Subscribe Bookmark RSS Feed

How do you specify a spec table when scripting Process Capability

kyle_lamson

Community Trekker

Joined:

Mar 17, 2016

I'm trying to automate some reports with process capability but I don't know the syntax needed to retrieve the spec table I have. I've also tried using the eval() function to place the correct syntax but that's not working either. What should I place in the Spec Limits() field to make that work?

pc = Process Capability(

Process Variables( collist[1] ),

Spec Limits( USE SPEC TABLE HERE),

Individual Detail Reports( 1 ),

Capability Box Plots( 0 ),

Goal Plot( 0 )

4 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

What I think will be the easiest way to handle what you want to do, is to copy the spec limits into the column properties for each of the columns that you are going to run the Process Capability Platform on.  Once you have saved the limits to the column properties, they will be there and can be accessed by many of the JMP platforms.  Here is a script that should give you a start on how to populate the column property

 

Names Default To Here( 1 );

dt = Open( "SAMPLE_DATA/semiconductor capability.jmp" );

   

// for the purpose of the example, delete the current spec limits for column NPN1 

dt:npn1 << delete property( "spec limits" );

   

// set the values for the new limits.  This could be in a loop,  

// reading the values from a spec data table 

hi limit = 118; 

lo limit = 100; 

parameter = "NPN1";

   

// Now set the limits for the columns, substituting the values in the expression 

// and then running the code 

Eval( 

       Substitute( 

                     Expr( 

                           Column( dt, __col__ ) << set property( "spec Limits", {LSL( _L_S_L_ ), USL( _U_S_L_ )} ) 

                     ), 

              Expr( _L_S_L_ ), lo limit,

              Expr( _U_S_L_ ), hi limit, 

              Expr( __col__ ), parameter 

       ) 

);

 

Jim
kyle_lamson

Community Trekker

Joined:

Mar 17, 2016

Thanks Jim, I have something that works with what you give me. That does seem like a round about means of getting there though. I have a spec table that I need to be able to share with the rest of my team if changes happen. Is skimming that spec table and changing all the column properties really the simplest way to run the capability analysis?

txnelson

Super User

Joined:

Jun 22, 2012

Kyle,

In my previous work life, I am now retired, I had set up a system where there was a script that was used to copy all limits from a central limits system, into whatever data table(s) the user was using.  The advantage of this, is that many different JMP platforms will take advantage of Spec Limits when it finds them as column properties.  Thus, only one script had to be written, rather than separate scripts for every different platform that one might want to use Spec Limits with.  So it was only one script run at the beginning of the analysis process, and the engineers then had them saved within their data tables.  There was also a script that allowed the users to extract the limits from all of the columns in a data table, and to place them into what became known as a limits data table.

Jim
laural_jmp

Staff

Joined:

Apr 7, 2014

Hi Kyle,

In addition to saving spec limits as column properties, it is also possible to use the JSL "ImportSpecLimits" function as shown below inserted into your code.  Both ways should work fine.


pc = Process Capability(

Process Variables( collist[1] ),

Spec Limits( ImportSpecLimits("mySpecLimitsFile.jmp")),

Individual Detail Reports( 1 ),

Capability Box Plots( 0 ),

Goal Plot( 0 )

);

I hope this helps.

Laura