Kv -300 – KEYENCE Visual KV Series User Manual
Page 314

6.2 High-speed Counters
KV
-300
KV-10/80
3-290
6
Chapter 6 Interrupts, High-speed Counters, Positioning Control
0000
2204
0000
SET
2204
RES
0000
2204
0000
SET
RES
KEEP
KEEP Instructions
SET/RES Instructions
Relay No.
Setting
Relay No.
Setting
2103
ON
2112
OFF
2104
OFF
2108
OFF
2105
OFF
2109
ON
2106
ON
2110
OFF
2107
OFF
2111
OFF
Special utility relay
Internal clock*
CTC0 value
CTC1 value
2100
1.0 µs
500
200
2101
10.0 µs
50
20
2102
100.0 µs
5
2
When start/stop of clock pulse is controlled by the input relay which enables/
disables the high-speed counter, response relay of up to 1 scan is generated
at start. Also, the same response relay is generated at stop, which may stop
clock pulse output while the output relay is still ON.
This controls the clock pulse so that it always starts and stops when 2205 turns
OFF.
Turn ON/OFF special utility relay 2205 as required to enable or disable output of
direct clock pulses using one of the external clocks. Use SET and RES instructions
together or only KEEP instruction to turn ON/OFF this relay.
The diagram below can be added to the sample diagram so that direct clock pulses
are output through 0501 only when 0000 is ON.
By overwriting the setting value of high-speed counter comparator CTC2 using the
LDA and STA instructions, you can change the clock pulse cycle (frequency).
Example of stopping clock pulse after reaching the specified output pulse count
The following example stops clock pulse having the pulse width of 200 µs which is
output from 0500 at cycle of 500 µs (2 kHz) after reaching the pulse count value of
10000.
■ Setting special utility relay, internal clock, and CTC
Settings of the special utility relays, internal clock, CTC0, and CTC1 are listed
below.
CAUTION
Coding
Line No.
Instruction
Operand
Line No.
Instruction
Operand
0000
LD
2008
0012
SET
2209
0001
MPS
0013
CON
0002
SET
2203
0014
RES
2210
0003
CON
0015
CON
0004
SET
2204
0016
RES
2211
0005
CON
0017
CON
0006
SET
2205
0018
RES
CTH1
0007
CON
0019
LD
2002
0008
RES
2207
0020
CTH
1 2201
0009
MPP
0021
CTC
2 #00050
0010
RES
2208
0022
CTC
3 #00020
0011
CON
➮ *Refer to page 3-276.
KVNKA Chap 06.p65
08.3.11, 0:10 PM
290