Mitsubishi MELSEC-Q/L Programming Manual page 460

Table of Contents

Advertisement

HABIN, HABINP, DHABIN, DHABINP
DHABIN
(1) Converts hexadecimal ASCII data stored in the area starting from the device number designated by
data, and stores it in the device number designated by
b15
ASCII code for the 7th digit
S
+1
ASCII code for the 5th digit
S
+2
ASCII code for the 3rd digit
S
+3
ASCII code for the 1st digit
S
For example, if the ASCII code of 5CB807E1
stored at
+1 and
in the following manner:
D
D
b15
S
+1
S
+2
S
+3
S
(2) The ASCII data designated by
(3) The ASCII codes can be in the range of "30
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into
SD0.
Error
code
The ASCII codes specified in
4100
and from "41
" to "46
H
The range of the device specified in
4101
corresponding device.
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]
[Operation]
b15
b8b7
36
(6)
D20
H
46
(F)
D21
H
A63F
458
b8b7
ASCII code for the 8th digit
ASCII code for the 6th digit
ASCII code for the 4th digit
ASCII code for the 2nd digit
is designated for the area starting from
H
b8b7
43
(C)
35
(5)
H
H
38
(8)
42
(B)
H
H
37
(7)
30
(0)
H
H
31
(1)
45
(E)
H
H
to
+3 can be in the range of from 00000000
S
S
" to "39
H
Error details
to
+3 are other than "30
S
S
".
H
exceeds the range of the
S
[List Mode]
Step
b0
41
(A)
H
33
(3)
H
Regarded as A63F
(-22977 in decimal
value)
.
D
b0
D
+1
b31
b16 b15
Upper 16 bits
BIN 32 bits
b0
D
+1
b31
b16
5CB8
H
H
" and from "41
" to "46
".
H
H
H
Q00J/
Q00/
QnH
Q01
" to "39
"
H
H
––
––
––
Instruction
Device
D0
22977
H
BIN value
into BIN 32-bit
S
D
b0
Lower 16 bits
, the operation result would be
S
D
b15
b0
07E1
H
to FFFFFFFF
.
H
QnPH QnPRH
QnU
––
––
LCPU

Advertisement

Table of Contents
loading

Table of Contents