Conversion instructions
673
Part III FP Instructions
F250_BTOA
Binary -> ASCII conversion
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
PLC types
Availability of F250_BTOA (see page 1323)
Variable Data type Function
s1_Control STRING Control string
D16
+
-
D:
H:
converts to decimal ASCII data
converts to hexadecimal ASCII data
Reverse direction
Normal direction
16: converts in 16-bit (1-word) units
32: converts in 32-bit (2-word) units
s2_BinaryData ANY Starting area for storing binary data
n_Conversion
Method
ANY16 Conversion method
16#
Number of ASCII characters per converted unit
Offset in ASCII character units (8-bit)
Number of 16-bit (1-word) or 32-bit (2-word)
units converted
(for details, see explanation following the tables)
d_AsciiData ANY Starting area for storing ASCII data
For Relay T/C Register Constant
s1_Control WX WY WR WL SV EV DT LD - -
s2_BinaryData WX WY WR WL SV EV DT LD - -
n_Conversion
Method
- WY WR WL SV EV DT LD - dec. or hex.
d_AsciiData - WY WR WL SV EV DT LD - -
Description
Converts 16-bit/32-bit binary data stored in the area specified by s2_BinaryData to ASCII code.
The conversion method is specified by n_ConversionMethod according to the four control
characters of s1_Control. The converted result is stored in the area specified by d_AsciiData.
Data types
Operands