Home 

     Process Trend 
     

    Process Trend ActiveX Control

     Developers Guide 
    This section of the document describes the programmatic interface to the Process Trend OCX. It assumes that the reader is familiar with VB Script, and has a general knowledge of Microsoft's ActiveX (COM) technology.

     

    Functions

    PutValues(fValues() As Single)

    This function is called by the ActiveX control container to write current (real-time) values to the Process Trend OCX. The array should have the same number of elements as the number of tags configured. The array can be base-0 or base-1; the Trend OCX can accommodate either.

    Note that this function can accept IEEE bad values (NaN) from the ActiveX control container to indicate that no valid data is available.

    Arguments:fValues - An array of real values (single-precision floating point).
    Return Value:Boolean, true if the function completed OK, else false

     

    PutValueStrings(strValues() As String)

    This function is called by the ActiveX control container to write current (real-time) values to the Process Trend OCX. The array should have the same number of elements as the number of tags configured. The array can be base-0 or base-1; the Trend OCX can accommodate either.

    This function is similar to the PutValues( ) function, except that the values are passed as ASCII strings. This is useful when the ActiveX control container cannot generate an IEEE bad value - instead the container can pass a value such as "---", "NaN" or any non-numeric string to indicate a bad value.

    Arguments:strValues - An array of strings
    Return Value:Boolean, true if the function completed OK, else false

     

    PutValuesVar(varValues As Variant)

    This function is called by the ActiveX control container to write current (real-time) values to the Process Trend OCX. The argument is a variant containing an array of single-precision (floating-point) values.

    The array is base-0.

    If an array element is non-numeric, the value of that element is set to NaN.

    Arguments:varValues - A variant, being an array of real values (single-precision floating point).
    Return Value:Boolean, true if the function completed OK, else false

     

    IsNaN(varVal As Variant)

    This function allows the control container to check for a bad value. If the variant is a single precision floating point, then the number is compared to an IEEE bad value.

    If the variant is a string, then IsNaN returns true if two left-most characters of the string are "--".

    Arguments:varVal - A variant
    Return Value:Boolean, true if the value is NaN, false if it is not

     

    Subroutines

    DefineTags

    Calling this subroutine informs the Trend OCX that the tag configuration details (names, descriptors, engineering units) have been entered, and instructs it to fetch the data from PHD.

    Arguments:None

     

    DeleteTag(Index as Long)

    This deletes a tag from the trend

    Arguments:Index - The tag to be deleted (1 to 4)