Interrupt-Driven Programming Execution - Siemens SIMATIC S5-115U User Manual

Simatic s5 series cpu 941-7ub11 cpu 942-7ub11 cpu 943-7ub11 and cpu 943-7ub21 cpu 944-7ub11 and cpu 944-7ub21
Table of Contents

Advertisement

Introduction to STEP 5
7.4.4

Interrupt-Driven Programming Execution

OBs 2 to 5 are called automatically by the operating system when a (process) interrupt (interrupt
A, B, C or D) occurs. See Chapter 9 for more detailed information on interrupt processing.
(Interrupt) Response After Time Expires
OB6 has a special position. OB6 is called by the operating system when a time programmed in
system data word 101 (EACA
operation).
In OB6, you program the response after expiry of the programmed time ("timed interrupt"). Start
the time by making an entry in system data word 101 (EACA
operation.
Example:
You have programmed OB6 with a timed response. OB6 is to be called 22 ms after starting the
clock prompt. Select and start the clock prompt with the operations
L KF +22
T BS 101.
After 22 ms, OB6 interrupts the current cyclic or time-controlled program.
Note
A running clock prompt can be restarted if you enter another value in system data
word 101. The operating system restarts the clock prompt specified by the value in
ACCUM 1. A running clock prompt can be stopped (prevents OB6 call!) by transferring
the value "0" to system data word 101.
After starting the clock prompt, system data word 101 contains the selected time until OB6 is
called. When the programmed time has expired, the operating system enters the value "0" in
system data word 101 and calls OB6.
The following applies for OB6:
To start the clock prompt, a number (in the range 3 to 65535 or 3
transferred to system data word 101 (EACA
The clock prompt can be programmed in steps of 1 ms, putting the programmable clock
prompt in the range 3 to 65535 ms.
The order of priority of OB6 can be programmed in DB1 (see Section 11.3) or in system data
word 120:
Bit
15
14
13
12
x
x
x
x
x = Bits which determine system characteristics
(Must not be changed when programming the priority of OB6!)
Figure 7-9. Determining the Order of Priority of OB6 in System Data Word 120
7-22
) has expired (provided interrupts are not disabled by the "RA"
H
).
H
11
10
9
8
7
6
x
x
x
x
x
) exclusively with the T RS 101
H
to FFFF
H
5
4
3
2
1
0
x
x
x
x
x
x
Priority (in descending order)
0: OB6, OB2 to 5, OB13 to 10 (Default setting after
Overall Reset)
1: OB2 to 5, OB6, OB13 to 10
S5-115U Manual
) must always be
H
RS 120
EWA 4NEB 811 6130-02b

Advertisement

Table of Contents
loading

Table of Contents