TMU / TMUsec![This function or function block supports PLCopen motion PLCopen motion icon](../Resources/Images/Icon_PLCopen.png)
A function block groups an algorithm and a set of private data. It has inputs and outputs. - Up-counting stop watch. TMUsec is identical to TMU except that the parameter is a number of seconds.
Inputs
IN | BOOL | The time counts when this input is TRUE |
RST | BOOL | Timer is reset to 0 when this input is TRUE |
PT | TIME | Programmed time |
PTsec | UDINT | Programmed time. (TMUsec - seconds) |
Outputs
Q : BOOL Timer elapsed output signal
ET : TIME Elapsed time
Q | BOOL | Timer elapsed output signal |
ET | TIME | Elapsed time |
ETsec | UDINT | Elapsed time. (TMU - seconds) |
Time diagram
Remarks
The timer counts up when the IN input is TRUE. It stops when the programmed time is elapsed. The timer is reset when the RST input is TRUE. It is not reset when IN is false.
ST Language
(* MyTimer is a declared instance of TMU function block *)
MyTimer (IN, RST, PT);
Q := MyTimer.Q;
ET := MyTimer.ET;
FBD Language
FFLD Language
IL Language:
(* MyTimer is a declared instance of TMU function block *)
Op1: CAL MyTimer (IN, RST, PT)
FFLD MyTimer.Q
ST Q
FFLD MyTimer.ET
ST ET
See also