Parameter Declaration Data type Memory area Description
DT1* INPUT DATE_AND_TIME D, L Input variable in format TD
DT2* INPUT DATE_AND_TIME D, L Input variable in format TD
RET_VAL* OUTPUT BOOL I, Q, M, D, L Comparison result
*) You can assign only a symbolically defined variable for the parameter.
15.2.20 FC 19 - LE_STRNG - Compare STRING for smaller then or equal
The function FC 19 compares the contents of two variables in the format STRING to
determine if one is smaller or equal to the other and outputs the result of the comparison
as a return value. The return value has the signal state "1" if the string at parameter S1 is
smaller than or equal to the string at parameter S2. The characters are compared by their
ASCII code (e.g. 'A' smaller than 'a'), starting from the left. The first character to be dif-
ferent decides the result of the comparison. If the left part of the longer character string
and the shorter character string are the same, the shorter string is smaller. The function
does not report any errors.
Parameter Declaration Data type Memory area Description
S1* INPUT STRING D, L Input variable in format STRING
S2* INPUT STRING D, L Input variable in format STRING
RET_VAL OUTPUT BOOL I, Q, M, D, L Comparison result
*) You can assign only a symbolically defined variable for the parameter.
15.2.21 FC 20 - LEFT - Left part of a STRING variable
The function FC 20 provides the first L characters of a string.
n If L is greater than the current length of the STRING variable, the input value is
returned.
n With L = 0 and with a blank string as the input value, a blank string is returned.
n If L is negative, a blank string is returned and the BR bit of the status word 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 left character string
RET_VAL* OUTPUT STRING D, L Output variable in format STRING
*) You can assign only a symbolically defined variable for the parameter.
Description
Parameter
Description
Parameter
VIPA SPEED7
Standard
IEC > FC 20 - LEFT - Left part of a STRING variable
HB00 | OPL_SP7 | Operation list | en | 18-30 812