Technical data

Table Of Contents
IEC Functions
System Software for S7-300/400 System and Standard Functions - Volume 2/2
26-26
A5E00739858-01
Description FC38 STRNG_I
The function FC38 converts a string to a variable in INT data type format. The first
character in the string may be a sign or a number, the characters which then follow
must be numbers. If the length of the string is equal to zero or greater than 6, or if
invalid characters are found in the string, no conversion takes place and the binary
result (BR) bit of the status word is set to “0". If the result of the conversion is
outside the INT range, the result is limited to the corresponding value and the
binary result (BR) bit of the status word is set to “0".
Parameter Declaration Data Type Memory Area Description
S INPUT STRING D, L Input string
RET_VAL OUTPUT INT I, Q, M, D, L Result
You can assign only a symbolically defined variable for the input parameter.
Description FC39 STRNG_R
The function FC39 converts a string to a variable in REAL data type format. The
string must have the following format:
±v.nnnnnnnE±xx ± Sign
v 1 digit before the
decimal point
n 7 digits after the
decimal point
x 2 exponential digits
If the length of the string is smaller than 14, or if it is not structured as shown
above, no conversion takes place and the binary result (BR) bit of the status word
is set to “0". If the result of the conversion is outside the REAL range, the result is
limited to the corresponding value and the binary result (BR) bit of the status word
is set to “0".
Parameter Declaration Data Type Memory Area Description
S INPUT STRING D, L Input string
RET_VAL OUTPUT REAL I, Q, M, D, L Result
You can assign only a symbolically defined variable for the input parameter.