Interrupt Processing
S5-95F
12.2.2 Programming Interrupt Responses in OB2
Interrupt-driven program scanning is possible only when the following prerequisites have been
fulfilled:
•
Interrupt inputs have been initialized in DB1
•
The S5-95F must be in the "POWER ON" state and set to "RUN"
•
Interrupt processing must not have been disabled with "IA" (see section 8.2.8)
•
OB2 must be programmed, whereby heed must be paid to the restrictions listed in section
12.2.1.
Example for Programming OB2
A negative signal edge at interrupt input I 59.0 triggers an interrupt.
This, in turn,
•
Invokes OB2, if programmed, and
•
Sets bit 60.4 in diagnostic byte IB 60 to "1" if OB2 has not been programmed.
Table 12-6.
Example for Programming OB2
STL
Example
Description
Ascertain cause of INT
Reset diagnostic bit
When interrupt at I 59.0, reset outputs Q 32.0
and Q 32.1.
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
Outputs 32.0 and 32.1 are
to be reset in response to
an interrupt at bit
59.0.
OB2
A I 60.4
R I 60.4
R Q 32.0
R Q 32.1
ID: Interrupt at I 59.0
Reset diagnostic bit
Start delay timer
Q 32.2 is reset after 5 s
If interrupt occurred while
OB2 was executing (at
I 59.0), also reset Q 32.2 5
s later.
OB1
A I 57.4
R I 57.4
L KT 500.0
SS T 4
A T 4
R Q 32.2
R T 4
Note
The diagnostic bits in IB 60 must be reset to "0" when the interrupt has been
processed. The system resets the appropriate bits when the next interrupt is generated.
12-6
EWA 4NEB 812 6210-02