1 high-speed counter instructions, Visual kv series – KEYENCE Visual KV Series User Manual

Page 228

Advertising
background image

4.1 High-speed Counter Instructions

3-204

Visual KV

Series

4

Chapter 4 High-speed Counters

CTH0: 16-Bit High-
speed counter

CTH1: 16-Bit High-
speed counter

CTC: High-speed
counter comparator

• 16-bit (0 to 65535) up/down counters for

clock pulses with a 30-kHz input

1.

response frequency.

• Can be changed to 24-bit (0 to 16777215)

counters with the MEMSW instruction.

2.

• Enables 30 kHz, two-phase input through

two channels.

1.

• Hardware-based comparator between the

preset value and current value of the
high-speed counter.

• The current value can be changed to a

preset value by external input.

SET

1

CTC

CTH

CTH

RES

0

CTH1

nnnn

CTCn

#ddddd

CTH0

nnnn

2008

0000

CTH0

RES

0500

SET

2103

SET

CTC0

RES

2008

0500

RES

CTC0

0500

T000

#60000

CTC0

#00030

T000

CTH0

0004

HSP

0004

1)

2)

3)

4)

5)

Input-enable relay

4.1

High-speed Counter Instructions

This section describes the CTH0, CTH1, and CTC instructions, which are used for
high-speed counters.

Count input

Example

Coding

Line No.

Instruction

Operand

Line No.

Instruction

Operand

0000

LD

2008

0009

LD

CTC0

0001

HSP

0004

0010

SET

0500

0002

LD

2008

0011

LD

0500

0003

SET

2103

0012

TMR

000 #00030

0004

CON

0013

AND

T000

0005

RES

CTH0

0014

RES

CTC0

0006

LD

0000

0015

CON

0007

CTH0

0004

0016

RES

0500

0008

CTC0

#6000

:

:

:

1. KV-300/Visual KV only
2. Visual KV only

KVNKA Chap 04_1.p65

08.3.11, 0:06 PM

204

Advertising