LTOF

LTOF 1:

Timer-off delay with 64-bit time data type (LTIME).

VAR_INPUT

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

VAR_OUTPUT

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

If IN is TRUE, the outputs are TRUE or 0. As soon as IN becomes FALSE, the time is incremented in nanoseconds in ET, until the value equals the value of PT. The value then remains constant. Q is FALSE, if IN = FALSE and ET = PT. Otherwise Q = TRUE. Q thus has a falling edge, once the time specified in nanoseconds in PT has elapsed.
Graph showing LTOF over time:

LTOF 2:

Requirements

Development environment

Target system type

PLC libraries to be linked

TwinCAT v3.0.0

PC or CX (x86)

Tc2_Standard