GRY Conversion

GRY, GRYP, DGRY, DGRYP

 

GRY instruction converts a binary data to a Gray code and save the result in the Destination (assigned device address).

(It supports only in XP and PLC-S CPU series)

 

S

Source

D

Destination

 

Instruction

Device address

No. of Steps

Flag

M

X

Y

K

L

F

T

C

S

Z

D

@D

Int.

 

Error

Zero

Carry

GRY(P)

DGRY(P)

S

o

o

o

o

o

o

o

o

-

o

o

o

o

4

o

-

-

D

o

-

o

o

o

-

o

o

-

o

o

o

o

 

GRY(P)

Functions

  • Convert S(16bit binary data) to 16bit gray code data and save the result in the Destination.

 

 

Example)

If M00 is ON, convert D80 (16bit binary data) to 16bit Gray code and then save the result in D90.

 

 

DGRY(P)

Functions

  • Convert S(32bit binary data) to 32bit Gray code and save the result in Destination.

 

 

Example)

If M00 is ON, convert D80 (32bit binary data) to 32bit Gray code and then save the result in D90.