K
K
K
K inco
inco
inco
inco -K
-K
-K
-K S
S
S
S series
series
series
series
22
129 “ CV=PV ” interrupt of 2nd PV
… … ( Plus 1 )
159 “ CV=PV ” interrupt of 32nd PV
HSC3
160 “ CV=PV ” interrupt of 1st PV
161 “ CV=PV ” interrupt of 2nd PV
… … ( Plus 1 )
191 “ CV=PV ” interrupt of 32nd PV
2.2.5
2.2.5
2.2.5
2.2.5 How
How
How
How to
to
to
to use
use
use
use high
high
high
high speed
speed
speed
speed counter
counter
counter
counter
�
�
�
� Method
Method
Method
Method 1:Use
1:Use
1:Use
1:Use instructions
instructions
instructions
instructions for
for
for
for programming
programming
programming
programming
1) Configure the control byte of HSC and define the current value (i.e. starting value) and the preset value.
2) Use HDEF instruction to define the counter and its operation mode.
3) (Optional) Use ATCH instruction to define the interrupt routines.
4) Use HSC instruction to start the high-speed counter.
�
�
�
�
Method
Method
Method
Method 2:Use
2:Use
2:Use
2:Use wizard
wizard
wizard
wizard of
of
of
of HSC
HSC
HSC
HSC
In K2 PLC, it provides configuration wizard for high speed counter. Users can use the wizard to configure all
high speed counters and don ’ t need to program. The wizard is as following figure:
After using wizard to configure HSC, user also can use “ M
M
M
M ethod
ethod
ethod
ethod 1
1
1
1 ” to modify the parameters of HSC.