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

AVEVA™ Historian

Edge detection for analog tags

  • Last UpdatedMar 03, 2025
  • 2 minute read

For example, the behavior of the WHERE clause as it processes a result set can be illustrated as:

Graph showing edge detection of analog tags.

Slopes A-B, C-D and E-F are rising edges, while slopes B-C, D-E and F-G are falling edges. The slopes are affected by the WHERE clause, which is a combination of the wwEdgeDetection option and the comparison operator used against the value.

The following table describes the rows that would be returned for the various edge detection settings:

Operator

=

<

>

<=

>=

Leading

Falling and rising edges; first value that meets the criteria.

Falling edge only; first value to meet the criteria.*

Rising edge only; first value to meet the criteria.

Falling edge only; first value to meet the criteria. *

Rising edge only; first value to meet the criteria.

Trailing

Falling and rising edges; first value to fail the criteria after a value meets the criteria.

Rising edge only; equal to the first value to fail the criteria.

Falling edge only; first value to fail the criteria.*

Rising edge only; first value to fail the criteria.

Falling edge only; first value to fail the criteria.*

* If the falling edge is a vertical edge with no slope, the query will return the lowest value of that edge.

The following query selects all values of "SysTimeSec" that are greater than or equal to 50 from the History table between 10:00 and 10:02 a.m. on December 2, 2001. No edge detection is specified.

SELECT DateTime, Value

FROM History

WHERE TagName = 'SysTimeSec'

AND DateTime >= '2001-12-02 10:00:00'

AND DateTime <= '2001-12-02 10:02:00'

AND wwRetrievalMode = 'Cyclic'

AND wwResolution = 2000

AND Value >= 50

AND wwEdgeDetection = 'None'

The results are:

DateTime

Value

2001-12-02 10:00:50.000

50

2001-12-02 10:00:52.000

52

2001-12-02 10:00:54.000

54

2001-12-02 10:00:56.000

56

2001-12-02 10:00:58.000

58

2001-12-02 10:01:50.000

50

2001-12-02 10:01:52.000

52

2001-12-02 10:01:54.000

54

2001-12-02 10:01:56.000

56

2001-12-02 10:01:58.000

58

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