Mitsubishi Electronics FX2C Home Theater Server User Manual


 
FX Series Programmable Controlers Applied Instructions 5
5-82
5.8.2 HKY (FNC 71)
Operation 1 - Standard:
This instruction creates a multiplex of 4 outputs
(D
1
) and 4 inputs (S) to read in 16 different
devices. Decimal values of 0 to 9 can be stored
while 6 further function fla
g
s ma
y
be set.
Points to note:
a) Each of the first 10 multiplexed source devices (identified as 0 to 9) map directl
y
to decimal
values 0 to 9. When entered, i.e. a source device is activated, then its associated decimal
value is added to the data strin
g
currentl
y
stored in D
2
. Activation of an
y
of these ke
y
s
causes bit device D
3+7
to turn ON for the duration of that ke
y
press.
b) The last 6 multiplexed source devices (identified as function ke
y
s A to F) are used to set bit
devices D
3+0
to D
3+5
respectivel
y
. These bit fla
g
s, once set ON, remain ON until the next
function ke
y
has been activated. Activation of an
y
of these ke
y
s causes bit device D
3+6
to
turn ON for the duration of that ke
y
press.
c) In all ke
y
entr
y
cases, when two or more ke
y
s are pressed, onl
y
the ke
y
activated first is
effective. When the pressin
g
of a ke
y
is sensed the M8029 (execution complete fla
g
) is
turned ON. When the HKY instruction is OFF, all D
3
devices are reset but data value D
2
remains intact.
d) When the HKY instruction is used with 16 bit
operation, D
2
can store numbers from 0 to 9,999
i.e. max. 4 di
g
its. When the DHKY instruction is
used (32 bit operation) values of 0 to 99,999,999
(max. 8 di
g
its) can be accommodated in two
consecutive devices D
2
and D
2+1
. In both cases if
the number to be stored exceeds the allowable
ran
g
es, the hi
g
hest di
g
its will overflow until an
allowable number is reached. The over-flowed
di
g
its are lost and can no lon
g
er be accessed b
y
the user. Leadin
g
zero’s are not accommodated,
i.e. 0127 will actuall
y
be stored as 127 onl
y
. This
operation is similar to that of the TKY instruction.
Mnemonic Function
Operands
Program steps
S
D
1
D
2
D
3
HKY
FNC 71
(Hexadeci-
mal
ke
y
input)
Multiplexes inputs
and outputs to
create a numeric
ke
y
board with 6
function ke
y
s
X,
Note:
uses 4
consecu-
tive
devices
Y,
Note:
uses 4
consecu-
tive
devices
T, C, D, V, Z
Note: uses 2
consecutive
devices
for 32 bit
operation
Y, M, S
Note:
uses 8
consecu-
tive
devices
HKY:
9 steps
DHKY:
17 steps
X4
Y 0 D 0
[ D2 ]
M0HKY
[ D1 ]
X 0
[ S ] [ D3 ]
X0 X1 X2 X324V 0V S/S
Y2 Y3
+V
Y0 Y1
1 2 3
4 5 6 7
9
0
D
8
C
BA
E F
Input keys-
0-9,A-F
Transistor Outputs (source)