S7-1200 Advanced Math

by Antigravity

Increment (INC) / Decrement (DEC)

Instruction Description: Increments or decrements a signed or unsigned integer number value (IN_OUT value + 1 or - 1).

HMI Panel

IN_OUT Value (%MW10)
0
Network 1: INC / DEC Operations
-|P|-
INC
IN_OUT
%MW10
-|P|-
DEC
IN_OUT
%MW10

LIMIT (Set Limit Value)

Instruction Description: Tests if the value of parameter IN is inside the value range specified by parameters MIN and MAX and if not, clamps the value at MIN or MAX.

HMI Panel

OUT (Clamped)
50
Network 2: LIMIT Operation
LIMIT
EN
MIN
IN
MAX
ENO
OUT
%MD30
MIN
IN
MAX

MIN / MAX Selector

Instruction Description: Compares the value of two parameters IN1 and IN2 and assigns the minimum (lesser) or maximum (greater) value to parameter OUT.

HMI Panel

OUT Result
0
Network 3: MIN/MAX Selection
MIN
EN
IN1
IN2
ENO
OUT
%MD40
IN1
IN2