beautypg.com

7 applications of high-speed counters, Visual kv series, Comparing encoder values – KEYENCE Visual KV Series User Manual

Page 241: Setting multi-level high-speed counters

background image

4.3 Setting and Operation of High-speed Counters

3-217

Visual KV

Series

1

4

Chapter 4 High-speed Counters

2008

2002

0000

2214

RES

2213

SET

2114

RES

2113

SET

EI

#60000

CTC0

CTH0

RES

0500

RES

CTH0

0004

CTH1

0005

HSP

0005

HSP

0006

HSP

0004

HSP

0007

INT

CTC0

2002

2009

2009

2002

ENDH

RETI

END

0500

SET

CTH0

RES

CTH1

RES

CTH1

LDA

#60000

CMP

4.3.7

Applications of High-speed Counters

Comparing encoder values

Uses two encoders to input phase differential signals to input relays 0004 and 0006,
and 0005 and 0007. Turns ON output relay 0500 if the count value of 0005 and 0007
is greater than that of 0004 and 0006 when 0004 and 0006 count "60000".

Compares current value of CTH1 with
"#60000". Turns ON 0500 when value is
greater than "#60000". Turns OFF 0500
when value is smaller.

Initial setting
SET 2113
RES 2114
SET 2213
RES 2214

Setting for CTH0

Setting for CTH1

Sets input time constant of inputs 0004,
0005, 0006, and 0007 to 10 µs.

Phase differential input to inputs 0004 and
0006

Specifies preset value of CTC0 to "#60000".

Phase differential input to inputs 0005 and
0007

Setting multi-level high-speed counters

Sets the preset value of the high-speed counter comparator for the high-speed
counter for input relay 0005 as follows:

#01000

DM0000

#02000

DM0001

#03000

DM0002

When the current counter value reaches one of the preset values, the respective
output turns ON as follows:

DM0000

0500 turns ON.

DM0001

0501 turns ON.

DM0002

0502 turns ON.

DM0000

STA

#01000

LDA

#02000

LDA

DM0001

STA

DM0000

CMP

CTH1

LDA

DM0001

CMP

DM0002

CMP

#03000

LDA

DM0002

STA

2008

0001

2009

2009

2009

2002

CTH1

0005

2002

HSP

0005

0500

0501

0502

KVNKA Chap 04_1.p65

08.3.11, 0:06 PM

217