Ascii Sub-String To Number Value Conversion - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

The length of the output string is specified by the ssss field. A size of 0, 1, or 2 bytes is not
valid. The number of digits to the right of the decimal point in the output buffer is assigned by
the nnn field. The valid range of the nnn field is 0 to 5. If you assign 0 digits to the right of the
decimal point, then the value is displayed without a decimal point. The output string is filled
with ASCII space characters when nnn is greater than 5 or when the assigned length of the
output string is too small to store the converted value. The c bit specifies the use of either a
comma (c=1) or a decimal point (c=0) as the separator between the whole number and the
fraction.
The following figure also shows examples of values that are formatted using a decimal point
(c= 0) with one digit to the right of the decimal point (nnn = 001) and an output string length
of 6 characters (ssss = 0110). The value at OUT is the length of the string stored in the next
byte addresses.
FMT operand for the real to string instruction
See Also
Assigning a constant value for instructions (Page 83)
7.5.4

ASCII sub-string to number value conversion

LAD / FBD
STL
STI IN, INDX, OUT ASCII sub-string to integer value conversion
STD IN, INDX, OUT ASCII sub-string to double integer value conversion
STR IN, INDX, OUT ASCII sub-string to real value conversion
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
Description
Program instructions
7.5 Convert
249

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents