EasyManua.ls Logo

Siemens Simatic S7 Series

Siemens Simatic S7 Series
726 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Program instructions
7.5 Convert
S7-200 SMART
210 System Manual, 09/2015, A5E03822230-AC
Double integer to string conversion
LAD / FBD
STL
Description
DTS IN, OUT, FMT
The Double Integer to String instruction converts a double integer IN to an
ASCII string with a length of 12 characters. The format (FMT) assigns the
conversion precision to the right of the decimal, and whether the decimal
point is to be shown as a comma or a period. The resulting string is writ-
ten to 13 consecutive bytes starting at OUT.
Non-fatal error conditions with ENO = 0
SM bits affected
0006H indirect address
0091H operand out of range
Illegal format (nnn > 5)
FMT bit is not zero for the four most signif-
icant bits of the FMT byte
None
Input / output
Data type
Operand
IN
DINT
ID, QD, VD, MD, SMD, SD, LD, AC, HC, *VD, *LD, *AC, Constant
FMT
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
OUT
STRING
VB, LB, *VD, *LD, *AC
The length of the output string is always 12 characters. The number of digits to the right of
the decimal point in the output buffer is specified 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 causes, then the value is
displayed without a decimal point. For values of nnn greater than 5, the output is a string of
12 ASCII space characters. 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 upper 4 bits of
the format must be zero.
The following figure also shows examples of values that are formatted using a decimal point
(c= 0) with four digits to the right of the decimal point (nnn = 100). The value at OUT is the
length of the string stored in the next byte addresses.
FMT operand for the double integer to string instruction

Table of Contents

Other manuals for Siemens Simatic S7 Series

Related product manuals