TP block

Short summary

Name

TP

→POU type

→function block

Category

IEC-block, Timer

Conform to →IEC-standard

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg no restrictions

Graphical interface

images/download/thumbnails/414782820/TP-version-1-modificationdate-1535105226561-api-v2.png

Available since

version 1.4.1 (for logi.CAD 3)

Functionality

This is a pulse generator.

Enter the length of the pulse at input PT. If input IN is →turned on and during the length of the pulse, output Q returns value TRUE (or an equivalent). Output ET returns the expired time since turning input IN on, until the value entered at PT is reached.

Implementer-specific realization

The IEC-standard does not specify whether and how to consider changes for input PT while the functionality is executed. In logi.CAD 3, the expired time is always compared with the current value of PT. Thus, if input PT is changed after input IN has been turned on, the behavior of the block is affected.

This block receives the current system time from the runtime system. This time remains constant while the same task is executed. However, in case of different tasks, it is possible that a different system time is used when the belonging programs are executed (even if the different tasks have the same cycle time).

The following illustration shows the behavior of TP:

images/download/attachments/414782960/TP-version-1-modificationdate-1535107239151-api-v2.png

In-/outputs


Identifier

→Data type

Description

Inputs:

IN

BOOL

input/start

PT

TIME

preset time

Outputs:

Q

BOOL

output

ET

TIME

elapsed time

Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

See:

Example for usage within ST-editor

Simple call of TP
PROGRAM Test
VAR
tp1 : TP;
pulse : BOOL;
END_VAR
tp1(IN := TRUE, PT := T#2s, Q => pulse);
(* Instance of block 'TP' is called. Variable 'pulse' delivers TRUE for 2 seconds. *)
END_PROGRAM

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.