beautypg.com

Visual kv series – KEYENCE Visual KV Series User Manual

Page 244

background image

4.3 Setting and Operation of High-speed Counters

3-220

Visual KV

Series

4

Chapter 4 High-speed Counters

Fetching counts from encoder

Uses the double (x2) multiplication mode to fetch phase differential input from the
encoder.
The fetched data is output as BCD data. Phase differential input: 0004, 0006 BCD
output: 0600 to 0615 (4 digits)

Cording

Initial setting
Special utility relays

Turn ON 2013 to reset the current value of CTH0 when CTC0 turns ON.

Turn ON 2113 and turn OFF 2114 to set the high-speed counter to double (x2)
multiplication mode.

Turn ON 2400 to enable the external reset.

The counter is reset at the rising edge of input 0008.

Note : The external reset input 0008 is set with hardware. Programming is not
necessary except for setting the external reset enable relay (2400 to ON).

2103

SET

2113

SET

2114

RES

CTH0

RES

2400

SET

2008

CTH0

LDA

TM00

STA

#00002

DIV

LDA

TBCD

0600

STA

2002 #00000

0000

CTH0

0004

2002

HSP

0004

HSP

0006

HSP

0008

END

ENDH

Initial setting

Line No.

Instruction

Operand

Line No.

Instruction

Operand

0000

LD

2008

0015

CTH

0 0004

0001

SET

2103

0016

LD

2002

0002

CON

0017

LDA

#0000

0003

SET

2113

0018

CON

0004

CON

0019

STA

TM00

0005

RES

2114

0020

CON

0006

CON

0021

LDA

CTH0

0007

RES

CTH0

0022

CON

0008

CON

0023

DIV

#00002

0009

SET

2400

0024

CON

0010

LD

2002

0025

TBCD

0011

HSP

0004

0026

CON

0012

HSP

0006

0027

STA

0600

0013

HSP

0008

0028

END

0014

LD

0000

0029

ENDH

KVNKA Chap 04_1.p65

08.3.11, 0:06 PM

220