Programmierung
Ladder Logic (LD) is the most widely used IEC 61131-3 language. Modelled on relay logic circuits, it is graphical, intuitive, and universally supported by every PLC vendor.
The two fundamental elements of Ladder: contacts represent inputs (conditions) and coils represent outputs (actions). A rung is TRUE when the logic path from the left rail to the coil is closed.
Rung 1:
[ Sensor_A ]---[ NOT E_Stop ]---( Motor_Run )
Rung 2:
[ Motor_Run ]---( Run_Lamp )
If Sensor_A is TRUE and E_Stop is FALSE, what is the state of Motor_Run?
TON (Timer On-Delay) is the most common timer block. It starts counting when its Enable input is TRUE. The Q output goes TRUE when the elapsed time reaches the preset.
Rung 3:
[ Start_PB ]---[TON T1 PT:=T#3s]
Q: Timer_Done
Rung 4:
[ Timer_Done ]---( Conveyor_Run )
How long after Start_PB goes TRUE will Conveyor_Run activate?
S (Set) and R (Reset) coils are latching: S sets the output TRUE and it stays TRUE even if the condition goes FALSE. R clears it. This is called a memory or latch circuit.
Rung 5:
[ Start_PB ]---( S Motor_Run )
Rung 6:
[ Stop_PB ]---( R Motor_Run )
After Start_PB pulses TRUE then FALSE, is Motor_Run still on?