This function sends a value to the PI Data Archive.

Visual Basic format

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

C format

int32 PIPROC piar_putarcvaluex(
int32 ptnum,
int32 mode,
float64 PIPTR *drval,
int32 PIPTR *ival,
void PIPTR *bval,
uint32 PIPTR *bsize,
int32 PIPTR *istat,
int16 PIPTR *flags,


Not implemented


System error



Point not found


Invalid mode



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



ptnum (passed)

Array of PI point numbers.

mode (passed)

Archive mode. These are defined in piapix.h.

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.

Usage Notes

See piar_putarcvaluesx for a description of Archive modes.

Enabling Operational Intelligence