FX Series Programmable Controlers Applied Instructions 5
5-186
5.15.2 GBIN (FNC 171)
Operation:
The GRAY CODE value in S is converted to the
normal binary equivalent and stored at D.
Points to Note:
This instruction can be used to read the value from a gray code encoder.
If the source is set to inputs X0 to X17 it is possible to speed up the reading time by adjusting
the refresh filter with FNC 51 REFF.
Mnemonic Function
Operands
Program steps
SD
GBIN
FNC 171
(Gray
Code)
Calculates the
integer value of a
gray code
K, H,
KnX, KnY, KnM, KnS,
T, C, D, V, Z
KnY, KnM, KnS,
T, C, D, V, Z
GBIN,GBINP:
5steps
DGBIN,
DGBINP:
9steps
FX
1S
FX
1N
FX
2N
FX
2NC
PULSE-P
16 BIT OPERATION
32 BIT OPERATION
T24
K3X20 D10GBIN
[ S ] [ D ]