Extended instructions
9.5 Interrupts
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
433
When EN=1, the SRT_DINT instruction starts the internal time delay timer (DTIME). When
the time delay elapses, the CPU generates a program interrupt 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 interrupt events must not exceed four.
Note
The SRT_DINT starts the time delay timer on every scan when EN=1. Assert EN=1 as a
one
-shot rather than just setting EN=1 to begin your time delay.
Timing diagram for the SRT_DINT instruction:
Time delay interrupt executes
Adding time delay interrupt OBs to your project
You can only assign time delay interrupt OBs 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,
select "Organization block (OB)", and choose "Time delay interrupt".
2. You have the option to rename the OB, select the programming language, or select the
block number. Switch to manual numbering if you want to assign a different block number
than the number that was assigned automatically.
3. Edit the time delay interrupt OB subprogram and create programmed reaction that you
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 six.
4. The newly assigned time delay interrupt OB names will be available when you edit the
OB_NR parameter of the SRT_DINT and CAN_DINT instructions.