beautypg.com

4 ring counter function, Visual kv series – KEYENCE Visual KV Series User Manual

Page 249

background image

4.4 Expanded Functions of High-speed Counters

3-225

Visual KV

Series

1

4

Chapter 4 High-speed Counters

4.4.4

Ring Counter Function

Normally, the counter reads "#65535 ($FFFF)" by counting down from "0" by one.
The ring counter function is an additional function of the automatic clear function. It
reads "preset value - 1" when it counts down from "0" by one.

Operation of the ring counter function

Setting procedure

When setting the ring counter, use CTC1 for CTH0 and CTC3 for CTH1.

Set the upper limit (preset value) to CTC1 or CTC3 and turn ON special utility
relay 2406 (for CTH0) or 2414 (for CTH1). The ring counter is set to read "CTC1/
CTC3 preset value - 1" when it counts down from "0" by one.

To use the ring counter for both counting up/down operations, turn ON special
utility relay 2112 (for CTH0) or 2212 (for CTH1).

Note 1: Use the SET-RES instruction pair to set the special utility relays.

Note 2: The flag or the count-up interrupt for each CTC is effective in counting up
operations, but is disabled in counting down operations.

Example: When CTC = 100

0

65535

0

CTC1 -1

( CTC3 -1)

65535

Not used

Normal counter

Ring counter

CTH

0

1

2

97

98

99

0

1

2

CTC

97

98

99

2

1

0

Count
up

Count
down

Turns ON.

Does not turn ON.

r

e

t

n

u

o

c

d

e

e

p

s

-

h

g

i

H

r

o

t

a

r

a

p

m

o

c

r

e

t

n

u

o

c

d

e

e

p

s

-

h

g

i

H

y

a

l

e

r

y

t

i

l

i

t

u

l

a

i

c

e

p

S

d

e

s

u

s

i

0

H

T

C

n

e

h

W

.

1

C

T

C

o

t

"

1

+

e

u

l

a

v

t

i

m

il

r

e

p

p

u

"

t

e

S

.

6

0

4

2

N

O

n

r

u

T

d

e

s

u

s

i

1

H

T

C

n

e

h

W

.

3

C

T

C

o

t

"

1

+

e

u

l

a

v

t

i

m

il

r

e

p

p

u

"

t

e

S

.

4

1

4

2

N

O

n

r

u

T

KVNKA Chap 04_1.p65

08.3.11, 0:06 PM

225