164
4
4 Instructions4.5.1 Data Conversion
◆
Function
The 16-bit data in S is separated by every four bits. The data after separation is stored in the lower four bits
of each of the elements from head address D. The other 12 bits are lled with 0s.
n ranges from 1 to 4. The instruction is not executed when n = 0.
000H
000H
儈ᆇ㢲 վᆇ㢲
000H
儈ᆇ㢲 վᆇ㢲
000H
[ D+0 ]
b0b4 b3
b8 b7
b12 b11 b0b4 b3
[ S ]
[ D+1 ]
[ D+2 ]
[ D+3 ]
b15 b15
Lower four bits
Lower four bits
Lower four bits
Lower four bits
An operation error occurs in the following conditions. The error ag M8067 is set to ON to identify this error
and the error code is stored in D8067.
Error K6705 is returned when the start number D is out of range.
Error K6706 is returned when n is out of range.
◆
Application
The 16-bit data in D100 is separated by every four bits. The result is stored in three consecutive D elements
from head address D120.
ASCI: Conversion from HEX to ASCII format
◆
Overview
The ASCI instruction encodes the value in S in ASCII format. The result is stored in variables from head
address D.
ASCI S D n
Conversion from
HEX to ASCII
format
Applicable model:
H3U
S
Data
source
Address of the variable or the numeric constant to be
converted
16-bit instruction
(7 steps)
ASCI:
Continuous
execution
ASCIP: Pulse
execution
D
Conversion
result
Head address of variables that store the ASCII characters
after conversion
n
Converted
character
count
Number of converted characters; value range: 1 to 256