453
BCDDA, BCDDAP, DBCDDA, DBCDDAP
1
2
3
4
4
6
7
8
7.11
Char
acter
string processing inst
ructions
7.11.3
B
CDDA, BCD
D
AP, DBCDDA, D
B
CDDAP
DBCDDA
(1) Converts the individual digit numbers of hexadecimal notation of the BCD 8-digit data designated by into ASCII codes,
and stores the results into the area starting from the device designated by .
For example, if the value 01234056 is designated by , the operation result would be stored following in the following
manner:
(2) The BCD data designated by can be in the range of 0 to 99999999.
(3) The results of calculation stored in the device . All zeros on the left side of the "Number of significant digits" are zero-
suppressed.
(4) The data to be stored at the device designated by +4 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......Does not change
Operat
i
on
E
rror
(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
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4100
During the operation of the BCDDA instruction, the data of is other
than 0 to 9999.
During the operation of the DBCDDA instruction, the data of is other
than 0 to 99999999.
––
4101
The range of the device specified in exceeds the range of the
corresponding device.
––
––
––
––
S
D
+1
Ten
millions
place
ASCII code for ten-millions place
ASCII code for millions place
ASCII code for ten-thousands place
b15
b8b7
b0
+2
(Only
w
hen
SM701 is OFF)
ASCII code for thousands place
ASCII code for hundreds place
ASCII code for tens place
ASCII code for unit place
0
+3
Millions
place
Hundred
thou-
sands
place
Ten
thou-
sands
place
+1
Thou-
sands
place
Hundreds
place
Tens
place
U
nits
place
b31 b28
b24
b27
b16
b19
b23 b20
b15 b12
b0
b3
b7
b4
b8
b11
S
S
D
D
D
D
ASCII code for hundred-thousands place
S
D
+
1
+
2
+
3
+
1
+4
b31 b28
b2
4
b27
b16
b19
b23 b20
b15 b12
b7
b
4
20
H
31
H
(1)
32
H
(2)
33
H
(3)
b15
b8b7
b0
3
4
H
(
4
)
30
H
(0)
35
H
(5)
36
H
(6)
00
H
b0
b3
b8
b11
0
1
2
3
4
0
5
6
S
D
S
D
D
D
D
S
D
0 0 0 1
N
umber
of
s
i
gn
i
f
i
cant
d
i
g
i
ts
20
H
2 0 9 8
D
S
S
D