LadderboxController: Conveyor_Cell
RUNOK

Controller Tags

Scope: Conveyor_Cell
NameValueStyleData TypeDescription

MainRoutine

MainTask › MainProgram · Ladder Diagram
Each if / else block is one rung. Edits rebuild the ladder as you type.
while (1) {Scan loop · fixed
}End of scan · outputs update, then it starts again
Ready
Instruction reference
Start_PBXICExamine if closed: true when the bit is 1
!Stop_PBXIOExamine if open: true when the bit is 0
a && bseriesInstructions in a row on the rung
a || bbranchParallel branch
a == b, a != bEQU NEQEqual, not equal
a < b, a <= bLES LEQLess than, less or equal
a > b, a >= bGRT GEQGreater than, greater or equal
LIM(lo, x, hi)LIMLimit test; wraps around when lo > hi
a + b > 10CMPComparison with math on either side
ONS(Storage)ONSOne-shot: true for a single scan on a rising edge
if (c) { b = 1; } else { b = 0; }OTEOutput energize: the bit follows the rung, so it needs both halves
OTL(b) OTU(b)OTL OTULatch, unlatch: write only when the rung is true
TON(T, 2000)TON TOF RTOTimers; preset in ms. Members .PRE .ACC .EN .TT .DN
CTU(C, 10)CTU CTDCounters. Members .PRE .ACC .CU .CD .DN .OV .UN
RES(T)RESReset a timer or counter
d = s;MOVMove
d = a + b;ADD SUB MUL DIV MODOne operator, two operands
d = (a + 1) % 4;CPTCompute; also ABS SQR SIN COS TAN LN LOG TRN and **
CLR(d); NOP();CLR NOPClear to zero; no operation
if (true) { … }—Unconditional rung
Word.3, Arr[2], Arr[Idx]—Bit of an integer, array elements
16#00FF, 2#1010, 8#17—Hex, binary and octal literals