Interpolation type (wwInterpolationType)
- Last UpdatedMar 03, 2025
- 3 minute read
For various retrieval modes, you can control how analog tag values at cycle boundaries are calculated if there is no actual value stored at that point in time. The options are as follows:
-
Stairstep: No interpolation occurs. The value at the cycle boundary is assumed to be the same value as the last stored value before the cycle boundary.The last known point is returned with the given cycle time. If no valid value can be found, a NULL is returned.

-
Linear: The historian calculates a new value at the cycle boundary by interpolating between the last stored value before the boundary and the first stored value after the boundary. If either of these values is NULL, it returns the last stored value before the boundary.
Expressed as a formula, Vc is calculated as:
Vc = V1 + ((V2 - V1) * ((Tc - T1) / (T2 - T1)))

The type of data that you want to retrieve usually determines the interpolation type to use. For example, if you have a thermocouple, the temperature change is linear, so it’s best to use linear interpolation. If you have a tag that contains discrete measurements, such as a set point, then you probably want to use stair-stepped values. In general, it is recommended that you use linear interpolation as the general setting, and use stair-stepped values for the exceptions.
This option is relevant in the following retrieval modes:
The quality of an interpolated point is determined by the wwQualityRule setting. For more information, see Quality rule (wwQualityRule).
The interpolation type can be set on three levels:
-
The AVEVA Historian system-wide setting. The system-wide setting must be either stair-step or interpolated. For more information, see "System Parameters" on page 36. This setting is configured using the AVEVA Historian Configuration Editor.
-
The individual analog tag setting. You can configure an individual analog tag to use the system-wide setting or either stair-stepped values or linear interpolation. The individual tag setting will override the system-wide setting. This setting is configured using the AVEVA Historian Configuration Editor.
-
The setting for the wwInterpolationType parameter in the query. This setting overrides any other setting for all tags in the query.
The wwInterpolationType parameter is dynamically used both for input for the query, when you need to override the individual tag settings, and for output for each individual row to show whether a particular row value was calculated using linear interpolation (returned as "LINEAR") or if it is a stair-stepped value (returned as "STAIRSTEP").
To force a query to always use linear interpolation whenever applicable, specify the following in the query:
AND wwInterpolationType = 'Linear'
To force a query to always return stair-stepped values, specify the following in the query:
AND wwInterpolationType = 'StairStep'