This function sends a value to the snapshot queue. If the queue is full, this function will also send all values in the queue to the PI home node and return a list of any point errors.

For real points, rval should contain the value in engineering units and istat should be zero unless the point is bad. If the data is bad, istat should contain the status code which corresponds to the appropriate string in the digital state table. The code may be positive or negative. See the discussion in Sending and Receiving Values from PI. For integer points and digital points, rval is ignored. If timedate is zero, the server time and date are used. This function executes scaling, filtering, and compression as required.

C format

LPQERRORS pisn_putsnapshotq (

int32 pt,

float rval,

int32 istat,

int32 timedate )


LPQERRORS type, which is a pointer to a qerrors structure as defined in piapi.h. The structure contains the system error and a list of point errors, if any. The structure and typedef are shown below:


pt (passed)

Point number

rval (passed)

Value in engineering units for real type points

istat (passed)

Status for real type points and value for integer and digital points

timedate (passed)

Time stamp

Usage Notes

The error structure will only be set after the network call has been made. The list of individual point errors will be in the same order they were added to the queue. If no point errors were encountered, this list will be empty.

The same structure is used for each queue call; thus, it is advisable to process the return information or copy the structure before making another queue call.

The local queue size is different depending on whether you are communicating with a PI2 or PI3 server. For PI2 servers, the queue size is 36. For PI3 servers, the size is 255. This means unless you call pisn_flushputsnapq, the API will send more values less frequently to a PI3 server.

typedef struct qerrors


 int32 syserror;  /* current system errors */

 int32 numbpterrs; /* number of individual pt errors */

 struct qerror qerr[MAXPUTSNAP]; /* list of points in error



typedef struct qerror


  int32 point;

  int32 error;



 >0  System error 

  0  Success


  Number of points in error list


  Point in error


  -1  Point does not exist

  -8  Time is after the current time or less than 0

  -9  Illegal status or integer value

Enabling Operational Intelligence