Special Functions: without Elements
13
Find Mean, Maximum, and Minimum Values
This function enables you to take a vector of registers and find the:
Mean of all the values in the vector,
Minimum value in the vector,
Maximum value in the vector.
You can base the function on a vector of MI registers or Database registers by selecting the
appropriate function.
Note that since there is no Ladder element for this function; you perform it by storing values
into:
SI 141 to determine the start of the vector,
SI 142 to determine the length of the vector,
SI 140 to select the type of function. Storing the function number calls the function. In
your application, call the function after you have entered all of the other parameters.
The results will be placed in:
SI 143: Mean
SI 144: Minimum
SI 145: Maximum
Note that if a remainder value results from the division operation used to calculate the Mean,
that remainder value will be place in SI 4, Divide Remainder.
To use this function:
Function Number
(SI 140)
Description
40 Find Mean, Minimum,
Maximum in
MI vector
41 Find Mean, Minimum,
Maximum in
DB vector
Note that when you run Test (Debug)
Mode, the current value in SI 140 will
not be displayed.