The function allows you to calculate the specified statistical archive function for all given time intervals on demand.
D2_CalcStatFuncArr
(archObjName, bt, et, step, deepTime, statFuncID, validPerc, paramIdent, bDirectionByRow, refresh) |
archObjName | TEXT type |
|
bt | ABS. TIME type | Interval begin time. |
et | ABS. TIME type | Interval end time. |
step | INT type | Time step [s] within the archive block. |
deepTime | INT type | Time depth [s] for calculating the statistics. Note: The parameter must be a positive integer. |
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. |
bDirectionByRow | BOOL type | Time order of cells in matrix. |
refresh | Optional parameter of optional type. |
The return value of the function is of array type. Owing to that fact, this function is predetermined to be used in so-called Matrix.
The action executes the calculation of a statistical function specified by the parameter statFuncID on the values represented by the historical value archObjName for the following time intervals specified by the parameters bt, et, step a deepTime:
The results are returned as an array, whose members represent the individual results of calculation of the statistical function for the given time intervals.
The parameter validPerctIdent_Int represents the Validation criteria used during the evaluation
of the statistical function. The permissible values are in range 1 .. 100 (the error ERR_RANGE_ERROR occurs if the condition is not met).
For some statistical archive function, the parameter paramIdent must be specified 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 |