806
20 SELECTION FUNCTIONS
20.3 Limit Control
20.3 Limit Control
LIMIT(_E)
These functions output an input value controlled with the upper and lower limits.
â– Descriptions, types, and data types
â– Operation processing
• These functions output an input value according to the BOOL, INT, DINT, WORD, DWORD, REAL, STRING, or TIME type
data input to (s1), (s2), and (s3) in the same data type as (s1), (s2), and (s3) from (d).
Data type is INT
• A data value of the BOOL, INT, DINT, WORD, DWORD, REAL, STRING, or TIME type can be input to (s1), (s2), and (s3).
(The input value of (s1) must be smaller than the one of (s3).)
Ladder diagram Structured text
[Without EN/ENO] [With EN/ENO] [Without EN/ENO]
d:=LIMIT(s1,s2,s3);
[With EN/ENO]
d:=LIMIT_E(EN,ENO,s1,s2,s3);
Argument Description Type Data type
EN Execution condition (TRUE: Execution, FALSE: Stop) Input variable BOOL
s1 Lower limit value (minimum output threshold value) Input variable ANY_SIMPLE
s2 Input value to be controlled with the upper and lower limits Input variable ANY_SIMPLE
s3 Upper limit value (maximum output threshold value) Input variable ANY_SIMPLE
ENO Output status (TRUE: Normal, FALSE: Abnormal) Output variable BOOL
d Output Output variable ANY_SIMPLE
• When the input value of (s2) is larger than the one of (s3), these functions output the input value of (s3) from (d).
• When the input value of (s2) is smaller than the one of (s1), these functions output the input value of (s1) from (d).
• When the input value of (s1)  the input value of (s2)  the input value of (s3), these functions output the input value of (s2) from (d).
LIMIT
_MN
_IN
_MX
OUT
-100
120
100
INT
INT
100
INT
Output value
Input value
INT
(s1)
(s2)
(s3)
(d)
Minimum
input value
Maximum
input value