beautypg.com

Applications of hsp instruction – KEYENCE Visual KV Series User Manual

Page 112

background image

2.4 Instruction Details

3-88

2

Chapter 2 Instructions

Line No.

Instruction

Operand

Line No.

Instruction

Operand

0000

LD

2008

0007

END

0001

EI

0008

INT

0000

0002

SET

2813

0009

LD

2002

0003

LD

0500

0010

SET

0500

0004

T000

#00010

0011

RET1

0005

LD

T000

0012

ENDH

0006

RES

0500

Applications of HSP Instruction

High-speed fetching of input data
When the input signal at 0000 has pulses of 5-ms interval and 2-ms scan time 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.

Coding

Timing diagram

*

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

➮ Refer to "Chapter 3 Interrupts" (p. 3-191).

When using the interrupt instruction

Coding

0001

HSP

0000

0000

0500

T000

0500

#00010

T000

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

ON
OFF

ON
OFF

0500

0000

0001

ON

2813

SET

EI

#00010

T000

2008

0500

T000

END

RETI

ENDH

INT

0500

RES

2002

0500

SET

0000

Turn ON for 1st scan only at startup.

Input time constant 10 µs

Turns ON
timer for 1s
when 0500
is ON.

Resets 0500 when T000 turns ON.

Sets 0500 when 0000 turns ON.

Interrupt enabled

Initial settings

Sets interrupt input at 0000.

1-s timer

Scan

1 s

Turn ON for 1st
scan only at startup.

HSP

KVNKA Chap 02_4aP.p65

08.3.11, 11:58 AM

88