FX Series Programmable Controlers Applied Instructions 5
5-185
5.15.1 GRY (FNC 170)
Operation:
The binary integer value in S is converted to the
GRAY CODE equivalent and stored at D.
Points to Note:
The nature of gray code numbers allows numeric values to be quickly output without the need
for a strobing signal. For example, if the source data is continually incremented, the new output
data can be set each program scan.
Mnemonic Function
Operands
Program steps
SD
GRY
FNC 170
(Gray
Code)
Calculates the
gray code value
of an integer
K, H,
KnX, KnY, KnM, KnS,
T, C, D, V, Z
KnY, KnM, KnS,
T, C, D, V, Z
GRY,GRYP:
5steps
DGRY,DGRYP
9steps
FX
1S
FX
1N
FX
2N
FX
2NC
PULSE-P
16 BIT OPERATION
32 BIT OPERATION
M45
K1234 K3Y10GRY
[ S ] [ D ]