TOFΒΆ
Provided by Standard Library.
Timer function block, implements a turn-off delay. When the input changes from TRUE to FALSE (falling edge), first a certain time will run through until also the output gets FALSE.
Inputs:
IN : BOOL; Falling edge starts counting up ET.
PT : TIME; Upper limit for counting up ET (delay time).
Outputs:
Q : BOOL; Gets a falling edge as soon as ET has reached the upper limit PV (delay time is over).
ET : current state of delay time.
TOF(IN, PT, Q, ET) means:
If IN is TRUE, the outputs will be TRU respectively 0.
As soon as IN becomes FALSE, in ET the time will begin to be counted in milliseconds in ET until its value is equal to PT. It will then remain constant.
Q is FALSE when IN is FALSE and ET equal PT. Otherwise it is TRUE.
Thus, Q has a falling edge when the time indicated in PT in milliseconds has run out.
Graphic display of TOF behavior over time:
Declaration example:\ \ \ \
TOFInst : TOF ;
Example in IL:\ \ \ \
Example in FBD:\ \ \ \
Example in ST:\ \ \ \
TOFInst(IN := VarBOOL1, PT:= T#5s);
VarBOOL2 :=TOFInst.Q;