Mitsubishi MELSEC-Q/L Programming Manual page 458

Table of Contents

Advertisement

DABIN, DABINP, DDABIN, DDABINP
For example, if the ASCII code of -1234543210
stored at
+1 and
in the following manner:
D
D
b15
b8b7
S
31
(1)
H
S
+1
33
(3)
H
S
+2
35
(5)
H
33
(3)
S
+3
H
+4
31
(1)
S
H
+5
S
(2) The ASCII data designated by
Further, data stored at the upper bytes of
(3) The sign "20
" will be stored if the BIN data is positive, and the sign "2D
H
(If other than "20
" and "2D
H
(4) ASCII code can be set for each position within the range from "30
(5) If the ASCII code set for individual positions is "20
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
"20
", or "00
".
H
H
4100
The ASCII data specified in
When the DABIN instruction is used......-32768 to 32767
When the DDABIN instruction is used...-2147483648 to 2147483647
The device specified in
4101
device.
Program Example
(1) The following program converts the decimal, 5-digit ASCII data and sign set at D20 through D22 to BIN values, and
stores the result at D0.
[Ladder Mode]
[Operation]
b15
b8b7
D20
20
(space)
H
D21
32
(2)
H
D22
36
(6)
H
-
276
456
is designated for the area starting from
H
b0
2D
( )
H
32
(2)
H
34
(4)
H
34
(4)
H
32
(2)
H
30
(0)
H
to
+5 can be in the range of from -2147483648 to 2147483647.
S
S
+5 will be ignored.
S
" is set, it will be processed as positive data.)
H
" or "00
H
Error details
to
+5 other than "30
S
S
to
+5 is outside the following ranges:
S
S
exceeds the range of the corresponding
S
[List Mode]
Step
b0
2D
( )
H
20
(space)
H
(Regarded as -00276)
37
(7)
H
D
+1
D
12 34
5 4
3 2 1 0
" will be stored if it is negative.
H
" to "39
".
H
H
," it will be processed as "30
H
Q00J/
Q00/
QnH
Q01
" to "39
",
H
H
––
––
––
Instruction
Device
D0
276
BIN value
, the operation result would be
S
".
H
QnPH QnPRH
QnU
LCPU
––
––

Advertisement

Table of Contents
loading

Table of Contents