Mitsubishi Electronics FX Home Theater Server User Manual


 
FX Series Programmable Controlers Applied Instructions 5
5-143
5.15.1 GRY (FNC 170)
Operation:
The binar
y
inte
g
er value in S is converted to the
GRAY CODE equivalent and stored at D.
Points to Note:
The nature of
g
ra
y
code numbers allows numeric values to be quickl
y
output without the need
for a strobin
g
si
g
nal. For example, if the source data is continuall
y
incremented, the new output
data can be set each pro
g
ram scan.
5.15.2 GBIN (FNC 171)
Operation:
The GRAY CODE value in S is converted to the
normal binar
y
equivalent and stored at D.
Points to Note:
This instruction can be used to read the value from a
g
ra
y
code encoder.
If the source is set to inputs X0 to X17 it is possible to speed up the readin
g
time b
y
ad
j
ustin
g
the refresh filter with FNC 51 REFF.
Mnemonic Function
Operands
Program steps
SD
GRY
FNC 170
(Gra
y
Code)
Calculates the
g
ra
y
code value
of an inte
g
er
K, H,
KnX, KnY, KnM, KnS,
T, C, D, V, Z
KnY, KnM, KnS,
T, C, D, V, Z
GRY,GRYP:
5 steps
DGRY,DGRYP
9 steps
Mnemonic Function
Operands
Program steps
SD
GBIN
FNC 171
(Gra
y
Code)
Calculates the
inte
g
er value of a
g
ra
y
code
K, H,
KnX, KnY, KnM, KnS,
T, C, D, V, Z
KnY, KnM, KnS,
T, C, D, V, Z
GBIN,GBINP:
5 steps
DGBIN,
DGBINP:
9 steps
M45
K1234 K3Y10GRY
[ S ] [ D ]
T24
K3X20 D10GBIN
[ S ] [ D ]