pisn_sendexceptionsx

This function adds new events to the PI System snapshot if it passes the exception test. Note that all arguments are passed by reference. Check Usage Notes below to determine how the passed data is interpreted by PI.

It is recommended that the extended functions pisn_sendexceptionqx for C or C++ or pisn_sendexceptqx for VB be used instead of this function.

C format

int32 PIPROC pisn_sendexceptionsx(
int32 num_pts,
int32 PIPTR *pts,
PI_EXCEPTSTRU PIPTR **except,
int32 PIPTR *errors,
int32 PIPTR *count);

Returns

>0

System error

Success

-991

Not implemented

-15017

Invalid value type

-30000

Success, but some points had errors

-30200

No data provided

 

Arguments

num_pts (passed)

Number of PI points passed in the following arrays.

pts (passed)

Array of PI point numbers.

except (passed,modified)

Array of exception specification structures, which includes old, previous, and new values plus the exception minimum time, exception maximum time and exception deviation. The structure is listed below in the Usage Notes.

errors (modified)

Array of error codes corresponding to the points in the point list for exception processing of the values.

count (modified)

Number of values sent to the snapshot.

Usage Notes

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.

typedef struct

{

PI_EVENT *newvalue; /* Must be allocated */ 

PI_EVENT *prevvalue; /* Must be set to NULL if not allocated */ 

PI_EVENT *oldvalue; /* Must be set to NULL if not allocated */ 

float64 excdeveng; 

float64 excmin; 

float64 excmax; 

} PI_EXCEPTSTRU;

Enabling Operational Intelligence