Calculation Modes
This information is intended to supplement the information in the Historian product documentation and the SDK Help File.
Sampling and calculation modes are used on retrieval of data that has already been collected to the archive. Calculation modes are used when the sampling mode is set to "Calculated". It is helpful to separate the many modes into 3 main categories from simplest to most complex. A detailed explanation of the calculation modes with examples are discussed in following topics:
- Count
- RawTotal
- RawAverage
- RawStandardDeviation
- FirstRawValue
- FirstRawTime
- LastRawValue
- LastRawTime
- Minimum
- MinimumTime
- Maximum
- MaximumTime
- TimeGood
- Average
- Total
- StandardDeviation
Other Calculation Modes
- STATECOUNT
- STATETIME
- OPCQOR and OPCQAND
- TagStats
Each sample retrieved from Historian has a timestamp, value, and quality.
- Timestamp - the same logic as for interpolated values. It is covered in detail in the Understanding Sampling Modes document and not covered at all in this document.
- Value – depends entirely on the calculation mode being used
- Quality - Depending on the calculation mode, this either means:
- The percent of raw samples vs. total raw samples in the interval that were of good data quality.
- The percent of time in the interval that the data was of good data quality
Filtered data queries are described in the Filtered data Queries section.