S5-115U Manual
Interrupt Processing
9.3.4
Reading in the Process Signals
The module offers a choice of two bytes for reading in the process signals:
•
The "module address" byte reproduces the status of the inputs (regardless of whether the
inputs have been initialized for interrupt processing).
•
In the "module 1" byte, the bits assigned to the interrupt-initiating input are set
after an interrupt, regardless of the type of initiating edge! (The module has to be initialized
at restart).
Example:
The 434-7 digital input module has starting address 8; it occupies I/O bytes 8 and 9. At startup,
only bit 0 has been enabled for interrupt initiation. The interrupt is to be triggered by a falling
edge. In the event of an interrupt, bytes 8 and 9 have the following values (provided the status of
input 8.0 has not changed after edge change):
Bit address of the input
Status of the inputs (8.0 to 8.7)
x
x
x
x
x
x
x
0
0
7
Module address (byte 8)
Interrupt trigger
0
0
0
0
0
0
0
1
0
7
Module 1 (byte 9)
x=Status of the inputs (0 or 1)
There are two ways of evaluating the input signals with bytes 8 and 9:
•
You can read the status of the inputs with direct I/O access (L PY 8) at any point in your control
program. It is irrelevant whether the status of the inputs is read in the cyclic, time-controlled
or interrupt-processing program.
•
If you have initialized inputs at restart as interrupt-triggering inputs, you must program a spe-
cific interrupt response in OB2:
-
Acknowledge interrupt by reading the "module 1" byte
(in the example: byte 9; L PY 9)
-
Transfer the byte read to the PII (in the example: T IB 9)
-
Evaluate all inputs enabled for interrupt
-
Trigger interrupt response.
After the byte "module 1" (byte 9 in the example) has been loaded into the ACCUM,
is automatically reset on the module! The module is therefore in a position to trigger another
interrupt and so set another bit in this byte! This means that the "module 1" byte
can be read out only once after an interrupt in order to identify the "interrupt trigger".
EWA 4NEB 811 6130-02b
9-7
Summary of Contents for SIMATIC S5-115U
Page 6: ...EWA 4NEB 811 6130 02b ...
Page 16: ...EWA 4NEB 811 6130 02b ...
Page 18: ...EWA 4NEB 811 6130 02b ...
Page 26: ......
Page 62: ...EWA 4NEB 811 6130 02b ...
Page 64: ...EWA 4NEB 811 6130 02b ...
Page 67: ......
Page 74: ......
Page 79: ......
Page 80: ......
Page 81: ......
Page 82: ......
Page 83: ......
Page 84: ......
Page 97: ......
Page 98: ......
Page 99: ......
Page 114: ...EWA 4NEB 811 6130 02b ...
Page 280: ...EWA 4NEB 811 6130 02b ...
Page 372: ...EWA 4NEB 811 6130 02b ...
Page 432: ...EWA 4NEB 811 6130 02b ...
Page 442: ......
Page 528: ...EWA 4NEB 811 6130 02b ...
Page 590: ......
Page 591: ......
Page 592: ......
Page 593: ......
Page 594: ......
Page 600: ...EWA 4NEB 811 6130 02b ...
Page 602: ...EWA 4NEB 811 6130 02b ...
Page 604: ...EWA 4NEB 811 6130 02b ...
Page 624: ...EWA 4NEB 811 6130 02b ...
Page 632: ...EWA 4NEB 811 6130 02b ...
Page 644: ...EWA 4NEB 811 6130 02b ...
Page 646: ...EWA 4NEB 811 6130 02b ...
Page 652: ...EWA 4NEB 811 6130 02b ...
Page 654: ...EWA 4NEB 811 6130 02b ...
Page 660: ...EWA 4NEB 811 6130 02b ...
Page 662: ...EWA 4NEB 811 6130 02b ...
Page 666: ...EWA 4NEB 811 6130 02b ...
Page 668: ...EWA 4NEB 811 6130 02b ...
Page 674: ...EWA 4NEB 811 6130 02b ...