LTOF

LTOF 1:

The function block LTOF is a timer off delay with 64- bit time data type (LTIME).

LTOF 2: Inputs

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

Name

Type

Description

IN

BOOL

Starts the timer with a falling edge and resets the timer with a rising edge.

PT

TIME

Time elapsed before Q is set.

LTOF 3: Outputs

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

Name

Type

Description

Q

BOOL

Q has a falling edge when the time specified in nanoseconds in PT has elapsed.

ET

LTIME

If IN = TRUE, the outputs are TRUE or 0. As soon as IN = FALSE, the time in ET is incremented in nanoseconds until the value reaches PT. The value then remains constant. Q is FALSE, if IN = FALSE and ET = PT.

Graph showing LTOF over time:

LTOF 4:

Requirements

Development environment

Target platform

PLC library to include

TwinCAT v3.0.0

PC or CX (x86)

Tc2_Standard