Programmierung

Ladder Logic

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.

📺 Video Lesson

Contacts & Coils

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.

Ladder Logic
Rung 1:
[ Sensor_A ]---[ NOT E_Stop ]---( Motor_Run )

Rung 2:
[ Motor_Run ]---( Run_Lamp )
Exercise 1

If Sensor_A is TRUE and E_Stop is FALSE, what is the state of Motor_Run?

Follow the rung left-to-right: both contacts must be TRUE.

Timers (TON)

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.

Ladder Logic
Rung 3:
[ Start_PB ]---[TON T1 PT:=T#3s]
                     Q: Timer_Done

Rung 4:
[ Timer_Done ]---( Conveyor_Run )
Exercise 2

How long after Start_PB goes TRUE will Conveyor_Run activate?

Look at PT (Preset Time) in the TON block.

Set / Reset Coils

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.

Ladder Logic
Rung 5:
[ Start_PB ]---( S Motor_Run )

Rung 6:
[ Stop_PB  ]---( R Motor_Run )
Exercise 3

After Start_PB pulses TRUE then FALSE, is Motor_Run still on?

Set coils retain their state after the condition goes FALSE.

Tutorial complete

Ready for more?