Both leading and trailing edge detection for analog 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 query selects values of "SysTimeSec" from the History table that meet both the Leading and Trailing criteria between 10:00 and 10:02 a.m. on December 2, 2001.
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 = 'Both'
The results are:
|
DateTime |
Value |
|
2001-12-02 10:00:50.000 |
50 |
|
2001-12-02 10:01:00.000 |
0 |
|
2001-12-02 10:01:50.000 |
50 |
|
2001-12-02 10:02:00.000 |
0 |
Compare these results with the same query using no edge detection, as shown in Edge detection for analog tags. Notice that value of the first row in the original query is returned in the result set.