Start buttons are momentary: they only make contact while pressed. But you want the conveyor to keep running after the operator lets go. The answer is the circuit every control engineer can draw in their sleep: the seal-in, also called a holding or latching circuit.
The seal-in circuit
LD X0 ; START (momentary, NO)
OR Y0 ; seal-in: MOTOR's own contact
ANI X1 ; STOP (NO button, NC program contact)
OUT Y0 ; MOTOR
Step through it:
- At rest, START is open and Y0 is off, so neither branch passes power. The motor is off.
- Press START. The top branch passes power, STOP’s contact is closed, so Y0 turns on.
- On the same or next scan, the Y0 contact in the parallel branch closes too.
- Release START. The top branch opens, but the Y0 branch still carries power. The rung seals itself in.
- Press STOP. Its contact opens, the rung goes false, Y0 turns off, and the Y0 branch opens. The motor stays off when STOP is released.
Try it, and also try holding START and STOP together:
Program listing (IL)
LD X0
OR Y0
ANI X1
OUT Y0Stop wins
Because STOP is in series after the parallel branch, it breaks the rung even while START is held. This is called a stop-dominant circuit and it is what you want almost every time: if an operator panics and presses both buttons, the machine must stop. If you put STOP inside the start branch instead, start could override stop. Never do that.
Where the real seal-in lives
On simple machines the seal-in is often done in hardware with an auxiliary contact on the motor contactor, exactly as in relay days. When the PLC does it, it is good practice to seal in with a feedback input from the contactor’s auxiliary contact rather than with the output bit. Then the program knows whether the contactor actually pulled in, and you can raise a fault if it did not.
SET and RESET
The second way to latch is with two separate instructions:
- SET (Allen-Bradley OTL, latch): when its rung is true, the bit turns on and stays on, even after the rung goes false.
- RESET (Allen-Bradley OTU, unlatch; Mitsubishi RST): when its rung is true, the bit turns off.
LD X0 ; START
SET M0 ; latch "Running"
LD X1 ; STOP
RST M0 ; unlatch
LD M0
OUT Y0 ; MOTOR
With SET/RESET, the rung lower in the program wins if both are true in the same scan, because it is solved last. Put the RESET rung after the SET rung to make stop dominant.
SET/RESET is handy for events that must be remembered until someone deals with them, such as an alarm that must stay on until acknowledged even if the fault clears. Press OVERTEMP briefly below, then ACK:
Program listing (IL)
LD X0
SET M0
LD X1
SET M1
LD X1
ANI X0
RST M0
LDI M0
RST M1
LD M0
OUT Y0
LD M0
ANI M1
OUT Y1After a power cut
This decision is about safety, not programming style:
- A seal-in circuit drops out when power is lost, because Y0 is cleared at start-up. The machine stays off until someone presses START again. This is what safety standards expect for most machines: no automatic restart.
- A SET bit in retentive memory may still be on when power returns, so the machine could restart by itself. Use non-retentive bits for run commands, or clear them on the first scan.
Unexpected restart injures people. Someone may have opened a guard or be clearing a jam during a power cut. Design every run command so the machine needs a deliberate start after power returns.
Frequently asked questions
What is a seal-in contact?
A contact of the output (or of a feedback input from the contactor) wired in parallel with the start button, so the rung stays true after the start button is released.
Which is better, seal-in or SET/RESET?
Both work. Seal-in rungs are easy to read and drop out on power loss. SET/RESET is useful for remembering events, but be careful with retentive bits and the order of rungs.
