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".
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
15.2.27 FC 26 - MID - Middle part of a STRING variable
The function FC 26 provides the middle part of a string (L characters from the character P
inclusive).
n If the sum of L and (P-1) exceeds the current length of the STRING variables, a string
is returned from the character P to the end of the input value.
n In all other cases (P is outside the current length, P and/or L are equal to zero or neg-
ative), a blank string is returned and the BR bit is set to "0".
Parameter Declaration Data type Memory area Description
IN* INPUT STRING D, L Input variable in format STRING
L INPUT INT I, Q, M, D, L
Constant
Length of the middle character
string
P INPUT INT I, Q, M, D, L
Constant
Position of first character
RET_VAL* OUTPUT STRING D, L Output variable in format STRING
*) You can assign only a symbolically defined variable for the parameter.
15.2.28 FC 27 - MIN - Select minimum
The function FC 27 selects the smallest of three numerical variable values.
n Variables of the data types INT, DINT, and REAL are permitted as input values.
n All variables with parameters assigned must be of the same data type.
n The variable type is recognized by the ANY pointer.
n The output value remains unchanged and the BR bit is set to "0" if:
– 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.
Example in STL:
Description
Parameter
Description
Parameter
VIPA SPEED7
Standard
IEC > FC 27 - MIN - Select minimum
HB00 | OPL_SP7 | Operation list | en | 18-30 815