Reading In The Process Signals - 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

S5-115U Manual
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 address+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
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 address+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 address+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 address+1" byte
can be read out only once after an interrupt in order to identify the "interrupt trigger".
EWA 4NEB 811 6130-02b
Status of the inputs (8.0 to 8.7)
7
x
x
x
x
x
x
x
Module address (byte 8)
Interrupt Processing
Interrupt trigger
0
7
0
0 0 0 0 0 0 0 1
Module address+1 (byte 9)
0
9-7

Advertisement

Table of Contents
loading

Table of Contents