TMD

PLCopen motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Down-counting stop watch.

Inputs

Input

Data Type

Range

Unit

Default

Description

IN

BOOL

FALSE, TRUE

 

 

The time countsClosed Internal count pulses, 1 pulse = 1/2^20turn. when this input is TRUE.

RST

BOOL

FALSE, TRUE

 

 

Timer is resetClosed New start of the microprocessor. to 0 (zero) when this input is TRUE.

PT

TIME

 

 

 

ProgrammedClosed The act of performing a sequence of instructions or commands. time.

Outputs

Input

Data Type

Range

Unit

Description

Q

BOOL

FALSE, TRUE

 

Timer elapsed output signal.

ET

TIME

 

 

Elapsed time.

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.

Time Diagram

Figure 1: Time Diagram

FBD Language Example

FFLD Language Example

IL Language Example

(* MyTimer is a declared instance of TMD functionClosed A function calculates a result according to the current value of its inputs. 
A function has no internal data and is not linked to declared instances. block *)
Op1: CAL MyTimer (IN, RST, PT)
     FFLD: MyTimer.Q
     STClosed Structured text - A high-level language that is block structured and syntactically resembles Pascal.: Q
     FFLD: MyTimer.ET
     ST: ET

ST Language Example

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

See Also

TMU / TMUsec