Guide · 6 min read · Free to try
PLC timers explained: on-delay, off-delay and retentive
A timer makes a controller wait. There are three kinds, and the difference is when they start counting and what happens when the rung turns off. Each one is shown below scan by scan, then you build it in your browser.
Free in FORGE, the online PLC simulator. No install, and no account to start.
The three timers at a glance
| Timer | Starts timing | Done bit (DN) | When the rung turns off | Use it to |
|---|---|---|---|---|
| On-delay (TON) | When the rung turns on | On once ACC reaches PRE | Resets to 0 | Wait before starting something |
| Off-delay (TOF) | When the rung turns off | On at once, off after PRE | Starts timing | Keep something running after a stop |
| Retentive (RTO) | When the rung turns on | On once ACC reaches PRE, and stays on | Keeps its time | Add up time across stops |
What is inside a timer
Every timer is one TIMER tag with five parts you read in your rungs.
- PRE, the preset: the time to reach, in milliseconds. 3 seconds is 3000.
- ACC, the accumulated time so far.
- EN, enabled: on while the rung is true.
- TT, timing: on while ACC is still climbing.
- DN, done: the bit your output usually follows.
On-delay timer (TON): wait, then act
An on-delay timer counts while its rung is true. When ACC reaches PRE, DN turns on. If the rung turns off before then, ACC goes straight back to 0 and the wait starts over next time.
Recorded from a real run in FORGE: PRE 1500, one scan every 500 ms. ACC is still 0 on the first true scan.
Example: sound a horn before a conveyor starts
Start turns on a warning horn and a timer. The conveyor follows the timer’s done bit, so it moves only after the horn has sounded for the full preset.
| Tag | Value |
|---|---|
| StartPB | 1 |
| HornTime | PRE 1200 ACC 1200 EN 1 TT 0 DN 1 |
| Conveyor | 1 |
StartPB has been on for 1.2 s. HornTime.DN turned Conveyor on.
Off-delay timer (TOF): keep going after a stop
An off-delay timer turns DN on as soon as its rung is true. When the rung turns off, it starts counting, and DN turns off once ACC reaches PRE.
Recorded from a real run in FORGE: PRE 1500, one scan every 500 ms.
Example: run a cooling fan after the motor stops
The fan follows DN. While the motor runs, the fan runs. When the motor stops, the fan keeps going for the preset, then stops on its own.
| Tag | Value |
|---|---|
| Motor | 0 |
| FanRunOn | PRE 5000 ACC 0 EN 0 TT 1 DN 1 |
| Fan | 1 |
Motor is off. Fan stays on until ACC reaches 5000.
Retentive timer (RTO): add up the time
A retentive timer counts while its rung is true and keeps ACC when the rung turns off. It carries on from there next time. Only a reset (RES) puts it back to 0.
Recorded from a real run in FORGE: PRE 1500, one scan every 500 ms. Run turns off at scan 4 and ACC keeps 500.
Example: a service lamp after one hour of pump running
The pump’s run contact drives the timer with a preset of 3,600,000 ms. Stops lose no time. The lamp follows DN, and the maintenance button resets the timer.
Which timer do I need?
- Something should happen after a signal has been on for a while: on-delay.
- Something should keep going for a while after a signal turns off: off-delay.
- The total time matters, even across stops: retentive, with a reset.
- A light should flash: two on-delay timers that restart each other. See the flasher.
Three mistakes beginners make
The preset typed in seconds
PRE is in milliseconds. A preset of 3 times out almost at once.
Expecting an on-delay timer to remember
A TON starts from 0 every time its rung goes false. Use an RTO to keep the time.
Two timers on one tag
Each timer writes ACC, TT and DN, so the second one overwrites the first. Give each timer its own tag.
Practise timers for free
Each exercise opens in FORGE and checks your rungs in simulation.
- Delay the startUse an on-delay timer so the motor starts only after the button has been held for 3 seconds.Free
- Run on after stopA cooling fan must keep running for 10 seconds after the motor stops. Use an off-delay timer.Free
- Flash the warning lightFlash a warning light while a machine door is open: on for half a second, off for half a second.Free
- Total running timeTrack how long a pump has run in total across starts and stops, and turn on a service lamp after one hour.Free
- Traffic light sequenceRun a red, amber and green sequence with correct timings and a pedestrian request that is handled safely.Free
- The timer that never finishesA timer starts timing but never sets its done bit. Something resets it every scan. Find it and fix it.Pro
Learn it in a course
Each course has a video, short steps, a quiz and a hands-on practical checked in FORGE.
On-delay timing
Wait a set time after an input turns on, then read the timer done bit. A reset clears it.
Off-delay and retentive timers
Keep an output on after an input turns off, and keep a timer count when its input stops. A reset clears that count.
Chained timers and a flasher
Start one timer when another is done, then loop two timers to flash a light.
Courses are in the Pro and Student plans, with a 7-day free trial. See plans
Questions
What are the three types of PLC timer?
On-delay (TON) waits before turning on, off-delay (TOF) waits before turning off, and the retentive on-delay timer (RTO) adds up time across stops until it is reset.
What is the difference between an on-delay and an off-delay timer?
An on-delay timer delays the output turning on after its rung goes true. An off-delay timer turns the output on at once and delays it turning off after its rung goes false.
Why does my timer start again from zero?
An on-delay timer resets whenever its rung goes false, even for one scan. If the time should carry over, use a retentive timer and reset it yourself.
Can I practise PLC timers without a PLC?
Yes. FORGE runs ladder logic scan by scan in your browser. Five of the timer exercises are free and need no account to start.
Build your first timer now.
Open the Delay the start exercise, add an on-delay timer and watch ACC climb.