Technical data

Table Of Contents
IEC Functions
System Software for S7-300/400 System and Standard Functions - Volume 2/2
A5E00739858-01
26-13
26.6 Comparing STRING Variables
Description FC10 EQ_STRNG
The function FC10 compares the contents of two variables in the data type format
STRING to find out if they are equal 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 the same as 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.
Description FC13 GE_STRNG
The function FC13 compares the contents of two variables in the data type format
STRING to find out if the first is greater than 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 greater than or equal to the string at parameter S2.
The characters are compared by their ASCII code (for example, 'a' is greater than
'A'), starting from the left. The first character to be different decides the result of the
comparison. If the first characters are the same, the longer string is greater.
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.