448
BINDA, BINDAP, DBINDA, DBINDAP
DBINDA
(1) Converts the individual digit numbers of decimal notation of the BIN 32-bit data designated by into ASCII codes, and
stores the results into the area starting from the device designated by .
For example, if the value -12345678 has been designated by , the following would be stored into the area starting from
:
(2) BIN data designated by can be between -2147483648 to 2147483647.
(3) The operations results stored at will be stored in the following way:
(a) The sign "20
H
" will be stored if the BIN data is positive, and the sign "2D
H
" will be stored if it is negative.
(b) The sign "20
H
" will be stored for the leading zeros of effective digits. (Zero suppression is conducted.)
(c) The data stored at the upper 8 bits of the device designated by +5 differs depending on the ON/OFF status of
SM701 (number of characters to output select signal).
When SM701 is OFF.....Stores "0"
When SM701 is ON..... Stores "20
H
"
Operat
i
on
E
rror
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Program
E
xamp
l
e
(1) The following example program uses the PR instruction to output the 16-bit BIN data W0 value by decimal to Y40 to Y48
as ASCII.
[Ladder Mode]
[List Mode]
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4101
The range of the device specified in exceeds the range of the
corresponding device.
––
––
––
––
S
D
+1
Sign
ASCII code for billions place
ASCII code for hundred-millions place
ASCII code for ten-millions place
b15
b8b7
b0
+2
When SM701 is OFF
When SM701 is ON
ASCII code for millions place
ASCII code for hundred-thousands place
ASCII code for ten-thousands place
ASCII code for thousands place
+3
+1
ASCII code for hundreds place
ASCII code for tens place
ASCII code for units place
0 or 20
H
0
20
H
U
pper 16 bits
Lo
w
er 16 bits
BIN 32-bit data
+4
+5
S
D
S
D
D
D
D
D
S
D
+
1
2D
H
(
)
20
H
(space)
20
H
(space)
31
H
(1)
b15
b8b7
b0
+
2
32
H
(2)
33
H
(3)
3
4
H
(
4
)
35
H
(5)
+
3
36
H
(6)
37
H
(7)
38
H
(8)
0
or
20
H
+4
+4
+
1
1 2 3
4
5 6 7 8
S
S
D
D
D
D
D
D
S
D
0 0 1 2
N
umber
of
s
i
gn
i
f
i
cant
d
i
g
i
ts
20
H
0 3
4
5 6 0
D
D
Step
I
nstruct
i
on
De
vi
ce