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

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Conversion from BCD 4-digit data to BIN data, conversion from
BCD 8-digit data to BIN data
BIN(P), DBIN(P)
High
Basic
Process
Redundant Universal
performance
BIN, DBIN
BINP, DBINP
(S): BCD data or head number of the devices where the BCD data is stored (BCD 4/8 digits)
(D): Head number of the devices where BIN data will be stored (BIN 16/32 bits)
Setting
Internal device
data
Bit
Word
(S)
(D)
Processing details
■BIN
• Converts BCD data (0 to 9999) at device designated by (S) to BIN data, and stores at the device designated by (D).
8000
4000
2000
1000
S
BCD 9999
1
0
0
1
Thousands digits Hundreds digits
32768
16384
8192
4096
0
0
1
0
D
BIN 9999
Always filled with 0s.
■DBIN
• Converts BCD data (0 to 99999999) at device designated by (S) to BIN data, and stores at the device designated by (D).
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
BCD 99999999
S
Ten
Millions
millions
digits
digits
D
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
Always filled with 0s.
LCPU
Command
Command
R, ZR
J\
Bit
800
400
200
100
80
40
20
10
1
0
0
1
1
0
0
Tens digits
BIN conversion
2048
1024
512
256
128
64
32
16
0
1
1
1
0
0
0
S
+1
Hundred
Ten
Thousands
thousands
thousands
digits
digits
digits
BIN conversion
D
+1
indicates an instruction symbol of
P
U\G
Word
8
4
2
1
1
1
0
0
1
Ones digits
8
4
2
1
0
1
1
1
1
S
Hundreds
Tens
Ones
digits
digits
digits
D
BIN/DBIN.
S
D
S
D
Zn
Constant
Others
K, H
6 BASIC INSTRUCTIONS
6.3 Data Conversion Instructions
6
271

Advertisement

Table of Contents
loading

Table of Contents