Two applications can ask for the same tag and time window and receive different numbers. One retrieves stored historian records; another requests evenly spaced estimates; a third asks for an average. The mismatch does not necessarily mean either application is broken. It may mean the queries answer different questions.
Before connecting a historian to a report or analytical application, agree on the retrieval mode, time boundaries, quality handling and calculation method. Then test them against a small window whose source records you can inspect.
Three retrieval modes, three questions
| Mode | Useful question | Important limitation |
|---|---|---|
| Recorded or raw archive values | What records did this historian store in the interval? | Stored records may already reflect collection settings, deadbands or compression. They are not necessarily every physical measurement. |
| Interpolated values | What value does the chosen interpolation method estimate at each requested time? | An estimated point is not a measurement taken at that instant. Method and behavior across gaps vary. |
| Aggregate values | What summary does the specified calculation produce for each window? | The result depends on the function, weighting, boundaries, and handling of gaps and quality. |
Names and defaults vary by product and API. For example, Ignition’s historian documentation discusses raw retrieval and interpolation. That documentation describes one product version, not every historian.
Work through a small example
Imagine a historian stored these good-quality temperature records, in degrees Celsius:
| Time | Recorded value |
|---|---|
| 10:00 | 20 |
| 10:20 | 30 |
| 10:25 | 30 |
The arithmetic mean of the three stored values is 26.67 °C. If the signal is treated as holding its last value until the next record, its time-weighted average from 10:00 to 10:30 is 23.33 °C, or (20 × 20 + 30 × 10) / 30. This assumes the last value is held through the end of the interval. Linear interpolation, different boundary rules, or quality exclusions can produce other results.
For a linear interpolation request at 10:10, the surrounding recorded points are 20 °C at 10:00 and 30 °C at 10:20. The requested time is halfway between them, so 20 + (30 − 20) × (10 / 20) = 25 °C. A raw query returns the recorded points (subject to API range and bounding options), not a newly measured 10:10 point. A simple average of the three stored records is 26.67 °C; the step-hold time-weighted average across the full 30-minute window is 23.33 °C. These outputs differ because they answer three different questions: stored observations, an estimated value at one instant, and a duration-weighted summary over a window. They are not three competing estimates of the same statistic.
Check the actual historian query contract
In the Ignition 8.3 tag history documentation, raw data queries return stored records without aggregation or interpolation, with documented boundary-value exceptions. The same documentation describes interpolation only under specified configuration conditions and a time-weighted Average mode. Its actual result depends on query mode, time windows, tag configuration, interpolation settings, boundary values and quality handling. The step-hold calculation above is a deliberately chosen hypothetical model; it is not a claim that Ignition’s Average uses that model or would return 23.33 °C for these settings. Verify the exact API, version and deployed configuration with a controlled test.
The example is illustrative, not a description of a particular historian’s default. Confirm whether the selected aggregate is sample-weighted or time-weighted, how it handles a value before the interval, and what happens when there is no valid end or start value.
Choose the mode for the consuming task
For an investigation, recorded values can show what the archive retained around an event. Ask whether the query includes a point just outside the interval and whether it returns all records or imposes a row limit. “Raw” usually describes retrieval from the archive; it does not reconstruct measurements discarded before or during storage.
For a chart that compares signals on a common time grid, interpolation can make alignment easier. Choose a method appropriate to the signal. A continuously changing temperature and a discrete pump state should not automatically use the same interpolation. Do not draw a continuous line across a known outage without showing that the interval is missing or uncertain.
For a shift report, an aggregate can reduce data volume and answer a business question directly. Specify the shift’s time zone, start and end convention, calculation, unit and quality policy. For TDengine TSDB implementations, consult its time-window query semantics. A daily average is not sufficient when the question is whether a brief excursion crossed a limit; retain or retrieve the detail needed for that decision.
Test quality, boundaries and gaps
Run the same short window in each mode and retain the query parameters with the output. Include a transition near the window boundary, an interval with sparse values and, where available, a known bad-quality or missing period. Check:
- Whether start and end points are included and whether a bounding value is returned.
- Which timestamp is used for selection and display, including time zone and precision.
- Whether bad or uncertain records are excluded, counted or returned with status.
- Whether interpolation crosses gaps, and whether the output identifies calculated points.
- Whether aggregation is sample- or time-weighted and how partial windows are handled.
Use the source product’s documented behavior and test the exact deployed version. OPC UA Historical Access defines specific timestamp and interruption semantics for implementations of that specification; a separate API may behave differently. The OPC Foundation’s historical access concepts describe those boundaries.
Make the result reproducible
Store the source and tag identifier, query interval and time zone, retrieval mode, sampling interval, calculation, quality filter, unit, extraction time and relevant configuration version with a downstream dataset. If history can be corrected, also decide how a later correction is discovered and how consumers distinguish a revised extract from the earlier one.
A trustworthy integration does not require every consumer to use the same mode. It requires each consumer to know what its numbers mean and to be able to reproduce them.
References
- Configuring Tag History, Ignition 8.3 documentation; product-specific configuration and behavior.
- OPC UA Historical Access concepts, timestamps, interruptions and history modifications.


