|
|
OPCHDB Applications -
Expressions and Functions
|
This capability is provided with all OPCHDB
user applications, enabling users to achieve substantial savings
in time and storage for accessing OPCHDB data.
Mathematical Operators
| + |
Addition |
| - |
Subtraction |
| * |
Multiplication |
| / |
Division |
| ^ |
Exponentiation |
| () |
Grouping |
Display Functions
| PERIOD() |
Displays the date and/or time for
each time slot collected. |
| P_START() |
Displays the date and time of the
first time slot collected. |
| P_END() |
Displays the date and time of the
last time slot collected. |
| NAME(block_name) |
Displays variable name for variable
block_name. |
| DESC(block_name) |
Displays description for variable
block_name. |
| UNITS(block_name) |
Displays engineering units for
variable block_name. |
Single Result Calculation Functions
| P_INTERVAL(n) |
The time between intervals. |
| P_SUM(expression) |
The sum value. |
| P_AVG(expression) |
The average value. |
| P_STD(expression) |
The standard deviation value. |
| P_MAX(expression) |
The maximum value over the collection
period. |
| P_MIN(expression) |
The minimum value over the collection
period. |
| P_MODE(expression,bins) |
The modal value. |
| P_MEDIAN(expression) |
The median value. |
| NI() |
The number of time slots (intervals)
collected. |
| NU(expression) |
The number of time slots containing
unavailable values. |
| NA(expression) |
The number of time slots containing
available values. |
Multiple Result Calculation Functions (returning a
result for each time slot collected)
| ALARM(expression, lo_alarm, lo_warn, hi_warn, hi_alarm) |
|