How to read ladder logic, one rung at a time

Ladder logic looks like an electrical drawing because it started as one. Once you know about six symbols, most of a real machine program becomes readable.

Ladder logic is read left to right, top to bottom. Each rung is a condition on the left and an action on the right, between two vertical rails. XIC (normally open contact) is true when its bit is 1, XIO (normally closed) is true when its bit is 0, and OTE turns its bit on while the conditions before it are true. Contacts in series are AND, parallel branches are OR, and boxes such as TON timers and MOV moves do work on numbers.

Rails, rungs and the scan

The left rail is power, the right rail is return. The controller evaluates rungs top to bottom, each one left to right, then repeats, many times a second. If there is a true path from the left rail to an output, the output acts. Because the scan is ordered, a later rung can overwrite what an earlier one did.

The six instructions you'll see most

  • XIC (examine if closed), drawn -| |-: true when the bit is 1.
  • XIO (examine if open), drawn -|/|-: true when the bit is 0. Stop buttons wired normally closed often appear here.
  • OTE (output energise), drawn -( )-: bit is 1 while the rung is true, 0 when it isn't.
  • OTL / OTU (latch / unlatch), -(L)- and -(U)-: set and reset a bit that stays put.
  • TON: a timer box. When its rung is true it counts its Accum up to Preset (milliseconds), then sets .DN.
  • MOV: copies Source to Dest when the rung is true.

AND, OR and the seal-in

Contacts one after another are AND. Branches stacked vertically are OR. The classic motor start rung combines both: a Start contact in parallel with the motor's own Run bit, then a Stop contact in series, driving the Run coil. Press Start, Run turns on and holds itself in through the branch until Stop breaks the path. In neutral text: [XIC(Start_PB),XIC(Motor_Run)]XIO(Stop_PB)OTE(Motor_Run);

Practising on real programs

Open any L5X in Rungview free and click a tag to see everywhere it's used. Following one output back through the rungs that permit it is the fastest way to learn how real machines are programmed.

Read a real program

Open any L5X free and follow the logic rung by rung.

FAQ

What does the .DN bit on a timer mean?

Done: the accumulated time has reached the preset. .EN is enabled and .TT is timing.

Why does my output never turn on even though the rung looks true?

Another rung may write the same bit later in the scan. Check the tag's cross-reference for a second OTE or an OTU.

Is Structured Text replacing ladder?

Many modern projects mix both. Ladder stays common for discrete logic and troubleshooting on the floor.

Studio 5000 and ladder logic guides