Technical data

Table Of Contents
IEC Functions
System Software for S7-300/400 System and Standard Functions - Volume 2/2
26-16
A5E00739858-01
26.7 Editing Number Values
Description FC22 LIMIT
The function FC22 limits the number value of a variable to limit values which can
have parameters assigned. Variables of the data types INT, DINT, and REAL are
permitted as input values. All variables with parameters assigned must be of the
same data type. The variable type recognized by the ANY pointer. The lower limit
value (parameter MN) must be smaller than/equal to the upper limit value
(parameter MX).
The output value remains unchanged and the binary result (BR) bit of the status
word is set to “0" if any of the following are true:
A variable with parameters assigned has an invalid data type
All variables with parameters assigned do not have the same data type
The lower limit value is greater than the upper limit value
A REAL variable does not represent a valid floating-point number.
Parameter Declaration Data Type Memory Area Description
MN INPUT ANY I, Q, M, D, L Lower limit
IN INPUT ANY I, Q, M, D, L Input variable
MX INPUT ANY I, Q, M, D, L Upper limit
RET_VAL OUTPUT ANY I, Q, M, D, L Limited output variable
Description FC25 MAX
The function FC25 selects the largest of three numerical variable values. Variables
of the data types INT, DINT, and REAL are permitted as input values. All variables
with parameters assigned must be of the same data type. The variable type
recognized by the ANY pointer.
The output value remains unchanged and the binary result (BR) bit of the status
word is set to “0" if any of the following are true:
A variable with parameters assigned has an invalid data type
All variables with parameters assigned do not have the same data type
A REAL variable does not represent a valid floating-point number.
Parameter Declaration Data Type Memory Area Description
IN1 INPUT ANY I, Q, M, D, L First input value
IN2 INPUT ANY I, Q, M, D, L Second input value
IN3 INPUT ANY I, Q, M, D, L Third input value
RET_VAL OUTPUT ANY I, Q, M, D, L Largest of the input values