6.2.5.2
Point-to-Point instructions
The Point-to-Point (PtP) chapter (Page 237) provides detailed information about the PtP
instructions and the communication modules.
6.2.6
Interrupt instructions
6.2.6.1
Attach and detach instructions
Parameter
OB_NR
EVENT
ADD
(ATTACH only)
RET_VAL
S7-1200 Programmable controller
System Manual, 11/2009, A5E02486680-02
You can activate and deactivate interrupt event-driven
subprograms with the ATTACH and DETACH instructions.
ATTACH enables interrupt OB subprogram execution for a
hardware interrupt event.
DETACH disables interrupt OB subprogram execution for a
hardware interrupt event.
Parameter
Data type
type
IN
Int
IN
DWord
IN
Bool
OUT
Int
Description
Organization block identifier:
Select from the available hardware interrupt OBs
that were created using the "Add new block" feature.
Double-click on the parameter field, then click on the
helper icon to see the available OBs.
Event identifier:
Select from the available hardware interrupt events
that were enabled in PLC device configuration for
digital inputs or high-speed counters. Double-click
on the parameter field, then click on the helper icon
to see the available events.
ADD = 0 (default): This event replaces all previous
event attachments for this OB.
ADD = 1: This event is added to previous event
attachments for this OB.
Execution condition code
Programming instructions
6.2 Extended instructions
167