Technical data

Table Of Contents
IEC Timers and IEC Counters
System Software for S7-300/400 System and Standard Functions - Volume 2/2
25-4
A5E00739858-01
25.3 Generating an Off Delay with SFB 5 "TOF"
Description
SFB 5 "TOF" delays a falling edge by the time PT. The timer runs only in the
STARTUP and RUN modes.
A rising edge at the IN input causes a rising edge at output Q. A falling edge at the
IN input causes a falling edge at output Q delayed by the time PT. If the IN input
changes back to 1 before the time PT has expired, output Q remains set to 1. The
ET output provides the time that has elapsed since the last falling edge at the IN
input. Its maximum value is, however the value of the PT input. ET is reset when
the IN input changes to 1.
SFB 5 "TOF" complies with the IEC 1131-3 standard.
The operating system resets the instances of SFB 5 "TOF" during a cold restart. If
you want instances of this SFB to be initialized following a warm restart, you must
call SFB 5 with PT = 0 ms in OB100. If instances of this SFB are located within
another block, you can reset these instances, for example, by initializing the higher-
level block.
Timing Diagram
PT PT
ET
Q
IN
PT
Parameter Declaration Data Type Memory Area Description
IN INPUT BOOL I, Q, M, D, L,
constant
Start input
PT INPUT TIME I, Q, M, D, L,
constant
Time by which the falling edge at the IN
input is delayed. PT must be positive.
(Note: the range of values is fixed by the
TIME data type)
Q OUTPUT BOOL I, Q, M, D, L Status of the time
ET OUTPUT TIME I, Q, M, D, L Expired time