PLC Simulator
PLC timer instructions

TON vs TOF: What’s the Difference?

The on-delay vs off-delay timer question, answered with timing diagrams you can read in ten seconds — and a browser simulator where you can run both instructions live and watch the accumulator count.

Join 1900+ learners practicing PLC programming

Quick answer

TON delays turning ON; TOF delays turning OFF. A TON (on-delay timer) starts timing when its input goes TRUE and only sets the output after the preset time — drop the input early and the timer resets with no output. A TOF (off-delay timer) sets the output immediately when the input goes TRUE and starts timing when the input goes FALSE — the output holds for the preset time after the input drops, then turns off. TON times the rising edge; TOF times the falling edge.

Side-by-side

TON vs TOF comparison table

BehaviourTON (on-delay)TOF (off-delay)
Timing starts onRising edge — input goes TRUEFalling edge — input goes FALSE
Output when input turns ONStays FALSE until preset elapsesTRUE immediately
Output when input turns OFFFALSE immediately (timer resets)Stays TRUE for the preset, then FALSE
Input dropped mid-timingAccumulator resets — no output ever firesAccumulator resets — output simply stays TRUE
Typical usesStart delays, warning horns, alarm persistence, debounceFan run-on, cool-down, purge cycles, hold-on lighting
IEC 61131-3 syntaxTON(IN, PT) → Q, ETTOF(IN, PT) → Q, ET
Allen-Bradley namingTON with PRE / ACC and EN, TT, DN bitsTOF with PRE / ACC and EN, TT, DN bits
Siemens (TIA Portal) namingIEC TON function block + instance DBIEC TOF function block + instance DB

Want the full instruction set — including retentive timers and the accumulator model? See the complete guide to PLC timers: TON, TOF, TP and RTO.

Timing diagrams

Read the difference in two diagrams

Timing diagrams make the TON/TOF distinction obvious. Each diagram shows the input signal (IN) on top and the timer output (Q) below it, with the preset time (PT) marked between the edges that matter.

TON: when IN goes TRUE, nothing happens at the output yet — the accumulator counts up. Only after IN has been TRUE for the full preset does Q turn on. Q then follows IN down: the moment IN drops, Q drops and the accumulator resets. Notice the first, short pulse in the diagram — it ends before PT elapses, so Q never fires at all. That “forgets immediately if interrupted” behaviour is the defining TON characteristic.

TON on-delay timer timing diagram — the output Q turns on only after the input has been true for the preset time PT, and turns off immediately when the input drops; a short input pulse never produces an outputTON — on-delayINQPTshorter than PT→ no outputt
TON: Q rises PT after IN rises, and falls the instant IN falls. An input pulse shorter than PT produces no output.

TOF: the mirror image. Q turns on together with IN — there is no delay on the leading edge. The timing only starts when IN drops: Q holds TRUE while the accumulator counts, then drops once the preset elapses. If IN comes back before PT expires, the accumulator resets and Q simply never turned off — which is exactly what you want for run-on applications.

TOF off-delay timer timing diagram — the output Q turns on immediately with the input and stays on for the preset time PT after the input drops, before turning offTOF — off-delayINQPTon togethert
TOF: Q rises with IN and stays TRUE for PT after IN falls — the delay is on the way off, not on the way on.

The trap that catches most beginners: the TOF done bit is TRUE during normal operation, not after it. You use a TOF output to keep equipment running, whereas you use a TON output to allow equipment to start. Same block shape on the rung, opposite polarity of thinking.

In the plant

A real example of each

TON: warning horn before a motor starts

Safety codes and plain common sense say a big conveyor should not lurch into motion the instant someone presses Start. The classic pattern: the Start command sounds a horn immediately and enables a TON. Only when the TON completes — say five seconds of horn — does its done bit energise the motor contactor.

Rung 1: Start command — OTE Horn, TON Start_Warn PRE=5 s
Rung 2: Start_Warn.DN — OTE Conveyor_Motor

If the operator releases Start during the horn period, the TON resets and the motor never starts — exactly the fail-safe behaviour you want from an on-delay.

TOF: fan run-on after a heater stops

A duct heater must never be left in still air — the residual element heat needs to be carried away after shutdown. Feed the heater-run bit into a TOF and drive the fan from the TOF output: the fan starts with the heater, and when the heater stops, the fan keeps running for the preset cool-down period before the TOF finally drops it.

Rung 1: Heater_On — TOF Fan_RunOn PRE=120 s
Rung 2: Fan_RunOn.DN — OTE Cooling_Fan

If the heater restarts during the cool-down window, the TOF resets and the fan never stops — no short-cycling, no extra logic.

Bonus: the third timer

TON, TOF and TP — where the pulse timer fits

IEC 61131-3 defines three basic timers, not two. The TP (pulse timer) fires a fixed-length output pulse on the rising edge of its input: Q goes TRUE immediately and stays TRUE for exactly the preset time — no shorter if the input is released, no longer if it is held. During the pulse, the input is ignored entirely.

A quick way to place all three: TON answers “has the input been on long enough?”, TOF answers “has the input been off long enough?”, and TP answers “give me exactly this much output, no matter what the input does”. Typical TP jobs are solenoid pulses, glue or paint bursts, and one-shot indicator flashes.

Allen-Bradley programmers sometimes emulate a TP with a TON plus a one-shot contact, but the native TP instruction (available in the IEC function block set) is cleaner. If you also need timers that accumulate across interruptions, that is the retentive timer (RTO / TONR) — covered, along with counters, in our guides to PLC timers and PLC counters.

Live browser simulator

Stop reading timing diagrams — run one

The fastest way to make TON vs TOF stick is to watch the accumulator count. Drop a TON on a rung, energise the input, and see DN fire at the preset — then build the TOF version and watch the output hold after the input drops. Auto-graded, in your browser, no install.

Practice TON and TOF free — in your browser.

Auto-graded timer scenarios unlocked immediately. No credit card. No install. Works on Mac, Windows, Linux and Chromebook.

Questions

TON vs TOF FAQ

A TON (on-delay timer) delays turning an output ON: the output only becomes TRUE after the input has been continuously TRUE for the preset time, and it drops the instant the input drops. A TOF (off-delay timer) delays turning an output OFF: the output becomes TRUE immediately when the input turns on, and stays TRUE for the preset time after the input turns off. TON times on the rising edge of the input; TOF times on the falling edge.

Watch a TON and a TOF run side by side today

No licence. No install. No credit card. Just ladder logic.

Create free account →