LTOF

The LTOF function block implements a timer with switch-off delay with 64-bit time data type (LTIME).
If IN = TRUE, the Q output has the value TRUE and the ET output has the value zero. As soon as IN is set to FALSE, the time in nanoseconds is counted up in ET until the setpoint PT is reached. Q is FALSE, if IN = FALSE and ET = PT. Otherwise Q = TRUE.
Graph showing LTOF over time:

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_VARName | Type | Description |
|---|---|---|
IN | BOOL | Falling edge: Start timer Rising edge: Reset timer |
PT | TIME | Delay time (time that elapses before Q is reset) |
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_VARName | Type | Description |
|---|---|---|
Q | BOOL | TRUE if the IN input is TRUE. FALSE if the IN input is FALSE and the time specified in PT has expired. |
ET | BOOL | Elapsed time since the falling edge at the IN input. |
Requirements
Development environment | Target platform | PLC library to include |
|---|---|---|
TwinCAT v3.0.0 | PC or CX (x86) | Tc2_Standard |