Program instructions
7.5 Convert
S7-200 SMART
244
System Manual, V2.3, 07/2017, A5E03822230-AF
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
STL
Network 1
LD I3.2
ATH VB30, VB40, 3
1
The "x" indicates that the "nibble" (half of a byte) is unchanged.
Example: Integer to ASCII
LAD
STL
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).
Network 1
LD I2.3
ITA VW2, VB10, 16#0B