EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Extended instructions
9.5 Interrupts
S7-1200 Programmable controller
420 System Manual, V4.2, 09/2016, A5E02486680-AK
9.5
Interrupts
9.5.1
ATTACH and DETACH (Attach/detach an OB and an interrupt event)
instructions
You can activate and deactivate interrupt event-driven subprograms with the ATTACH and
DETACH instructions.
Table 9- 97 ATTACH and DETACH instructions
LAD / FBD
SCL
Description
ret_val := ATTACH(
ob_nr:=_int_in_,
event:=_event_att_in_,
add:=_bool_in_);
ATTACH enables interrupt OB subprogram
execution for a hardware interrupt event.
ret_val := DETACH(
ob_nr:=_int_in_,
event:=_event_att_ in);
DETACH disables interrupt OB subprogram
execution for a hardware interrupt event.
Table 9- 98 Data types for the parameters
Parameter and type
Data type
Description
OB_NR IN OB_ATT 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 IN EVENT_ATT 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
(ATTACH only)
IN Bool
ADD = 0 (default): This event replaces all previous event attach-
ments for this OB.
ADD = 1: This event is added to previous event attachments for
this OB.
RET_VAL
OUT
Int
Execution condition code

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals