This function sends exception reports to the pi Snapshot and Archive. It is the recommended method of putting instrument or other real-time data into pi.

This function determines if the passed, new value is an exception. An exception is a value that satisfies one of these criteria:

If it is an exception, it sends the previous value if that value has a different time stamp than the last exception (oldvalue). It then always sends the new value when there is an exception.

This routine moves the new value to the previous value. If there is an exception, it also moves the new value to the old value. If newtime is passed as 0, the current server time is used.

The passed parameters are given the recommended data types for program storage. For example, the exception minimum and maximum times should be short (16 bit) rather than char or long. The time variables must be long (32 bit) variables.

C format

int32 pisn_sendexceptions (

int32 pt,

char type,

float PIPTR * oldval,

short PIPTR * oldstat,

int32 PIPTR * oldtime,

float PIPTR * prevval,

short PIPTR * prevstat,

int32 PIPTR * prevtime,

float newval,

short newstat,

int32 newtime,

float excdeveng,

short excmin,

short excmax,

int32 PIPTR * count );



System error




Point does not exist


Time is after the current time or less than 0


Illegal status or integer value


pt (passed)

Point number

type (passed)

pi point type (R, I, or D)

oldval (passed, returned)

Value of last exception

oldstat (passed, returned)

Status of last exception

oldtime (passed, returned)

Time stamp of last exception

prevval (passed, returned)

Value of last scan

prevstat (passed, returned)

Status of last scan

prevtime (passed, returned)

Time stamp of last scan

newval (passed)

New value

newstat (passed)

New status

newtime (passed)

Time stamp of new value or 0 for current time

excdeveng (passed)

Exception deviation in engineering units

excmin (passed)

Exception minimum time in seconds

excmax (passed)

Exception maximum time in seconds

count (returned)

Number of values sent to pi: 0,1, or 2

Usage Notes

Enabling Operational Intelligence