Simatic Interrupt And Communications Instructions; Attach Interrupt, Detach Interrupt; Understanding Attach And Detach Interrupt Instructions - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

9.15

SIMATIC Interrupt and Communications Instructions

Attach Interrupt, Detach Interrupt

L
A
EN
D
F
INT
B
D
EVNT
EN
EVNT
S
ATCH
T
L
DTCH
221
222 224
Inputs/Outputs
INT
Constant
EVNT
Constant (CPU 221/222: 0-12, 19-23, 27-33;
CPU 224: 0-23, 27-33; CPU 226: 0 - 33)

Understanding Attach and Detach Interrupt Instructions

Before an interrupt routine can be invoked, an association must be established
between the interrupt event and the program segment that you want to execute
when the event occurs. Use the Attach Interrupt instruction (ATCH) to associate an
interrupt event (specified by the interrupt event number) and the program segment
(specified by an interrupt routine number). You can attach multiple interrupt events
to one interrupt routine, but one event cannot be concurrently attached to multiple
interrupt routines. When an event occurs with interrupts enabled, only the last
interrupt routine attached to this event is executed.
When you attach an interrupt event to an interrupt routine, that interrupt is
automatically enabled. If you disable all interrupts using the global disable interrupt
instruction, each occurrence of the interrupt event is queued until interrupts are
re-enabled, using the global enable interrupt instruction.
You can disable individual interrupt events by breaking the association between the
interrupt event and the interrupt routine with the Detach Interrupt instruction
(DTCH). The Detach instruction returns the interrupt to an inactive or ignored state.
S7-200 Programmable Controller System Manual
A5E00066097-02
The Attach Interrupt instruction associates an interrupt
event (EVNT) with an interrupt routine number (INT), and
ATCH
ENO
enables the interrupt event.
The Detach Interrupt instruction disassociates an
interrupt event (EVNT) from all interrupt routines, and
disables the interrupt event.
Attach Interrupt: Error conditions that set ENO = 0:
DTCH
ENO
SM4.3 (run-time), 0002 (conflicting assignment of inputs
to an HSC).
INT,
EVENT
EVENT
226
Operands
SIMATIC Instructions
Data Types
BYTE
BYTE
9-169

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents