A seal-in circuit with stop priority
This motor start/stop ladder logic example introduces a holding circuit, also called a seal-in or self-latching circuit. A short Start press turns on MotorRun. Releasing Start leaves the motor running, while pressing Stop clears the running state. The stop condition must interrupt every path that could hold the output on.
The logic is MotorRun = StopOK AND (Start OR MotorRun). One branch checks Start and the other reads the MotorRun output as feedback. Once Start energizes the coil, the feedback branch can maintain it on later scans. This differs from Lamp Follow, whose output becomes false immediately after its single input becomes false.
StopOK is true while the physical NC Stop button is released, and false when Stop is pressed. The ladder therefore uses a NO instruction to check StopOK. NO means “pass when this bit is true”; it does not mean “the physical device must have normally-open wiring.” Using an NC instruction for StopOK would reverse the intended permissive.
Both branches include StopOK. When StopOK becomes false, neither Start nor feedback can energize the coil, including when Start and Stop are pressed together. After the output clears, releasing Stop with Start released does not create a new start command. If Start remains held when Stop is released, the Boolean expression permits running again; this is not a separate edge-triggered restart lockout.
Try the program
- Open the simulator and run the reference. With Stop released, check that StopOK is true and MotorRun is initially false. Distinguish the button position from the bit value.
- Press and release Start. Confirm MotorRun remains true through the feedback branch. Inspect both the Start input and the running output to see that they no longer have identical values.
- Press Stop while running. MotorRun must become false. Release Stop with Start released and confirm the motor remains off until another Start command.
- Try Start and Stop together and run the automatic cases. Check that StopOK occurs on both parallel paths rather than only on the Start path.
Use Load reference to restore the supplied solution, or Start blank to build your own. The reference is a working starting point, so passing tests before editing does not mean you have built the circuit yourself. Use the diagram, input values and test results together to explain each output change.
Practice challenge
Predict the result of pressing Stop while Start is held, then of releasing Stop without first releasing Start. Compare both predictions with the expression StopOK AND (Start OR MotorRun). Next repeat with Start released before Stop is released. Explain the difference between stop priority and a separate requirement for a fresh rising edge to restart. Restore the reference and verify the ordinary start, hold and stop sequence before moving to the tank example.
Three common mistakes
Using NC for the StopOK instruction
StopOK already encodes a healthy released stop as true. Check it with NO. Decide from the bit meaning, not from the physical NC label on the device.
Letting the feedback bypass Stop
If MotorRun alone forms a parallel branch, the circuit can hold itself on after Stop is pressed. Gate the holding branch with StopOK as well as gating the Start branch.
Testing only the Start press
A program without feedback can start correctly and still fail on release. Check start, hold, stop, simultaneous commands and behavior after releasing Stop. These transitions define the latch.
Questions about this example
Why is a physical NC Stop checked with a NO contact?
The physical button produces StopOK=true while released. A NO instruction passes on true, which permits running only while that condition holds. Hardware contact type and program instruction type describe different things.
Is the holding state saved when I reload?
Saving stores the program, not a promise to resume a live motor state. The simulation starts from its defined initial values. This exercise teaches scan-to-scan feedback, not retained hardware memory.
Can I use this as an emergency-stop circuit?
No. This is an educational Boolean simulation with virtual I/O. It does not provide safety-rated controls, wiring diagnostics or a physical means of removing energy.
Keep practicing
Review ladder logic basics, or compare this program with a related example:
All addresses and devices here are virtual. See supported instructions and limitations for the teaching subset, timing model and boundaries of the simulator.