Coils (output instruction)
OTL: Output Latch
Sets the bit to 1 and leaves it there, even after the rung goes false.
Also called: set coil, latch, SET, -(L)-.
OTL(coil)What it does
OTL only ever writes a 1. When the rung is true it sets the bit; when the rung goes false it does nothing at all, which is precisely why the bit stays set. Something else, an OTU somewhere in the program, has to clear it.
That makes it the right instruction for anything that must be remembered rather than followed: a fault that has occurred and must be acknowledged, a step in a sequence that has been entered, a mode an operator selected.
It also makes it dangerous in one specific way. A latched bit survives a controller going from program to run, and in most controllers it survives a power cycle. A machine that latched a run command before the power failed can start on its own when power returns. Anything that moves should be gated by a first-scan reset or an explicit operator action, never by a bare latch.
A rung you can run
A fault that latches and needs an operator acknowledge
XIC(Press_Fault_Sw)ONS(Fault_Edge)OTL(Press_Fault)
XIC(HMI_Ack)XIO(Press_Fault_Sw)OTU(Press_Fault)
XIO(Press_Fault)XIC(Sys_Enable)OTE(Press_Run)The fault latches on the first scan the switch trips, so a fault that lasts one scan is still caught. It clears only when the operator acknowledges AND the underlying condition has gone away, which stops an acknowledge from clearing a fault that is still present.
Run this rung in the simulatorWhat it is called on other controllers
| Platform | Equivalent |
|---|---|
| Rockwell (Studio 5000) | OTL |
| Siemens (TIA Portal) | S, the set coil |
| Mitsubishi (GX Works) | SET |
| CODESYS and IEC 61131-3 | S, the set coil |
Common mistakes
- Latching a motor or valve output directly. Latch a state bit and drive the output from it, so a first-scan reset can put the machine in a known state.
- Writing the OTL and forgetting the OTU. A bit that nothing can clear is a bit that is stuck on for good.
- Putting the OTL and its OTU in the wrong order in the scan. If the set rung is evaluated after the reset rung, a condition that is true for both will leave the bit set.
Practise it
Interactive exercises that use OTL. Each one checks your ladder against a real scan.
- Set / ResetLatch and unlatch instructions (OTL / OTU) instead of a seal-in branch, and the crucial detail of which one wins when both fire, decided purely by rung order.
- State Coil / Fault CoilA fault lamp that latches ON when any alarm condition occurs, even briefly, and only clears on Reset. And if the condition is still present when Reset is released, the fault comes right back.
