Specifications

SIMATIC Instructions
9-138
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Double Integer to ASCII
The Double Integer to ASCII instruction converts a
double word (IN) to an ASCII string. The format (FMT)
specifies the conversion precision to the right of the
decimal. The resulting conversion is placed in 12
consecutive bytes beginning with OUT.
Error conditions that set ENO = 0: SM4.3 (run-time),
0006 (indirect address), no output (illegal format)
Inputs/Outputs Operands Data Types
IN VD, ID, QD, MD, SD, SMD, LD, HC, Constant, AC, *VD, *AC, *LD DINT
FMT VB, IB, QB, MB, SMB, LB, AC, Constant, *VD, *AC, SB, *LD BYTE
OUT VB, IB, QB, MB, SMB, LB, *VD, *AC, SB, *LD BYTE
The format operand (FMT) for the DTA instruction is defined in Figure 9-49. The
size of the output buffer is always 12 bytes. 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. Specifying 0 digits to the right of the decimal point causes
the value to be displayed without a decimal point. For values of nnn bigger than 5,
the output buffer is filled with ASCII spaces. 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 must be zero. The output buffer is formatted in
accord with the following rules:
1. Positive values are written to the output buffer without a sign.
2. Negative values are written to the output buffer with a leading minus sign (-).
3. Leading zeros to the left of the decimal point (except the digit adjacent to the
decimal point) are suppressed.
4. Values are right-justified in the output buffer.
L
A
D
S
T
L
DTA IN, OUT, FMT
DTA
EN
IN
FMT
F
B
D
ENO
OUT
222 224
333
221