Conversion From Gray Code To Bin 16-Bit Data; Dgbin, Dgbinp - Mitsubishi MELSEC-Q/L Programming Manual

Table of Contents

Advertisement

Program Example
(1) The following program converts the BIN data at D100 to Gray code when X10 is ON, and stores result at D200.
[Ladder Mode]
(2) The following program converts the BIN data at D10 and D11 to Gray code when X1C is ON, and stores it at D100 and
D101.
[Ladder Mode]
6.3.10
GBIN, GBINP

Conversion from Gray code to BIN 16-bit data

6.3.10

DGBIN, DGBINP

Conversion from Gray code to BIN 32-bit data
GBIN, GBINP, DGBIN, DGBINP
GBIN, DGBIN
GBINP, DGBINP
: Gray code data or head number of the devices where the Gray code data is stored (BIN 16/32 bits)
S
: Head number of the devices where the converted BIN data will be stored (BIN 16/32 bits)
D
Internal Devices
Setting
Data
Bit
Word
S
D
Function
GBIN
Converts Gray code data at device designated by
b15
S
Gray code 1234
0
0
0
b15
0
0
0
D
BIN 1234
[List Mode]
Step
[List Mode]
Step
Command
Command
J
\
R, ZR
Bit
to BIN 16-bit data and stores at device designated by
S
16 bit
0
0
1
1
0
1
0
1
0
0
1
0
0
1
1
0
GBIN, GBINP, DGBIN, DGBINP
Device
Instruction
Instruction
Device
High
Basic
performance
indicates an instruction symbol of
U
\G
Word
b0
1
1
0
1
1
b0
1
0
0
1
0
Process
Redundant Universal
LCPU
GBIN/DGBIN.
S
D
P
S
D
Constants
Zn
Other
K, H
––
.
D
1
2
3
4
6
7
8
––
––
245

Advertisement

Table of Contents
loading

Table of Contents