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

DIVTIME

Function Name

DIVTIME

Description

Provides a time interval output that is the result of a time interval input divided by an integer input.

Arguments

Input 1 {TIME}

Input 2 {INT}

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

Returns

Output {TIME}

The output is the result of Input 1/Input 2.

Example:

Function Block Diagram - DIVTIME:

A DIVTIME function has 2 inputs (in this case, the inputs are constants):

  • Input 1 is a time value and is set to 59h (59 hours)
  • Input 2 is an integer and is set to 4.

The DIVTIME function divides 59 hours by 4 to provide the output of 14h45m (14 hours and 45 minutes).

ST Program - DIVTIME:

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

  • Output := DIVTIME (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. Input 1 is a Time value, Input 2 is an integer value and the Output is a Time value.


ClearSCADA 2015 R2