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

AVEVA™ Historian

Both leading and trailing edge detection for discrete tags

Both leading and trailing edge detection for discrete tags

  • Last UpdatedFeb 06, 2025
  • 1 minute read

If Both is specified as the parameter in the edge detection extension, all rows satisfying both the leading and trailing conditions are returned.

The following queries select values of "SysPulse" and "MyPulse" that meet an edge detection of Both for a value criterion of 1 (On) from the History and WideHistory tables between 12:59 and 1:04 a.m. on December 8, 2001.

SELECT DateTime, TagName, Value

FROM History

WHERE TagName IN ('SysPulse','MyPulse')

AND DateTime > '2001-12-08 00:59:00'

AND DateTime <= '2001-12-08 01:04:00'

AND Value = 1

AND wwEdgeDetection = 'Both'

The results are:

DateTime

TagName

Value

2001-12-08 00:01:00.000

SysPulse

1

2001-12-08 00:01:00.000

MyPulse

1

2001-12-08 00:01:40.000

MyPulse

1

2001-12-08 00:02:00.000

SysPulse

1

2001-12-08 00:02:20.000

MyPulse

1

2001-12-08 00:03:00.000

SysPulse

1

2001-12-08 00:03:00.000

MyPulse

1

2001-12-08 00:03:40.000

MyPulse

1

2001-12-08 00:04:00.000

SysPulse

1

SELECT DateTime, SysPulse, MyPulse FROM OpenQuery(INSQL, 'SELECT DateTime, SysPulse, MyPulse

FROM WideHistory

WHERE DateTime > "2001-12-08 00:59:00"

AND DateTime <= "2001-12-08 01:04:00"

AND SysPulse = 1

AND MyPulse = 1

AND wwEdgeDetection = "Both"

')

The results are:

DateTime

SysPulse

MyPulse

2001-12-08 00:01:00.000

1

1

2001-12-08 00:01:40.000

1

1

2001-12-08 00:03:40.000

1

1

2001-12-08 00:04:00.000

1

1

Compare these results with the same query using no edge detection, as shown in the Edge detection for discrete tags.

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