Popular plc programmingladder logicPLC tutorial for beginnersIEC 61131-3industrial automationPLC timers
Lesson 7 of 12

Start/stop circuits: seal-in, SET and RESET

In this lesson
  • How a seal-in (holding) contact works
  • Why stop should win over start
  • SET/RESET (latch/unlatch) and when to prefer them
  • What should happen after a power cut

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:

  1. At rest, START is open and Y0 is off, so neither branch passes power. The motor is off.
  2. Press START. The top branch passes power, STOP’s contact is closed, so Y0 turns on.
  3. On the same or next scan, the Y0 contact in the parallel branch closes too.
  4. Release START. The top branch opens, but the Y0 branch still carries power. The rung seals itself in.
  5. 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:

Start / stop with seal-in RUN
Program listing (IL)
LD   X0
OR   Y0
ANI  X1
OUT  Y0

Stop 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:

Latching alarm with acknowledge (SET / RST) RUN
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  Y1

After 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.

Knowledge check

Check your understanding

4 questions. Your best score is saved on this device.

1In a seal-in circuit, what is the Y0 contact in parallel with START for?
2Why should STOP be in series after the start/seal-in branch?
3SET and RESET rungs for the same bit are both true in one scan. Which wins?
4What is the main risk of a retentive SET bit used as a run command?