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

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

Program instructions
7.10 Interrupt
7.10.2

Interrupt routine overview and CPU model event support

Before an interrupt routine can be invoked, an association must be assigned 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 one event cannot be concurrently
attached to multiple interrupt routines.
When you attach an event and interrupt routine, new occurrences of this event will cause
execution of the attached interrupt routine only if the global ENI (enable interrupts)
instruction was executed and interrupt event processing is active. Otherwise, the event is
added to the interrupt event queue. If you disable all interrupts using the global DISI (disable
interrupts) instruction, each occurrence of the interrupt event is queued until 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
284
Description
0
Rising edge I0.0
1
Falling edge I0.0
2
Rising edge I0.1
3
Falling edge I0.1
4
Rising edge I0.2
5
Falling edge I0.2
6
Rising edge I0.3
7
Falling edge I0.3
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
PLS0 PTO pulse count complete interrupt
20
PLS1 PTO pulse count complete interrupt
21
Timer T32 CT=PT (current time = preset time)
22
Timer T96 CT=PT (current time = preset time)
CR40/CR60
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
Y
Y
Y
N
N
Y
Y
System Manual, 09/2015, A5E03822230-AC
SR20/ST20
SR30/ST30
SR40/ST40
SR60/ST60
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
Y
Y
Y
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 series

Table of Contents