TOF Timer Off Delay in PLC Programming Explained
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.
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
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.