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

MAKE_TIME_FROM_OPC

Function Name

MAKE_TIME_FROM_OPC

Description

Provides a time output that is made up from the input string (which defines a time in the OPC time format). The input may be a value in the database, for example, the TrendUpdateRate tag of a point.

Arguments

Input 1 {STRING - OPC Time Format}

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_FROM_OPC:

The MAKE_TIME_FROM_OPC function outputs a time value that is based on the OPC time provided by the input. In the example shown above, the StringPoint input is a tag (the tag represents the CurrentValueFormatted property of an internal string point). The CurrentValueFormatted of the string point is 2D, so the MAKE_TIME_FROM_OPC function converts the OPC time of the string point into a time value for the ST program: 2d.

ST Program - MAKE_TIME_FROM_OPC:

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

  • Output := MAKE_TIME_FROM_OPC (Input 1);

Where Output and Input 1 are defined as variables earlier in the ST program. The Input 1 variable represents a String that contains a time value in the OPC time format.


ClearSCADA 2015 R2