PLC Programming · Technical Blog

PLC Timers in TIA Portal: TON, TOF and TP Examples

A practical guide to IEC on-delay, off-delay and pulse timers—complete with timing behavior, ladder-logic applications, Siemens TIA Portal examples and commissioning checks.

2,500+ engineers trained 4.9/5 Google rating 21+ years, Chinchwad, Pune Next batch: contact for dates
Quick answer

TON delays an output turning ON, TOF delays an output turning OFF, and TP generates a fixed-duration pulse after a rising edge. In Siemens TIA Portal, each IEC timer needs its own instance memory, a Boolean IN signal, and a TIME preset at PT; Q is the timed output and ET shows elapsed time.

  • TON is ideal for start delays, signal validation and fault supervision.
  • TOF keeps an output active for a defined time after its input turns OFF.
  • TP produces one fixed pulse per valid rising edge; a continuously true input does not retrigger it.

How IEC PLC Timers Work

A PLC timer is a software function block evaluated during every scan. It does not pause the CPU. Instead, the controller compares elapsed time with a configured preset and updates the timer outputs.

The standard IEC interface is easy to recognize:

  • IN: Boolean condition that starts or controls timing.
  • PT: preset time, such as T#5s or T#250ms.
  • Q: timer result used by the rest of the program.
  • ET: elapsed time for online monitoring and diagnostics.

Give every timer call a unique instance. Reusing one instance for unrelated calls causes state to be overwritten and produces confusing results.

Want to practice this on real hardware?

Join a live Siemens PLC session with practical TIA Portal exercises—online, Pune classroom or corporate in-plant.

Book a Free Demo Class

TON: On-Delay Timer

A TON starts accumulating time when IN becomes true. Q remains false while ET increases. When ET reaches PT, Q becomes true. If IN turns false at any point, Q resets and ET returns to zero.

Typical TON applications

  • Delay a conveyor start until lubrication pressure is healthy.
  • Validate that a level switch remains active before accepting it.
  • Generate a no-feedback fault when a motor command is ON but feedback is missing.
  • Debounce a noisy field signal with a short confirmation delay.
INETQMeaning
FALSE0FALSETimer reset
TRUE, ET < PTIncreasingFALSEDelay in progress
TRUE, ET ≥ PTPTTRUEDelay complete

TOF and TP Timers

TOF: off-delay

When TOF input is true, Q becomes true immediately. When IN changes to false, timing begins and Q stays true until ET reaches PT. TOF is useful for cooling-fan overrun, delayed lamp shutdown and keeping extraction running after a machine stops.

TP: pulse timer

A rising edge at IN turns Q on for exactly PT. After the pulse begins, its duration normally continues even if IN goes false. The input must return false and rise again before another pulse can be triggered.

NeedInstructionExample
Wait before turning ONTONStart permissive confirmation
Wait before turning OFFTOFVentilation fan overrun
Fixed one-shot outputTPReject-solenoid pulse

Programming Workflow and Troubleshooting

  1. Describe the desired timing in plain language and choose TON, TOF or TP.
  2. Create meaningful tags for input, preset, output and elapsed time.
  3. Insert the IEC timer and assign a unique instance.
  4. Use a TIME literal or validated TIME variable for PT.
  5. Compile, simulate and monitor IN, PT, Q and ET together.
  6. Test normal operation, interrupted timing, rapid toggling, power recovery and manual reset.
SymptomLikely causeCheck
Timer never finishesIN drops during timing or PT is wrongTrend IN and ET online
Two timers affect each otherShared instanceAssign a unique IEC instance to each call
Pulse repeats unexpectedlyNo clean edge or logic retriggers INMonitor the trigger and add edge detection
Unexpected state after restartRetentivity assumptionReview instance DB retentivity and recovery design

Hands-On Lab: Compare TON, TOF and TP in TIA Portal

Hands-on
Before you start
  • TIA Portal V16 or later with PLCSIM, or an S7-1200/S7-1500 trainer
  • Boolean tags Test_Enable and Test_Pulse plus monitored Q/ET tags
  • Use only internal bits or indicator lamps for this exercise
  • Estimated time: 20 minutes
1

Create three timer networks

Insert TON with PT=T#5s, TOF with PT=T#3s and TP with PT=T#2s. Give each call a separate instance.

The project compiles without an instance or data-type error.
2

Test TON

Turn Test_Enable ON, watch ET increase and confirm Q turns ON at five seconds. Turn Test_Enable OFF before PT and repeat.

Q resets immediately when IN is false, and interrupted timing restarts from zero.
3

Test TOF

Turn Test_Enable ON and confirm Q is immediate. Turn it OFF and measure how long Q remains true.

Q remains true for about three seconds after IN turns false.
4

Test TP and edge behavior

Create one rising edge on Test_Pulse, hold it true, then return it false and create another edge.

Each valid rising edge generates one two-second pulse; holding IN true does not continuously retrigger it.
Checkpoint—how to know you did it right

Your monitored values match every expected result, abnormal cases have been tested, no force remains active, and the final project revision and test evidence are saved.

Frequently asked questions

Does a PLC timer stop the program scan?

No. The CPU continues scanning the complete program while the timer function block updates its state each cycle.

Can multiple timer calls use the same instance?

Unrelated timers should not share an instance because the stored state will be overwritten. Assign a unique instance or dedicated multi-instance member to every timer.

Which timer should I use for sensor debounce?

A short TON is commonly used when the signal must remain continuously true before it is accepted. Confirm the delay is compatible with the machine speed and safety requirements.

Reviewed by Bhawesh Kumar SinghIndustrial Automation Trainer and Industry 4.0 Consultant · Softwell Automation · 21+ years industry experience

Get the full syllabus + free demo class

Share your details—a Softwell training advisor will contact you with batch dates, fees and hardware-practice options.

No spam. Used only to share course details for this enquiry.

Learn with practical industrial examples

Join live online, Pune classroom or corporate in-plant automation training.

Request Course Details
Verified learning pathway

Discuss PLC Timers: TON, TOF and TP

Explore practical curriculum, software, hardware and batch options for this technology.

Content reviewed: 14 July 2026

Siemens PLC & TIA Portal Learning Path

Continue with the related Siemens PLC tutorials in this practical learning series.

  1. SCL vs Ladder Logic
  2. Upload PLC Program
  3. TIA Selection Tool
  4. Analog Input Scaling
  5. PLC Counters
  6. PLC Timers
  7. Addressing & Data Types
  8. Hardware & PLC Tags
  9. OB, FB, FC & DB
☎ Call WhatsApp ✉ Email Enquire Now