LTON

LTON 1:

The LTON function block implements a timer with a switch-on delay with a 64-bit time data type (LTIME).

If IN = FALSE, the Q output has the value FALSE and the ET output has the value zero. As soon as IN is set to TRUE, the time in nanoseconds is counted up in ET until the setpoint PT is reached. Q is TRUE, if IN = TRUE and ET = PT. Otherwise Q = FALSE.

Graph showing LTON over time:

LTON 2:

LTON 3: Inputs

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

Name

Type

Description

IN

BOOL

Rising edge: Start timer

Falling edge: Reset timer

PT

TIME

Delay time (time elapsed before Q is set)

LTON 4: Outputs

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

Name

Type

Description

Q

BOOL

FALSE if the IN input is FALSE.

TRUE if the IN input is TRUE and the time specified in PT has elapsed.

ET

TIME

Elapsed time since the rising edge at the IN input.

Requirements

Development environment

Target platform

PLC library to include

TwinCAT v3.0.0

PC or CX (x86)

Tc2_Standard