Ladder Logic, Relay Ladder Logic, or Ladder Diagrams is the most common programming language used to program a PLC.
Ladder logic was one of the first programming approaches used in PLCs because it borrowed heavily from the Relay Diagrams that plant electricians already knew.
The symbols used in Relay Ladder Logic consists of a power rail to the left, a second power rail to the right, and individual circuits that connect the left power rail to the right. The logic of each circuit (or rung) is solved from left to right. The symbols of these diagrams look like a ladder – with two side rails and circuits that resemble rungs on a ladder.
The picture above has a single circuit or “rung” of ladder.
- If Input1 is ON (or true) – power (logic) completes the circuit from the left rail to the right rail – and Output1 turns ON (or true).
- If Output1 is OFF (or false) – then the circuit is not completed and logic does not flow to the right – and Output 1 is OFF.
There are many logic symbols available in Ladder Logic – including Timers, Counters, Math, and Data Moves – such that any logical condition or control loop can be represented in Ladder Logic. With just a handful of basic symbols – a Normally Open Contact, Normally Closed Contact, Normally Open Coil, Normally Closed Coil, Timer, Counter – most logical conditions can be represented.