Program instructions
7.5 Convert
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 a buffer size of six bytes
(ssss=0110).
FMT Operand for the Real to ASCII (RTA) instruction
Example: ASCII to Hexadecimal
LAD
The "x" indicates that the "nibble" (half of a byte) is unchanged.
1
Example: Integer to ASCII
LAD
244
STL
Network 1
LD I3.2
ATH VB30, VB40, 3
Convert the integer value at VW2 to
8 ASCII characters starting at VB10,
using a format of 16#0B (a comma
for the decimal point, followed by 3
digits).
STL
Network 1
LD I2.3
ITA VW2, VB10, 16#0B
System Manual, V2.3, 07/2017, A5E03822230-AF
S7-200 SMART