6 - 69 6 - 69
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
High Performance
QnA Q4AR
Basic
QCPU
PLC CPU
Process CPU
6.3.8 Conversion of Gray code to BIN 16 and 32-bit data
(GBIN, GBINP, DGBIN, DGBINP)
Usable Devices
Internal Devices
(System, User)
MELSECNET/10(H)
Direct J
\
Set
Data
Bit Word
File
Register
Bit Word
Special
Function
Module
U
\G
Index
Register
Zn
Constant
K, H
Other
S
D
[Instruction Symbol] [Execution Condition]
indicates GBIN or DGBIN
Command
Command
GBINP, DGBINP
GBIN, DGBIN
P
DS
DS
[Set Data]
Set Data Meaning Data Type
S
Gray code data or the head number of device where Gray code data is
being stored
Gray code
D
Head number of the device to store BIN data after conversion BIN 16/32 bits
[Functions]
GBIN
Converts Gray code data at device designated by
S
to BIN 16-bit data and stores at device
designated by
D
.
b15
00
0 0 0
1 1
0
1
0
1 1 1
0
11
b0
16 Bits
00
0 0 0 1 0 0 1 1 0 1 0 0 10
b15 b0
Gray code 1234
S
BIN 1234
D
DGBIN
Converts Gray code data at device designated by
S
to BIN 32-bit data and stores at device
designated by
D
.
000
1
0 0
1
0 0 0
1 1
0
1
0 0 0
1
0
1
0
1 1
0 0
1 1 1 1
0 00
0001 1 0 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1 00
b31 b16 b
b15
b31 b16
b
b15
Gray code 305419896
BIN 305419896
D
S
+1 (upper 16 bits)
S
(lower 16 bits)
S
D
D
+1
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com