Block Reference
Complete reference for all IEC 61131-3 function blocks available in Sim Assist
Logic Blocks
Boolean logic gates that operate on BOOL signals.
| Block | Inputs | Outputs | Description |
|---|---|---|---|
| AND | IN1: BOOL, IN2: BOOL | OUT: BOOL | Output is TRUE when all inputs are TRUE. |
| OR | IN1: BOOL, IN2: BOOL | OUT: BOOL | Output is TRUE when at least one input is TRUE. |
| NOT | IN: BOOL | OUT: BOOL | Inverts the input signal. |
| XOR | IN1: BOOL, IN2: BOOL | OUT: BOOL | Output is TRUE when exactly one input is TRUE. |
| NAND | IN1: BOOL, IN2: BOOL | OUT: BOOL | Inverted AND — output is FALSE only when all inputs are TRUE. |
| NOR | IN1: BOOL, IN2: BOOL | OUT: BOOL | Inverted OR — output is TRUE only when all inputs are FALSE. |
| XNOR | IN1: BOOL, IN2: BOOL | OUT: BOOL | Inverted XOR — output is TRUE when both inputs have the same value. |
Timers
Time-based blocks that use TIME durations. All timers have an internal elapsed time output ET: TIME.
| Block | Inputs | Outputs | Description |
|---|---|---|---|
| TON | IN: BOOL, PT: TIME | Q: BOOL, ET: TIME | On-Delay Timer — output turns TRUE after the input has been TRUE for the preset time. |
| TOF | IN: BOOL, PT: TIME | Q: BOOL, ET: TIME | Off-Delay Timer — output stays TRUE for the preset time after the input goes FALSE. |
| TP | IN: BOOL, PT: TIME | Q: BOOL, ET: TIME | Pulse Timer — output turns TRUE for exactly the preset duration on a rising edge of the input. |
Counters
Counting blocks that track integer values. All counters have a current value output CV: INT.
| Block | Inputs | Outputs | Description |
|---|---|---|---|
| CTU | CU: BOOL, RESET: BOOL, PV: INT | Q: BOOL, CV: INT | Count Up — increments on each rising edge of CU; Q is TRUE when CV reaches PV. |
| CTD | CD: BOOL, LOAD: BOOL, PV: INT | Q: BOOL, CV: INT | Count Down — decrements on each rising edge of CD; Q is TRUE when CV reaches zero. |
| CTUD | CU: BOOL, CD: BOOL, RESET: BOOL, LOAD: BOOL, PV: INT | QU: BOOL, QD: BOOL, CV: INT | Up/Down Counter — combines CTU and CTD; QU is TRUE at PV, QD is TRUE at zero. |
Edge Detection
Detect transitions in BOOL signals.
| Block | Inputs | Outputs | Description |
|---|---|---|---|
| R_TRIG | CLK: BOOL | Q: BOOL | Rising Edge — output pulses TRUE for one scan cycle when input transitions from FALSE to TRUE. |
| F_TRIG | CLK: BOOL | Q: BOOL | Falling Edge — output pulses TRUE for one scan cycle when input transitions from TRUE to FALSE. |
Latches
Bistable blocks that hold their state until explicitly changed.
| Block | Inputs | Outputs | Description |
|---|---|---|---|
| SR | S: BOOL, R: BOOL | Q: BOOL | Set-dominant latch — set takes priority when both inputs are TRUE. |
| RS | R: BOOL, S: BOOL | Q: BOOL | Reset-dominant latch — reset takes priority when both inputs are TRUE. |
Math Blocks
Arithmetic operations on numeric values (INT, REAL).
| Block | Inputs | Outputs | Description |
|---|---|---|---|
| ADD | IN1, IN2 | OUT | Returns the sum of two values. |
| SUB | IN1, IN2 | OUT | Returns the difference (IN1 minus IN2). |
| MUL | IN1, IN2 | OUT | Returns the product of two values. |
| DIV | IN1, IN2 | OUT | Returns the quotient (IN1 divided by IN2). |
| MOD | IN1, IN2 | OUT | Returns the remainder of integer division. |
| ABS | IN | OUT | Returns the absolute value. |
| LIMIT | MIN, IN, MAX | OUT | Clamps the input between MIN and MAX. |
| MIN | IN1, IN2 | OUT | Returns the smaller of two values. |
| MAX | IN1, IN2 | OUT | Returns the larger of two values. |
Comparison Blocks
Compare two values and return a BOOL result.
| Block | Inputs | Outputs | Description |
|---|---|---|---|
| EQ | IN1, IN2 | OUT: BOOL | TRUE when IN1 equals IN2. |
| NE | IN1, IN2 | OUT: BOOL | TRUE when IN1 does not equal IN2. |
| GT | IN1, IN2 | OUT: BOOL | TRUE when IN1 is greater than IN2. |
| GE | IN1, IN2 | OUT: BOOL | TRUE when IN1 is greater than or equal to IN2. |
| LT | IN1, IN2 | OUT: BOOL | TRUE when IN1 is less than IN2. |
| LE | IN1, IN2 | OUT: BOOL | TRUE when IN1 is less than or equal to IN2. |
Selection Blocks
Select between values based on conditions.
| Block | Inputs | Outputs | Description |
|---|---|---|---|
| SEL | G: BOOL, IN0, IN1 | OUT | Binary selector — returns IN0 when G is FALSE, IN1 when G is TRUE. |
| MUX | K: INT, IN0, IN1, ... | OUT | Multiplexer — returns the input at index K from a list of inputs. |