Siemens S5-100U User Manual page 262

Simatic s5 programmable controller
Hide thumbs Also See for S5-100U:
Table of Contents

Advertisement

Interrupt Processing
Possibilities of Accessing Process I/O Image Tables
The following figure shows how data transfer between the process I/O image tables and ACCU 1
takes place when using various load and transfer statements in OB2.
T IBX/T IW X
T QBX/T QW X
X=byte or word address
Figure 10-3. Accessing the Process Image Tables from OB2
Example of How OB2 Can Be Programmed
Binary statements can access only the normal PII and PIQ. In order to determine the channel that
triggered an interrupt, transfer the I/O byte or word, for example, to a flag byte or word and then
evaluate using binary statements.
Example
Two sensors are
connected on channels 0
and 1 on a four-channel
digital input module on
slot 0.
Branch to FB12 if sensor 1
(channel 0) triggers an
interrupt.
Caution
Be sure to save the flags (in a data block, for example) if these flags are to be
overwritten during interrupt processing and are needed again in the cycle.
10-4
PII
L IBX/L IW X
ACCU 1
PIQ
STL OB2
L PY 0
T FY 0
A F 0.0
AN I 0.0
O
AN F 0.0
A I 0.0
JC FB 12
...
Interrupt
T PYX/T PW X
Interrupt
Explanation
Load byte 0 of the interrupt PII into ACCU 1 and
transfer it to flag byte 0.
Did a positive edge occur on channel 0?
OR
Did a negative edge occur on channel 0?
If a pulse edge has occurred, a branch is made
to FB12.
S5-100U
PII
L PYX/L PY1/L PW0
PIQ
EWA 4NEB 812 6120-02

Advertisement

Table of Contents
loading

Table of Contents