PLC TIMERS
PLC Timers TON, TOF and TP Explained With a Video Demo
TON waits, TOF holds, TP fires a fixed pulse. A plain-English timing walkthrough of the three IEC timers, with a credited TIA Portal video demo.

PLC timers come in three standard types. A TON (on-delay) turns its output on once the input has stayed on for the preset time. A TOF (off-delay) turns it on at once and holds it for the preset time after the input goes off. A TP (pulse) gives one fixed-length pulse per rising edge.
In this lesson by Hegamurl, the three timers, plus the retentive TONR, are used in Siemens TIA Portal. Watch it first, then use the written walkthrough below as your companion: follow along, then check your work against these steps.
The four signals every IEC timer has
Siemens, CODESYS and most IEC 61131-3 platforms use the same names:
- IN, the input that starts or stops timing.
- PT, the preset time, written in TIA Portal as a TIME value such as T#5s.
- Q, the output.
- ET, the elapsed time so far.
In TIA Portal each IEC timer needs its own instance data, of type IEC_TIMER, so two timers must never share one instance. Reusing an instance is one of the most common timing mistakes.
TON: the on-delay timer
Picture the timing diagram as three lines: IN, ET and Q.
- IN goes true. ET starts counting up from zero. Q stays false.
- If IN stays true until ET reaches PT, Q goes true and stays true for as long as IN is true.
- If IN goes false at any point, ET resets to zero and Q goes false.
The key point is step 3. A TON needs the input to stay true for the whole preset time. That makes it ideal for confirming a signal: a level switch that must be made for 2 seconds before a pump starts, a guard that must be closed for 1 second before a machine is allowed to run, or the star-to-delta changeover on a motor starter.
TOF: the off-delay timer
Draw the same three lines.
- IN goes true. Q goes true at once. ET stays at zero.
- IN goes false. Now ET starts counting. Q stays true.
- When ET reaches PT, Q goes false.
- If IN goes true again before ET reaches PT, ET resets and Q simply stays true.
A TOF keeps something running after the command stops. Classic uses are a cooling fan that runs on after a motor stops, a conveyor that clears the last product before stopping, or a light that stays on for a while after a presence sensor drops out.
TP: the pulse timer
- IN goes from false to true (a rising edge). Q goes true and ET starts counting.
- Q stays true until ET reaches PT, whatever IN does in the meantime.
- Q goes false when PT is reached.
Siemens documents this plainly: the timer runs for the set time regardless of later changes at the input, and a new rising edge during the pulse does not affect it. So a TP is not retriggerable. If you hold IN true after the pulse, nothing new happens until IN goes false and then true again.
Use a TP when the length of the output matters more than the length of the input: a 3-second horn when a fault appears, a fixed-length pulse to a solenoid, or a "carton full" lamp that flashes once.
TONR and RTO: the retentive timer
A retentive on-delay timer, TONR in TIA Portal or RTO in Allen-Bradley Logix, adds time while IN is true and keeps it when IN goes false. It needs a separate reset. That makes it the timer for running hours, cumulative heating time or total time a pump has spent in a fault state.

Allen-Bradley names
In Allen-Bradley Studio 5000 ladder the same ideas appear as TON, TOF and RTO instructions, with a preset (PRE) and an accumulated value (ACC) instead of PT and ET, and status bits for enabled (EN), timing (TT) and done (DN). The behaviour you draw on a timing diagram is the same. Our free Allen-Bradley Studio 5000 course has a module on these timers.
Try it in PLCSIM
Build these four rungs in TIA Portal and run them in PLCSIM. They match the practice task in our organisation blocks and timers course.
- TON: a star-delta start. Start button sets the star contactor; after a TON of 5 seconds, drop star and pull in delta.
- TOF: a fan run-on. The fan output follows the motor, and a TOF keeps it running for 30 seconds after the motor stops.
- TP: a horn pulse. A rising edge on a fault bit drives a 3-second horn, however long the fault lasts.
- TONR: a machine-hours counter that only counts while the motor runs, with a reset you can trigger from an HMI or a tag.
For each rung, force IN in PLCSIM, watch ET in the watch table, and draw the timing diagram you actually saw. Then compare it with the steps above. If your TON output came on while IN was flickering, check that no other timer uses the same instance data.
Common mistakes
- Two timers sharing one instance, so each resets the other.
- Using a TON where a TOF was meant, so the fan stops at the same moment as the motor.
- Expecting a TP to restart on a second press while it is still running.
- Using a plain TON for run-hours, which loses the total every time the motor stops.
Learn timers properly, free
Timers are taught in module 12 of our free Siemens TIA Portal course, alongside counters and edge detection, and in more depth in Siemens TIA Portal: Organisation Blocks, Interrupts and Timers, which also covers resetting and presetting timers. For more options, see all free PLC courses.
Everything is free, including the final assessment. The certificate is optional, a small one-off fee from US$2.99 for a beginner course. It is an EDWartens certificate of completion with a code you can check at edwartens.com/verification, not a Siemens or Rockwell certification. Create a free account to start.
Take the free course
Questions
What is the difference between TON and TOF?
TON delays the output turning on: Q goes true only after IN has been true for the preset time. TOF delays the output turning off: Q goes true as soon as IN is true and stays true for the preset time after IN goes false.
Can a TP pulse timer be retriggered?
Not in the IEC timer used in TIA Portal. Siemens' documentation says the pulse runs for the set time regardless of later changes at the input, and a new rising edge during the pulse does not affect it.
What happens to a TON if the input drops before the time is up?
The elapsed time resets to zero and the output stays false. The input has to stay true for the whole preset time, which is why TON is used to filter sensor chatter.
Which timer should I use to count machine running hours?
A retentive timer: TONR in TIA Portal or RTO in Allen-Bradley Logix. It keeps its elapsed time when the input goes false and needs a separate reset.
Sources
- Siemens TIA Portal Information System: TP start pulse timer (S7-1200, S7-1500)
- CODESYS online help: TON
- CODESYS online help: TOF
- CODESYS online help: TP
Written by the EDWartens engineering team for general education. Product names are trademarks of their owners; mentioning them does not imply endorsement. Prices and terms of other providers were checked on the date shown and can change.





