KEYENCE Visual KV Series User Manual

Page 356

Advertising
background image

8.2 Details

3-332

8

Chapter 8 Programming Examples

2008

Turn ON for 1st scan only at startup.

2813

SET

E I

0500

#00010

T000

T000

RES

0000

2002

SET

0500

0500

Interrupt enabled

Input time constant
10

µs

Turns ON timer for
1s when 0500 is ON.

Resets 0500 when
T000 turns ON.

Sets interrupt input
at 0000.

Sets 0500 when
0000 turns ON.

END

I NT

RET I

ENDH

Initial settings

Resetting internal utility relays
When input relay No. 0000 turns ON, all internal utility relays No. 1000 through 1915
turn OFF.
SFT instruction can be substituted for RES instruction. This application can be used
to reset many relays at one time.

Ladder diagram

Coding

Applications of HSP instruction

High-speed fetching of input data
When the input signal at 0000 has pulses of 5-ms interval and input relay 0001 is
ON, fetches data from input relay 0000 at high speed and outputs 1-s one-shot
pulse from output relay 0500.

Timing diagram

Ladder diagram

Coding

*

To input a signal having pulse interval shorter than the scan time, use the inter-
rupt instruction.

➮ Refer to p. 3-192.

When using the interrupt instruction
Ladder diagram

2003

2003

0000

1000

D

SFT

CLK

RES

1915

0001

0000

0500

1s

0001

0000

0500

#00010

T000

1-s timer

0500

T000

Outputs
1-s one-shot
pulse from
output relay
0500.

0000

HSP

Line No.

Instruction

Operand

0000

LD

2003

0001

LD

2003

0002

LD

0000

0003

SFT

1000 1915

Line No.

Instruction

Operand

0000

LD

0001

0001

HSP

0000

0002

LD

0000

0003

OR

0500

0004

TMR

000 #00010

0005

ANB

T000

0006

OUT

0500

KVNKA Chap 08.p65

08.3.11, 0:12 PM

332

Advertising