11 High-speed Counters
11-22
CP2E CPU Unit Software User’s Manual(W614)
•
Changing the PV of a High-speed Counter
In this example, high-speed counter 0 operates in linear mode and starts interrupt task 10 when the
PV reaches
3
0,000 (0000 75
3
0 hex) and starts interrupt task 11 when the PV reaches 20,000 (0000
4E20 hex).
1
Set high-speed counter 0 in the PLC Setup's Built-in Input Tab.
2
Set the target-value comparison table in words D1000 to D1006.
3
Create the programs for interrupt tasks 10 and 11.
Operand
Settings
C1
Port specifier
#0010
High-speed counter 0
~
~
#0015
High-speed counter 5
C2
Control data
#0000
Start comparison.
#0001
Stop comparison.
#0002
Change the PV.
S
First word of
new PV
S contains the first word of the new PV when C is set to #0002
(change the PV).
Example 1: Target Value Comparison
Item
Setting
High-speed counter 0
Use counter
Counting mode
Linear mode
Circular Max. Count
−
Reset method
Software reset
Input Setting
Up/Down inputs
Word
Setting
Function
D1000
#0002
Number of target values = 2
D1001
#75
3
0
Rightmost 4 digits of the target value 1 data (
3
0000)
Target value =
3
0,000(0000 75
3
0 hex)
D1002
#0000
Leftmost 4 digits of the target value 1 data (
3
0000)
D100
3
#000A
Target value 1
Bit 15: 0 (incrementing)
Bits 00 to 07: A hex (interrupt task number 10)
D1004
#4E20
Rightmost 4 digits of the target value 2 data (20000)
Target value =
20,000(0000 4E20 hex)
D1005
#0000
Leftmost 4 digits of the target value 2 data (20000)
D1006
#
8
00B
Target value 2
Bit 15: 1 (decrementing)
Bits 00 to 07: B hex (interrupt task number 11)
@I
N
I
C1
C2
S
Exec
u
tion condition
C1: Port specifier
C2: Control data
S: First
w
ord of ne
w
PV
Содержание SYSMAC CP Series
Страница 1: ...USER S MANUAL Cat No W614 E1 01 SYSMAC CP Series CP2E E D CP2E S D CP2E N D CP2E CPU Unit Software ...
Страница 3: ......
Страница 32: ...1 Overview 1 4 CP2E CPU Unit Software User s Manual W614 ...
Страница 44: ...3 CPU Unit Operation 3 8 CP2E CPU Unit Software User s Manual W614 ...
Страница 116: ...6 I O Allocation 6 8 CP2E CPU Unit Software User s Manual W614 ...
Страница 144: ...7 PLC Setup 7 28 CP2E CPU Unit Software User s Manual W614 ...
Страница 170: ...10 Interrupts 10 14 CP2E CPU Unit Software User s Manual W614 ...
Страница 200: ...11 High speed Counters 11 30 CP2E CPU Unit Software User s Manual W614 ...
Страница 272: ...12 Pulse Outputs 12 72 CP2E CPU Unit Software User s Manual W614 ...
Страница 278: ...13 PWM Outputs 13 6 CP2E CPU Unit Software User s Manual W614 ...
Страница 460: ...18 Programming Device Operations 18 28 CP2E CPU Unit Software User s Manual W614 ...
Страница 576: ...Revision 2 CP2E CPU Unit Software User s Manual W614 ...
Страница 577: ......