Program instructions
7.5 Convert
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
205
The following figure 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).
FMT operand for the double integer to ASCII (DTA) instruction
The
instruction converts a real-number value IN to ASCII charac-
ters. The format parameter FMT specifies the conversion precision to the right of
the decimal, whether the decimal point is shown as a comma or a period, and
the output buffer size. The resulting conversion is placed in an output buffer
beginning with OUT.
Non-fatal error conditions with ENO = 0
• 0006H Invalid indirect address
• 0091H Operand out of range
• nnn > 5
• ssss < 3
• ssss < number of characters in OUT
None
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC, Constant
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
IB, QB, VB, MB, SMB, SB, LB, *VD, *LD, *AC
The number (or length) of the resulting ASCII characters is the size of the output buffer and
can be assigned from 3 to 15 bytes or characters.
The real-number format supports a maximum of 7 significant digits. Attempting to display
more than 7 significant digits produces a rounding error.