TP

TP 1:

The pulse timer block can be used to generate output pulses of a given time 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, Q is FALSE and ET is 0.

As input IN goes TRUE, tho output Q follows and remains TRUE for the pulse duration as specified by time input PT.

While the pulse output ist TRUE, the elapsed time ET ist increased.

On the termination of the pulse, the elapsed time is held until the beginning of the next pulse, at which point it is reset.

The output Q will remain TRUE until the pulse time has elapsed, irrespective of the state of the input IN.

Graphic Display of the TP Time Sequence:

TP 2:

The function TP requires 14 byte data

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT Version >= 2.6.0

PC or CX (x86)

Standard.Lib

TwinCAT Version >= 2.6.0

BC (165)

Standard.Lb6

TwinCAT Version >= 2.9.0

BCxx50 or BX

Standard.lbx

TwinCAT Version >= 2.10.0 Build >= 1301

CX (ARM)

Standard.lib