PLC Simulator
examples
ladder logic
hub

PLC Programming Examples: A Curated Hub of Worked Ladder Logic

By PLC Simulation Software8 min read

PLC Programming Examples

The fastest way to learn PLC programming is to read worked examples, then rebuild them yourself. This hub collects our best ladder logic examples — sorted by category and difficulty — so you can find one that matches what you are trying to build and open it in a free browser PLC simulator without installing anything.

Every example below links to a full walkthrough with the ladder logic, the I/O list and the reasoning behind each rung. Start with the start/stop seal-in if you are new, then work down the list as the concepts stack on each other.

A curated hub of worked PLC programming and ladder logic examples

How the examples are organised

We group examples into four families. Almost every real machine program is a mix of these, so learning one example from each gives you a toolkit that transfers everywhere.

Four categories of PLC programming examples: motor control, sequencing, process and sensing

  • Motor control — starting, stopping and protecting motors and actuators.
  • Sequencing — making things happen in a fixed order, often on timers.
  • Process control — holding a temperature, level or flow at a setpoint.
  • Sensing & logic — turning raw sensor inputs into clean, debounced signals.

The "hello world" of ladder logic: start/stop seal-in

Before any of the larger examples, get the start/stop seal-in rung straight. A momentary Start button latches a motor on, the motor seals itself in around the start contact, and a normally-closed Stop button drops it. It is the single most reused pattern in industrial control.

Start stop seal-in ladder rung, the canonical first PLC programming example

Read the full walkthrough in seal-in rungs explained — it covers why the Stop contact is wired normally-closed and how the seal-in branch holds the coil. Once that clicks, the rest of the examples are variations on the same idea.

Examples at a glance

Here is every worked example in this hub with its difficulty and the core concepts it practises. Pick something one notch above what you already know.

Comparison table of PLC programming examples by difficulty and concepts practised

Motor control examples

These build directly on the seal-in pattern and add timing, interlocks and direction control.

Conveyor belt control

A conveyor is the classic next step after start/stop: you add a run-on timer so the last part clears the belt, photo-eye interlocks, and often a jam-detect rung. See conveyor belt PLC programming for the full ladder logic.

Pump control

Pump logic introduces lead/lag duty sharing, dry-run protection and level-based start/stop using float switches. The worked example in PLC pump control shows how to alternate two pumps so they wear evenly.

Sequencing examples

Sequencing is where timers and counters earn their keep — steps fire in order, each waiting on the one before it.

Traffic light controller

The traffic light is the textbook sequencing exercise: a fixed loop of states driven by on-delay timers, with a clear safety constraint (never two greens at once). Walk through it in traffic light PLC programming.

Bottle filling line

A filling line chains sensing, a fill valve, a dwell timer and a part counter into one repeating cycle. The bottle filling PLC example is a great bridge between simple sequencing and a real production cycle.

Elevator control

An elevator adds request queuing and direction logic on top of sequencing — the most involved example in the hub. The elevator PLC programming walkthrough breaks the call logic into manageable rungs.

Process control examples

Process examples hold a measured value at a setpoint rather than just switching things on and off.

Temperature control

Bang-bang and hysteresis control of a heater is the gentlest introduction to process logic — turn the heater on below the lower limit, off above the upper limit. See PLC temperature control for the ladder and the deadband maths.

HVAC control

HVAC combines temperature control with sequencing (staged heating/cooling) and interlocks (don't run the compressor and the heater together). The HVAC PLC programming example ties several patterns together.

Sensing & logic building blocks

These are not full machines, but you will drop them into almost every program above.

Timers — TON, TOF and TP

Nearly every example on this page uses a timer somewhere. If on-delay, off-delay and pulse timers are still fuzzy, start with PLC timers explained and its timing diagrams.

Counters — CTU and CTD

Count parts, batches or cycles with up and down counters. The PLC counters CTU and CTD example shows the count, reset and done-bit behaviour you'll reuse in the bottle-filling line.

How to practise an example so it sticks

Reading an example is not the same as understanding it. Work through each one like this:

Checklist for practising a PLC programming example effectively

The non-negotiable step is rebuild it from scratch without looking. If you can recreate the rungs from a blank editor and explain why each one exists, you own the pattern.

Which example should you start with?

If you are not sure where to jump in, follow your current level rather than the topic that sounds most interesting.

Flowchart for choosing a PLC programming example by your experience level

Beginners should always start at the seal-in rung even if it feels too simple — every later example assumes it.

Run any of these in your browser

You don't need vendor software or hardware to follow along. Every example here can be built and tested in the free browser PLC simulator: wire the inputs, write the ladder logic, force a contact and watch the coil energise in real time. When you want a guided version with checks and a pass condition, open the matching task in the scenarios library and build it against test cases.

Bookmark this page — we add new worked examples regularly, and each one links back here so the whole set stays one click away.

FAQ

What is the best first PLC programming example? The start/stop seal-in rung. It is the most reused pattern in industrial control and every other example on this page builds on it.

Are these ladder logic examples free to try? Yes. Every example links to a walkthrough you can rebuild for free in the browser PLC simulator — no install, no hardware.

What is the difference between an example and a scenario? An example is a written walkthrough with the ladder logic explained rung by rung. A scenario is the same task set up in the simulator with test cases and a pass condition so you can verify your own solution.

In what order should I work through these examples? Start with the seal-in rung, then conveyor and pump (motor control), then traffic light and bottle filling (sequencing), then temperature and HVAC (process), pulling in the timer and counter building blocks as you need them.

Share:X / TwitterLinkedIn

Practice this yourself in the simulator

3 scenarios free — no install, no credit card. Write real ladder logic against a live machine model.

Try the simulator free →

Related articles

plc programming
encoder

PLC Encoder Programming Examples: Delta, Siemens, Allen-Bradley, Mitsubishi

Practical PLC encoder programming examples for Delta, Siemens S7-1200, Allen-Bradley CompactLogix, and Mitsubishi FX. Covers high-speed counter setup, quadrature mode, homing, and position-based output control in each dialect.

June 12, 2026 · 12 min read
analog
examples

Analog Input PLC Programming Examples (4 Worked, With the Maths)

Four fully worked analog input PLC programming examples: 4-20mA to PSI scaling (including the 4mA offset trap), tank level %, temperature with deadband, and valve % output. The maths shown, wiring noted, Allen-Bradley and Siemens dialect explained.

June 11, 2026 · 15 min read
ladder logic
function block

Ladder Logic vs Function Block Diagram: When to Use Each

Ladder logic suits discrete interlocks and relay replacement; function block diagram suits analog, PID, and reusable logic. Compare LD vs FBD and pick the right one.

June 7, 2026 · 8 min read