PLC Simulator
Ladder logic

PLC Ladder Logic Simulator — Free, Browser-Based.

Write rungs, press Run, and watch contacts pass power in real time. Full IEC 61131-3 instruction set — contacts, coils, timers, counters, edges, compare, math, PID. No install.

Ladder logic 101

What is ladder logic?

Ladder logic is the graphical PLC programming language that looks like an electrical relay schematic rotated 90 degrees. Two vertical power rails sandwich a series of horizontal "rungs". Each rung reads left to right: contacts (inputs) in series and parallel combinations, then a coil (output) at the far right. If power flows all the way across, the coil energises. If it does not, the coil de-energises.

The language was designed in the 1970s for electricians who already knew how to read relay drawings. That legacy is still why ladder logic dominates discrete control: it is the one PLC language that a hardware-first technician can read on day one without a computer-science background.

Under the hood, every rung is a Boolean expression evaluated once per scan. The simulator parses your rung into an expression tree, walks the tree against the current IO image, and sets the coil. Repeat for every rung, in order, from top to bottom. That is the whole model.

Evaluation criteria

What makes a good ladder logic simulator?

If you are picking one, these are the five tests that matter.

  1. 1

    It parses the dialect you actually use.

    If your plant runs Studio 5000, a simulator that only speaks Codesys is useless. Good simulators support multiple dialects and let you switch on any rung. We support IEC 61131-3, Allen-Bradley, and Siemens.

  2. 2

    It executes a real scan cycle.

    Not a sequential script that "acts like" a PLC, but a three-phase loop: input-image update, rung execution, output-image update. This is what makes timer behaviour, edge detection, and multi-coil interactions behave like hardware.

  3. 3

    It models function blocks to spec.

    A TON with a preset of 500 ms should set its .Q output exactly 500 ms after its input goes true, regardless of scan time. A CTU should increment on rising edges only, not on every scan where the input is true. Cutting corners here creates programs that pass in simulation and fail on real hardware.

  4. 4

    You can inspect the IO table and internal bits.

    Debugging ladder logic without a live view of every tag is like debugging C without a debugger. Every address, every internal bit, every timer accumulator should be watchable during a run. Our editor renders them in a sidebar.

  5. 5

    It is ungated.

    No Windows-only install, no paid license, no $2,000 vendor IDE, no admin rights required. If a student or interview candidate cannot open the tool in under thirty seconds, the tool fails its core job. This is the hardest criterion for traditional simulators to meet.

Live demo

See a rung pass power in real time.

The Traffic Light scenario is ungated — open it in a new tab and watch the ladder simulator execute each scan against an animated intersection. The pedestrian walk button, all-red phase, and timer chain are the whole scenario; the rung visualiser highlights which contacts are passing power as your program runs.

  • • Rungs in IEC 61131-3, AB, or Siemens syntax
  • • Live IO table — every input, every coil, every internal bit
  • • Timer accumulators update in real time
  • • Scripted test cases with pass/fail on each objective
  • • Phaser-rendered machine scene tied to your output coils
Supported elements

Every ladder instruction you need.

The simulator implements the IEC 61131-3 core instruction set, with AB and Siemens aliases mapped to the same execution primitives.

Contacts
  • XIC / --] [-- (normally open)
  • XIO / --]/[-- (normally closed)
Coils
  • OTE / OUT (standard coil)
  • OTL / SET (latch)
  • OTU / RESET (unlatch)
Timers
  • TON (on-delay)
  • TOF (off-delay)
  • TP (pulse)
Counters
  • CTU (count up)
  • CTD (count down)
  • CTUD (up / down)
Edges
  • R_TRIG (rising edge)
  • F_TRIG (falling edge)
Compare
  • EQ, NE (equality)
  • GT, GE, LT, LE (relational)
Math
  • ADD, SUB, MUL, DIV, MOD
Control
  • PID function block
  • JMP / LBL (program flow)
Example rungs

Example: Motor start-stop in ladder logic.

The classic three-wire seal-in rung, extended with a fault-handling branch. This is the canonical beginner exercise: START is a momentary push-button, STOP is normally closed, and the coil latches via its own auxiliary contact. We add E-stop, thermal overload, and a stuck-contactor timer for a more realistic industrial rung.

VAR
  START_PB        AT %I0.0 : BOOL;
  STOP_PB         AT %I0.1 : BOOL;
  ESTOP           AT %I0.2 : BOOL;
  THERMAL_OL      AT %I0.3 : BOOL;
  MOTOR_AUX       AT %I0.4 : BOOL;
  MOTOR_CONTACTOR AT %Q0.0 : BOOL;
  RUN_LAMP        AT %Q0.1 : BOOL;
  FAULT_LAMP      AT %Q0.2 : BOOL;
  RUN_BIT         : BOOL;
  FAULT_BIT       : BOOL;
  T_STUCK         : TON;
END_VAR

T_STUCK(IN := MOTOR_AUX AND NOT MOTOR_CONTACTOR, PT := 500);

| ESTOP OR THERMAL_OL OR T_STUCK.Q | S= FAULT_BIT ;
| STOP_PB AND /ESTOP AND /THERMAL_OL AND /T_STUCK.Q | R= FAULT_BIT ;

| START_PB AND /FAULT_BIT | S= RUN_BIT ;
| STOP_PB OR ESTOP OR THERMAL_OL | R= RUN_BIT ;

| RUN_BIT AND /FAULT_BIT | := MOTOR_CONTACTOR ;
| RUN_BIT AND /FAULT_BIT | := RUN_LAMP ;
| FAULT_BIT              | := FAULT_LAMP ;

Open this exact source in the editor at /scenarios/motor-start-stop. Switch dialect to see the equivalent Allen-Bradley ladder logic or Siemens ladder diagram rendering.

Questions

Frequently asked.

Five tests: does it parse the dialect you actually use? Does it execute a real three-phase scan cycle (not a sequential script)? Does it model timer and counter function blocks to spec? Can you inspect the IO table and internal bits at runtime? Is it ungated — no paid license, no Windows-only install — so you can iterate from anywhere?

Write a rung. Watch it run.

The ladder simulator is ungated for the first two scenarios. Open one in your browser and have a passing program inside ten minutes.

Related: PLC programming simulator · Allen-Bradley simulator · Siemens simulator · Ladder diagram simulator.