TON

TON 1:

Timer on-delay

VAR_INPUT

VAR_INPUT
    IN : BOOL; (* starts timer with rising edge, resets timer with falling edge *) 
    PT : TIME; (* time to pass, before Q is set *)
END_VAR

VAR_OUTPUT

VAR_OUTPUT
    Q  : BOOL; (* is TRUE, PT seconds after IN had a rising edge *)
    ET : TIME; (* elapsed time *)
END_VAR

If IN is FALSE, Q is FALSE and ET is 0.As soon as IN becomes TRUE, the time will begin to be counted in milliseconds in ET until its value is equal to PT. It will then remain constant. Q is TRUE when IN is TRUE and ET is equal to PT. Otherwise it is FALSE. Thus, Q has a rising edge when the time indicated in PT in milliseconds has run out.
Graphic display of TON behavior over time:

TON 2:

The function TON requires 15 byte data.

Requirements

Development environment

Target system type

PLC libraries to be linked

TwinCAT v3.0.0

PC or CX (x86)

Tc2_Standard