6.3 Data Conversion Instructions
6.3.9 16-/32-bit BIN data to Gray code conversion
6-87
6
BA
S
IC
INSTRUCTIONS
GR
Y,
DG
R
Y
GRY, DGRY
6.3.9
16-/32-bit BIN data to Gray code conversion
GRY, DGRY
F
unct
i
on
GRY(P)
Converts 16-bit BIN data in the device specified for
to Gray code, and stores the result to the
device specified for
.
Negative values cannot be specified for
.
GRY(P)
DGRY(P)
P: Executing condition
:
indicates any of the following
instructions.
GRY
GRYP
DGRY
DGRYP
Input argument,
EN:
Executing condition
: Bit
s:
BIN data
: ANY16/32
Output argument,
ENO:
Execution result
: Bit
d:
Converted Gray code
: ANY16/32
Setting
data
Internal device
R, ZR
J
\
U
\G
Zn
Constant
K, H
Others
Bit
Word
Bit
Word
−
−
−
U
n
i
versa
l
UD
Hi
g
h
Per
f
ormance
Structured ladder
ST
GRY
EN
ENO
s
d
GRY
(EN, s, d);
ENO:=
s
d
s
d
s
b15
0
B
IN
0
0
0
0
1
0
0
1
1
0
1
0
0
1
0
b
0
16 bi
ts
b15
0
Gray
code
12
3
4
0
0
0
0
1
1
0
1
0
1
1
1
0
1
1
b
0
s
d
12
3
4
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......