Parameter
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.31 FC 30 - R_STRNG - Convert REAL to STRING
The function FC 30 converts a variable in REAL data format to a string.
n The string is shown with 14 digits:
±v.nnnnnnnE±xx
– ±: Sign
– v: 1 digit before the decimal point
– n: 7 digits after the decimal point
– x: 2 exponential digits
n If the variable given at the return parameter is too short or if no valid floating-point
number is given at parameter IN, no conversion takes place and the BR bit is set to
"0".
Parameter Declaration Data type Memory area Description
IN INPUT REAL I, Q, M, D, L
Constant
Input value
RET_VAL* OUTPUT STRING D, L Result string
*) You can assign only a symbolically defined variable for the parameter.
15.2.32 FC 31 - REPLACE - Replace in a STRING variable
The function FC 31 replaces a number of characters L of the first string IN1 starting at the
character at position P (inclusive) with the entire second string IN2.
n If L is equal to zero and P is not equal to zero, the first string is returned.
n If L is equal to zero and P is equal to zero, the second string is precent to the first
string.
n If L is not equal to zero and P is equal to zero or one, the string is replaced from the
1. character (inclusive).
n If P is outside the first string, the second string is appended to the first string.
n If L and/or P is negative, a blank string is returned and the BR bit is set to "0". The BR
bit is also set to "0" if the resulting string is longer than the variable given at the output
parameter; in this case the result string is limited to the maximum set length.
Description
Parameter
Description
VIPA SPEED7
Standard
IEC > FC 31 - REPLACE - Replace in a STRING variable
HB00 | OPL_SP7 | Operation list | en | 18-30 817