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.
| Language | structured text |
|---|---|
| Code | TON |
| Group | Timer |
| Syntax | TONInst(IN := VarBOOL1, PT := T#5s); |
| Dialect | CODESYS |
| 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. |