IEC 61131-3 Ladder Logic
The international standard that unifies PLC programming across vendors. Uses VAR blocks and symbolic addressing. Widely supported by Codesys, Siemens TIA Portal (LD), and most modern PLCs.
The same Button to Light, Seal-In (Motor Start/Stop), AND Gate, OR Gate, and TON On-Delay programs written in 9 PLC dialects. Click any cell to copy — no account required.
Want hands-on practice in any of these dialects? Pro tier unlocks all 9 — simulate real machines, earn a certificate.
Try a lesson| Program | IEC 61131-3 | Allen-Bradley | Siemens STL |
|---|---|---|---|
Button to LightA momentary push-button directly energises an output coil. The simplest possible rung.boolean | | | |
Seal-In (Motor Start/Stop)Classic 3-wire motor control: START latches the motor output via its own feedback contact; STOP (NC) breaks the seal.boolean | | | |
AND GateOutput energises only when both inputs are simultaneously active — the fundamental series rung.boolean | | | |
OR GateOutput energises when either input is active — the fundamental parallel rung.boolean | | | |
TON On-DelayOutput turns on after the start input has been active. IEC/AB show a real TON timer block; other dialects show an equivalent latch pattern.timer | | | |
The international standard that unifies PLC programming across vendors. Uses VAR blocks and symbolic addressing. Widely supported by Codesys, Siemens TIA Portal (LD), and most modern PLCs.
Rockwell Automation's instruction set uses XIC, XIO, OTE mnemonics and file-based addresses (I:0/0). Powers the MicroLogix, SLC-500, and ControlLogix families.
Step 7 / TIA Portal's low-level text language. Boolean stack instructions:A (AND), O (OR), = (coil). Often called "Siemens ladder logic" by practitioners.
Uses LD, AND, OR, OUT with native X/Y/M device addressing. Dominant in Japanese automotive and semiconductor manufacturing.
Similar mnemonics to IEC IL but with two-token negation:LD NOT, AND NOT, OR NOT. Channel-based addressing (e.g. 0.00).
Popular in cost-sensitive OEM markets. Uses octal-group addressing (X0–X7 = first 8 inputs). ANI /ORI for normally-closed contacts instead of separate NC tokens.
A tested learning subset using R, MR, and DM devices with KV-style contact, coil, timer, counter, and arithmetic mnemonics.
Industrial automation sites often run multiple PLC brands — an Allen-Bradley ControlLogix on the packaging line, a Siemens S7 on the press, Mitsubishi on the conveyor. Technicians who can read and translate between dialects are far more flexible and valuable. This free reference shows the same logic in each dialect so you can spot the patterns quickly: seal-in in AB looks like XIC START OR XIC MOTOR AND XIO STOP OTE MOTOR; in Siemens it is A START / O MOTOR / AN STOP / = MOTOR. Same concept, different syntax.
All programs on this page are live — you can open them in the Open in editor links or copy the code and paste it into the simulator's editor to run it against real machine scenarios.