Technical data

Table Of Contents
IEC Functions
System Software for S7-300/400 System and Standard Functions - Volume 2/2
A5E00739858-01
26-15
Description FC24 LT_STRNG
The function FC24 compares the contents of two variables in the data type format
STRING to find out if the first is smaller than 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 the string at parameter S2.
The characters are compared by their ASCII code (for example, 'a' is smaller than
'A'), starting from the left. The first character to be different 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 Result of comparison
You can assign only a symbolically defined variable for the input parameters.
Description FC29 NE_STRNG
The function FC29 compares the contents of two variables in the data type format
STRING to find out if they are unequal 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 not equal to the string at parameter S2.
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 Result of comparison
You can assign only a symbolically defined variable for the input parameters.