Technical data

Table Of Contents
Organization Blocks
System Software for S7-300/400 System and Standard Functions - Volume 1/2
1-10
A5E00709327-01
1.4 Time-Delay Interrupt Organization Blocks
(OB20 to OB23)
Description
S7 provides up to four OBs (OB20 to OB23) which are executed after a specified
delay. Every time-delay OB is started by calling SFC32 (SRT_DINT). The delay
time is an input parameter of the SFC.
When your program calls SFC32 (SRT_DINT), you provide the OB number, the
delay time, and a user-specific identifier. After the specified delay, the OB starts.
You can also cancel the execution of a time-delay interrupt that has not yet started.
Understanding the Operation of Time-Delay Interrupt OBs
After the delay time has expired (value in milliseconds transferred to SFC32
together with an OB number), the operating system starts the corresponding OB.
To use the time-delay interrupts, you must perform the following tasks:
You must call SFC32 (SRT_DINT).
You must download the time-delay interrupt OB to the CPU as part of your
program.
Time-delay OBs are executed only when the CPU is in the RUN mode. A warm or
a cold restart clears any start events for the time-delay OBs. If a time-delay
interrupt has not started, you can use SFC 33 (CAN_DINT) to cancel its execution.
The delay time has a resolution of 1 ms. A delay time that has expired can be
started again immediately. You can query the status of a delay-time interrupt using
SFC 34 (QRY_DINT).
The operating system calls an asynchronous error OB if one of the following events
occur:
If the operating system attempts to start an OB that is not loaded and you
specified its number when calling SFC 32 "SRT_DINT."
If the next start event for a time-delay interrupt occurs before the time-delay OB
has been completely executed.
You can disable or delay and re-enable delay interrupts using SFCs 39 to 42.