ABS examples
- Last UpdatedMar 04, 2025
- 1 minute read
Example 1
The following expression returns the difference between the flow rates of two pumps.
ABS( Pump101.Flow - Pump102.Flow )
Represented as a query:
SELECT DateTime, Value, OPCQuality
FROM History
WHERE wwExpression = 'ABS( Pump101.Flow - Pump102.Flow )'
Results over a 1 hour interval:
|
DateTime |
Value |
OPCQuality |
|
2022-03-31 09:07:51.4320000 |
259.439523422241 |
192 |
|
2022-03-31 09:07:53.2590000 |
268.941925048828 |
192 |
|
2022-03-31 09:07:55.2590000 |
264.847595214844 |
192 |
|
... |
... |
... |
|
2022-03-31 10:07:49.2590000 |
457.803894042969 |
192 |
Represented as a line chart over a 1 hour interval:

Example 2
The following expression produces a oscillating stream of values from 0 to 30, and back to 0:
ABS( SysTimeSec - 30 )
Represented as a query:
SELECT DateTime, Value, OPCQuality
FROM History
WHERE wwExpression = 'ABS( SysTimeSec - 30 )'
Results over a 1 hour interval:
|
DateTime |
Value |
OPCQuality |
|
2022-03-31 09:47:52.3500000 |
22 |
192 |
|
2022-03-31 09:47:53.0000000 |
23 |
192 |
|
2022-03-31 09:47:54.0000000 |
24 |
192 |
|
... |
... |
... |
|
2022-03-31 10:47:51.0000000 |
21 |
192 |
Represented as a line chart over a 5 minute interval:
