Function Block - Pulse timer.


IN : BOOL   Timer command
PT : TIME   Programmed time

RST : BOOL  Reset (TPR only)


Q : BOOL   Timer elapsed output signal
ET : TIME  Elapsed time

Time diagram

TpDiag.gif (2861 octets)


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, 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.

TPR is same as TP but has an extra input for resetting the timer

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

ST Language

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

FBD Language

TpFbd.gif (1221 octets)

LD Language

TpLd.gif (1345 octets)

IL Language:

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

See also