Skip to content

Ladder logic and Structured Text

PLC programming examples you can run in your browser

Classic ladder logic and Structured Text programs. Each card opens a page that explains the program rung by rung. Or pick one and run it now: press Run and set the inputs yourself. You don't need an account.

Run an example

Ladder logic examples

Written as Neutral Text, drawn as ladder

Motor start/stop

Ladder (NT)

A latching start/stop station. Click Start once and the seal-in branch holds the motor on through its own contact until Stop breaks the rung.

StartStopMotor

Conveyor with dwell

Ladder (NT)

The belt runs, a 5-second timer gives it time to get up to speed, and only then does the ready lamp light. Watch the accumulator climb.

RunRequestDwellTimer.ACCReadyLamp

Bottle counter

Ladder (NT)

A photo-eye counts bottles into a case of six. Pulse the sensor and watch the count climb, then reset it for the next case.

BottleSensorBottleCount.ACCCaseFull

One-shot toggle

Ladder (NT)

One button turns a lamp on, and the same button turns it off. A one-shot makes each press count exactly once, however long you hold it.

ButtonPulseLamp

Forward/reverse interlock

Ladder (NT)

Two seal-in rungs that lock each other out. The motor has to stop before it can change direction.

FwdStartForwardReverse

Fan run-on

Ladder (NT)

The fan starts with the heater and keeps running for 10 seconds after it stops. A TOF off-delay timer holds it on.

HeaterRunOnTimer.ACCFan

Structured Text examples

IEC 61131-3

Tank level alarms

Structured Text

Level alarms with hysteresis, in Structured Text. Each alarm sets at one level and clears at another.

LevelHighAlarmFillValve

Traffic light sequencer

Structured Text

Three chained timers cycle forever with no input. Press Run and watch it go.

GreenAmberRed

L5X import example

A Studio 5000 program export

Pump station (L5X)

L5X import

An L5X program export with lead/lag pumps, program-scope tags and a JSR'd alarm routine.

TankLevelLeadPumpLagPump

Your own program

+ Or bring your ownImport an .L5X, paste Neutral Text or Structured Text, or start from an empty program.