piar_value

This function returns a single value and status for a specified time stamp. mode determines whether the returned value is interpolated or an actual Archive event. The possible modes are:

1 Value before given time and date (default)

2 Value after given time and date

3 Interpolated value at exact time and date

4 Interpolated value for resolution codes 1, 2, and 3 and value before given time for resolution code 4

C format

int32 piar_value(

int32 pt,

int32 PIPTR * timedate,

int32 mode,

float PIPTR * rval,

int32 PIPTR * istat);

Returns

>0

System error

Success

-1

Bad point number

-101

Date not on-line

-103

No data for this point during the specified time range

-105

Bad time stamp

Arguments

pt (passed)

Point number

timedate (passed, returned)

Time stamp

mode (passed)

Retrieval mode

rval (returned)

Value in engineering units

istat (returned)

Integer value or status

Usage Notes

The codes to be used when calling piar_value are defined in piapi.h as:

#define ARCVALUEBEFORE  1

#define ARCVALUEAFTER  2

#define ARCVALUEINTERP  3

#define ARCVALUECODE  4

Enabling Operational Intelligence