Selection guide
Ladder logic simulator selection by instruction coverage
Short answer
Score a ladder logic simulator by instruction coverage, proven with execution rather than animation. Build one test rung per instruction class - on-delay and off-delay timers, a seal-in and a set/reset bit across a restart, an up counter, and math with negative and limit values - and compare observed behavior with the standard's timer definitions. A tool that holds the elapsed value after the timer input drops, or wraps integer overflow silently, is out for sequence work; a tool that passes every class goes on the shortlist.
On this page
Pick the ladder logic simulator that executes every instruction class your sequence needs, and prove it with one test rung per class before you trust it with a project. An editor that draws power flow across contacts and coils teaches Boolean thinking, but it cannot validate logic that depends on elapsed time, bits that survive a restart, or arithmetic at a data-type limit. The broader tool categories are covered by choosing a PLC ladder logic simulator for practice and by what a browser PLC simulator can and cannot teach; this article is the acceptance test you run inside whichever tool those lead you to, with the numbers, the standard and the decision for each class.
List the instruction classes before comparing tools #
Write down what the target program actually uses before you evaluate any tool. Most sequencing work needs this minimum set: normally open and normally closed contacts, output coils, an on-delay timer, an off-delay timer, an up counter with a reset, one latching method (a seal-in branch or a set/reset pair), one compare, and one math or move instruction. Add edge detection, analog scaling or function blocks only when the exercises actually call for them.
Open the candidate tool's instruction catalog or help file and check each class against that list. Presence in the palette is a claim, not coverage: the catalog says what the editor can draw, and only execution says what the engine can do. The tool must also let you change inputs and watch internal values while the logic runs; without live forcing and a value monitor it is a static drawing aid no matter what its menus advertise. If a class the program needs is absent from the catalog, close that candidate immediately, because redrawing a rung cannot add a feature the engine does not implement.
If a symbol's intended behavior is unclear before you test it, ladder logic symbols and what each one does in a rung names what each element is supposed to do.
Run one test rung per class and score it #
Build one tiny rung per class: one input you toggle by hand, one output or value you watch, nothing else. Compare what you observe against the documented behavior of that instruction class, using IEC 61131-3, the international standard that defines ladder logic among its PLC programming languages, as the reference for the standard elements. Record a pass or fail per class; the table is the scorecard.
| Instruction class | Test to run | Pass criterion | Failure means |
|---|---|---|---|
| On-delay timer (TON) | Toggle the input on, drop it halfway to the preset, run it to completion | Elapsed value climbs to the preset, done bit sets at the preset, elapsed value returns to 0 the moment the input drops | The tool draws but does not time; reject for any sequence that uses time |
| Off-delay timer (TOF) | Hold the input on, drop it, keep watching the output | Output stays on for the preset after the input drops, then goes off | Run-on and cooldown logic cannot be validated |
| Up counter (CTU) | Pulse the input past the preset, then pulse the reset | Count advances once per rising edge, done bit sets at the preset, reset clears the count | Edge detection or reset is not implemented |
| Seal-in branch | Momentarily close the start contact, then release it | Output stays on until the stop contact breaks the holding branch | No holding-path evaluation |
| Set/reset with restart | Set the bit, stop the simulation, restart it | A declared-retained bit returns, a plain bit clears, per the tool's retention model | No retention model, so power-loss behavior is untestable |
| Signed math | Evaluate an expression that goes negative and one at the type limit | The negative result reads negative, and overflow behaves visibly as the tool documents | Unsigned-only or silent wrap; process math is untrustworthy |
One failed class that the program uses ends the evaluation for that project. Interface polish, browser access and saved-project convenience do not offset a missing timer or a bit that will not hold.
Timer test with numbers #
What the standard requires of TON and TOF #
IEC 61131-3 defines the on-delay timer (TON) as an output that turns on only after its input has been true continuously for the preset time, and it makes the elapsed value non-retentive: when the input goes false, the elapsed value returns to zero. The off-delay timer (TOF) is the mirror image: the output stays on for the preset after the input goes false, and the elapsed value resets when the input returns. A simulator that claims standard timers must reproduce exactly these two behaviors; anything else is a different instruction wearing the same box.
The worked on-delay rung #
Example rung, with illustrative tags and both inputs defaulting to false: Limit_Switch drives Conveyor_Delay, a TON with PT = 4000 ms, and Conveyor_Delay.Q drives Conveyor_Run.
- At 0 s,
Limit_Switchgoes true and the elapsed value climbs from 0. - At 1.5 s, the value monitor reads 1500 ms and
Conveyor_Delay.Qis still false. - At 4.0 s, elapsed 4.0 s equals the 4.0 s preset, the elapsed value reads 4000 ms, Q turns on and
Conveyor_Runfollows. - At 5.0 s, drop
Limit_Switch: on the next evaluation the elapsed value must read 0 and Q must be false.
If the tool keeps the elapsed value at 4000 ms after the input drops, it implemented a retentive timer, not a TON. The drawing looks identical either way; only the class test tells them apart. Run the same pattern on a TOF: preset 3000 ms, input held 2 s then dropped, and the output must stay on until 5 s (2 s of on-time plus the 3 s preset), with the elapsed value resetting when the input returns.
Judge timing from the value monitor, never from the animation: the drawing is a display layer and can lag the logic engine by several evaluations. Check the time base as well: time a preset of 10 s against a stopwatch, and a tool that claims millisecond resolution should land within about 1 percent, which is 100 ms over a 10 s run. When an exercise depends on exact platform timing, repeat the rung in the target software, because real controllers clip the displayed elapsed value at the preset, as explained in why an S7-1200 timer ET never exceeds PT in ladder logic.
Retentive memory across a restart #
Decide what flip-flop means before testing, because four different behaviors hide behind that word: a seal-in branch, a separate set and reset pair, a toggle that changes on one transition, and retained storage that survives a stop. Test them one at a time.
Seal-in: momentarily close the start contact and release it, and the output must stay on until the stop contact breaks the holding branch. Set/reset: pulse set and release, and the bit holds; pulse reset and it clears. With set and reset true in the same evaluation, the winner is whatever evaluation order the tool documents, so read that order and then test it, and treat a tool that documents nothing here as unusable for trip logic.
Retention: declare a bit retained, set it, stop the simulation and restart it with the tool's ordinary start command, and the bit must come back. Repeat with the retention declaration removed and the same test must clear it. IEC 61131-3 defines the retention qualifier, RETAIN, as the mechanism that keeps a variable's value across a stop or power loss; which variables default to retained, and what survives a cold start versus a warm one, is set per platform, so test both restart paths the tool offers. A tool with no retention declaration fails this class for any program that must resume after a power loss, though it remains usable for purely combinational practice.
Toggle trap: flip a bit from a continuously true input and it changes every scan, which reads as chatter. The command must be edge-detected so one physical action produces one change. Test with a brief pulse and with a held command; a correct implementation changes state exactly once in both cases.
The choice between the latching styles changes how that restart behaves, and the guide on latching outputs and when to use set/reset versus seal-in logic walks through the trade-off.
Math at negative values and type limits #
A math block on a menu proves nothing until the engine evaluates it. Check operand and destination types, negative handling, overflow behavior and integer division, each with values you can predict by inspection.
Sign test: compute 7 - 9 in a 16-bit signed integer. The correct result is -2. If the monitor shows 65,534 instead, the engine ran unsigned arithmetic, because a 16-bit word offers 65,536 patterns (two to the sixteenth power) and 65,536 - 2 = 65,534. Unsigned-only math is acceptable for count-total exercises whose totals fit the range, but it cannot represent a negative process value, so it fails the class for signed work.
Limit test: add 1 to a 32-bit signed integer holding 2,147,483,647, the top of that range (two to the thirty-first power, minus 1). Watch what happens: a wrap to -2,147,483,648, saturation at the limit, or an overflow flag. Saturation and a flagged wrap are both workable; a silent wrap is the reject, because a running total or position that quietly changes sign corrupts whatever consumes it.
Division: 7 divided by 2 gives 3 in integer types and 3.5 in a real type. Run it once and read which behavior the tool executed; if an exercise needs fractional values, the tool must compute a real result rather than display a truncated integer.
The acceptance program and the decision #
Finish with one small program instead of isolated rungs, so the classes interact. Port a project you already understand and can rebuild by hand in under a dozen rungs; the siren ring count ladder logic with a timer and counter example combines a timer, a counter and a sealed state and suits this well. Run it four ways: from an all-clear start to completion, interrupted partway through the timer, stopped and restarted mid-sequence, and with an input forced while it runs. At each checkpoint read the value monitor (initial elapsed value, completion bit, behavior after the interruption, retained bit after the restart) and compare it with what the same logic must do on a controller.
Then read the scorecard and decide:
- Passes every class the program uses: keep it on the shortlist, and rebuild the two trickiest rungs in the target platform's own programming software before committing, because scan order and retention defaults are set per platform.
- Holds the elapsed value after the timer input drops: it built a retentive timer where the program needs a non-retentive one, so reject it for time-based sequences; it remains fine for combinational practice.
- Offers no retention declaration: reject it for any program that must resume after a power loss.
- Returns unsigned results or wraps integers silently: reject it for signed process values, running totals and positions.
- Misses a needed class entirely: stop evaluating that tool, because no amount of redrawing adds execution.
None of this validates a safety function: interlocks and emergency-stop logic are proven on the real controller against the machine's risk assessment, never in a simulator.
Questions asked
Does a pass on these test rungs guarantee the program runs on my PLC?
No. Scan order, retention defaults, timer resolution and integer sizes are set per platform, so a pass puts a tool on the shortlist rather than closing the job. Rebuild the two trickiest rungs in the target platform's programming software, then prove the sequence on hardware before it controls anything.
What preset value should a manual timer test use?
Pick one you can watch: 2000 ms to 5000 ms works well for hand tests. Activate the input, confirm the elapsed value climbs to the preset and the done bit sets, then drop the input halfway through. A non-retentive on-delay timer must return its elapsed value to zero at that moment.
Is a contact-and-coil animated tool a simulator?
Only for combinational logic that holds no state between scans. Without executed timers, counters, retentive bits and math, a sequence with time or memory behaves differently on a controller than in the tool. Treat a drawing-only editor as an illustration, and run the instruction-class test before you call anything a simulator.
How do I test retention without cycling real power?
Use the tool's stop and restart controls in place of a power cycle. Set the bit and note the elapsed timer value, stop the simulation, then start it again with the tool's ordinary start command. A retained bit comes back and a non-retentive one clears; compare both against the retention model the tool documents.
Why judge timing from the value monitor instead of the drawing?
The picture is a display layer and the logic engine runs on its own evaluation cycle, so a contact can change state several evaluations before the drawing catches up. Read the elapsed and done values from the monitor or status table, and treat highlighted power flow as a sketch of the scan, not the scan itself.