206
Interrupt Functions Section 5-1
4. Use CTBL(882) to start the comparison operation with high-speed counter
0 and interrupt task 10.
5. Operation
When execution condition W0.00 goes ON, the comparison starts with
high-speed counter 0.
When the PV of high speed counter 0 reaches 30,000, cyclic task process-
ing is interrupted, and interrupt task 10 is processed. When interrupt task
10 processing is completed, processing of the interrupted cyclic task re-
sumes.
Example 2: High-speed
Counter (Ring Mode)
In this example, high-speed counter 1 operates in circular (ring) mode and
starts interrupt task 12 when the PV is between 25,000 (0000 61A8 hex) and
25,500 (0000 639C hex).
The maximum ring count is set at 50,000 (0000 C350Hex).
1,2,3... 1. Set high-speed counter 1 in the PLC Setup’s Built-in Input Tab.
2. Set the range comparison table starting at word D20000. Even though
range 1 is the only range being used, all 40 words must still be dedicated
to the range comparison table.
W0.00
CTBL(882)
# 0000
# 0000
D100 00
Use high-speed counter 0.
First comparison table word
Register a target-value comparison table and
start comparison operation.
W0.00
CIO 0.01
0
Counting enabled
Cyclic task
processing
Interrupt task
10 processing
Processing
interrupted
Cyclic task
processing
Interrupt task
10 processing
Processing
interrupted
Cyclic task
processing
30,000 (7530 hex)
High-speed counter 0 PV
(in A270 and A271)
Item Setting
High-speed counter 1 Use counter
Counting mode Circular mode
Circular Max. Count 50,000
Reset method Software reset (continue comparing)
Input Setting Up/Down inputs
Word Setting Function
D20000 #61A8 Rightmost 4 digits of range 1 lower limit Lower limit value:
25,000
D20001 #0000 Leftmost 4 digits of range 1 lower limit
D20002 #639C Rightmost 4 digits of range 1 upper limit Upper limit value:
25,500
D20003 #0000 Leftmost 4 digits of range 1 upper limit