# CODESYS TON

Instructions · `TON` · verification: source checked

TON is a function block that implements an on-delay timer. A rising edge on IN starts the delay counter, and Q becomes TRUE after the delay time PT has elapsed while IN remains TRUE. A falling edge on IN resets the delay counter.

## Specification

| Property | Value |
|---|---|
| Language | structured text |
| Code | TON |
| Group | Timer |
| Syntax | TONInst(IN := VarBOOL1, PT := T#5s); |
| Dialect | CODESYS |

### Parameters

| Name | Data type | Description |
|---|---|---|
| IN | BOOL | Rising edge starts delay counter. Falling edge resets delay counter. |
| PT | TIME | Time for the delay counter [ms]. |
| Q | BOOL | FALSE if IN is FALSE; TRUE if IN is TRUE and delay time PT elapsed. |
| ET | TIME | Elapsed time since rising edge at IN. |

## Study notes

- Declared as a function block instance, for example TONInst : TON;
- Called in ST as TONInst(IN := VarBOOL1, PT := T#5s);
- Output Q is read as TONInst.Q.

## Sources

1. [Beckhoff Information System](https://infosys.beckhoff.com/content/1033/tcplclib_tc2_standard/74406539.html) (accessed 2026-10-26)
2. [CODESYS Group](https://content.helpme-codesys.com/en/libs/Standard/Current/Timer/TON.html) (accessed 2026-10-26)

---

Source page: https://machineschema.com/instruction/iec-ton  
JSON: https://machineschema.com/instruction/iec-ton.json  
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite Machine Schema and the original sources.
