Data Conversion Instructions; Conversion From Bin Data To 4-Digit And 8-Digit Bcd (Bcd(P),Dbcd(P)) - Mitsubishi MELSEC Q Series Programming Manual

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

BCD(P),DBCD(P)
6.3

Data conversion instructions

6.3.1
Conversion from BIN data to 4-digit and 8-digit BCD
(BCD(P),DBCD(P))
BCD(P),DBCD(P)
BCD(P), DBCD(P)
BCD, DBCD
BCDP, DBCDP
Setting
Data
S
D
Function
BCD
Converts BIN data (0 to 9999) at the device designated by
device designated by
DBCD
Converts BIN data (0 to 99999999) at the device designated by
the device designated by
6-74
Command
Command
: 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
R, ZR
Bit
Word
.
D
16384
8192
4096
2048
1024
-32768
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
.
D
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)
High
Basic
performance
indicates an instruction symbol of
J
\
U
\G
Bit
Word
to BCD data, and stores it at the
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
S
(Lower 16 bits)
BCD conversion
Ten
Thousands
Hundreds
Tens
thousands
digits
digits
digits
digits
D
(Lower 4 digits)
Process
Redundant Universal
BCD/DBCD.
S
D
P
S
D
Constants
Zn
Other
K, H
––
2
1
1
1
2
1
0
1
to BCD data, and stores it at
S
Ones
digits
LCPU
––
––

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents