Bit Instructions Overview
Reference for Ladder Logic bit instructions in rungs.dev — XIC, XIO, OTE, OTL, OTU, and ONS — the contacts and coils that examine or control a single BOOL value.
XIC — Examine If Closed
XIC (Examine If Closed) passes power along a ladder rung when the referenced bit is 1 — a normally-open contact in the rungs.dev ladder simulator.
XIO — Examine If Open
XIO (Examine If Open) in rungs.dev passes power along the rung when the referenced bit is 0 — a normally-closed contact and the closest thing to NOT in ladder.
OTE — Output Energize
OTE in rungs.dev is the standard output coil — sets a BOOL bit to 1 while the rung is true and back to 0 when the rung goes false. The default ladder output.
OTL / OTU — Latch and Unlatch
OTL latches a bit to 1 and holds it on after the rung goes false. Pair it with OTU to unlatch the bit back to 0 in the rungs.dev ladder simulator.
ONS — One Shot
ONS in rungs.dev makes a ladder rung true for exactly one scan on each rising edge of its input. Requires a dedicated storage BOOL per ONS instance.
Timers Overview
Reference for Ladder Logic timer instructions in rungs.dev — TON, TOF, RTO, and RES — and the TIMER tag structure with preset, accumulator, and status bits.
TON — On-Delay Timer
TON in rungs.dev is the on-delay timer — starts timing when the rung goes true, sets the .DN bit when .ACC reaches .PRE, and resets when the rung goes false.
TOF — Off-Delay Timer
TOF in rungs.dev is the off-delay timer — starts timing when the rung goes false and holds the .DN bit at 1 for the preset duration after the rung drops.
RTO — Retentive Timer On
RTO in rungs.dev is the retentive on-delay timer — like TON, but the .ACC accumulator survives rung transitions and must be cleared explicitly with RES.
Counters Overview
Reference for Ladder Logic counter instructions in rungs.dev — CTU, CTD, and RES — and the COUNTER tag with preset, accumulator, and done/up/down status bits.
CTU — Count Up
CTU (Count Up) in rungs.dev increments .ACC by 1 on each rising edge of the rung. Sets .DN when .ACC reaches .PRE and keeps counting past the preset value.
CTD — Count Down
CTD (Count Down) in rungs.dev decrements .ACC by 1 on each rising edge of the rung. Typically paired with CTU on the same COUNTER tag for bidirectional counting.
RES — Reset
RES in rungs.dev clears the accumulator and status bits of a TIMER or COUNTER tag back to zero — typically paired with RTO, CTU, or CTD on the same tag.
MOVE — Copy a Value
MOVE copies a literal or tag into a destination tag every scan in rungs.dev. It also converts between DINT and REAL when the operand types differ.
Compare — EQ / NE / GT / GE / LT / LE
Reference for Ladder Logic compare instructions in rungs.dev — EQ, NE, GT, GE, LT, LE — that pass power along a rung when the numeric relationship holds.
LIMIT — Range Check
LIMIT in rungs.dev passes power when a test value is inside [lowLimit, highLimit]; if lowLimit is greater than highLimit, the bounds reverse to outside-the-band.
Math — ADD / SUB / MUL / DIV
Reference for Ladder Logic math instructions in rungs.dev — ADD, SUB, MUL, DIV — performing arithmetic on two sources and writing the result to a destination tag.