TP

TP 1:

Pulse generator. 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 : TIME; (* The length of the High-Signal in ms *)
END_VAR

VAR_OUTPUT

VAR_OUTPUT
   Q  : BOOL; (* The pulse *)
   ET : TIME; (* The current phase of the High-Signal *)
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 milliseconds 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.
Graphic display of TP behavior over time:

TP 2:

The TP function requires 14 bytes of data.

Requirements

Development environment

Target system type

PLC libraries to be linked

TwinCAT v3.0.0

PC or CX (x86)

Tc2_Standard