
Program instructions
7.5 Convert
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
247
The following figure also shows examples of values that are formatted using a decimal point
(c= 0) with three digits to the right of the decimal point (nnn = 011). The value at OUT is the
length of the string stored in the next byte addresses.
FMT parameter for the integer to string instruction
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.
Содержание SIMATIC S7-200
Страница 30: ...Product overview 1 7 Programming software S7 200 SMART 30 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 267: ...Program instructions 7 6 Counters S7 200 SMART System Manual V2 3 07 2017 A5E03822230 AF 267 HSC modes 3 and 4 ...
Страница 394: ...Program instructions 7 18 Subroutine S7 200 SMART 394 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 425: ...Communication 8 5 PROFIBUS S7 200 SMART System Manual V2 3 07 2017 A5E03822230 AF 425 ...
Страница 786: ...Technical specifications A 11 S7 200 SMART cables S7 200 SMART 786 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 798: ...Error codes C 4 PLC fatal error codes S7 200 SMART 798 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 848: ...Ordering information F 6 Human Machine Interface devices S7 200 SMART 848 System Manual V2 3 07 2017 A5E03822230 AF ...