piar_putvalue

This function adds a new value to the Archive, or it replaces a value if one exists at the same time stamp.

If the passed time is after the current Snapshot time, pisn_putsnapshot is called. Otherwise, if there is a value in the Archive for the specified time, it is replaced.

This function is intended to be used in place of pisn_putsnapshot for laboratory results so that corrected values can be replaced in the Archive. Typically points for lab values are configured with compression off. Edited values and out of order values bypass the compression algorithm.

A wait flag is provided, which if TRUE, directs the call to return when the value has been written or if over thirty seconds have elapsed. If the wait flag is FALSE, the function returns immediately.

C format

int32 piar_putvalue(

int32 pt

float rval,

int32 istat,

int32 timedate,

int32 wait );

Returns

>0

System error

Success

-1

Bad point number

-8

Time is after current time

-9

Bad integer or digital value

-101

Date not on-line

-108

Time is before the editing time limit

-110

Queue has fallen behind

-111

Timed out

Arguments

pt (passed)

Point number

rval (passed)

Value in engineering units

istat (passed)

Integer value or status

timedate (passed)

Time stamp

wait (passed)

Wait for completion flag

Usage Notes

Enabling Operational Intelligence