Home
Process Trend |
Process Trend ActiveX ControlDevelopers GuideThis 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. FunctionsPutValues(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.
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.
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.
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 "--".
SubroutinesDefineTagsCalling 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.
DeleteTag(Index as Long)This deletes a tag from the trend
|