Quality rule - query 7
- Last UpdatedFeb 07, 2025
- 1 minute read
The returned Quality Detail is the same as OPC quality unless there is special flag for certain indication; for example, when there is indication for rollover in counter mode.
SELECT TagName, DateTime, Value, QualityDetail, OPCQuality
FROM History
WHERE TagName = 'I0R5'
AND DateTime >= '2009-09-12 00:20'
AND DateTime <= '2009-09-12 00:40'
AND wwResolution = 10000
AND wwRetrievalMode = 'Avg'
If you run this query against the following sample data:
|
Tagname |
DateTime |
Resolution |
QualityDetail |
|---|---|---|---|
|
I0R5 |
2009-09-12 00:07 |
2 |
218 |
|
I0R5 |
2009-09-12 00:14 |
3 |
218 |
|
I0R5 |
2009-09-12 00:22 |
0 |
218 |
|
I0R5 |
2009-09-12 00:25 |
1 |
218 |
|
I0R5 |
2009-09-12 00:27 |
0 |
218 |
|
I0R5 |
2009-09-12 00:29 |
2 |
218 |
|
I0R5 |
2009-09-12 00:33 |
3 |
218 |
|
I0R5 |
2009-09-12 00:36 |
0 |
218 |
|
I0R5 |
2009-09-12 00:39 |
1 |
218 |
The results are:
|
Tagname |
DateTime |
Value |
QualityDetail |
OPCQuality |
|---|---|---|---|---|
|
I0R5 |
2009-09-12 00:20 |
2.6 |
218 |
218 |
|
I0R5 |
2009-09-12 00:30 |
1.0 |
218 |
218 |
|
I0R5 |
2009-09-12 00:40 |
1.6 |
218 |
218 |