SET and RESET coils in a PLC (latch and unlatch)
A normal coil is on only while its rung is true. A SET coil turns a bit on and leaves it on; a RESET coil turns it off. Together they let a program remember something, such as "an alarm happened" or "we are in step 3".
How they work
|--[ START ]-----------------( S MOTOR )--| |--[ STOP_PRESSED ]----------( R MOTOR )--|
When START is true for even one scan, the SET coil makes MOTOR 1, and it stays 1 after START goes false. Only a true RESET rung makes it 0 again. Unlike a normal coil, a SET or RESET coil does nothing while its rung is false.
Names in each brand
| Brand | Set | Reset |
|---|---|---|
| Siemens | S (Set coil) | R (Reset coil) |
| Allen-Bradley | OTL (output latch) | OTU (output unlatch) |
| Mitsubishi | SET | RST |
| TOYOPUC | SET | RST |
When both are true: the last one wins
The PLC executes rungs from top to bottom. If the SET rung and the RESET rung are both true in the same scan, the bit takes the value of whichever rung comes last. Put the RESET rung after the SET rung when stopping must win (reset dominant), which is what you want for anything that stops a machine.
SET / RESET vs seal-in
| Seal-in rung | SET / RESET | |
|---|---|---|
| Where the logic is | one rung: easy to read | spread over two or more rungs |
| STOP held down | output can never be on | depends on rung order |
| Best for | motors and anything with a STOP | alarms, sequence steps, modes, remembering events |
Typical uses
- Alarm memory: the rising edge of a fault sets an alarm bit; ACK resets it. See the alarm example in ladder logic examples.
- Sequence steps: each step is a bit; the condition that ends a step sets the next and resets the current one. A batch tank (fill, mix, drain) is a classic.
- Tank level hysteresis: set the fill valve below LOW, reset it at HIGH.
Retentive bits
A SET bit in normal memory is cleared when the PLC powers up. If a state must survive a power cut (a counter total, a recipe step), use retentive memory (Siemens M100+ in PLC Sim Lab, Mitsubishi L, Allen-Bradley B9, TOYOPUC K) and decide carefully what the machine should do on restart.
Watch it on the PLC Sim Lab channel
A 30-second comparison with a live ladder simulation. Open on YouTube → · More videos →
Try it yourself. Wire sensors, contactors and a PLC, write ladder logic and press RUN in the free PLC Sim Lab Playground. Nothing to install.
Open the Playground →Guided lessons →Frequently asked questions
What is the difference between SET and a normal coil?
A normal coil follows its rung every scan. A SET coil turns the bit on when its rung is true and leaves it on until a RESET coil turns it off.
What are OTL and OTU in Allen-Bradley?
Output Latch and Output Unlatch: the Allen-Bradley names for SET and RESET coils.
What happens if SET and RESET are both true?
The rung executed last in the scan decides. Place the RESET rung below the SET rung when the reset must win.