IEC selection operator performing a limiting function.
OUT := LIMIT(Min, IN, Max) means:
OUT := MIN (MAX (IN, Min), Max)
Max is the upper and Min the lower limit for the result. Should the value IN exceed the upper limit Max, LIMIT will return Max. Should IN fall below Min, the result will be Min.
IN and OUT can be any type of variable.
Result is 80
LD 90
LIMIT 30 ,
80
ST Var1
Var1:=LIMIT(30,90,80); (* Result is 80 *);