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