Ladder Logic for Beginners: Rungs, Contacts, Coils and the Scan Cycle
Ladder logic explained for beginners: rungs, contacts, coils, the PLC scan cycle, series AND, parallel OR, and the seal-in circuit with examples.
Ladder logic is where almost everyone starts PLC programming, and for good reason: it looks like the relay wiring diagrams that ran factories for half a century before PLCs existed. If you can read a rung, you can troubleshoot most industrial machines on earth. This guide teaches ladder logic for beginners from zero — what rungs, contacts and coils actually mean, how the PLC scan cycle executes them, and the one circuit (the seal-in) that unlocks everything else.
Ladder Logic for Beginners: What a Rung Really Is
A ladder program is drawn between two vertical power rails. Each horizontal rung is one statement of logic, read left to right: if the conditions on the left are true, energize the thing on the right.
Three symbols do most of the work:
Normally-open contact -| |- — examines a BOOL variable and passes power if it is TRUE. Think "is the button pressed?"
Normally-closed contact -|/|- — passes power if the variable is FALSE. Think "is the button not pressed?" (Crucial subtlety: the symbol describes the logic test, not the physical switch. Real stop buttons are wired normally-closed for fail-safety, so their PLC input is TRUE when the machine is healthy — which is why a stop button usually appears as a normally-open contact in Allen-Bradley programs and trips beginners up everywhere.)
Coil -( )- — writes the rung's result to a variable. TRUE if power reached it, FALSE if not.
Two arrangements give you all of Boolean logic:
- Contacts in series = AND. Power must get through every one.
- Contacts in parallel (a branch) = OR. Power needs any one path.
That's it. Every interlock chain you will ever read is series and parallel contacts feeding a coil.
The Scan Cycle: Why Ladder Isn't Electricity
The picture looks like electricity flowing, but a PLC actually runs a loop called the scan cycle, typically every 1–20 ms:
- Read inputs — snapshot all physical inputs into memory.
- Execute logic — evaluate every rung, top to bottom, using that snapshot.
- Write outputs — copy the coil results to the physical output terminals.
Three consequences matter from day one:
- Rung order matters. A coil written on rung 10 and examined on rung 2 delivers its previous scan's value — a built-in one-scan lag.
- The last write wins. If two rungs drive the same coil, only the lower rung's result reaches the real output. One coil, one rung — treat it as law.
- Fast events between snapshots can be missed — and slow events are seen many times. A half-second button press at a 10 ms scan is TRUE for ~50 consecutive scans, which is exactly why counters need edge detection (more on that in PLC Counters Explained).
The Seal-In: The First Circuit Worth Memorizing
Here is the start/stop motor circuit, the "hello world" of industrial control:
Start Stop Motor
----| |--------|/|----------( )----
| |
| Motor |
----| |----
Press Start: power flows through the Start contact and the (healthy, TRUE) Stop input, and the Motor coil turns on. Release Start: the parallel Motor contact — the motor examining its own coil — now carries the power. The rung has sealed itself in. Press Stop: the normally-closed contact opens, the coil drops, the seal breaks, and the motor stays off until Start is pressed again.
In one rung you've met memory (the seal), fail-safe stop wiring, and feedback. The same logic in Structured Text is a single line, which is a good way to see that ladder is a notation, not a different kind of thinking:
PROGRAM StartStop
VAR
Start, Stop_OK, Motor : BOOL; (* Stop_OK is TRUE while the NC stop button is unpressed *)
END_VAR
Motor := (Start OR Motor) AND Stop_OK;
END_PROGRAM
The rung is that expression: parallel branch = OR, series contacts = AND.
Beyond Contacts: Timers and Counters on Rungs
Real programs need time and counting, and IEC 61131-3 provides standard function blocks that sit on a rung like a box:
- TON (on-delay):
Qturns TRUE only afterINhas been TRUE for preset timePT. "Run the fan 5 s after the burner starts." - TOF (off-delay):
Qstays TRUE forPTafterINdrops. "Keep the fan running 30 s after shutdown." - CTU (up-counter): increments on each rising edge of
CU;Qgoes TRUE at presetPV.
Each of these keeps internal state, so each gets an instance name, and each instance is used in exactly one place. We walk through all of them with both ladder and FBD views in PLC Timers Explained: TON, TOF and TP.
Reading Discipline: How Professionals Keep Ladder Sane
- One rung (network) per output. Conditions are cheap; duplicate coils are bugs.
- Order rungs in signal-flow order — permissives first, actuators last — to avoid one-scan surprises.
- Name variables for their TRUE meaning (
StopOK, notStop) so normally-closed wiring stops being confusing. - Comment the why, not the what.
Start AND NOT Faultis legible; why Fault includes the door switch is not.
Practice Beats Reading
Ladder logic is small enough to learn in an afternoon and deep enough to troubleshoot for a career, and the fastest route is to build the seal-in yourself, watch the power flow animate, and then break it on purpose. You can do that in your browser with the PLC-Ladder simulator — draw the three-contact rung above, toggle Start and Stop, and watch the seal hold. Then try the same program in the FBD view to see the identical logic as gates; our Function Block Diagram Complete Tutorial picks up exactly there. When timers enter the picture, continue with PLC Timers Explained — between those three posts and a simulator, you'll cover a genuinely surprising fraction of what working PLC programs contain.Visit to PLC-Ladder.com