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

ADD_TOD_TIME

Function Name

ADD_TOD_TIME

Description

Adds a time interval to a specified time of day.

Arguments

Input 1 {TIME_OF_DAY}

Input 2 {TIME}

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

Returns

Output {TIME_OF_DAY}

The output is the Time of Day provided by Input 1 + the Time interval provided by Input 2.

Example:

Function Block Diagram - ADD_TOD_TIME:

An ADD_TOD_TIME function has 2 inputs (in this case, the inputs are constants):

  • Input 1 defines 10:10:00 as a Time of Day value (TOD#)
  • Input 2 defines 10 minutes as a Time interval value (T#).

The ADD_TOD_TIME function adds the 10 minute time interval to the 10:10:00 time of day value and outputs the result: 10:20:00.000

ST Program - ADD_TOD_TIME:

The syntax for an ADD_TOD_TIME function in an ST Program is:

  • Output := ADD_TOD_TIME (Input 1, Input 2)

Where Output, Input 1 and Input 2 are defined as variables earlier in the ST program. Each input is separated by a comma. Output and Input 1 are Time of Day values and Input 2 is a Time value (it defines an interval).


ClearSCADA 2015 R2