Visual kv series – KEYENCE Visual KV Series User Manual

Page 229

Advertising
background image

4.1 High-speed Counter Instructions

3-205

Visual KV

Series

1

4

Chapter 4 High-speed Counters

Operands

CTH0:

0004
2100 to 2102

CTH1:

0005
0500
2200 to 2202

CTC0 to 3:

Preset value
#00001 to #65535

Key operation

Description

1) Initializes the setting when power is turned on.

The HSP instruction sets the input time constant of input relay 0004 to 10 µs.

The current value of CTH0 is reset as soon as it matches the preset value of
CTC0 when special utility relay 2103 is ON.

2) The counting is disabled when input relay 0000 is OFF. Counting starts (at 0004)

when input relay 0000 turns ON.

3) Sets "60000" as the preset value of the high-speed counter comparator.
4) When the current value of CTH0 reaches "60000", output relay 0500 turns ON

and the current value is reset.

5) Turns OFF both CTC0 and 0500 for three seconds after output relay 0500 turns

ON.

Tips

Unlike software-based counters, the high-speed counter is a hardware-based,
program-independent counter. It achieves an input response frequency of 30 kHz
without being affected by the scan time.

Input relays 0004 and 0005 can independently count the pulses with a 30 kHz
input response frequency.

Two-phase encoder input can be captured through two channels (30 kHz).

CTH0 uses input from relay 0004 as phase A input and input from relay 0006 as
phase B input (KV-10xx: 0000). CTH1 uses input from 0005 as phase A input
and input from 0007 as phase B input (KV-10xx: 0001).

Note: When phase differential input is used, pulses with a maximum frequency of 30
kHz can be counted, provided the pulses have a duty ratio of 1:1 (50%) and phase
difference of 90°. Inputting pulses with an irregular duty ratio or phase difference will
decrease the allowable input frequency.

SET

1

RES

0

CTC

CTH

Operand

Clock input

Preset

value

ENT

R-SRCH

ENT

R-SRCH

KVNKA Chap 04_1.p65

08.3.11, 0:06 PM

205

Advertising