TON Timer in PLC: On-Delay Timing and Examples
Quick answer
A TON timer delays an output turning on. When IN remains TRUE, ET increases toward PT; Q becomes TRUE when ET reaches PT. If IN becomes FALSE, a standard non-retentive TON resets Q and ET. The timer instance must be executed regularly for its state to update.
The TON (Timer On-Delay) is one of the most commonly used function blocks in PLC programming. It starts counting when the input (IN) transitions from FALSE to TRUE, and sets the output (Q) to TRUE after the preset time (PT) has elapsed. While the input remains TRUE, the elapsed time (ET) continues to increment until it reaches PT. When the input goes FALSE, both Q and ET are immediately reset to their initial values. TON timers are essential for implementing time delays, debouncing inputs, sequence control, and motor start delays in industrial automation systems.
Reviewed
Parameters
Inputs
| Name | Type | Description |
|---|---|---|
| IN | BOOL | Timer enable input - starts timing when TRUE |
| PT | TIME | Preset time value (e.g., T#5s for 5 seconds) |
Outputs
| Name | Type | Description |
|---|---|---|
| Q | BOOL | Timer done output - TRUE when ET >= PT |
| ET | TIME | Elapsed time - current timer value |
How TON on-delay timer works scan by scan
Read the waveforms and state table together. The diagram shows the sequence; the table states what the program should observe at each execution.
TON on-delay timing diagram
IN rises first. ET accumulates until the preset interval PT has elapsed, then Q rises. IN falling resets both ET and Q.
State table
| Moment | Input | Internal state | Output | Engineering meaning |
|---|---|---|---|---|
| Before enable | IN = FALSE | ET = T#0s | Q = FALSE | The timer is reset and ready for a new continuous interval. |
| Enable begins | IN changes FALSE → TRUE | ET starts increasing | Q = FALSE | The on-delay interval has started but is not complete. |
| Preset reached | IN remains TRUE | ET = PT | Q = TRUE | The condition persisted for the complete delay. |
| Enable removed | IN = FALSE | ET resets to T#0s | Q = FALSE | A standard TON does not retain partial or completed time. |
Ladder and Structured Text examples
Motor permissive after a five-second delay
|----[ Start_Request ]----[ TON StartDelay ]----|
| PT: T#5s |
|----[ StartDelay.Q ]--------( Motor_Permissive )|StartDelay must stay enabled for the complete five seconds. Use StartDelay.Q as the delayed permissive; do not drive the motor directly from the timer-enable rung.
IEC-style Structured Text call
VAR
StartDelay : TON;
StartRequest : BOOL;
MotorPermissive : BOOL;
END_VAR
StartDelay(IN := StartRequest, PT := T#5s);
MotorPermissive := StartDelay.Q;Declare one persistent instance and call it on each intended task execution. A temporary instance or conditional call can lose or freeze the state needed to measure elapsed time.
Vendor compatibility
A shared mnemonic does not guarantee an identical interface or state machine. Confirm the instruction help for the controller, firmware, language and library version used on the project.
| Platform | Instruction | What maps cleanly | Caveat to verify |
|---|---|---|---|
| Siemens S7-1200/1500 | TON with IEC_TIMER instance data | Same on-delay intent and IN/PT/Q/ET model | The instance data and task call determine state updates; verify DB retentivity separately from normal TON behavior. |
| Rockwell Logix | TON in Ladder; TONR in FBD/ST is a different instruction | PRE/ACC and DN represent the preset, elapsed value and done state | Logix tags, status bits and execution rules are controller-family specific. Do not infer IEC parameter names from the mnemonic alone. |
| CODESYS / IEC libraries | TON | Common IN, PT, Q and ET interface | Timer resolution and what happens when an instance is not called depend on the runtime and task configuration. |
Failure modes and edge cases to test
IN drops one scan before PT
Q remains FALSE and the standard TON resets ET; the next TRUE interval starts from zero.
PT is shorter than or close to the task interval
Q can only be observed on a task execution. Measure the effective delay on the target runtime.
The timer call is inside conditional logic
Outputs may stop updating while the call is skipped. Prefer a regular call with a controlled IN input.
The same instance is reused
Two logical conditions overwrite one state machine. Give each independent delay its own timer instance.
Evidence and review status
TON behavior and standard IN, PT, Q and ET interface were checked against current CODESYS documentation. Rockwell timer structures and time bases are vendor-specific.
Technical review date:
Critical behavior
- A rising IN starts timing; a falling IN resets a non-retentive TON.
- Q becomes true when IN remains true and the elapsed time reaches PT.
- The block must be called for its state to update.
- A preset close to task period or timer resolution needs platform-specific timing tests.
Verification checklist
- 1Test false input, timing input, done state and reset state.
- 2Interrupt IN before PT and verify ET and Q reset.
- 3Confirm time literal syntax and time base in the target IDE.
- 4Check that one timer instance is not reused for unrelated conditions.
Worked test
Test a five-second start delay
Call StartDelay(IN := EnableRequest, PT := T#5s).
- 1Hold EnableRequest false and record Q and ET.
- 2Set EnableRequest true for 4 seconds.
- 3Continue until at least 5 seconds.
- 4Set EnableRequest false.
Expected result: Q stays false before 5 seconds, becomes true after the continuous delay and resets with ET when EnableRequest goes false.
Technical sources
The target controller's version-specific instruction help remains authoritative.
- TON Standard function block
CODESYS Development
- TON: Generate on-delay
Siemens STEP 7 V20 documentation — S7-1200/1500 IN, PT, Q and ET behavior
Platform-Specific Implementation
Siemens (TIA Portal)
In TIA Portal, use IEC_Timer (TON) or legacy SFB 4 (TON_TIME). Access via 'Timer operations' in the instruction tree. Data type is IEC_TIMER for S7-1200/1500.
Allen-Bradley (Studio 5000)
Use TON instruction in Studio 5000/RSLogix 5000. Preset (PRE) is in milliseconds by default. Timer data type is TIMER. Access .DN (done), .TT (timing), .ACC (accumulated).
CODESYS
Standard IEC TON available in Standard library under Timers. Time literals use T# prefix (e.g., T#5s, T#100ms). Fully IEC 61131-3 compliant.
Common Applications
- Motor start delay
- Debouncing inputs
- Sequence timing
- Watchdog timers
- Pump priming delay
Common Mistakes to Avoid
- Forgetting that ET resets when IN goes FALSE
- Using TON when TOF is more appropriate for off-delay
- Not accounting for scan time in very short timer presets
- Assuming timer continues after IN goes FALSE
Frequently Asked Questions
What is TON (Timer On-Delay) in PLC programming?
Starts timing on rising edge, output activates after preset delay. The TON (Timer On-Delay) is one of the most commonly used function blocks in PLC programming. It starts counting when the input (IN) transitions from FALSE to TRUE, and sets the output (Q) to TRUE after the preset time (PT) has elapsed.
What are common applications of TON (Timer On-Delay)?
TON (Timer On-Delay) is commonly used for: Motor start delay, Debouncing inputs, Sequence timing, Watchdog timers, Pump priming delay.
How do I use TON (Timer On-Delay) in different PLC platforms?
Siemens: In TIA Portal, use IEC_Timer (TON) or legacy SFB 4 (TON_TIME). Access via 'Timer operations' in the instruction tree. Data type is IEC_TIMER for S7-1200/1500. Allen-Bradley: Use TON instruction in Studio 5000/RSLogix 5000. Preset (PRE) is in milliseconds by default. Timer data type is TIMER. Access .DN (done), .TT (timing), .ACC (accumulated). CODESYS: Standard IEC TON available in Standard library under Timers. Time literals use T# prefix (e.g., T#5s, T#100ms). Fully IEC 61131-3 compliant.
Related Function Blocks
TOF (Timer Off-Delay)
Output stays TRUE for preset time after input goes FALSE.
View Reference →TP (Timer Pulse)
Generates a fixed-duration pulse on rising edge of input.
View Reference →RTO (Retentive Timer On)
Timer retains accumulated value when input goes FALSE; requires manual reset.
View Reference →CTU (Counter Up)
Counts up on each rising edge; output activates when count reaches preset.
View Reference →TONR (Timer On-Delay Retentive)
Siemens time accumulator that retains ET across enable cycles until its reset input is applied.
View Reference →RTOR (Retentive Timer On with Reset)
Retentive on-delay timer with integrated reset input for accumulated time clearing.
View Reference →