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.

BlockInputsOutputsDescription
ANDIN1: BOOL, IN2: BOOLOUT: BOOLOutput is TRUE when all inputs are TRUE.
ORIN1: BOOL, IN2: BOOLOUT: BOOLOutput is TRUE when at least one input is TRUE.
NOTIN: BOOLOUT: BOOLInverts the input signal.
XORIN1: BOOL, IN2: BOOLOUT: BOOLOutput is TRUE when exactly one input is TRUE.
NANDIN1: BOOL, IN2: BOOLOUT: BOOLInverted AND — output is FALSE only when all inputs are TRUE.
NORIN1: BOOL, IN2: BOOLOUT: BOOLInverted OR — output is TRUE only when all inputs are FALSE.
XNORIN1: BOOL, IN2: BOOLOUT: BOOLInverted 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.

BlockInputsOutputsDescription
TONIN: BOOL, PT: TIMEQ: BOOL, ET: TIMEOn-Delay Timer — output turns TRUE after the input has been TRUE for the preset time.
TOFIN: BOOL, PT: TIMEQ: BOOL, ET: TIMEOff-Delay Timer — output stays TRUE for the preset time after the input goes FALSE.
TPIN: BOOL, PT: TIMEQ: BOOL, ET: TIMEPulse 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.

BlockInputsOutputsDescription
CTUCU: BOOL, RESET: BOOL, PV: INTQ: BOOL, CV: INTCount Up — increments on each rising edge of CU; Q is TRUE when CV reaches PV.
CTDCD: BOOL, LOAD: BOOL, PV: INTQ: BOOL, CV: INTCount Down — decrements on each rising edge of CD; Q is TRUE when CV reaches zero.
CTUDCU: BOOL, CD: BOOL, RESET: BOOL, LOAD: BOOL, PV: INTQU: BOOL, QD: BOOL, CV: INTUp/Down Counter — combines CTU and CTD; QU is TRUE at PV, QD is TRUE at zero.

Edge Detection

Detect transitions in BOOL signals.

BlockInputsOutputsDescription
R_TRIGCLK: BOOLQ: BOOLRising Edge — output pulses TRUE for one scan cycle when input transitions from FALSE to TRUE.
F_TRIGCLK: BOOLQ: BOOLFalling 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.

BlockInputsOutputsDescription
SRS: BOOL, R: BOOLQ: BOOLSet-dominant latch — set takes priority when both inputs are TRUE.
RSR: BOOL, S: BOOLQ: BOOLReset-dominant latch — reset takes priority when both inputs are TRUE.

Math Blocks

Arithmetic operations on numeric values (INT, REAL).

BlockInputsOutputsDescription
ADDIN1, IN2OUTReturns the sum of two values.
SUBIN1, IN2OUTReturns the difference (IN1 minus IN2).
MULIN1, IN2OUTReturns the product of two values.
DIVIN1, IN2OUTReturns the quotient (IN1 divided by IN2).
MODIN1, IN2OUTReturns the remainder of integer division.
ABSINOUTReturns the absolute value.
LIMITMIN, IN, MAXOUTClamps the input between MIN and MAX.
MININ1, IN2OUTReturns the smaller of two values.
MAXIN1, IN2OUTReturns the larger of two values.

Comparison Blocks

Compare two values and return a BOOL result.

BlockInputsOutputsDescription
EQIN1, IN2OUT: BOOLTRUE when IN1 equals IN2.
NEIN1, IN2OUT: BOOLTRUE when IN1 does not equal IN2.
GTIN1, IN2OUT: BOOLTRUE when IN1 is greater than IN2.
GEIN1, IN2OUT: BOOLTRUE when IN1 is greater than or equal to IN2.
LTIN1, IN2OUT: BOOLTRUE when IN1 is less than IN2.
LEIN1, IN2OUT: BOOLTRUE when IN1 is less than or equal to IN2.

Selection Blocks

Select between values based on conditions.

BlockInputsOutputsDescription
SELG: BOOL, IN0, IN1OUTBinary selector — returns IN0 when G is FALSE, IN1 when G is TRUE.
MUXK: INT, IN0, IN1, ...OUTMultiplexer — returns the input at index K from a list of inputs.

On this page