Interrupt Instructions - Siemens SIMATIC S7-200 System Manual

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

Advertisement

Interrupt Instructions

Enable Interrupt and Disable Interrupt
The Enable Interrupt instruction (ENI) globally enables
processing of all attached interrupt events. The Disable
Interrupt instruction (DISI) globally disables processing of all
interrupt events.
When you make the transition to RUN mode, interrupts are
initially disabled. In RUN mode, you can enable interrupt
processing by executing the Enable Interrupt instruction.
Executing the Disable Interrupt instruction inhibits the
processing of interrupts; however, active interrupt events will
continue to be queued.
Error conditions that set ENO = 0:
H 0004 (attempted execution of ENI, DISI, or HDEF instructions in
an interrupt routine)
Conditional Return from Interrupt
The Conditional Return from Interrupt instruction (CRETI)
can be used to return from an interrupt, based upon the
condition of the preceding logic.
Attach Interrupt
The Attach Interrupt instruction (ATCH) associates an
interrupt event EVNT with an interrupt routine number INT
and enables the interrupt event.
Error conditions that set ENO = 0:
H 0002 (conflicting assignment of inputs to an HSC)
Detach Interrupt
The Detach Interrupt instruction (DTCH) disassociates an
interrupt event EVNT from all interrupt routines and disables
the interrupt event.
Clear Interrupt Event
The Clear Interrupt Event instruction removes all interrupt events of type EVNT from the interrupt
queue. Use this instruction to clear the interrupt queue of unwanted interrupt events. If this
instruction is being used to clear out spurious interrupt events, you should detach the event
before clearing the events from the queue. Otherwise new events will be added to the queue
after the clear event instruction has been executed.
The example shows a high-speed counter in quadrature mode using the CLR_EVNT instruction
to remove interrupts. If a light chopper stepper sensor was stopped in a position that is on the
edge of a light to dark transition, then small machine vibrations could generate unwanted
interrupts before the new PV can be loaded.
Table 6-45
Valid Operands for the Interrupt Instructions
Inputs/Outputs
INT
EVNT
Data Types
Operands
BYTE
Constant (0 to 127)
BYTE
Constant
S7-200 Instruction Set
CPU 221 and CPU 222:
CPU 224:
CPU 224XP and CPU 226: 0 to 33
Chapter 6
0 to 12, 19 to 23, and 27 to 33
0 to 23 and 27 to 33
153

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents