11-23
11 High-speed Counters
CP2E CPU Unit Software User’s Manual(W614)
11-3 High
-sp
eed
Co
un
ter
Interrupts
11
11
-
3
-
3
Hig
h-speed Coun
ter Interr
upt I
nstr
uction
4
Use the CTBL instruction to start the comparison operation with high-speed counter 0 and inter-
rupt tasks 10 and 11.
When execution condition W0.00 turns ON, the comparison starts with high-speed counter 0.
When the PV of high speed counter 0 reaches
3
0,000, cyclic task execution is interrupted, and
interrupt task 10 is executed.
When the PV of high speed counter 0 reaches 20,000, cyclic task execution is interrupted, and
interrupt task 11 is executed.
When interrupt task 10 or 11 execution has been completed, execution of the interrupted cyclic
task resumes.
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 61A
8
hex) and 25,500 (0000 6
3
9C hex).
The maximum ring count is set to 50,000 (0000 C
3
50 hex).
1
Set high-speed counter 1 on the PLC Setup
’
s Built-in Input Tab Page.
Example 2: Range Comparison
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
@CTBL
#0000
#0000
D1000
W
0.00
Use high-speed co
u
nter 0.
Register a target-
v
al
u
e comparison
ta
b
le and start comparison operation.
First comparison ta
b
le
w
ord.
W
0.00
0
0.00
0.01
High-speed co
u
nter 0 PV
(in A270 and A271)
Co
u
nting ena
b
led
Cyclic task
exec
u
tion
Cyclic task
exec
u
tion
Cyclic task
exec
u
tion
Processing
interr
u
pted
Processing
interr
u
pted
Interr
u
pt task
10 exec
u
tion
Interr
u
pt task
11 exec
u
tion
Lo
w
er limit: 20,000 (4E20 Hex)
Upper limit: 30,000 (7530 Hex)
Summary of Contents for SYSMAC CP Series
Page 3: ......
Page 32: ...1 Overview 1 4 CP2E CPU Unit Software User s Manual W614 ...
Page 44: ...3 CPU Unit Operation 3 8 CP2E CPU Unit Software User s Manual W614 ...
Page 116: ...6 I O Allocation 6 8 CP2E CPU Unit Software User s Manual W614 ...
Page 144: ...7 PLC Setup 7 28 CP2E CPU Unit Software User s Manual W614 ...
Page 170: ...10 Interrupts 10 14 CP2E CPU Unit Software User s Manual W614 ...
Page 200: ...11 High speed Counters 11 30 CP2E CPU Unit Software User s Manual W614 ...
Page 272: ...12 Pulse Outputs 12 72 CP2E CPU Unit Software User s Manual W614 ...
Page 278: ...13 PWM Outputs 13 6 CP2E CPU Unit Software User s Manual W614 ...
Page 460: ...18 Programming Device Operations 18 28 CP2E CPU Unit Software User s Manual W614 ...
Page 576: ...Revision 2 CP2E CPU Unit Software User s Manual W614 ...
Page 577: ......