CODESYS TON

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.

Source checked15/15 values · 2026-10-26

Specification

2 sources
Languagestructured text
CodeTON
GroupTimer
SyntaxTONInst(IN := VarBOOL1, PT := T#5s);
DialectCODESYS

Parameters

NameData typeDescription
INBOOLRising edge starts delay counter. Falling edge resets delay counter.
PTTIMETime for the delay counter [ms].
QBOOLFALSE if IN is FALSE; TRUE if IN is TRUE and delay time PT elapsed.
ETTIMEElapsed 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.
↑↓ navigate↵ openesc close