Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

Interpolated retrieval - query 3

  • Last UpdatedFeb 28, 2025
  • 2 minute read

SELECT TagName, DateTime, Value, QualityDetail, wwInterpolationType

FROM History

WHERE TagName = 'A001'

AND DateTime >= '2009-09-12 00:20'

AND DateTime <= '2009-09-12 00:40'

AND wwRetrievalMode = 'Interpolated'

AND wwResolution = '10000'

This query can be run against the following sample data:

Tagname

DateTime

Value

QualityDetail

A001

2009-09-12 00:09

0.2

192

A001

2009-09-12 00:15

1.3

192

A001

2009-09-12 00:17

0.8

192

A001

2009-09-12 00:22

0.6

249

A001

2009-09-12 00:26

0.9

192

A001

2009-09-12 00:28

0.0

249

A001

2009-09-12 00:29

0.0

249

A001

2009-09-12 00:33

1.1

192

A001

2009-09-12 00:35

1.6

192

A001

2009-09-12 00:38

0.5

192

A001

2009-09-12 00:42

0.8

192

The following is a graphical representation of the data:

Graph showing interpolated retrieval.

The results are:

Tagname

DateTime

Value

QualityDetail

wwInterpolationType

A001

2009-09-12 00:20

0.8

192

STAIRSTEP

A001

2009-09-12 00:30

NULL

249

STAIRSTEP

A001

2009-09-12 00:40

0.5

192

LINEAR

The sample data points and the results are mapped on the following chart. Only the data falling between the time start and end marks at 00:20 and 00:40 (shown on the chart as dark vertical lines) are returned by the query.

Because there is no value that matches the start time, an initial value at 00:20 is returned in the results based on the preceding data point at 00:17 because the following data point at 00:22 is NULL. Because a NULL value precedes the 00:30 cycle boundary at 00:29, the NULL is returned at the cycle boundary. The value at 00:40 is an interpolation of the data points at 00:38 and 00:42.

TitleResults for “How to create a CRG?”Also Available in