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

Table of Contents

Advertisement

GRY, GRYP, DGRY, DGRYP
6.3.9
GRY, GRYP

Conversion from BIN 16-bit data to Gray code

6.3.9

DGRY, DGRYP

Conversion from BIN 32-bit data to Gray code
GRY, GRYP, DGRY, DGRYP
GRY, DGRY
GRYP, DGRYP
: BIN data or head number of the devices where the BIN data is stored (BIN 16/32 bits)
S
: Head number of the devices where the converted Gray code will be stored (BIN 16/32 bits)
D
Setting
Internal Devices
Data
Bit
Word
S
D
Function
GRY
Converts BIN 16-bit data at the device designated by
b15
S
BIN 1234
0
0
b15
0
0
D
Gray code 1234
DGRY
Converts BIN 32-bit data at the device designated by
b31
S
BIN 305419896
0
0
0 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 0 0
b31
Gray code 305419896 0
0
0 1 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 0 0
D
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Error
code
4100
The data at
is a negative value.
S
244
Command
Command
J
R, ZR
Bit
to Gray code, and stores result at device designated by
S
16 bits
0
0
0
1
0
0
1
1
0
0
0
1
1
0
1
0
to Gray code, and stores result at device designated by
S
S
+1 (Upper 16 bits)
b16
b15
D
+1
b16
b15
Error details
Basic
indicates an instruction symbol of
\
U
\G
Word
b0
0
1
0
0
1
0
b0
1
1
1
0
1
1
S
(Lower 16 bits)
b0
D
b0
Q00J/
Q00/
QnH
Q01
High
Process
Redundant Universal
performance
GRY, DGRY.
S
D
S
D
P
Constants
Zn
K, H
––
D
D
QnPH QnPRH
QnU
LCPU
Other
––
––
.
.
LCPU

Advertisement

Table of Contents
loading

Table of Contents