Interrupt Routine Overview And Cpu Model Event Support - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Program instructions
7.10 Interrupt
7.10.2

Interrupt routine overview and CPU model event support

Before you can invoke an interrupt routine, you must assign an association between the
interrupt event and the program segment that you want to execute when the event occurs.
Use the attach interrupt instruction 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 you cannot attach one event to
multiple interrupt routines.
When you attach an event and interrupt routine, new occurrences of this event cause
execution of the attached interrupt routine only if the program executed the global ENI
(enable interrupts) instruction and interrupt event processing is active. Otherwise, the CPU
adds the event to the interrupt event queue. If you disable all interrupts using the global DISI
(disable interrupts) instruction, the CPU queues each occurrence of the interrupt event until
the interrupts are re-enabled, using the global ENI (enable interrupt) instruction or the
interrupt queue overflows.
You can disable individual interrupt events by breaking the association between the interrupt
event and the interrupt routine with the detach Interrupt instruction. The detach interrupt
instruction returns the interrupt to an inactive or ignored state. The following table lists the
different types of interrupt events.
Event
14-15
324
Description
0
I0.0 Rising edge
1
I0.0 Falling edge
2
I0.1 Rising edge
3
I0.1 Falling edge
4
I0.2 Rising edge
5
I0.2 Falling edge
6
I0.3 Rising edge
7
I0.3 Falling edge
8
Port 0 Receive character
9
Port 0 Transmit complete
10
Timed interrupt 0 (SMB34 controls the time interval)
11
Timed interrupt 1 (SMB35 controls the time interval)
12
HSC0 CV=PV (current value = preset value)
13
HSC1 CV=PV (current value = preset value)
Reserved
16
HSC2 CV=PV (current value = preset value)
17
HSC2 Direction changed
18
HSC2 External reset
19
PTO0 Pulse count complete
CPU CR20s
CPU CR30s
CPU CR40s
CPU CR60s
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
Y
Y
Y
N
System Manual, V2.3, 07/2017, A5E03822230-AF
CPU
SR20/ST20
CPU
SR30/ST30
CPU
SR40/ST40
CPU
SR60/ST60
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
Y
Y
Y
Y
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents