Interrupts; Attach And Detach (Attach/Detach An Ob And An Interrupt Event) Instructions - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

8.4

Interrupts

8.4.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 8- 85
ATTACH and DETACH instructions
LAD / FBD
Table 8- 86
Data types for the parameters
Parameter and type
OB_NR
IN
EVENT
IN
ADD
IN
(ATTACH only)
RET_VAL
OUT
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
SCL
ret_val := ATTACH(
ob_nr:=_int_in_,
event:=_event_att_in_,
add:=_bool_in_);
ret_val := DETACH(
ob_nr:=_int_in_,
event:=_event_att_
in);
Data type
Description
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_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.
Bool
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.
Int
Execution condition code
Extended instructions
Description
ATTACH enables interrupt OB subprogram
execution for a hardware interrupt event.
DETACH disables interrupt OB subprogram
execution for a hardware interrupt event.
8.4 Interrupts
331

Advertisement

Table of Contents
loading

Table of Contents