beautypg.com

2 interrupt processing, 1 interrupt processing, Visual kv series – KEYENCE Visual KV Series User Manual

Page 218

background image

3.2 Interrupt Processing

3-194

Visual KV

Series

3

Chapter 3 Interrupts

2008

SET

or

2813

EI

#00000

DW

DM1940

2002

2002

EI

HSP

0000

(0000 to 0015)

(0500 to 0503)

3.2

Interrupt Processing

This section describes interrupt processing.

3.2.1

Interrupt Processing

Outline

Normally, a PLC processes a ladder sequence program by repeating the steps of
input processing, program execution, and output processing. Therefore, signals
which are shorter than the scan time cannot be received.
When the interrupt processing function is used, a process can be executed at the
instant of the interrupt, independent of the scan time.
When any interrupt occurs, the Visual KV series suspends the currently executed
program and executes the interrupt program in accordance with the interrupt factor.
When the interrupt program completes, the Visual KV resumes execution of the
suspended program.

➮ For more about scan time, refer to "1.1.2 Scan Time" (p. 3-3).

Direct input/output

The direct input/output functions are used during interrupt processing. Direct input
allows the KV PLC to fetch the input status of input relays 0000 through 0015 (KV-
10xx: 0000-0005, KV-16xx: 0000-0009) during execution of the interrupt program.
Direct output allows the Visual KV PLC to output the ON/OFF status of output relays
0500 through 0503 during execution of the interrupt program.
No special setting is required to use the direct input/output functions. The functions
can be used only by using the devices assigned for direct input/output within the
interrupt program.

Executing interrupts

The INT (Interrupt) instruction is used to execute an interrupt. Since an interrupt is
disabled at the start of operation, it is necessary to execute an EI (Interrupt enable)
instruction before using the INT instruction. In addition, the input time constant
should be set shorter by using the HSP instruction (to 10 µs) or by specifying the
desired value in DM1940 and turning ON special utility relay 2813.

➮ For more about the input time constant, refer to "1.4.1 Input Time Constant Change Function" (p. 3-

23).

Direct output

Input

processing

Program

execution

Output

processing

Scan

time

Interrupt input

Return to the next
line of the interrupt.

Interrupt

processing

Direct input *

KVNKA Chap 03.p65

08.3.11, 0:05 PM

194