LTP
Pulse generator with 64-bit time data type (LTIME). This function block can be used to generate pulses with a defined pulse duration.
VAR_INPUT
VAR_INPUT
IN : BOOL; (*Trigger for Start of the Signal*)
PT : LTIME; (*The length of the High- Signal*)
END_VAR
VAR_OUTPUT
VAR_OUTPUT
Q : BOOL; (*The pulse*)
ET : LTIME (*elapsed time since pulse start*)
END_VAR
If IN is FALSE, the outputs are FALSE or 0. As soon as IN becomes TRUE, Q also becomes TRUE and remains TRUE for the pulse duration PT. As long as Q is TRUE, the time is incremented in nanoseconds in ET, until the value reaches PT. The value then remains constant. The output Q remains TRUE until the pulse duration has elapsed, irrespective of the state of the input IN. Q therefore supplies a signal over the interval specified in PT.
Graph showing LTP over time:
Requirements
Development environment |
Target system type |
PLC libraries to be linked |
---|---|---|
TwinCAT v3.0.0 |
PC or CX (x86) |
Tc2_Standard |