Interpolated retrieval - query 2
- Last UpdatedFeb 06, 2025
- 1 minute read
If you omit the interpolation type in the query, the historian determines which interpolation type to use for an analog tag based on the value of the InterpolationType column in the AnalogTag table, in conjunction with the InterpolationTypeInteger and InterpolationTypeReal system parameters.
In the following query both analog tags are set to use the system default through the AnalogTag table, while the InterpolationTypeInteger and InterpolationTypeReal system parameters are set to 0 and 1, respectively. Because SysTimeMin is defined as a 2-byte integer and ReactTemp is defined as a real we see that only rows for ReactTemp are interpolated.
SELECT DateTime, TagName, Value, wwInterpolationType FROM History
WHERE TagName IN ('SysTimeMin', 'ReactTemp', 'SysPulse')
AND DateTime >= '2005-04-11 12:02:30'
AND DateTime <= '2005-04-11 12:06:30'
AND wwRetrievalMode = 'Interpolated'
AND wwResolution = 60000
The results are:
|
DateTime |
TagName |
Value |
wwInterpolationType |
|---|---|---|---|
|
2005-04-11 12:02:30.000 |
SysTimeMin |
2.0 |
STAIRSTEP |
|
2005-04-11 12:02:30.000 |
ReactTemp |
23.2 |
LINEAR |
|
2005-04-11 12:02:30.000 |
SysPulse |
1.0 |
STAIRSTEP |
|
2005-04-11 12:03:30.000 |
SysTimeMin |
3.0 |
STAIRSTEP |
|
2005-04-11 12:03:30.000 |
ReactTemp |
139.96753 |
LINEAR |
|
2005-04-11 12:03:30.000 |
SysPulse |
0.0 |
STAIRSTEP |
|
2005-04-11 12:04:30.000 |
SysTimeMin |
4.0 |
STAIRSTEP |
|
2005-04-11 12:04:30.000 |
ReactTemp |
111.49636 |
LINEAR |
|
2005-04-11 12:04:30.000 |
SysPulse |
1.0 |
STAIRSTEP |
|
2005-04-11 12:05:30.000 |
SysTimeMin |
5.0 |
STAIRSTEP |
|
2005-04-11 12:05:30.000 |
ReactTemp |
17.00238 |
LINEAR |
|
2005-04-11 12:05:30.000 |
SysPulse |
0.0 |
STAIRSTEP |
|
2005-04-11 12:06:30.000 |
SysTimeMin |
6.0 |
STAIRSTEP |
|
2005-04-11 12:06:30.000 |
ReactTemp |
168.99531 |
LINEAR |
|
2005-04-11 12:06:30.000 |
SysPulse |
1.0 |
STAIRSTEP |