FX Series Programmable Controlers Applied Instructions 5
5-71
5.7.4 INCD (FNC 63)
Operation:
This instruction
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
le list of values which are to be
selected and compared b
two consecutive counters (S2and S2+1). The data table is
identified as havin
a head address S1and consists of n data elements.
b) Counter S2 is pro
rammed in a conventional wa
. The set value for counter S2 MUST be
reater than an
of the values entered into the data table. Counter S2 counts a user event
and compares this to the value of the currentl
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
ainst the new data elements value.
c) The counter S2+1 ma
have values from 0 to n. Once the nth data element has been
processed, the operation complete fla
M8029 is turned ON. This then automaticall
resets
counter S2+1hence, the c
cle starts a
ain with data element S1+0.
d) Values from 0 to 32,767 ma
be used in the data table.
e) The INCD instruction ma
onl
be used
ONCE
.
From the example instruction and the data table
identified left, the followin
timin
dia
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
le output
sequence in
response to
counter data
KnX, KnY,
KnM, KnS,
(in
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
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