MATH.Statistics_DINT (FB)

(CAA_Mathematics.library)

This function block will update the values of minimum, maximum and average with respect to the integral input parameter, which will be added to a set of integral data (stemming from previous calls). Pay attention, that the returned average is of type DINT. In contrast to the arithmetic mean the result will be rounded:

.

Input:

xEnable

BOOL

reset (see “CAA 指南”)

diInput

DINT

new data

Output:

diMin

DINT

minimum of set  

diMax

DINT

maximum of set  

diAverage

DINT

rounded average of data  

xOverrun

BOOL

will be set in case of overflow; the module will compensate this by a minor weighting of the old data leading to inaccuracy of the result