Skip to main content

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

NameType
dataBitBOOL

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 Overload goes true, Fault latches on and stays on.
  • Reset clears Fault once Overload has dropped.
  • Rung order matters: the OTL rung runs after the OTU rung, so a held Reset cannot mask a live Overload — 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/OTU and OTE on 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.