7-197
HABIN(P),DHABIN(P)
1
2
3
4
6
6
7
8
7.11 Character string processing instructions
7.11.5 Conversion from hexadecimal ASCII to BIN 16-bit and 32-bit data (HABIN(P),DHABIN(P))
Program Example
(1) The following program converts the hexadecimal, 4-digit ASCII data set at D20 and D21 to
BIN data, and stores the result at D0.
[Ladder Mode] [List Mode]
[Operation]
(2) The following program converts the hexadecimal, 8-digit ASCII data set at D20 to D23 to
BIN values, and stores the result at D10 and D11.
[Ladder Mode] [List Mode]
[Operation]
Step Instruction Device
D21
41H (A)36H (6)
33H (3)46H (F)
b8b7 b0
D20 D0
BIN value
22977
A63F
b15
Regarded as A63FH
(-22977 in decimal
value)
Step Instruction Device
D21
34H (4)46H (F)
44H
(D)32H (2)
b15 b8b7 b0
D20
Regarded as 4FD28750H
(1339197264 in decimal
value)
4FD28750
38H (8)37H (7)
35H (5)30H (0)
D22
D23
D11
BIN value
D10
7264
13391 9