Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
8 Applied Instructions (Move and Compare)
8.9 BCD / Conversion to Binary Coded Decimal
160
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Function and operation explanation
1. 16-bit operation(BCD, BCDP)
This instruction converts the binary (BIN) data specified by into binary-coded decimal (BCD) data, and
transfers the converted BCD data to the device specified by .
The data of the device specified by can be converted if it is within the range from K0 to K9999 (BCD).
The table below shows digit specification for the devices specified by and respectively.
2. 32-bit operation(DBCD, DBCDP)
This instruction converts the binary (BIN) data specified by into binary-coded decimal (BCD) data, and
transfers the converted BCD data to the device specified by .
The data of the device specified by can be converted if it is within the range from K0 to K99999999
(BCD).
The table below shows digit specification for the devices specified by and respectively.
Number of digits Data range
K1Y000 1 0 to 9
K2Y000 2 00 to 99
K3Y000 3 000 to 999
K4Y000 4 0000 to 9999
[+1,]
Number of digits Data range
K1Y000 1 0 to 9
K2Y000 2 00 to 99
K3Y000 3 000 to 999
K4Y000 4 0000 to 9999
K5Y000 5 00000 to 99999
K6Y000 6 000000 to 999999
K7Y000 7 0000000 to 9999999
K8Y000 8 00000000 to 99999999
BCD
EN
s
ENO
d
Conversion
source data
Conversion
destination data
When "K4Y000" is specified
(sequence on the right)
PLC
BCD
Y014
to
Y017
BIN
BCD
Command
input
Y010
to
Y013
Y004
to
Y007
Y000
to
Y003
DBCD
EN
s
ENO
d
Conversion
source data
Conversion
destination data
PLC
DBCD
Y034
to
Y037
BIN
BCD
Command
input
When "K8Y000" is specified
(sequence on the right).
Y030
to
Y033
Y024
to
Y027
Y020
to
Y023
Y014
to
Y017
Y010
to
Y013
Y004
to
Y007
Y000
to
Y003