Timers (output instruction)

TOF: Timer Off-Delay

Its done bit goes true immediately when the rung goes true, and stays true for the preset after the rung goes false.

Also called: off delay timer, delay off, run-on timer.

TOF(timer, preset, base)

Arguments

NameWhat it isAcceptsDefault
destinationWhat the instruction acts ona timerrequired
presetPreset (ms)a whole number1000
baseTime base (ms)a whole number1

Arguments are positional and this table is generated from the simulator's own instruction registry, so it always matches what the engine accepts.

What it does

TOF is the timer that keeps something running after the reason for it has gone away. The done bit turns on the instant the rung does, and the timing only starts when the rung drops out.

That makes it exactly right for run-on: a cooling fan that must keep going after the motor stops, a conveyor that must clear its last part after the feed stops, an extraction system that must purge before it shuts down.

It also catches people out, because the done bit is true when the rung is true and stays true afterwards. If you want a bit that is only on during the delay, you need the done bit and the rung condition together, not the done bit alone.

A rung you can run

A cooling fan that runs on for two minutes after the motor stops

[object Object]
XIC(Main_Motor)TOF(Fan_RunOn,120000)
XIC(Fan_RunOn.DN)OTE(Cooling_Fan)

The fan starts with the motor and keeps running for 120000 ms, two minutes, after it stops. Restart the motor inside those two minutes and the timer simply resets.

Run this rung in the simulator

What it is called on other controllers

PlatformEquivalent
Rockwell (Studio 5000)TOF
Siemens (TIA Portal)TOF
Mitsubishi (GX Works)No single instruction; built from a timer and a latch
CODESYS and IEC 61131-3TOF

Common mistakes

  • Reading TOF as the inverse of TON. It is not; its done bit is true in both the running state and the delay state.
  • Using TOF to debounce an input that chatters on the way on. TOF only extends the trailing edge; a leading-edge bounce needs a TON.

Practise it

Interactive exercises that use TOF. Each one checks your ladder against a real scan.

Related instructions

All ladder logic instructions