The nature of the PI System's data compression and archiving algorithms requires that applications be able to access Archive data in a number of different ways. For single values, piar_value allows access to single archive values relative to a time stamp. A mode parameter may be specified to get an actual Archive event before or after the passed time or to interpolate a value at exactly the passed time.
There is also an option which gets the Archive event prior to the passed time for resolution code 4 points, (consistent with the nature of lab or step data), while getting an interpolated value for resolution codes 1, 2, and 3, (which are typically process or continuous data).
This flexibility extends to the archive retrieval functions that provide ranges of Archive data. Compressed data (actual Archive events) is retrieved by the function piar_compvalues. For evenly spaced, interpolated (sampled) data over a time period, use piar_interpvalues. Interpolated values for a user-defined time array are provided by piar_timedvalues.
A special archive retrieval function is provided to retrieve values for plotting, piar_plotvalues. It uses passed information about the resolution of the plot region.