Choose Language Hide Translation Bar
Highlighted
yanee
Level III

For loop for measurement system analysis

I write a script to generate GR&R (measurement system analysis). Script works fine but for every plot, it shows the pop up window (see below) and I have to click ok for all parameters. is there a way to by pass this ?

 

yanee_0-1586826222882.png

dt << set name("combine");

ColList = dt_spec << get column names (numeric); obj = data table("combine") << manage spec limits (Y(eval(ColList)), load from limits table (dt_spec), save to column properties(1)); obj << close window; close(dt_spec,no save); new window ("GRR", for (i = 1, i <= N items (ColList), i++, variability chart ( Y ((ColList [i])), X (:Tester,:Operators, :Parts), Model ("Crossed"), Analysis Type( "Choose best analysis (EMS REML Bayesian)" ), Show group means (1), Points Jittered( 1 ), AIAG Labels( 0 ), Show Box Plots( 1 ), Mean Diamonds( 1 ), Mean Plots( 1 ), Name( "Gauge R&R" )(5.15), Name( "Gauge R&R Report" )(1), Automatic Recalc( 1 ), ) ); );

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: For loop for measurement system analysis

Try adding "Historical Sigma(0)" inside the Variability Chart part of the script to see if that helps.  For example:

 

	variability chart (
		Y ((ColList [i])),
		X (:Tester,:Operators, :Parts),
		Model ("Crossed"),
		Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
		Show group means (1),
		Points Jittered( 1 ),
		AIAG Labels( 0 ),
		Show Box Plots( 1 ),
		Mean Diamonds( 1 ),
		Mean Plots( 1 ),
		Historical Sigma(0),
		Name( "Gauge R&R" )(5.15),
		Name( "Gauge R&R Report" )(1),
		Automatic Recalc( 1 ),
		)

 

View solution in original post

6 REPLIES 6
Highlighted
txnelson
Super User

Re: For loop for measurement system analysis

You script is confusing to me.  It appears that you are getting the names of the columns to be analyzed from the dt_spec referenced data table

ColList = dt_spec << get column names (numeric);

But then close the data table before analyzing it

I believe the code for setting the spec limits should be

dt << set name("combine");
ColList = dt << get column names (numeric);
obj = dt << manage spec limits (Y(eval(ColList)), load from limits table (dt_spec), save to column properties(1));
obj << close window;
close(dt_spec,no save);

 

Jim
Highlighted
Roselle_Grant
Level II

Re: For loop for measurement system analysis

Hello @txnelson 

Am not sure if am commenting on the correct post but I have a question I'd like your help with:

 

I have 2 tables:

Table 1: 'CadDataFromF31' that has 201 rows

Roselle_Grant_0-1586842919048.png

Table 2: 'Fiducial 12 Measured from Fiducial 31' that has 10 rows

Roselle_Grant_1-1586842989894.png

I would like to use these 3 columns: "File Name of Fiducial 31 Grouped", "c" and "s" from Table 2 and add to Table 1. The thing is, I'd like to do this with iteration. Meaning 10x of Table 1 [concatenated].... and have 3 additional columns from Table 2. 

 

So the new table should have 2010 rows and 18 columns. Each group of 201 rows should have the same value for the last 3 columns as in the image below.  

Roselle_Grant_2-1586844261940.png

 

Could you help me with this?

 

Thanks in advance

 

Highlighted
Roselle_Grant
Level II

Re: For loop for measurement system analysis

Actually, I now see that this can be done with a 'Cartesian Join'.... Thanks nonetheless!
Highlighted
yanee
Level III

Re: For loop for measurement system analysis

hi,

 

yes, i get the name from dt_spec for the analysis. i have no problem set up the spec.

The problem i have is when I plot the GR&R, for every graph, it will show a pop up window (see my original email) that I have to click ok.

Question : Is there a way to skip that pop up window ? so all graphs can be plotted without user clicking ok

 

Yanee

Highlighted

Re: For loop for measurement system analysis

What if you change the option indicated by this launch argument?

 

Analysis Type( "Choose best analysis (EMS REML Bayesian)" )
Learn it once, use it forever!

Re: For loop for measurement system analysis

Try adding "Historical Sigma(0)" inside the Variability Chart part of the script to see if that helps.  For example:

 

	variability chart (
		Y ((ColList [i])),
		X (:Tester,:Operators, :Parts),
		Model ("Crossed"),
		Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
		Show group means (1),
		Points Jittered( 1 ),
		AIAG Labels( 0 ),
		Show Box Plots( 1 ),
		Mean Diamonds( 1 ),
		Mean Plots( 1 ),
		Historical Sigma(0),
		Name( "Gauge R&R" )(5.15),
		Name( "Gauge R&R Report" )(1),
		Automatic Recalc( 1 ),
		)

 

View solution in original post

Article Labels

    There are no labels assigned to this post.