
Drive PLC Developer Studio
IEC 61131-3 Operators
12-9
l DDS EN 2.3
12.4.3 MIN
Minimum function
Returns the lesser of two values.
OUT := MIN(IN0, IN1)
IN0, IN1 and OUT canbeofanytype.
Examples
IL ST FBD
LD 90
MIN 30
MIN 40
MIN 77
ST Var1 (* Var1 = 30 *)
12.4.4 LIMIT
Limitation
OUT := LIMIT(Min, IN, Max)
means:
OUT := MIN (MAX (IN, Min), Max)
Max is the upper, Min the lower limit for the result.
• If the value IN exceeds the upper limit Max, then LIMIT returns Max.
• If IN falls below Min, the result is Min.
IN and OUT canbeofanytype.
Examples
IL ST FBD
LD 90
LIMIT 30,80
ST Var1 (* Var1 = 80 *)
Komentarze do niniejszej Instrukcji