540
7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
Conversion from hexadecimal ASCII to BIN 16-bit data,
conversion from hexadecimal ASCII to BIN 32-bit data
HABIN(P), DHABIN(P)
■HABIN
• Converts hexadecimal ASCII data stored in the area starting from the device number designated by (S) into BIN 16-bit data,
and stores it in the device number designated by (D).
For example, if the ASCII code of 5A8DH is designated for the area starting from (S), the operation result would be stored at
(D) in the following manner:
• The ASCII data designated by (S) to (S)+1 can be in the range of from 0000H to FFFFH.
• The ASCII codes can be in the range of "30H" to "39H" and from "41H" to "46H".
(S): ASCII data to be converted to BIN value or head number of the devices where the ASCII data is stored (character string)
(D): Head number of the devices where the conversion result will be stored (BIN 16/32 bits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
$
Others
Bit Word Bit Word
(S)
(D)
Process
High
performance
Redundant
Universal
LCPU
Basic
Command
Command
P
D
S
D
S
HABIN, DHABIN
HABINP, DHABINP
indicates an instruction symbol of HABIN/DHABIN.
b15 b0
BIN 16 bits
+1
ASCII code for the 4th digitASCII code for the 3rd digit
ASCII code for the 2nd digit
ASCII code for the 1st digit
b15 b8b7 b0
S
S
D
b15 b0
+1
35
H
(5)41
H
(A)
38
H
(8)44
H
(D)
b15 b7 b0
5A8DH
D
S
S
b8