Siemens SIMATIC S5 Equipment Manual page 50

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

Advertisement

Operating Instructions
When an interrupt (process interrupt or interrupt) occurs the appropriate interrupt OB is called
depending on operating mode and jumper settings on the 1P 241.
Function block FB 157 is then called in the interrupt OB with the command BEF = KB.
Parameter ST indicates from which channel an interrupt was reported. The interrupt bits must be
evaluated each time FB 157 is called.
Bit O: channel 1
Bit 1: channel 2.
You can start your own interrupt program when a bit has signal status"1".
A recommendation for interrupt OB2 or FBO programming is shown in the example in sec-
tion 2.3.
If an interrupt occurs during processing of function block FB 157 in
the cyclic program, the grou 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 fla , your specific
interrupt program can be called. The information from w ich channel
the interrupt originated is stored in the control byte (ST).
Therefore after each call of FB 157 in the cyclic program, both IP 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 – 16
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Advertisement

Table of Contents
loading

Table of Contents