
Chapter 5. Application instructions
5-11
5.2
Conversion instructions
5.2.1
BCD, BCDP, DBCD, DBCDP
BCD
(Binary coded
decimal)
FUN(60) BCD
FUN(62) DBCD
FUN(61) BCDP
FUN(63) DBCDP
Applicable
CPU
All CPUs
Available Device
Flag
Instructions
M
P
K
L
F
T
C
S
D
#D Integer
Steps
Error
(F110)
Zero
(F111)
Carry
(F112)
O O O O* O O O
O
O
BCD(P)
DBCD(P)
O O O O
*
O
O
O
O
5
O
* Available only when do not use computer link module or data link module
1) Functions
-
BCD : Converts binary data (0 to 9999) of the device specified at [ S ] into BCD format and
transfers the result to the device specified at [ D ].
-
DBCD : Converts binary data (0 to 99999999) of the device specified at [ S ] into BCD format and
transfers the result to the device specified at [ D ].
Operand setting
D
S
BCD
BCDP
DBCD
DBCDP
S
D
S
D
The source device at which
the data to be converted to
BCD format is stored
The device at which the
converted result is stored
D
S
1
8192
0
4096
0
32768
0
16384
1
512
1
256
0
2048
1
1024
0
32
0
16
0
128
0
64
1
2
1
1
1
8
1
4
0
2000
1
1000
1
8000
0
4000
0
200
1
100
1
800
0
400
0
20
1
10
1
80
0
40
0
2
1
1
1
8
0
4
Be sure to set as 0.
(BCD conversion will
be exceeded if not)
BIN (9999)
BCD (9999)
D
S