TOF / TOFR
Function Block
A function block groups an algorithm and a set of private data. It has inputs and outputs. - Off timer.
Inputs
|
Input |
Data Type |
Range |
Unit |
Default |
Description |
|---|---|---|---|---|---|
|
IN |
BOOL |
|
|
|
Timer command. |
|
PT |
TIME |
|
|
|
Programmed time. |
|
RST |
BOOL |
|
|
|
Reset (TOFR only). |
Outputs
|
Output |
Data Type |
Range |
Unit |
Description |
|---|---|---|---|---|
|
Q |
BOOL |
|
|
Timer elapsed output signal. |
|
ET |
TIME |
|
|
Elapsed time. |
Remarks
- TOFR is same as TOF but has an extra input for resetting the timer.
- The timer starts on a falling pulse of IN input.
- It stops when the elapsed time is equal to the programmed time.
- A rising pulse of IN input resets the timer to 0 (zero).
- The output signal is set to TRUE when the IN input rises to TRUE.
- It is reset to FALSE when the programmed time is elapsed.
Time Diagram
FBD Language Example
FFLD Language Example
- In the FFLD
"Free Form Ladder Diagram" Language, the input rung is the IN command. - The output rung is Q the output signal.
IL Language Example
(* MyTimer is a declared instance of TOF function block *)
Op1: CAL MyTimer (IN, PT)
FFLD MyTimer.Q
ST Q
FFLD MyTimer.ET
ST ET
ST Language Example
(* MyTimer is a declared instance of TOF function block *)
MyTimer (IN, PT);
Q := MyTimer.Q;
ET := MyTimer.ET;
See Also





