TON (On-Delay Timer)
Starts timing when the input becomes TRUE and sets the output to TRUE after the preset time elapses.
Description
The TON (Timer On-Delay) instruction implements a delay-on timer, as defined in IEC 61131-3. When the input .IN becomes TRUE, the timer starts counting. After the elapsed time .ET reaches the preset time .PT, the output .Q becomes TRUE.
If the input .IN goes FALSE before the preset time is reached, the timer resets and the elapsed time returns to zero. The output .Q remains FALSE.
Key behavior:
- Input goes TRUE: timer starts counting up from 0
- Elapsed time reaches preset: output
.QbecomesTRUE - Input goes FALSE: timer resets immediately, output
.QbecomesFALSE
This is the most commonly used timer type. It is ideal for delaying the activation of an output, such as waiting a few seconds before starting a motor or confirming a sensor signal is stable.
Syntax
Sequence Visual Editor

The PT chip holds the preset in milliseconds; transitions read the output as T_delay.q.
Python
from automation_machine import ActionInstruction
step.add_action("timer_name", "Timer description", instruction=ActionInstruction.TON, duration=5000)
Parameters
- name: the name of the timer instance
- description: human-readable description
- qualifier:
ActionQualifierenum (default:ActionQualifier.N, keep timer running while step active) - instruction: must be
ActionInstruction.TON - duration: the preset time in milliseconds (e.g.,
5000for 5 seconds)
Timer Variables
Each TON timer instance exposes the following child variables:
| Variable | Type | Description |
|---|---|---|
.IN |
BOOL | Input signal: activates the timer when TRUE |
.Q |
BOOL | Output signal: becomes TRUE when .ET >= .PT |
.PT |
TIME | Preset time: the configured delay duration |
.ET |
TIME | Elapsed time: the current accumulated time since .IN became TRUE |
See Also
- TOF (Off-Delay Timer): delays turning off
- TP (Pulse Timer): fixed-duration pulse
- RTO (Retentive On-Delay Timer): remembers elapsed time
- Action Qualifiers Overview
- Instructions Overview