Subscribe Bookmark RSS Feed

Importing quality control limits

Swalo66

Community Trekker

Joined:

Apr 28, 2015

I have two files.  The fist contains process data from multiple grade codes. The second contains only 6 columns: Grade_Code, Hi_Lim, Hi_Warn, Target, Lo_Warn and Lo_Lim.

How can I use the limits in the second file when I want to produce gradecode specific SPC charts in the first file?

BR

Darren

4 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Darren,

I need you to answer a couple of questions::

1. Your measurement data and your Grade_Code, are then in just 2 separate columns?  Or is the measurement for each Grade_Code in a separate column?

2.The Hi_Lim and Lo_Lim are effectively Spec Limits?

3. The Hi_Warn and Lo_Warn are Control Limits?

Assuming you have your data in a column for Grade_Code, and a single column for the measurement data, and the definition of the limits are as I asked, I would take the following approach:

JMP does not handle multiple limits of the same type for a single column.  Therefore, I would do a Tables==>Split on your data, and split the data into separate columns for each grade code.

Then a simple script can be written to load the limits from the one table into the Spec Limits and Control Limits for each of the different Grade_Code columns.

Finally, you just have to run the control chart on each of the grade code columns to get the data displayed.

If this isn't making sense to you, I will gladly work up an example, if you can attach examples of the 2 files.

Jim
Swalo66

Community Trekker

Joined:

Apr 28, 2015

Jim,

I will attached a couple of screens shots, cos I've heard a picture paints a few words.

The file with the measurement data has a single grade code column (GRDBWT) that relates to multiple measurements for that grade code..11088_Data_table.JPG

The spec file contains limits for each grade,,

11089_specs_table.JPG

I would agree with your assumptions for Q2 & Q3

I will say I am no scripting guru, so any help is very appreciated.....

Happy weekend

Darren

txnelson

Super User

Joined:

Jun 22, 2012

Darren,

I have created some sample data tables that I have attached to this reply.

Here is the script I developed.  I am sure it will need to have some modifications to meet your exact requirements, but it works with my sample data.  I tried to make my sample data as close to your data as necessary.

 

// Before running this script, open up the measurement and limits data tables.

// If you are using the two files I attached to the reply, the dtmeas = and 

// dtlim = statements below are pointing to the correct data table.  But if 

// you use different data tables, you need to change the Data Table names 

Names Default To Here( 1 ); 

dtmeas = Data Table( "Measurements Table" ); 

dtlim = Data Table( "Limits Table" );

 

// Split the data table based upon the Grade Code so each group is in a different 

// column 

dtsplitmeas = dtmeas << Split( Split By( :GRDBWT ), Split( :ACC Basis Weight ) );

   

// Get the column names from the split data table, which are really the different 

// Grade Codes 

cols = dtsplitmeas << get column names( string );

   

// Loop across the split data table and read the values for that column from the

// dtlim data table.  Populate the Spec Limits and Control Limits

For( i = 1, i <= N Cols( dtsplitmeas ), i++, 

       limrow = Try( (dtlim << get rows where( dtlim:Gradecode == cols[i] ))[1], . ); 

       If( Is Missing( limRow ) == 0,  

              specs = {LSL( . ), USL( . ), Target( . ), Show Limits( 1 )}; 

              specs["LSL"] = dtlim:LOW[limrow]; 

              specs["Target"] = dtlim:TARG[limrow]; 

              specs["USL"] = dtlim:HIGH[limrow]; 

              Column( dtsplitmeas, Char( cols[i] ) ) << set property( "spec limits", Eval( specs ) ); 

              controllimits = {XBar( Avg( a ), LCL( b ), UCL( c ) )}; 

              Substitute Into( controllimits, Expr( a ), dtlim:LWarn[limrow] ); 

              Substitute Into( controllimits, Expr( c ), dtlim:uwarn[limrow] ); 

              Substitute Into( controllimits, Expr( b ), dtlim:targ[limrow] ); 

              Column( dtsplitmeas, Char( cols[i] ) ) << set property( "control limits", Eval( controllimits ) ); 

       ); 

);

  Once the new measurement table is produced, and the limits loaded into the column properties, the control charts can be produced.  Please excuse my failure to center the actual sample data within the limits, but you can see that they are there.

11085_pastedImage_0.png

Jim
Swalo66

Community Trekker

Joined:

Apr 28, 2015

Jim,

I really appreciate it!! I haven't been able to do it justice yet, but it does look like you have got me what I was looking for...Many thanks!!