LTOF

The function block LTOF is a timer off delay with 64- bit time data type (LTIME).
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. |
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:

Requirements
Development environment | Target platform | PLC library to include |
---|---|---|
TwinCAT v3.0.0 | PC or CX (x86) | Tc2_Standard |