beautypg.com

Kv -300 – KEYENCE Visual KV Series User Manual

Page 302

background image

6.2 High-speed Counters

KV

-300

KV-10/80

3-278

6

Chapter 6 Interrupts, High-speed Counters, Positioning Control

High-speed counter and counter comparators
High-speed counter (CTH1)
CTH1 is a 16-bit hardware counter that counts from 0 to 65535.

You can specify the operands listed in the table below as the count input.

You can specify one operand from the table below.

Operand cannot be modified externally during execution of the program.

When the external pulse (0004, 0005) is selected, CTH1 is used as a High-speed
counter with a response frequency of 30 kHz.*

When one of the internal clocks (2100 to 2102, 2200 to 2202) is selected, CTH1
is used as a High-speed timer.

When the external pulse 0500 is selected as input to CTH1, CTH1 can count
direct clock pulses generated by CTH0.

* KV-10/80: 10 kHz

High-speed counter comparator (CTC)
High-speed counter comparators (CTC) is used only for High-speed counters (CTH).
When the current value of CTH reaches the preset value of one of the comparators
(CTC), the comparator turns ON.
At the contact of High-speed counter comparator (CTC), the level of output (0500,
0501) can be changed (directly output) through hardware or an interrupt can be
generated. To change the level of output 0500 and 0501, set the desired value (ON/
OFF) to special utility relays 2103 to 2112, 2203 to 2205, and 2207 to 2212.

The High-speed counters correspond to the High-speed counter comparators as
shown in the table below.

Internal Clocks for CTH0 and CTH1

Each High-speed counter (CTH) has its own internal clock.

The desired clock can be selected by specifying the relay No. as operand for
CTH instruction.

You cannot change the internal clock or external pulse during execution of the
program.

Each clock has the following period:

High-speed counter

CTH0

CTH1

Operand

2100

2200

2101

2201

2102

2202

0004

0005
0500

Countable range

0 to 65535

High-speed

High-speed

Range of

Output

Interrupt

counter

counter

setting value

comparator

CTH0

CTC0

0 TO 65535

0500

INT CTC0

CTC1

INT CTC1

CTH1

CTC2

0501

INT CTC2

CTC3

INT CTC3

High-speed counter

CTH0

CTH1

Period

Relay No.

2100

2200

1.0 µs

2101

2201

10.0 µs

2102

2202

100.0 µs

KVNKA Chap 06.p65

08.3.11, 0:10 PM

278