MainRoutine
MainTask › MainProgram · Ladder DiagramThe transmission cell is a press and spin-test station with three pneumatic cylinders and a VFD-driven motor. Load it to program the process.
The 3D world is a package sorting line: a feeder, a belt, photo-eyes, a height beam, a pusher and a stack light, all driven by your PLC.
Maze
This program has no HMI screen of its own. Every tag still gets a faceplate below.
Tags
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_PB | XIC | Examine if closed: true when the bit is 1 |
| !Stop_PB | XIO | Examine if open: true when the bit is 0 |
| a && b | series | Instructions in a row on the rung |
| a || b | branch | Parallel branch |
| a == b, a != b | EQU NEQ | Equal, not equal |
| a < b, a <= b | LES LEQ | Less than, less or equal |
| a > b, a >= b | GRT GEQ | Greater than, greater or equal |
| LIM(lo, x, hi) | LIM | Limit test; wraps around when lo > hi |
| a + b > 10 | CMP | Comparison with math on either side |
| ONS(Storage) | ONS | One-shot: true for a single scan on a rising edge |
| if (c) { b = 1; } else { b = 0; } | OTE | Output energize: the bit follows the rung, so it needs both halves |
| OTL(b) OTU(b) | OTL OTU | Latch, unlatch: write only when the rung is true |
| TON(T, 2000) | TON TOF RTO | Timers; preset in ms. Members .PRE .ACC .EN .TT .DN |
| CTU(C, 10) | CTU CTD | Counters. Members .PRE .ACC .CU .CD .DN .OV .UN |
| RES(T) | RES | Reset a timer or counter |
| d = s; | MOV | Move |
| d = a + b; | ADD SUB MUL DIV MOD | One operator, two operands |
| d = (a + 1) % 4; | CPT | Compute; also ABS SQR SIN COS TAN LN LOG TRN and ** |
| CLR(d); NOP(); | CLR NOP | Clear 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 |