PLC Scan Cycle Simulator — Ladder Logic, Seal-In Rung & Fault Latch

Interactive PLC scan-cycle simulator with a live three-rung ladder: a motor seal-in circuit, fault detection and fault reset, driven by START, STOP, FEEDBACK and RESET inputs.

← PLC / SCADA / Automation Labs
About this tool — how it works & FAQOpen ▾Close ▴

About the PLC Scan Cycle Simulator

This simulator shows a programmable logic controller doing what it does forever: read inputs, solve the ladder, write outputs, tend to housekeeping, repeat. A three-rung motor program runs live. You press START, STOP, FEEDBACK and RESET, and the ladder lights up as each scan updates the coils. The phases are slowed to 0.4 seconds each so you can see when an input is sampled and when an output changes.

What the simulator shows

• A scan-cycle bar with four phases (INPUT, LOGIC, OUTPUT, HOUSE), a description of the current phase and a cycle counter. • A three-rung ladder: rung 1 is a START/STOP seal-in with a FAULT interlock, rung 2 sets a FAULT latch if MOTOR_RUN is on without FEEDBACK, and rung 3 resets the fault with RESET when the motor is off. • Input buttons for START (I0.0), STOP (I0.1), FEEDBACK (I0.2) and RESET (I0.3), and output lamps for MOTOR_RUN (Q0.0) and FAULT (Q0.1). • Run/Pause control, plus expandable notes, formulas and a worked example.

How the program works

Rung 1 is the classic seal-in: MOTOR_RUN turns on when (START or MOTOR_RUN) and STOP and not FAULT are true, so the coil's own contact holds it on after START is released. STOP is wired normally closed so a broken wire stops the motor. Rung 2 energizes FAULT whenever MOTOR_RUN is on but FEEDBACK is missing, and rung 3 clears FAULT only when RESET is pressed and the motor is off. Try starting the motor without turning on FEEDBACK and watch the fault latch.

Why scan order matters

Logic is solved once per scan against a snapshot of the inputs, and the results are written to the outputs afterward, so a pulse shorter than one scan can be missed and changes take effect on the next pass. Real scans take a few milliseconds; this simulator spreads them out so each phase is visible. The logic is committed at the end of the LOGIC phase, which is why pressing START during a scan can take until the next cycle to show on MOTOR_RUN.

Frequently asked questions

What are the four phases of a PLC scan?

Reading inputs into the input image table, solving the program using that snapshot, writing the results to the output image table and physical outputs, and housekeeping such as diagnostics and communications. The controller repeats them continuously.

How does a seal-in circuit hold the motor on?

A normally open contact of the motor's own run coil is wired in parallel with START. Once the coil is energized, its contact closes and keeps the rung true after the START button is released, until STOP opens the rung or a fault interrupts it.

Why does the FAULT latch when I start without FEEDBACK?

Rung 2 checks that the motor's auxiliary feedback contact confirms it is running. If MOTOR_RUN is on but FEEDBACK is not present, FAULT is set. It stays on until the RESET rung clears it, which only works while MOTOR_RUN is off.

Is this the same as the PLC Ladder Logic Simulator web app?

No. This lab is a fixed, guided three-rung program focused on the scan cycle and on seal-in and latch behavior. It does not let you edit ladder rungs or add timers and counters.

Related tools & guides