TP / TPR

PLCopen motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - PulseClosed When the step gets activated, the action is activated for a single execution, and possibly once again when the step is deactivated timer.

Inputs

Input

Data Type

Range

Unit

Default

Description

IN

BOOL

 

 

 

Timer command.

PT

TIME

 

 

 

Programmed time.

RST

BOOL

 

 

 

Reset (TPR only).

Outputs

Output

Data Type

Range

Unit

Description

Q

BOOL

 

 

Timer elapsed output signal.

ET

TIME

 

 

Elapsed time.

Time Diagram

TpDiag.gif (2861 octets)

Remarks

  • TPR is same as TP but has an extra input for resetting the timer.
  • The timer starts on a rising pulse of IN input.
    • It stops when the elapsed time is equal to the programmed time.
  • A falling pulse of IN input resets the timer to 0 (zero) but only if the programmed time is elapsed.
  • All pulses of IN while the timer is running are ignored.
  • The output signal is set to TRUE while the timer is running.

FBD Language

TpFbd.gif (1221 octets)

FFLD Language

  • In the FFLD language, the input rung is the IN command.
    • The output rung is Q the output signal.

TpLd.gif (1345 octets)

IL Language

(* MyTimer is a declared instance of TP function block *)
Op1: CAL MyTimer (IN, PT)
     FFLD  MyTimer.Q
     ST  Q
     FFLD  MyTimer.ET
     ST  ET

ST Language

(* MyTimer is a declared instance of TP function block *)
MyTimer (IN, PT);
Q := MyTimer.Q;
ET := MyTimer.ET;

See Also