Siemens SIMATIC S5 Equipment Manual page 48

Digital position decoder ip 241 with fb 156/1 57 158
Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

Operating Instructions
If one of the setpoints or a zero shift value is supplied with an interrupt identifier, the module must
be set to a group interrupt bit of the peripheral byte PYO via jumper adjustment.
The number of this group interrupt bit must be specified at parameter ABIT (in the interrupt OB):
x = O Reset of the pertaining interrupt bit in the system data
See the Equipment Manual for the S5–150S/U.
When an interrupt occurs (analog to the jumper setting) the corresponding interrupt OB is called.
The call for the function block FB 157 with the command = KB (read track identifier bit) is entered
into this alarm OB. After the call the parameter ST shows from which channel the interrupt origi-
nated.
Now you can have your specific interrupt program processed.
A recommendation for interrupt OB programming is shown in the example in section 2.3.
If an interrupt occurs during processing of function block FB 157 in
the cyclic program, the group interrupt at the bus is cancelled by
FB 157 (or by reading byte 7).
Consequently no interrupt identity bit can be evaluated in the alarm OB.
In the function block, howeve~ the control bits are updated, so that
depending on the interrupt identifier bits saved in the flag? your specific
interrupt rogram can be called. This means the information from which
channel t e interrupt originated is stored in the control byte (ST).
Therefore after each call of FB 157 in the cyclic program, both 1P 241
interrupt bits must be scanned!
After being evaluated, the control bits in the interrupt OB must be
reset so that the interrupt programs (FBxx and FByy) are not processed
in the cyclic program again.
This is taken into account in the example in section 2.3.
2 – 14
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Number of the interrupt bit
R 02/92

Advertisement

Table of Contents
loading

Table of Contents