Timers (output instruction)

TON: Timer On-Delay

Starts timing when the rung goes true, and sets its done bit once the preset has elapsed.

Also called: on delay timer, delay on, TON.

TON(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

TON is the timer people mean when they say timer. While the rung is true its accumulator counts up in milliseconds; when the accumulator reaches the preset, the done bit goes to 1 and stays there for as long as the rung stays true.

The moment the rung goes false, both the accumulator and the done bit go back to zero. There is no memory. That reset-on-false behaviour is the whole difference between TON and RTO, and it is what makes TON right for a delay and wrong for a running-hours meter.

Three bits are worth knowing. The done bit is true after the preset has elapsed. The timing bit is true while it is counting and not yet done. The enable bit follows the rung. Most rungs only ever need the done bit.

A rung you can run

A motor that must not start until the lube pump has run for five seconds

[object Object]
XIC(Lube_Pump_Run)TON(Lube_Prime,5000)
XIC(Lube_Prime.DN)XIC(Start_Cmd)XIO(Stop_Cmd)OTE(Main_Motor)

Preset is in milliseconds, so 5000 is five seconds. If the lube pump drops out at any point the timer resets and the main motor loses its permissive.

Run this rung in the simulator

What it is called on other controllers

PlatformEquivalent
Rockwell (Studio 5000)TON
Siemens (TIA Portal)TON
Mitsubishi (GX Works)OUT T with a K preset
CODESYS and IEC 61131-3TON

Common mistakes

  • Using a TON to accumulate run time. Every stop resets it to zero. Use RTO.
  • Expecting timing accurate to less than one scan. A timer is evaluated once per scan, so a 10 ms preset on a 20 ms scan is not going to behave the way the number suggests.
  • Driving the timer from a rung that flickers. A condition that goes false for a single scan restarts the delay from zero, and the symptom is a delay that never completes.

Practise it

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

Related instructions

All ladder logic instructions