This function sends values to the PI Data Archive.

Visual Basic format

Declare Function piar_putarcvaluesx Lib "piapi32.dll" (
ByVal Count&,
ByVal Mode&,
drVal As Any,
bVal As Any,
time0 As PITimeStamp,
Errors&) As Long

C format

int32 PIPROC piar_putarcvaluesx(
int32 count,
int32 mode,
int32 PIPTR *ptnum,
float64 PIPTR *drval,
int32 PIPTR *ival,
void PIPTR *bval,
uint32 PIPTR *bsize,
int32 PIPTR *istat,
int16 PIPTR *flags,
int32 PIPTR *errors);



System error



Point not found


Invalid mode


Not implemented


Invalid bsize

Invalid count


Memory allocation error


STATE Not Found


Invalid timestamp


Unusable string value passed for numeric point


PIvalue Type or PIstring is Not Integer


PIvalue Type is Not Allowed For This Call


Success, but some points had errors



count (passed)

The number of values in the passed arrays.

mode (passed)

Archive mode. These are defined in piapix.h.

ptnum (passed)

Array of PI point numbers.

drval (passed)

Floating-point values in engineering units.

ival (passed)

Integer values in engineering units.

bval (passed)

Pointer to string or byte array buffers without a terminating null.

bsize (passed)

The lengths in bytes of the buffers passed as bval not including the null terminator.

istat (passed)

For digital points, the point values. For all other point types, the digital state codes indicating status of the value.

flags (passed)

Data quality flag masks.

timestamp (passed)

Array of PITIMESTAMP strutctures.

errors (modified)

Returns the array of codes indicating success or failure for individual points.

Usage Notes

The arguments, including any NULL pointers, should be set according to the same mechanism as pisn_putsnapshotsx. The errors array will be filled in the same order as the list of points which was added to PI.

For server versions less than PI 3.2 SR1, this call reverts to the standard API calls to delete/replace values.

The following modes are valid for these calls (see piapix.h):

ARCNOREPLACE add unless event(s) exist at same time (PI 2.x)

ARCAPPEND add event regardless of existing events.

ARCREPLACE add event, replace if event at same time.

ARCREPLACEX replace existing event (fail if no event at time)

ARCDELETE remove existing event.

ARCAPPENDX add event regardless of existing events, with
 no compression.

Enabling Operational Intelligence