Data Conversion Instructions; Conversion From Bin Data To Bcd 4-Digit Data; Conversion From Bin Data To Bcd 8-Digit Data - Mitsubishi MELSEC-Q/L Programming Manual

Table of Contents

Advertisement

6.3

Data conversion instructions

6.3.1
BCD, BCDP

Conversion from BIN data to BCD 4-digit data

6.3.1
DBCD, DBCDP

Conversion from BIN data to BCD 8-digit data

BCD, BCDP, DBCD, DBCDP
BCD, DBCD
BCDP, DBCDP
: BIN data or head number of the devices where the BIN data is stored (BIN 16/32 bits)
S
: Head number of the devices where BCD data will be stored (BCD 4/8 digits)
D
Internal Devices
Setting
Data
Bit
Word
S
D
Function
BCD
Converts BIN data (0 to 9999) at the device designated by
DBCD
Converts BIN data (0 to 99999999) at the device designated by
Command
Command
J
\
R, ZR
Bit
-32768
16384
8192
4096
2048
1024
S
BIN 9999
0
0
1
0
0
Must always be "0".
8000
4000
2000
1000
800
D
BCD 9999
1
0
0
1
1
Thousands digits Hundreds digits
S
+1 (Upper 16 bits)
S
BIN 99999999
0
0
0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1
Must always be "0" (upper 5 digits).
1
0
0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1
D
BCD 99999999
Ten
Millions
Hundred
millions
digits
thousands
digits
digits
D
+1 (Upper 4 digits)
BCD, BCDP, DBCD, DBCDP
High
Basic
performance
indicates an instruction symbol of
P
U
\G
Word
to BCD data, and stores it at the device designated by
S
512
256
128
64
32
16
8
4
1
1
1
0
0
0
0
1
1
BCD conversion
400
200
100
80
40
20
10
8
4
0
0
1
1
0
0
1
1
0
Tens digits
Ones digits
to BCD data, and stores it at the device designated by
S
S
(Lower 16 bits)
BCD conversion
Ten
Thousands
Hundreds
Tens
thousands
digits
digits
digits
digits
D
(Lower 4 digits)
Process
Redundant Universal
LCPU
BCD/DBCD.
S
D
S
D
Constants
Zn
Other
K, H
––
2
1
1
1
2
1
0
1
Ones
digits
1
2
3
4
6
––
––
7
8
.
D
.
D
231

Advertisement

Table of Contents
loading

Table of Contents