OTL / OTU — Latch and Unlatch
dataBit
L
dataBit
U
Latches a bit to 1 and leaves it on, even after the rung goes false. Pair with OTU to clear.
Unlatches a bit back to 0 while the rung is true. Pair with OTL.
Operands
| Name | Type |
|---|---|
dataBit | BOOL |
How They Work
While the rung is true, OTL writes 1 to dataBit and OTU writes 0. While the rung is false, neither writes — dataBit keeps whatever value it last had. This is the key difference from OTE: OTE always writes the rung state, while OTL and OTU only write on rung-true.
Example — Fault Latch
XIC(Reset)OTU(Fault);XIC(Overload)OTL(Fault)
- When
Overloadgoes true,Faultlatches on and stays on. ResetclearsFaultonceOverloadhas dropped.- Rung order matters: the
OTLrung runs after theOTUrung, so a heldResetcannot mask a liveOverload— the latch has the last word each scan.
When to Use
- Fault registers that must persist until explicitly cleared.
- Machine-state flags that survive across a momentary input.
- Alarm annunciators.
When Not to Use
- For a regular momentary-start output, prefer the seal-in pattern with
OTE. It is easier to reason about and fails safe — losing power de-energizes the output. - Avoid mixing
OTL/OTUandOTEon the same bit. The write order during the scan makes behaviour hard to predict.
Common Mistakes
- Forgetting to write the matching
OTU— the bit will latch forever with no way to clear it.
Related
- OTE — momentary output coil
- Bit instructions overview