AH500 Programming Manual
6-168
API
Instruction code Operand Function
0706 INCD
S
1
, S
2
, n, D
Incremental drum sequencer
Device
X Y M S T C HC D L SM SR E PR K 16#
“$” DF
16-Bit instruction (9 steps)
AH500
Symbol:
S
1
:
Initial device in the
comparison
Word
S
2
:
Counter number Word
D
:
Comparison result Bit
n
:
Number of comparison
groups
Word
Explanation:
1. The instruction INCD is used to generate multiple pulses for a pair of counters.
2. The current value of S
2
is compared with the setting value in S
1
. When the current value
matches the setting value, the current value of S
2
is rest to 0, and the current comparison
group number is stored in S
2
+1.
3. After the comparison between the current values of S
2
and the n groups of values is complete,
SM688 is ON for a scan cycle.
4. When the conditional contact is not enabled, the value in S
2
is 0, the value in S
2
+1 is 0,
D~D+n-1 are OFF, and SM688 is OFF.
5. When the on-line editing is used, please reset the conditional contact to initialize the
instruction.
6. The operand n should be within the range between 1 and 256.
Example:
1. Before the instruction INCD is executed, the instruction MOV is used to write the setting values
in D100~D104. The values in D100~D104 are 15, 30, 10, 40, and 25 respectively.
2. The current values of C10 is compared with the setting values in D100~D104. When the
current value matches the setting value, C10 is rest to 0, and counts again.
3. The current comparison group number is stored in C11.
4. When the value in C11 changes by one, M10~M14 act correspondingly. Please refer to the
timing diagram below.
5. When the comparison between the current values of C10 and the values in D100~D104 is
complete, SM688 is ON for a scan cycle.
6. When X0.0 is switched from ON to OFF, C10 and C11 are reset to 0, and M10~M14 are
switched OFF. When X0.0 is ON again, the execution of the instruction starts from the
beginning.