Mitsubishi Electronics FX Home Theater Server User Manual


 
FX Series Programmable Controlers Applied Instructions 5
5-71
5.7.4 INCD (FNC 63)
Operation:
This instruction
g
enerates a sequence of
sequential output patterns (there are n number of
addressed outputs) in response to the current
value of a pair of selected counters (S2, S2+1).
Points to note:
a) This instruction uses a ‘data table’ which contains a sin
g
le list of values which are to be
selected and compared b
y
two consecutive counters (S2and S2+1). The data table is
identified as havin
g
a head address S1and consists of n data elements.
b) Counter S2 is pro
g
rammed in a conventional wa
y
. The set value for counter S2 MUST be
g
reater than an
y
of the values entered into the data table. Counter S2 counts a user event
and compares this to the value of the currentl
y
selected data element from the data table.
When the counter and data value are equal, S2 increments the count of counter S2+1and
resets its own current value to ‘0’ (zero).
This new value of counter S2+1selects the new data element from the data table and
counter S2now compares a
g
ainst the new data elements value.
c) The counter S2+1 ma
y
have values from 0 to n. Once the nth data element has been
processed, the operation complete fla
g
M8029 is turned ON. This then automaticall
y
resets
counter S2+1hence, the c
y
cle starts a
g
ain with data element S1+0.
d) Values from 0 to 32,767 ma
y
be used in the data table.
e) The INCD instruction ma
y
onl
y
be used
ONCE
.
From the example instruction and the data table
identified left, the followin
g
timin
g
dia
g
ram for elements
M0 to M3 can be constructed.
Mnemonic Function
Operands
Program steps
S
1
S
2
Dn
INCD
FNC 63
(Incremental
drum
sequencer)
Generates a
sin
g
le output
sequence in
response to
counter data
KnX, KnY,
KnM, KnS,
(in
g
roups of
8)
T, C, D
C
Uses 2
consecu-
tive
counters
Y, M, S
Note:
n consec-
utive
devices
are used
K,H
Note:
n
64
INCD:
9 steps
Note: Hi
g
h speed
counters are not allowed
X0
C 0D300 M 0
[ S1 ]
[ S2 ]
[ D ]
K 4
[ n ]
INCD
X0
C0
C1
M0
M1
M2
M3
M8029
0
1
2
3
0
1
20
30
40
10
20
Cycle restarts
D300
Data table
Value of
counter
S2+1
D301
D302
D303
20
30
10
40
0
1
2
3
Data
element
Data value / count value
for counter S2