Kv -300 – KEYENCE Visual KV Series User Manual

Page 312

Advertising
background image

6.2 High-speed Counters

KV

-300

KV-10/80

3-288

6

Chapter 6 Interrupts, High-speed Counters, Positioning Control

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 clock pulse so that it always starts and stops when 2105 turns OFF.
Turn ON/OFF special utility relay 2105 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 0500 only when 0000 is ON.

By overwriting the setting value of high-speed counter comparator CTC0 using the
LDA and STA instructions, you can change the clock pulse cycle (frequency).

➮ Refer to "Example of pulse output "on page 3-293.

CAUTION

Programming example

2008

SET

2103

2104

2105

2106

2002

0001

0002

0003

2101

RES

RES

SET

RES

CTH0

CTC0

#00050

0004

0005

RES

2108

2109

2110

2111

CTH0

SET

RES

RES

RES

2107

CTC1

#00020

CTH0 value

ON

OFF

CTC0
CTC1

The status of output 0500 is set by turning ON one of the relays 2104 to 2107
and 2108 to 2111 at the beginning of the program. In Example, output of direct
clock pulses to 0500 is enabled, and the status of output 0500 is turned ON at
CTC0 and is turned OFF at CTC1.

Turns ON special utility relay 2103 and specifies to clear CTH0 using CTC0. The
program repeats clearing the CTH0 current value with the value set to CTC0.

Input relay which enables CTH0 remains ON during clock pulse output.

Coding

Line No.

Instruction

Operand

Line No.

Instruction

Operand

0000

LD

2008

0013

CON

0001

MPS

0014

SET

2109

0002

SET

2103

0015

CON

0003

CON

0016

RES

2110

0004

RES

2104

0017

CON

0005

CON

0018

RES

2111

0006

RES

2105

0019

CON

0007

CON

0020

RES

CTH0

0008

SET

2106

0021

LD

2002

0009

CON

0022

CTH

0 2101

0010

RES

2107

0023

CTC

0 #00050

0011

MPP

0024

CTC

1 #00020

0012

RES

2108

0000

2105

0000

SET

2105

RES

0000

2105

0000

SET

RES

KEEP

KEEP Instructions

SET/RES Instructions

KVNKA Chap 06.p65

08.3.11, 0:10 PM

288

Advertising