AutomationView Documentation

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:

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

Action T_delay with the TON instruction badge and the PT 5000 preset chip
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


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