Every ladder logic program in industry is built from a small set of recurring patterns. This page explains eight of them — with inline pattern diagrams and links to 130+ live browser scenarios where you can run each pattern yourself. No install. No screenshots.
Join 800+ learners practicing PLC programming
First scenarios free. Create a free account to start.

Why patterns matter
A motor start/stop circuit is not invented from scratch each time — every controls engineer recognises the seal-in rung immediately. An interlock blocking two contactors from energising simultaneously is a known pattern. A timer cascade advancing a timed sequence step by step is a known pattern. When you know the patterns, you read unfamiliar PLC programs quickly because you recognise the structures rather than decoding every rung individually.
The patterns below cover the building blocks of approximately 80% of discrete machine control programs. Learning them is not about memorising rungs — it is about understanding what problem each pattern solves and why it is structured the way it is.
Each pattern on this page includes a structural diagram (pattern shape only — no complete program, no tag addresses), a plain-English explanation of what it does and when it is used, and links to the live scenarios on this platform that exercise that exact pattern. The scenarios are the place to build the pattern yourself. This page is the conceptual foundation.
The most common ladder circuit in industry
A momentary Start pushbutton energises an output coil. A parallel contact — fed by the same output bit — holds the coil energised after the Start button is released. A normally-closed Stop contact in series with the parallel branch breaks the circuit on demand. The output coil "seals itself in" through its own contact.
Virtually every motor circuit. Conveyor drives. Pump contactors. Any load that must stay on after a momentary start command and turn off on a momentary stop command. The pattern also appears in alarm latches, fault holds, and mode-enable circuits where any version of seal-in logic is required.
Pattern structure (concept only)
Preventing two outputs from being simultaneously true
Two outputs (A and B) must never both be energised at the same time. A normally-closed contact of output A is placed in series with the rung driving output B, and vice versa. If A is true, its NC contact in the B rung opens, blocking B. This is a software interlock; in real panels it is always paired with a hardwired electrical interlock (wired NC contacts across the physical contactors).
Forward/reverse motor drives where reversing a spinning motor is mechanically destructive. Star and delta contactors in a star-delta starter — energising both simultaneously would short two motor terminals. Dual-coil solenoid valves where both coils energised is a fault state. Any dual-output exclusion requirement.
Pattern structure (concept only)
Triggering logic on the rising or falling edge of a signal
A one-shot (OSR/R_TRIG) instruction produces a single-scan true output on the rising edge of its input signal — regardless of how long the input stays true. A standard normally-open contact stays true for as long as the input is true; the one-shot is true for exactly one scan. The equivalent falling-edge instruction (OSF/F_TRIG) triggers on the 0→1→0 transition.
Counting items on a conveyor — a photoelectric sensor sees each item for multiple scans; the one-shot ensures each item counts as exactly one pulse. Incrementing a counter only once per button press even if the button is held. Triggering a timed delay on the first scan that a condition becomes true. Detecting the leading edge of a process alarm before it is acknowledged.
Pattern structure (concept only)
Chaining TON timers to step through a timed sequence
Multiple TON (on-delay) timers are chained so that the done bit of timer N enables the coil of timer N+1 and simultaneously de-energises the output for step N. Each step occupies a time window defined by its TON preset. When the final timer's done bit fires, it resets the chain and the sequence repeats from step 1. The done bit of each timer in the chain also drives its corresponding output.
Traffic light sequencing — the canonical example. Machine warm-up sequences with timed dwell phases. Wash cycle timers in a CIP or dishwash sequence. Alarm acknowledgement timeout windows. Any application where a series of outputs must each be active for a fixed duration in a repeating cycle.
Pattern structure (concept only)
Counting events and triggering logic at a threshold
A CTU (count-up) instruction increments its accumulator by one on each rising edge of its count input. When the accumulator reaches the preset value, the done bit goes true. A CTD (count-down) decrements from the preset to zero. The accumulator can be read at any time for display or comparison logic. A reset coil sets the accumulator back to zero.
Counting boxes on a conveyor and triggering a diverter or stop signal at the batch size. Counting pump starts for maintenance hour scheduling. Counting parts through a machine cycle to verify correct operation. Tracking occupancy (entry CTU − exit CTU = current count). Any scenario where cumulative events drive a threshold action.
Pattern structure (concept only)
Latching and unlatching a bit with separate coil instructions
A SET (latch) coil instruction sets its bit true when its rung goes true and holds it true even when the rung goes false — the bit remains latched until a RESET (unlatch) instruction on a separate rung sets it false. Unlike a seal-in circuit, the SET/RESET latch is controlled by two completely independent rungs. In IEC syntax this is the S and R coil pair; in Allen-Bradley it is OTL (Output Latch) and OTU (Output Unlatch).
Fault latch circuits where an alarm state must persist until an operator resets it — even across a power cycle if stored in retentive memory. Mode-select logic where pressing a mode button sets a mode bit and pressing another mode button resets it. Any scenario where set and reset conditions are physically or logically separate enough that combining them in a seal-in rung would be confusing.
Pattern structure (concept only)
Requiring all safety conditions to be clear before allowing a start
A permissive is a condition that must be satisfied before a machine action is allowed. Multiple permissives are wired in series in the logic — each as a normally-closed contact for a fault bit, or a normally-open contact for a ready bit. Every permissive in the chain must be true simultaneously for the permissive rung output to be true. The permissive rung output then gates the start command. A single failed permissive blocks the entire chain.
Boiler startup: purge complete AND gas pressure OK AND no flame present must all be true before pilot ignition is permitted. Conveyor start: guard door closed AND e-stop reset AND upstream conveyor running must all be true before the drive can start. Any machine with multiple independent safety or readiness conditions that must all be verified before motion is permitted.
Pattern structure (concept only)
Organising complex machine behaviour into named states with defined transitions
A state machine assigns an integer step counter (or a set of mutually exclusive state bits) to represent which phase of the machine cycle is currently active. Each rung in the program is conditioned on the current step value. Transition logic advances the step counter when the exit conditions for the current step are met. Only one step is active at a time, and only the rungs for that step execute.
Garage door controllers where the door can be Opening, Open, Closing, Closed, or Faulted. Batch mixer sequences where the machine moves through Fill, Mix, Heat, Hold, Drain, and Clean phases. Elevator controllers where the cab can be Idle, Moving Up, Moving Down, Door Opening, Door Open, or Door Closing. Any machine with a defined sequence of named operating modes where the active mode determines what the PLC should be doing.
Pattern structure (concept only)
Why runnable wins
A screenshot of a ladder diagram explains the structure but not the behaviour. When you run the same circuit in a live simulation and watch the seal-in contact hold the motor on after you release the Start button — or watch the interlock block the reverse contactor when the forward contactor is energised — the pattern shifts from something you recognise to something you understand. That difference is what the grader measures.
Each pattern on this page links directly to a scenario in the catalogue. Open it in a new tab, write the rung, run it. The grader tests that your circuit behaves correctly under the test inputs — not just that it compiles.
You can implement a seal-in as a parallel contact or as a SET coil. The grader does not care about the method — it tests whether the output stays true after the start input goes false and goes false when the stop input fires. Correct behaviour is the standard.
The advanced scenarios combine multiple patterns from this page. The elevator uses seal-in, interlock, state machine, and safety permissive chains together. Recognising the individual patterns inside the larger program is the skill industrial employers test in interviews.
Quick reference
Triggering logic on the rising or falling edge of a signal
Organising complex machine behaviour into named states with defined transitions
Keep learning
Every pattern above links to a live scenario. Free account. Browser-based. Real grader.
No install. No vendor licence. Real scan cycle, real grader. Free to start.