Accessing historical values - D2_CalcStatFunc function
The function allows you to calculate the specified statistical archive function on demand.
The function allows you to calculate the specified statistical archive function on demand.
D2_CalcStatFunc
(archIdent, bt, et, statFuncID, validPerc, paramIdent, refresh)
archIdent | TEXT type |
|
bt | ABS. TIME type | Interval begin time. |
et | ABS. TIME type | Interval end time. |
statFuncID | INT type | Statistical function type. The type is represented by a numerical value (see the table). |
validPerc | INT type | Validation criteria. |
paramIdent | REAL or INT types | Parameter for some types of functions. |
refresh | Optional parameter of optional type. |
The function calculates the statistical function specified by the parameter statFuncID on the values represented by the historical value archIdent within the time interval given by the parameters bt and et. After successful execution, the function returns a result value.
The parameter validPerctIdent_Int represents Validation criteria used during evaluation of the statistical function. It can get the values within 0 .. 100 (the error ERR_RANGE_ERROR occurs if the condition is broken).
For some statistical function, it is required to enter the parameter paramIdent according to the table:
Statistical function | Parameter description | ||||||||
_STAT_F_INTEGRAL |
Integral time units. For individual types, there are also established predefined local variables
according to the table:
|
||||||||
_STAT_F_GE_TIME _STAT_F_GT_TIME _STAT_F_LE_TIME _STAT_F_LT_TIME _STAT_F_ADDITION_PARAM _STAT_F_INCREMENT_PARAM _STAT_F_DELTA_PARAM |
Reference value |
Pridať komentár