Chapter 8 Logic Instructions
8-147
FB/FC
FC
LIMIT is used for limiting the output value within the zone between the
specified minimum and maximum values.
Parameters
Meaning
Description Valid range
MN
Minimum
value
Input Minimum value
Depends on the data type of the
variable that the input parameter is
connected to.
In Data to limit Input Data to limit
Depends on the data type of the
variable that the input parameter is
MX
Maximum
value
Input Maximum value
Depends on the data type of the
variable that the input parameter is
Out
Processing
result
Output Processing result
Depends on the data type of the
variable that the output parameter is
Boolean
Bit string Integer
Real
number
Time, date
String
BOOL
BYTE
WORD
LWORD
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
STRING
MN
● ● ● ● ● ● ● ● ● ● ● ● ● ●
In
● ● ● ● ● ● ● ● ● ● ● ● ● ●
MX
● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out
● ● ● ● ● ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data
type.
Function Explanation
LIMIT instruction limits the value within range between MN and MX and the result is output to Out.
MN ≤ In ≤MX
In