101BExtended instructions
8.4 Interrupts
Parameter and type
SIGN
IN
1
RET_VAL
OUT
STATUS
OUT
Only for SRT_DINT
1
Operation
The SRT_DINT instruction specifies a time delay, starts the internal time delay timer, and
associates a time delay interrupt OB subprogram with the time delay timeout event. When
the specified time delay has elapsed, a program interrupt is generated that triggers the
execution of the associated time delay interrupt OB. You can cancel an in-process time
delay interrupt before the specified time delay occurs by executing the CAN_DINT
instruction. The total number of active time delay and cyclic interrupt events must not exceed
four.
Adding time delay interrupt OB subprograms to your project
Only time delay interrupt OBs can be assigned to the SRT_DINT and CAN_DINT
instructions. No time delay interrupt OB exists in a new project. You must add time delay
interrupt OBs to your project. To create a time-delay interrupt OB, follow these steps:
1. Double-click the "Add new block" item in the "Program blocks" branch of the project tree,
2. You have the option to rename the OB, select the programming language, or select the
3. Edit the time delay interrupt OB subprogram and create programmed reaction that you
4. The newly assigned time delay interrupt OB names will be available when you edit the
QRY_DINT parameter STATUS
Table 8- 98
Bit
0
1
2
280
Data type
Word
Int
Word
select "Organization block (OB)", and choose "Time delay interrupt".
block number. Switch to manual numbering if you want to assign a different block number
than the number that was assigned automatically.
want to execute when the time delay timeout event occurs. You can call other FC and FB
code blocks from the time delay interrupt OB, with a maximum nesting depth of four.
OB_NR parameter of the SRT_DINT and CAN_DINT instructions.
If there is an error (REL_VAL <> 0), then STATUS = 0.
Value
Description
0
In RUN
1
In startup
0
The interrupt is enabled.
1
The interrupt is disabled.
0
The interrupt is not active or has elapsed.
1
The interrupt is active.
Description
Not used by the S7-1200: Any value is accepted. A value must be
assigned to prevent errors.
Execution condition code
QRY_DINT instruction: Status of the specified time-delay interrupt OB,
see the table below
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05