Skip to main content

7.3.1 TP_TIME

Function

TP_TIME is called the standard generated pulse timer. Its function is to realize the function of generating pulse signals of a specified length of time in the PLC program, which is used to drive other devices or trigger other operations

LD graphics

alt text

  • Generate pulse timing diagram:

alt text

Parameter description

Interface variableDeclarationData typeDescription
INVar_InputBOOLStart input bit
PTVar_InputTIMESet time input
QVar_OutputBOOLOutput bit
ETVar_OutputTIMEElapsed time

Corresponding syntax

  • The input bit IN value is "TRUE", the timer starts, and at the same time, the Q value outputs "TRUE"
  • When the ET value is less than the PT value, the change in the IN value does not affect the output of the Q value and the timing of the ET value

Example

  • LD example is shown in the following animation:

alt text

  • ST example is shown in the following code:
TP_TIME_1(
IN:=IN1,
PT:=T#1s,
Q=>OUT,
ET=>ET
);
IF OUT THEN
iVar:=iVar+1;
else
iVar:=0;
END_IF;