Conversion instructions
662
Part III FP Instructions
F95_ASC
12 Character -> ASCII transfer
d[5]
F
d[4]
ED
d[3]
0
d[2]
32
2046454420303332
d[1]
1C
d[0]
BA
31434241
[s]
[d]
A B C 1 2 3 0 D E F
Character constants
SPACE
ASCII character
Data register
ASCII HEX code
If the number of character constants specified by s is less than 12, the ASCII code
16#20 (SPACE) is stored in the extra destination area, e.g. s = ’12345’, d[0] = 3231,
d[1] = 3433, d[2] = 2035, d[3] = 2020, d[4] = 2020, d[5] = 2020.
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 F95_ASC (see page 1326)
Variable Data type Function
s constant, no
variables possible
Character constants, max. 12 letters (source).
d ANY16 Starting 16-bit area for storing 6-word ASCII code
(destination).
For Relay T/C Register Constant
s - - - - - - - - - dec. or hex.
d - WY WR WL SV EV DT LD FL -
No. IEC address Set If
R9007 %MX0.900.7 permanently
R9008 %MX0.900.8 for an instant
the last area for ASCII code exceeds the
limit
(6 words: six 16-bit areas).
Description
Converts the character constants specified by s to hexadecimal ASCII code. The hexadecimal
code is stored in 6 words starting from the 16-bit area specified by d.
Data types
Operands
Error flags