WinSPC Knowledgebase Home | Glossary | Favorites | Contact | Login WinSPC Knowledgebase Home | Glossary | Favorites | Contact | Login
Search the WinSPC Knowledgebase Browse by Category
How can I determine the maximum or minimum value in a set of variables?
Article Details

Last Updated
11th of May, 2017

Applies to
WinSPC 7.2, WinSPC 8.0, WinSPC 8.1, WinSPC 8.2, WinSPC 8.3, WinSPC 9.0

There are many scenarios in which it is helpful to know which variable in a set of variables contains the largest value. Similarly, there are many scenarios in which it is helpful to know which variable in a set of variables contains the smallest value. These scenarios can all be addressed by using the WinSPC Equation Builder to calculate maximum and minimum values. The following procedure explains how to do this.

  1. Set up the set of variables within which you want to determine the variable with the maximum or minimum value. (Note: In most cases, each variable in the set will have the same specs, settings and control limits. Otherwise, the maximum or minimum value risks being relatively meaningless.)
  2. Create a new variable for the maximum or minimum value.
  3. Double-click this new variable and in the "Variable Setup" dialog box that appears click the "Advanced" button.
  4. Configure this variable to have the same specs and settings as those in the set of variables.
  5. On the "Settings" tab, click the "Calculated" checkbox and then click the "Equation" button.

    faq-05-02.jpg

    This causes the "Equation Builder" to be displayed.


    faq-05-03.jpg

  6.  

  7. In the "Calculation Text" area of the Equation Builder, enter an equation that will compare the values in the variable set and identify the maximum or minimum value. For the maximum value, an acceptable equation will look something like this:
  8.  

    faq-05-04.jpg

     For the minimum value, an acceptable equation will look something like this:

    faq-05-05.jpg

    In these examples, there are three variables in the variable set: V1, V2 and V3. For larger variable sets, the pattern illustrated here can be extended as necessary.

  9. Click the "OK" button in the "Equation Builder".
  10. Click the "OK" button in the "Variable Setup" dialog box.
  11. Add all the variables, including the calculated maximum or minimum variable, to a collection plan.
  12. Load the collection plan into the Data Collection window and collect data for all but the calculated variable. WinSPC will then determine the value for the calculated variable.

As an aside, if you want to calculate the range for a variable set, you can build on the concepts introduced above and use an equation similar to the following:

Maxvalue = V1

If V2 > Maxvalue Then

Maxvalue = V2

End if

If V3 > Maxvalue Then

Maxvalue = V3

End if

Minvalue = V1

If V2 < Minvalue Then

Minvalue = V2

End if

If V3 < Minvalue Then

Minvalue = V3

End if

Result = Maxvalue - Minvalue

Attachments
No attachments were found.
Related Articles
Visitor Comments
No visitor comments posted. Post a comment
Post Comment for "How can I determine the maximum or minimum value in a set of variables?"
To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Your Name:
   Email Address:
* Your Comment:
* Enter the code below:
 

All Content 2012 DataNet Quality Systems. All Rights Reserved.