PLC concepts
5.1 Execution of the user program
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
95
Hardware interrupt OBs execute when the relevant hardware event occurs. A hardware
interrupt OB interrupts normal cyclic program execution in reaction to a signal from a
hardware event.
Hardware interrupt events
Changes in the hardware, such as a rising or falling edge on an input point, or an HSC (High
Speed Counter) event trigger hardware interrupt events. The S7-1200 supports one interrupt
OB for each hardware interrupt event. You enable the hardware events in the device
configuration, and assign an OB for an event in the device configuration or with an ATTACH
instruction in the user program. The CPU supports several hardware interrupt events. The
CPU model and the number of input points determine the exact events that are available.
Limits on hardware interrupt events are as follows:
● Rising edge events: maximum of 16
● Falling edge events: maximum of 16
● CV=PV: maximum of 6
● Direction changed: maximum of 6
● External reset: maximum of 6
Table 5- 5 Start information for a hardware interrupt OB
LADDR HW_IO Hardware identifier of the module that triggered the hardware inter-
USI WORD User structure identifier (16#0001 to 16#FFFF), reserved for future
use
Number of the channel that triggered the interrupt
EventType BYTE Identifier for the module-specific event type associated with the
event triggering the interrupt, for example falling edge or rising
The bits in EventType depend on the triggering module as shown below:
Onboard I/O
from
16#1 Falling edge
HSC