Edge detection for events (wwEdgeDetection)
- Last UpdatedFeb 06, 2025
- 2 minute read
For AVEVA Historian, an event is the moment at which a detection criterion is met on historical tag values in the AVEVA Historian. At a basic level, anything that can be determined by looking at stored data can be used as an event.
When detecting events, it is useful to pinpoint rows in a result set where the satisfaction of criteria in a WHERE clause changed from true to false, or vice versa. For example, you may want to know when the level of a tank went above 5 feet. The WHERE clause in a query for this example might be TANKLEVEL > 5. As the tank level approaches 5 feet, the criterion does not return true. Only when the level crosses the line from not satisfying the criterion to satisfying it, does the event actually occur. This imaginary "line" where the change occurs is called the edge.
Over a period of time, there may be many instances where the criteria cross the "edge" from being satisfied to not satisfied, and vice-versa. The values on either side of this "edge" can be detected if you configure your event tag to include this information. There are four possible options for edge detection: none, leading, trailing, or both. You will get differing results based on which option you use:
|
Option |
Results |
|---|---|
|
None |
Returns all rows that successfully meet the criteria; no edge detection is implemented at the specified resolution. |
|
Leading |
Returns only rows that are the first to successfully meet the criteria (return true) after a row did not successfully meet the criteria (returned false). |
|
Trailing |
Returns only rows that are the first to fail the criteria (return false) after a row successfully met the criteria (returned true). |
|
Both |
All rows satisfying both the leading and trailing conditions are returned. |
Edge detection only applies to analog and discrete value detectors. Also, edge detection is handled slightly differently based on whether you are using analog tags or discrete tags.
You can also use the ToDiscrete() query filter to determine when data values cross a particular threshold. For more information, see Converting analog values to discrete values (ToDiscrete).
For more information on event detection with the Classic Event subsystem, see Classic event subsystem in the AVEVA Historian Administration Guide.
Related Links
- Edge detection for analog tags
- Leading edge detection for analog tags
- Trailing edge detection for analog tags
- Both leading and trailing edge detection for analog tags
- Edge detection for discrete tags
- Leading edge detection for discrete tags
- Trailing edge detection for discrete tags
- Both leading and trailing edge detection for discrete tags