This function is intended for use from Visual Basic. It adds a new event to the PI System Snapshot if it passes the exception test. The Visual Basic variant type is used to pass the data value. The queueing flag determines whether or not the data is queued until either 4kb of data or pisn_flushputsnapqx is called.
Visual Basic format
Declare Function pisn_sendexceptqx Lib "piapi32.dll" (
oldVal As Variant,
oldTime As PITimeStamp,
prevVal As Variant,
prevTime As PITimeStamp,
Val As Variant,
newTime As PITimeStamp,
qErrs As QERROR) As Long
Success, but some points had errors
No data provided
PI point number.
Last value that passed the exception test. The structure is listed below in the Usage Notes.
Last value to be tested for exception. If the last test was true, this will be the same as oldvalue. The structure is listed below in the Usage Notes.
New value to be tested for exception.
Exception deviation in engineering units used in the exception test.
Exception minimum time in seconds used in the exception test.
Exception maximum time in seconds used in the exception test.
Number of values sent to the snapshot.
Flag indicating whether this value should be queued (TRUE or FALSE).
The number of point errors for the queued data.
An array of size 192 of QERROR structures allocated by the calling program.
See pisn_sendexceptionqx for a description of the exception algorithm and the PI Data Archive manual for a description of the point attributes used in exception processing.
The variant types used in this function contain information regarding the type of value. Setting the variant using a floating point value will cause this function to read the value as a floating point value. Likewise, setting the value using a string will cause this function to read a string from the variant.
An internal data queue for the extended snapshot values is enabled by passing queuing = 1. This will queue about 4 kilobytes of data before making a network call to send the data to the PI server snapshot. The function pisn_flushsnapshotqx may also be used to send the data to the PI server. The QERROR array, if returned, must be declared by the calling program to a minimum array size of 192.