![Siemens Simatic SM331 Getting Started Download Page 68](http://html.mh-extra.com/html/siemens/simatic-sm331/simatic-sm331_getting-started_1265387068.webp)
Hardware interrupt
9.1 Hardware interrupt
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
9-2
Getting Started, 11/2006, A5E00253410-02
Determining functions
If a hardware interrupt occurs, OB40 is called. In the user program of OB40 you can program
the reaction of the automation system to hardware interrupts.
In the example user program, OB40 reads the cause of the hardware interrupt. This can be
found in the temporary variable structure OB40_POINT_ADDR (local words 8 to 11).
/%
/%
9LRODWLRQRIWKHOROLPLWDWFKDQQHO
9LRODWLRQRIWKHOROLPLWDWFKDQQHO
8SSHUOLPLWYDOXHYLRODWHGFKDQQHO
8SSHUOLPLWYDOXHYLRODWHGFKDQQHO
Figure 9-1
OB40 start information: In the example, and triggered a hardware interrupt
In the example, OB40 only transfers LD8 and LD9 into a marker word (MW100). The marker
word is monitored in the existing variable table. You can acknowledge the marker word in
OB1 by setting marker bit M200.0 or by setting it to TRUE in the variable table.
If you supply 5.71 mA with a calibration device to channel 0, you will get the value 0001 hex
for MW100 in the variable table. This means that OB40 was called and channel 0 exceeded
its low limit value (6 mA).
Figure 9-2
Hardware interrupt: Channel 0 exceeded low limit value