You are here: Core Reference > Coding > Logic > MAKE_TIME

MAKE_TIME

Function Name

MAKE_TIME

Description

Provides a time output that is made up from the components supplied via the inputs.

Arguments

The arguments are (from top to bottom):

D {INT}

D provides the day.

H {INT}

H provides the hour.

MI {INT}

MI provides the minutes.

S {INT}

S provides the seconds.

MS {INT}

MS provides the milliseconds.

For more information on the data types for the inputs and outputs, see Data Type Hierarchy.

Returns

Output {TIME}

Example:

Function Block Diagram - MAKE_TIME:

The MAKE_TIME function outputs a time value that is made up from the components supplied via its inputs (the day is taken from the D input, hour from the H input, minute from the MI input, seconds from the S input and the milliseconds from the MS input). On a live system, the inputs for a MAKE_TIME function would most likely be the results of a calculation, with the inputs being variable depending on the outputs of other functions etc.

ST Program - MAKE_TIME:

The syntax for a MAKE_TIME function in an ST Program is:

  • Output := MAKE_TIME (D, H, MI, S, MS);

Where Output, D, H, MI, S and MS are defined as variables earlier in the ST program.

Alternatively, you can use the following syntax:

  • Output := MAKE_TIME (D:= 11, H:= 14, MI:= 32, S:= 21, MS:= 07);

Where the numbers are the input values (in this case, they are the same numbers as used in the Function Block Diagram example above).


ClearSCADA 2015 R2