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
| Behaviour | TON (on-delay) | TOF (off-delay) |
|---|---|---|
| Timing starts on | Rising edge — input goes TRUE | Falling edge — input goes FALSE |
| Output when input turns ON | Stays FALSE until preset elapses | TRUE immediately |
| Output when input turns OFF | FALSE immediately (timer resets) | Stays TRUE for the preset, then FALSE |
| Input dropped mid-timing | Accumulator resets — no output ever fires | Accumulator resets — output simply stays TRUE |
| Typical uses | Start delays, warning horns, alarm persistence, debounce | Fan run-on, cool-down, purge cycles, hold-on lighting |
| IEC 61131-3 syntax | TON(IN, PT) → Q, ET | TOF(IN, PT) → Q, ET |
| Allen-Bradley naming | TON with PRE / ACC and EN, TT, DN bits | TOF with PRE / ACC and EN, TT, DN bits |
| Siemens (TIA Portal) naming | IEC TON function block + instance DB | IEC 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
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.
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.
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
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.
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
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
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.
Auto-graded timer scenarios unlocked immediately. No credit card. No install. Works on Mac, Windows, Linux and Chromebook.
No licence. No install. No credit card. Just ladder logic.
Create free account →