LIMIT

Restricts integer values to a given interval. Integer values between the minimum and maximum are unchanged. Integer values greater than the maximum are replaced with the maximum value. Integer values less than the minimum are replaced with the minimum value.
lrsf_li1_cam5
Arguments
MIN
MIN
DINT
Minimum value allowed
IN
IN
DINT
Any signed integer value
MAX
MAX
DINT
Maximum value allowed
LIMIT
Q
DINT
Input value restricted to the allowed range
Example
(* FBD Program using "LIMIT" Function *)
lrsf_li2
(* ST Equivalence: *)
new_value := LIMIT (min_value, value, max_value); (* bounds the value to the [min_value..max_value] set *)
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal