0
0
FreertosConceptBeginner · 3 min read

TOF Timer Off Delay in PLC Programming Explained

A TOF timer (Timer Off Delay) in PLC programming delays turning off an output after the input signal turns off. It keeps the output active for a set time before switching it off, useful for controlled shutdowns or delays.
⚙️

How It Works

A TOF timer works like a delayed light switch off. Imagine you turn off a light, but it stays on for a few seconds before going off. In PLCs, when the input to the TOF timer goes from ON to OFF, the timer starts counting down the preset delay time. During this countdown, the output remains ON.

Once the delay time finishes, the output finally turns OFF. If the input turns ON again before the timer finishes, the timer resets and the output stays ON continuously. This behavior helps machines or processes to stop smoothly instead of abruptly.

💻

Example

This example shows a TOF timer in a simple PLC ladder logic style using structured text. The timer delays turning off the output for 5 seconds after the input goes OFF.

structured-text
VAR
  InputSignal : BOOL := FALSE;
  OutputSignal : BOOL := FALSE;
  TOFTimer : TOF;
END_VAR

// TOF timer logic
IF InputSignal THEN
  OutputSignal := TRUE;
  TOFTimer(IN := TRUE, PT := T#5s);
ELSE
  TOFTimer(IN := FALSE);
  OutputSignal := TOFTimer.Q;
END_IF
Output
When InputSignal is TRUE, OutputSignal is TRUE immediately. When InputSignal turns FALSE, OutputSignal stays TRUE for 5 seconds, then turns FALSE.
🎯

When to Use

Use a TOF timer when you want to delay turning off a device or process after a control signal stops. For example:

  • Keep a conveyor belt running briefly after a stop button is pressed to clear items.
  • Delay turning off a motor to allow it to cool down safely.
  • Hold a valve open for a few seconds after a sensor stops detecting flow.

This prevents sudden stops that might damage equipment or cause safety issues.

Key Points

  • TOF timer delays turning off an output after input goes OFF.
  • Output stays ON during the delay period.
  • If input turns ON again, timer resets and output stays ON.
  • Useful for smooth shutdowns and safety delays.

Key Takeaways

A TOF timer delays turning off an output after input turns off.
The output remains active during the preset delay time.
If input returns ON before delay ends, the timer resets.
Use TOF timers to prevent abrupt stops and protect equipment.
TOF timers are common in industrial automation for controlled shutdowns.