Ladder logic simulator (LAD)
A ladder program really makes sense when you watch the “power” flow through the contacts while you press the buttons. This simulator runs a scan every 50 milliseconds, just like a PLC: it reads the inputs, executes the networks from top to bottom and writes the outputs. Whatever conducts is drawn in green. Choose a circuit, press the field buttons and work through the challenges below.
Inputs (what is in the field)
Outputs
Try this
How to read the simulator
- Push buttons are active while you hold them down; switches change state each time you press them. Under each one you can see its physical state, how it is wired and the value the PLC gets on its input.
- The number under each contact or coil is the value of its tag in that scan: 1 or 0.
- Green means power reaches that part of the rung. A normally open contact conducts when its tag is 1; a normally closed one, when it is 0.
- With Pause and One scan you can step scan by scan and see exactly when each thing changes.
What each circuit teaches
- Start/stop with seal-in: why a stop button wired normally closed is programmed with a normally open contact, and how the output itself keeps the motor running.
- Forward/reverse with interlock: how to stop two incompatible outputs from turning on together in the program.
- On-delay timer (TON): how a timer filters out a signal that does not last long enough.
- Part counter (CTU): why counters count edges, not levels.
- Double coil: the classic mistake of writing the same output in two networks, and why the last one wins.
- Set and reset (S and R): how an output is latched, and what happens when it is set and reset in the same scan.
Why the scan cycle matters
A PLC does not react to an input at the instant it changes. It copies all the inputs into memory at the start of the scan (the process image), runs the whole program with those values and only then writes the outputs. That is why a coil written twice ends up with the value of the last network, and why a push button pressed for less than one scan can be missed. Once you understand this, most “strange” program behaviour stops being strange.
To understand the topic in depth: Ladder logic (LAD) in TIA Portal, with theory and a practice test.