6. BASIC INSTRUCTIONS
6 − 39
MELSEC-A
6.3.1 BIN data → BCD 4-, 8-digit
conversion
(BCD, BCDP, DBCD, DBCDP)
Available Device
Bit device Word (16-bit) device Constant Pointer
Level
Carry
flag
Error
flag
X Y M L S B F T C D W R A0 A1 Z V K H P I N
Digit specification
Index
M9012 (M9010, M9011)
(S) O O O O O O O O O O O O O O O O
BCD
(D) O O O O O O O O O O O O O O O
K1
to
K4
(S) O O O O O O O O O O O O O O
DBCD
(D) O O O O O O O O O O O O O
K1
to
K8
O O
Functions BCD
Converts BIN data (0 to9999) of the device specified at (S) into BCD and transfers
the result to the device specified at (D).
Applicable
CPU
All CPUs
(S) (D)
(S) (D)
P
BCD conversion commands
(S)
BIN data or head number
of device which stores
BIN data
(D)
Head number of device
which will store BCD data
Setting data
BCD, DBCD
Indicates the instruction symbol.
Be sure to set to 0.
(BCD conversion will
be exceeded if not)
(S) side BIN 9999
(D) side BCD 9999
BCD conversion
Units digits Tens digits
Hundreds
digits
Thousands
digits