Lab Sampling Mode

Lab Sampling is designed to duplicate the way iFIX classic Historian (HTA/HTC) returned data. This sampling mode returns only collected values. Each collected value is repeated until the next collected value, resulting in a jagged step plot instead of a smooth curve.

Interpolated values are used in other calculation modes. Lab sampling is never used by calculation modes. Each sample has the following attributes:

  • Timestamp - Lab sampling determines intervals and timestamps the same as interpolated retrieval.
  • Value - Any value returned is an actual collected raw value; the data value is never interpolated..
  • Data Quality - Lab sampling uses the same logic as interpolated sampling to determine percent good quality.

Example: Retrieving lab sample values of an interval with GOOD data

This sample uses exactly the same parameters as the interpolated sampling example, except that the sampling mode should be specified as lab.

select timestamp, value, quality from ihrawdata where samplingmode=lab and timestamp >= '29-Mar-2002 13:50' and timestamp <= '29-Mar-2002 14:30' and tagname = tag1 and numberofsamples = 8

This supplies the following results:

TimestampValueQuality
29-Mar-200213:55:00.0000.000.00
29-Mar-200214:00:00.00022.70100.00
29-Mar-200214:05:00.00022.70100.00
29-Mar-200214:10:00.00012.50100.00
29-Mar-200214:15:00.0007.00100.00
29-Mar-200214:20:00.0007.00100.00
29-Mar-200214:25:00.0004.80100.00
29-Mar-200214:30:00.0004.80100.00

The value is never anything other than a collected value. This differs from interpolated sampling. A plot of this data would look like a series of steps, rather than a smooth, interpolated curve.

Anticipated Usage

Since lab sampling returns real, collected values, it is more accurate when a sufficient number of raw samples are stored. Use interpolated sampling for highly compressed data. It is generally not useful with archive compression. Collector compression can be used to filter out non-changing values, but a high deadband reduces the number of raw samples and therefore reduces the accuracy of lab sampling.