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
41
H
(A)36
H
(6)
33
H
(3)46
H
(F)
b8b7 b0
D20
D0
BIN value
22977
A63F
b15
Regarded as A63FH
(-22977 in decimal
value)
Step Instruction Device
D21
34
H
(4)46
H
(F)
44
H
(D)32
H
(2)
b15 b8
b7
b0
D20
Regarded as 4FD28750H
(1339197264 in decimal
value)
4FD28750
38
H
(8)37
H
(7)
35
H
(5)30
H
(0)
D22
D23
D11
BIN value
D10
7
2
6
4
13391 9