Reading about contacts and coils is easy, but writing a working rung for a real motor or pump is where most students get stuck. These ten solved rungs show the I/O, the logic in plain words and the mistakes that cause trouble on site.
Ten solved PLC rungs with I/O tables cover motors, pumps, tanks, alarms and star delta starters. Each rung is explained in plain words, with common mistakes and a timer preset calculator.

Table of Contents
ToggleWhat Are PLC Ladder Logic Examples?
PLC ladder logic examples are small, solved programs that show how contacts, coils, timers and counters combine to control real machines such as motors, pumps and conveyors. Each example pairs an I/O table with a rung you can type into any PLC software and test.
- A seal in contact parallel to Start keeps a motor running after the button is released
- Interlocks use the opposite output as a normally closed contact so two outputs never run together
- TON delays switching on, TOF delays switching off, CTU counts rising edges
- Timer preset equals delay in ms divided by the time base in ms
If symbols like XIC and XIO are new to you, read our ladder logic basics for beginners first. Every rung here assumes a normal PLC scan cycle of read inputs, solve logic, write outputs.

How to Write a Ladder Logic Program
In all plc ladder logic examples, write each coil only once, because the last rung that writes a coil always wins. Our guide on PLC programming languages explains why ladder suits discrete logic.
Wire Stop and overload contacts as normally closed in the field, then use a normally open (XIC) instruction for them in the program. A broken wire then stops the motor instead of leaving it unstoppable.
10 PLC Ladder Logic Examples With I/O Tables
Addresses use the Siemens style I0.0 and Q0.0, but these plc ladder logic examples work in Allen Bradley, Delta or Mitsubishi software too. Change only the addresses.
Example 1: Seal In Circuit in Ladder Logic
| Tag | Address | Device |
|---|---|---|
| Start PB | I0.0 | NO push button |
| Stop PB | I0.1 | NC push button |
| Overload | I0.2 | NC relay contact |
| Motor | Q0.0 | Contactor coil |
When Start is pressed the coil turns on, and the parallel Q0.0 contact holds it on after the button is released. Pressing Stop or a trip of the thermal overload relay opens the series path and the motor drops out.
A seal in rung is safer than a SET and RESET pair, which is why it opens these plc ladder logic examples. After a power failure the output stays off until Start is pressed again.
Example 2: Forward Reverse Interlock
| Tag | Address |
|---|---|
| Forward PB | I0.0 |
| Reverse PB | I0.1 |
| Stop PB | I0.2 |
| Forward contactor | Q0.0 |
| Reverse contactor | Q0.1 |
Each rung holds a normally closed contact of the other output, so forward and reverse never run in the same scan. The contactors still need a hardwired interlock through their auxiliary contacts.
Example 3: Jog and Run Selection
In jog mode the motor runs only while Jog is held, useful for aligning a conveyor belt. A run bit M0.0 is latched by Start and Stop, and the output rung is XIC M0.0 OR XIC Jog I0.3, driving Q0.0.
Never put Jog in parallel with the seal in contact, or the motor latches on while jogging. Combine jog only at the output rung.
Southern Illinois University notes for course ET 438b point out that an NC Stop button is programmed with XIC, not XIO. PLC logic follows the input state, not the schematic symbol.
Ladder Logic Timer Examples
Timers appear in most plc ladder logic examples because real machines rarely switch at the instant a button is pressed. Our detailed article on TON, TOF and RTO timer instructions covers the status bits, while the two rungs below show them at work.
Example 4: ON Delay Timer for a Pump
| Tag | Address | Setting |
|---|---|---|
| Pump start command | M0.1 | From seal in rung |
| Timer | T1 (TON) | PT 5 s |
| Pump contactor | Q0.2 | Output |
The pump starts 5 seconds after the command, giving a suction valve time to open. When M0.1 turns off, the TON resets and the pump stops at once.
Example 5: OFF Delay Timer for a Cooling Fan
A heater output Q0.3 drives a TOF timer T2 with a preset of 60 s, and the DN bit of T2 drives the fan Q0.4. The fan starts with the heater and runs one minute after it turns off.
Students often swap TON and TOF here. Say the sentence aloud first, fan stops one minute after the heater stops, and the TOF choice becomes obvious.
Delay = 5 s = 5000 ms
Time base = 100 ms
Preset = 5000 ÷ 100
Preset = 50
Controllers such as the Allen Bradley SLC 500 store presets as counts of the time base, while IEC style timers take a direct time value. The calculator converts seconds into counts.
Example 6: Counter for Bottles on a Conveyor
| Tag | Address | Setting |
|---|---|---|
| Bottle sensor | I0.4 | PNP photo sensor |
| Counter | C1 (CTU) | PV 12 |
| Carton pusher | Q0.5 | Solenoid valve |
| Pusher home | I0.5 | Reed switch |
The counter adds one on each rising edge, so a bottle that stops at the sensor counts once. Pick the right type from our guide to NPN and PNP sensors.
Our page on CTU and CTD counter instructions covers accumulator limits and overflow. Very fast products need a high speed counter input.
Example 7: Tank Fill With Level Switches
| Tag | Address | Contact |
|---|---|---|
| Low level switch | I0.6 | On when water is below low |
| High level switch | I0.7 | On when water reaches high |
| Fill pump | Q0.6 | Output |
The pump starts when the level falls below the low switch, seals itself in, and stops only when the high switch operates. The gap between switches is a deadband that stops short cycling.
Confirm whether each switch is NO or NC when wet before writing the rung. See float level switch working and the guide to float switch wiring for both cases.
Example 8: Alternating Duty and Standby Pumps
Two pumps share wear when a toggle bit M1.0 flips at the end of each duty cycle. A one shot on the falling edge of demand flips M1.0, and the pump rungs read Pump A = demand AND XIO M1.0, Pump B = demand AND XIC M1.0.
Without a one shot the bit flips every scan, which is why the ONS, OSR and OSF instructions matter. Add a fault input so the healthy pump takes over.
Example 9: Alarm With Acknowledge
| State | Lamp | Horn |
|---|---|---|
| Fault active, not acknowledged | Flashing | On |
| Fault active, acknowledged | Steady | Off |
| Fault cleared, acknowledged | Off | Off |
A fault sets an alarm bit, and the Ack button latches an acknowledge bit while the alarm is active. The lamp rung is alarm AND (ack OR flasher bit), and the horn rung is alarm AND XIO ack.
This announce, acknowledge and clear sequence matches ISA 18.2 alarm states, covered in SCADA alarm management. For several trip inputs, the first out alarm logic shows which fault happened first.
Example 10: Star Delta Starter Sequence
| Tag | Address | Role |
|---|---|---|
| Main contactor KM1 | Q1.0 | Supply to motor |
| Star contactor KM3 | Q1.1 | Shorts winding ends |
| Delta contactor KM2 | Q1.2 | Run connection |
| Star timer | T3 (TON) | PT 7 s |
| Pause timer | T4 (TON) | PT 0.1 s |
The motor starts in star at reduced voltage, then switches to delta. Mutual XIO contacts and a short pause stop star and delta closing together, which would short the supply.
Set the star time by watching the motor reach near full speed. Compare the starter with others in DOL vs star delta starter, and see the induction motor working principle to understand why starting current falls in star.
- Drops out after power loss
- Stop is always dominant
- Standard for motor starters
- Can survive a power cycle
- Harder to trace during faults
- Useful for sequence step bits
Common Mistakes in Ladder Logic Programs
| Symptom | Likely Cause | Fix |
|---|---|---|
| Motor will not stop | Stop programmed with XIO on an NC button | Use XIC for NC field contacts |
| Output flickers | Same coil written on two rungs | One coil per output |
| Counter counts wrong | Sensor bounce or missing edge | Use a one shot or debounce timer |
| Motor restarts after power cut | SET coil used for motor | Use a seal in rung |
When one of your own plc ladder logic examples looks right but the machine misbehaves, follow our PLC troubleshooting steps. Watch the rung online and compare it with the real input lamps.
Run every rung in a simulator and toggle each input by hand before wiring field devices. Our list of PLC simulation software shows free options.
- Every output has exactly one coil
- Stop, overload and emergency stop are in series and wired NC
- Opposite outputs carry an XIO interlock
- Timer presets match the time base
- Motor rungs restart only after a fresh Start
After these rungs, move on to sequences, where the SQO and SQI sequencer instructions replace long chains of step bits. The ladder logic overview on Zenta Engineering is a useful revision page.
Real plants also scale analog signals, and the PLC raw count calculator helps there. Practise all ten plc ladder logic examples in free software before touching hardware.
The SIU lecture notes show a TON with a 0.01 s time base and a preset of 100 giving a one second delay. With a 1.0 s time base the same preset gives 100 seconds.
PLC Ladder Logic Examples FAQ
A seal in circuit places an output contact parallel to the Start button, so the output stays energised after the button is released. It drops out only when a series Stop or overload condition opens the rung.
This behaviour copies the holding contact of a hardwired contactor starter. It also stops the motor from restarting by itself after a power failure, which makes it safer than a latch coil.
The basic instructions are the normally open contact, the normally closed contact and the output coil. Timers, counters, compare and math blocks build on them, as most plc ladder logic examples show.
Allen Bradley calls the coil OTE and the contacts XIC and XIO, while Siemens uses other names. The logic itself works the same way in every brand of controller.
A TON timer waits for its preset time after the rung becomes true, then turns its done bit on. It resets as soon as the rung goes false again.
A TOF timer turns its done bit on as soon as the rung is true and keeps it on for the preset time after the rung goes false. Use TON for start delays and TOF for run on delays like cooling fans.
Divide the required delay in milliseconds by the timer time base in milliseconds. For a 5 second delay with a 100 ms base, the preset is 5000 divided by 100, which equals 50.
Check that the result stays below the preset limit of your controller, such as 32767 on an SLC 500. If it is higher, choose a larger time base or use a cascaded timer.
A normally closed Stop button keeps the input ON while everything is healthy. If the wire breaks or the terminal works loose, the input goes OFF and the motor stops safely.
In the program the Stop input is therefore used with a normally open instruction. Many students get this wrong because the schematic symbol and the ladder instruction look opposite to each other.
Related Articles
- Ladder Logic for Beginners
- PLC Timer Instructions TON TOF RTO
- PLC Counter Instructions CTU CTD
- First Out Alarm PLC Logic
- DOL vs Star Delta Starter
External References
- SIU ET 438b Lesson 19: PLC Programming Techniques (PDF)
- PLC Academy: Ladder Logic Examples and PLC Programming Examples
- Wikipedia: Ladder logic
What We Learn Today
- How to build start stop seal in, forward reverse interlock and jog rungs with clear I/O tables that work on any PLC brand you use.
- How TON, TOF and CTU instructions solve pump delays, cooling fans and bottle counting, plus how to calculate a timer preset from seconds.
- How plc ladder logic examples for tank filling, alternating pumps, alarm acknowledge and star delta starters are written, tested and debugged on site.

