Technical data

Table Of Contents
IEC Functions
System Software for S7-300/400 System and Standard Functions - Volume 2/2
A5E00739858-01
26-17
26.8 Example in STL
CALL FC 25
IN1 := P#M 10.0 DINT 1
IN2 := MD20
IN3 := P#DB1.DBX 0.0 DINT 1
RET_VAL := P#M 40.0 DINT 1
= M 0.0
Note:
The admitted data types INT, DINT and REAL must be entered in the ANY pointer.
Such parameters as “MD20“ are also admitted, but you must define the
corresponding data type of “MD20“ in “Symbol“.
Description FC27 MIN
The function FC27 selects the smallest 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 is 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 Smallest of the input values