Hardware interrupt
9.1 Hardware interrupt
OB40 hardware interrupt
Hardware interrupts generally trigger alarm organization blocks in the CPU. In our example,
OB40 is called up.
In the STEP 7 program, OB40 is used for hardware interrupts. Depending on the CPU,
several hardware interrupts can be configured.
If a hardware interrupt occurs, OB40 is called up. In the OB40 user program, 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 temporary variable structure OB40_POINT_ADDR (local bytes 8 to 11).
Figure 9-1
(1)
(2)
(3)
(4)
In the example, OB40 only transfers local data variables 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.
9-2
2
1
OB40 start information: Which event has violated limits and triggered a hardware
interrupt
Value exceeds upper limit in channel 1
Value exceeds upper limit in channel 0
Violation of the lower limit in channel 0
Violation of the lower limit in channel 1
SM331;AI 8x12 Bit Getting Started Part 2: Voltage and PT100
Getting Started, 11/2006, A5E00264161-02
Need help?
Do you have a question about the SIMATIC S7-300 and is the answer not in the manual?