Timers in PLC programming are essential for controlling time-based operations such as delays, pulse generation, or switching events after a specific duration. In Schneider PLC EcoStruxure Control Expert, timers are widely used to automate industrial processes with precise timing. Structured Text (ST), one of the IEC 61131-3 languages, lets you write timer logic using instructions like TON (On-Delay), TOF (Off-Delay), and TP (Pulse). With ST, timer programming is flexible, powerful, and easy to read—ideal for complex automation tasks.
This guide explains how to use timers in Structured Text (ST) with Schneider PLC EcoStruxure Control Expert. You’ll learn the differences between TON, TOF, and TP timers, see practical examples and use cases, and pick up best practices for reliable, real-world industrial automation.
A timer in PLC programming is a function block used to measure and control time-based events such as delays, pulse generation, or switching outputs after a set period. In Schneider PLC EcoStruxure Control Expert, timers play a key role in automating processes that depend on precise timing, such as motor start delays, valve operations, or alarm handling.
In Structured Text (ST), timers are declared and executed as functions. Each timer instance must have a unique name (e.g., TON_0, TOF_1, TP_0) so they can be used independently within a program. A timer function is called with specific input and output parameters that define its behavior and status.
General Syntax Example:
Timer_Name (IN := condition, PT := T#10s, Q => output, ET => elapsed_time);
Each timer function block in Structured Text has standard input and output parameters. These parameters control the operation of the timer and provide useful feedback for program logic.
In Schneider PLC EcoStruxure Control Expert, you can use timers and other function blocks directly in your Structured Text (ST) programs by accessing the Types Library Browser. The Types Library contains pre-defined function blocks like TON, TOF, TP, and many other standard timers that can be easily added to your program without manually declaring everything.
Steps to Add a Timer:
Using the Types Library Browser ensures you are using standard, tested function blocks, which reduces errors and makes your Structured Text program easier to read and maintain. Once added, the timer can be referenced and used just like any other variable or function block in your code.
In Structured Text (ST) programming of Schneider PLC EcoStruxure Control Expert, timers are declared as function blocks. Each timer must have a unique instance name (for example, TP_0, TP_1) to be used independently in a program. The TP (Pulse Timer) generates a fixed pulse output for the specified duration whenever the input condition changes from FALSE to TRUE.
Example Declaration:
TP_0 (IN := timer_start, PT := T#10s, Q => output_timer, ET => timer_et);
The TON (On-Delay Timer) is used when you want a delay before an output turns ON after an input condition becomes TRUE. In other words, when the input signal switches from FALSE to TRUE, the timer begins counting. Only if the input stays TRUE for the entire preset time (PT), the output (Q) will finally turn ON. If the input goes FALSE before the time is completed, the timer resets back to zero and the output remains OFF.
This type of timer is useful in situations where you need to make sure a condition is stable for a certain duration before activating an output. For example, you may not want to start a motor immediately when a button is pressed — instead, you can wait a few seconds to ensure all conditions are safe.
Example in Structured Text:
TON_0 (IN := Start_Button, PT := T#5s, Q => Motor_Output, ET => Timer_ET);
The TOF (Off-Delay Timer) is used when you want an output to remain ON for a certain time after the input condition turns FALSE. Unlike the TON timer, the output in a TOF timer is TRUE immediately when the input is TRUE. Once the input goes FALSE, the timer starts counting the preset time (PT). The output (Q) will stay TRUE during this period and only switch OFF after the elapsed time reaches the preset value. If the input goes TRUE again before the timer finishes, the timer stops and the output remains ON.
This timer is very useful in applications such as keeping a fan running for a few seconds after a machine stops, delaying the shutdown of an alarm, or maintaining a signal for a fixed period after a process ends.
Example in Structured Text:
TOF_0 (IN := Sensor_Input, PT := T#8s, Q => Alarm_Output, ET => Timer_ET);