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