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

MAKE_TIME_OF_DAY

Function Name

MAKE_TIME_OF_DAY

Description

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

Arguments

The arguments are (from top to bottom):

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_OF_DAY}

Example:

Function Block Diagram - MAKE_TIME_OF_DAY:

The MAKE_TIME_OF_DAY function outputs a time of day value that is made up from the components supplied via its inputs (the hour is taken 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_OF_DAY function are often the results of a calculation, with the inputs being variable depending on the outputs of other functions etc.

ST Program - MAKE_TIME_OF_DAY:

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

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

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

Alternatively, you can use the following syntax:

  • Output := MAKE_TIME_OF_DAY (H:= 18, MI:= 25, S:= 13, MS:= 32);

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