S5-95F
Interrupt Processing
12
Interrupt Processing
This section covers the following:
•
Interrupt inputs on the S5-95F
•
How interrupt inputs are connected
•
How the characteristics for interrupt inputs are defined in DB1
•
What happens "internally" during interrupt processing
•
How to compute the response times to process interrupts
12.1
Using Onboard Interrupt Inputs
Program scanning should be interrupt-driven whenever a particularly fast response to changes in
process signals is required.
A change in the process signal at an interrupt input interrupts cyclic program scanning (OB1), time-
controlled program scanning (OB13) or the operating system and starts an interrupt service routine
(OB2 or OB3). When the interrupt service routine has executed, the S5-95F returns to the point of
interruption and program scanning is resumed.
The onboard inputs to be used as interrupt inputs are specified in DB1 as part of the process of
initializing the onboard I/Os.
In the DB1, you can initialize up to
•
4 interrupt inputs for triggering OB2 as interrupt service routine and
•
20 interrupt inputs for triggering OB3 as interrupt service routine.
Priorities
Table 12-1.
Priorities of the Organization Blocks
Can be Interrupted by
Organization Block
Asynchronous interrupt processing
Synchronous interrupt processing
Time-controlled program scanning
Cyclic program scanning
High
Low
Priority
OB2
OB3
OB13
OB1
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
OB2
OB2, OB3
OB2, OB3, OB13
Differences between OB2 and OB3 Interrupts
Table 12-2.
Differences Between OB2 and OB3 Interrupts
OB2 Interrupt
Hardware
Interrupt response time
Programming
restrictions
4 special interrupt
inputs (sub D connector)
3.2 ms typ.
Only a few command types
possible
OB3 Interrupt
16 onboard DIs and 4 special
hardware interrupt inputs
23 ms typ.
None
EWA 4NEB 812 6210-02
12-1