Bit Instructions
Bit instructions are the core of Ladder Logic. They examine or control a single BOOL value — a contact on the input side, a coil on the output side.
Available Bit Instructions
| Instruction | Symbol | Purpose |
|---|---|---|
| XIC | dataBit | Passes power along the rung when the referenced bit is 1. Equivalent to a normally-open contact. |
| XIO | dataBit / | Passes power along the rung when the referenced bit is 0. Equivalent to a normally-closed contact and the closest thing to a NOT in ladder logic. |
| OTE | dataBit | Sets a bit to 1 while the rung is true and back to 0 when the rung goes false. The standard output coil. |
| OTL | dataBit L | Latches a bit to 1 and leaves it on, even after the rung goes false. Pair with OTU to clear. |
| OTU | dataBit U | Unlatches a bit back to 0 while the rung is true. Pair with OTL. |
| ONS | storageBit [ONS] | Makes a rung true for exactly one scan on each rising edge of its input. Requires a dedicated storage bit per instance. |
Contacts vs Coils
- Contacts (
XIC,XIO) go on the left side of a rung. They examine a bit and decide whether power continues along the rung. - Coils (
OTE,OTL,OTU) go on the right side of a rung. They act on a bit based on whether power reached them.
A rung always flows: contacts → (optional more contacts) → coil.
Looking for NOT?
Ladder Logic has no dedicated NOT instruction. To negate a bit, use XIO instead of XIC. Both examine the same tag; XIO simply inverts the result.
XIO(Fault)OTE(Ready)
Ready energizes when Fault = 0.