Learn PLCs free
Timers & CountersBeginnerIEC 61131-3

TOF (Timer Off-Delay)

Output stays TRUE for preset time after input goes FALSE.

The TOF (Timer Off-Delay) function block provides a delayed turn-off behavior. When the input (IN) goes TRUE, the output (Q) immediately goes TRUE. When IN transitions from TRUE to FALSE, the timer begins counting. Q remains TRUE until the elapsed time (ET) reaches the preset time (PT), at which point Q goes FALSE. If IN goes TRUE again before the timer expires, the timer resets and Q stays TRUE. TOF timers are commonly used for keeping outputs active for a period after an input condition is removed, such as cooling fan run-on, conveyor coast-down delays, and light-off timers.

Parameters

Inputs

NameTypeDescription
INBOOLTimer input - output follows immediately when TRUE
PTTIMEPreset off-delay time value

Outputs

NameTypeDescription
QBOOLTimer output - stays TRUE during off-delay
ETTIMEElapsed time since IN went FALSE

Timing Diagram

IN:  ___/‾‾‾‾‾‾‾‾\________________
Q:   ___/‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾\___
ET:  ______________/‾‾‾‾‾‾‾‾‾‾‾‾‾
                   0s        30s
                            ^PT=30s

Ladder Logic Example

// Ladder Logic - TOF Timer (Fan Run-On)
//
// |----[ Motor_Running ]----[TOF Fan_Timer]----|
// |                         IN: Motor_Running  |
// |                         PT: T#30s          |
// |                         Q:  Fan_Output     |
// |                         ET: Elapsed        |
//
// Fan continues running 30s after motor stops

Structured Text Example

VAR
    Fan_Timer : TOF;
    Motor_Running : BOOL;
    Fan_Output : BOOL;
END_VAR

Fan_Timer(IN := Motor_Running, PT := T#30s);
Fan_Output := Fan_Timer.Q;
// Fan stays on 30 seconds after Motor_Running goes FALSE

20 Production-Ready Ladder Logic Templates

Stop writing the same rungs from scratch. Get copy-paste-ready templates for motor control, PID loops, safety interlocks, conveyors, and more.

Platform-Specific Implementation

S

Siemens (TIA Portal)

Use IEC_Timer (TOF) in TIA Portal. Legacy: SFB 5 (TOF_TIME). Behaves identically to IEC standard.

AB

Allen-Bradley (Studio 5000)

Use TOF instruction in Studio 5000. Timer data type is TIMER. Access .DN, .TT, .ACC bits.

C

CODESYS

Standard TOF in Standard library. Fully IEC 61131-3 compliant.

Common Applications

  • Cooling fan run-on after motor stops
  • Conveyor coast-down delay
  • Light-off timer (stairwell lights)
  • Lubrication pump run-on
  • Exhaust fan delay

Common Mistakes to Avoid

  • Confusing TOF with TON behavior
  • Forgetting that Q goes TRUE immediately when IN is TRUE
  • Not understanding that the timer only counts when IN is FALSE

Frequently Asked Questions

What is TOF (Timer Off-Delay) in PLC programming?

Output stays TRUE for preset time after input goes FALSE. The TOF (Timer Off-Delay) function block provides a delayed turn-off behavior. When the input (IN) goes TRUE, the output (Q) immediately goes TRUE.

What are common applications of TOF (Timer Off-Delay)?

TOF (Timer Off-Delay) is commonly used for: Cooling fan run-on after motor stops, Conveyor coast-down delay, Light-off timer (stairwell lights), Lubrication pump run-on, Exhaust fan delay.

How do I use TOF (Timer Off-Delay) in different PLC platforms?

Siemens: Use IEC_Timer (TOF) in TIA Portal. Legacy: SFB 5 (TOF_TIME). Behaves identically to IEC standard. Allen-Bradley: Use TOF instruction in Studio 5000. Timer data type is TIMER. Access .DN, .TT, .ACC bits. CODESYS: Standard TOF in Standard library. Fully IEC 61131-3 compliant.

Stop Writing Ladder Logic From Scratch

Get 20 production-ready ladder logic templates for $29 -- download instantly and use them on your next project today.

20
Ready-Made Templates
LD + ST
Both Languages Included
$29
One-Time Purchase
Get Instant Access -- $29

Instant download - 30-day money-back guarantee - Use on unlimited projects

Free PLC simulator

Wire this block up and run it

Drop the instruction into a rung, hit Run, and watch it execute in your browser. 12 guided lessons across 8 PLC dialects — free account, no credit card.

Practice PLCs free →