Field Statistics block
The block calculates the instantaneous statistics over a collection of fields.
Field Statistics block
Description
The output of the block is the statistical variables of average, variance, standard deviation, skew and kurtosis and the maximum and minimum values calculated over the instantaneous values of the collection of the fields configured in the input port. The number of bad quality and good quality input fields are provided in the quality port.
field statistics block
Block Type
Statistical block
Input/Output ports
The statistical calculations are made over the instantaneous values of all the fields configured in the Input Port.
The Output port contains the instantaneous calculations of the statistical variables over the collection of fields.
The Quality Port denotes the number of good and bad fields in the Input Port.
Parameter port
The quality threshold parameter may be either a fixed value entered offline or a value read online. The Parameter Port contains the field(s) available to supply an online value for the quality threshold. Remember the following points when using a quality threshold field:
-
The quality threshold field may be either an integer or a double field
-
The value must range from 0 to 100 inclusive. A value outside of this range will set all the statistics to bad quality.
-
All the statistics will also be set to bad quality when the quality threshold field has bad quality.
-
The value of the quality threshold field is read and used on every execute cycle, thus enabling online modification of the quality threshold.
Functions performed on tags
On the values:
-
“Average” – The output value is the calculated average over the fields in the input port.
-
“Variance” – The output value is the variance of the values of the fields in the input port.
-
“Standard Deviation” – The output is the standard deviation of the values of the fields in the input port.
-
“Maximum” – The largest value in the input port.
-
“Minimum” – The smallest value in the input port.
-
“Skew” – Indicates the skewness of the distribution of input field values.
-
“Kurtosis” – Indicates the kurtosis of the distribution of input field values.
On the timestamp – The output time stamp is set to the execute time.
On the quality – The quality is set based on the quality threshold. The quality level is calculated from the number of good quality input fields as a percentage of the total number of input fields. If the quality level is less than the quality threshold, the quality of the statistical fields in the output port is set to bad, otherwise it is good. The quality of the fields in the quality port is always good.
Related topics: