FUNCTION_BLOCK TP
Implements a pulse timer
(* Example declaration *)
TPInst : TP ;
(* Example in ST *)
TPInst(IN := VarBOOL1, PT:= T#5s);
VarBOOL2 := TPInst.Q;
InOut:
Scope |
Name |
Type |
Comment |
Input |
IN |
BOOL |
Rising edge starts the pulse timer and sets Q to TRUE |
PT |
TIME |
Length of the pulse (high-signal) |
|
Output |
Q |
BOOL |
Pulse signal, set to TRUE for PT milliseconds if EN has a rising edge |
ET |
TIME |
Elapsed time since pulse timer started. It will then remain constant after PT is reached. |