PLC control for model railway
Couldn't load pickup availability
Description
You are looking for an SCL function block (FB_Zugsteuerung) that automatically controls two trains and a switch in defined steps – perfect for model or demo railways in the TIA Portal.
Note: All modules are designed exclusively as a learning and optimization basis and are not approved for live operation. System modules, in particular, must be finally tested and commissioned by qualified personnel before productive use.
How it works
- Stop signal active → both train motors off, switch in home position, step=0
- Step 0: wait for start → Signal track 1 green, switch straight for train 1
- Step 1: Train 1 travels to LS_Track1 → Stop, start 5-second timer
- Step 2: Timer expired → Signal Track 1 red
- Step 3: Switch on branch until EndSwitch1 is reached
- Step 4: Train 2 moves → Signal Track2 green, to LS_Track2, then stop
- After step 4: Signal track 2 red, reset to step 0
Technical details
• Inputs: Stop, Start, LS_Track1, LS_Track2, EndSwitch1
• Outputs: Motor_Train1, Motor_Train2, Switch1, SignalTrack1, SignalTrack2
• TON timer (PT=T#5s) for hold time in step 1
• Sequence control via INT variable step in CASE structure
• RETURN at Stop immediately interrupts all subsequent steps
Possible applications
• Model railway control in training and further education
• Demo stands at trade fairs or in sales
• PLC training projects and laboratories
• Retrofit and upgrade of existing systems
compatibility
• Siemens S7-1200 & S7-1500
• TIA Portal V13 or higher; recommended V16+ for PLCSIM & HMI visualization
Scope of delivery
• .scl file with declaration of all inputs/outputs, timer instance, state transitions and comments
• Download link immediately after purchase
Support
Adjustment of stop times, additional switch or signal positions, expansion to include additional trains or HMI layouts on request via shop message or email.