cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

GR&R calculation in script

Hi,

I have several test parameters for which I need their GR&R results calculated by JMP and stored in a variable, using the JMP script. Specifically, I need the values reported on the GR&R analysis (shown below) as variables in a script. I assume that there is a function that by calling it in a script I can get these results (or some of them) as the return value of that function. I tried saving the Variability Gauge window as a script, but the contents do not seem helpful (copied below). Can someone show me how to use scripts to store the GR&R results in a variable and print it?

 

LoglinearRange8_0-1670341617316.png

 

Variability Chart(
	Y( :"Check DUT Tx Output Power > Limit"n ),
	MSA Metadata(
		:"Check DUT Tx Output Power > Limit"n(
			Lower Tolerance( -10 ),
			Upper Tolerance( 8 ),
			Tolerance Range( 18 )
		)
	),
	Model( "Crossed" ),
	X( :Operator, :UUT ),
	Variability Analysis(
		:"Check DUT Tx Output Power > Limit"n,
		"Gauge R&R Report"n( 1 )
	),
	SendToReport(
		Dispatch(
			{"Variability Gauge Analysis for Check DUT Tx Output Power > Limit"},
			"Variability Chart for Check DUT Tx Output Power > Limit",
			OutlineBox,
			{Close( 1 )}
		),
		Dispatch(
			{"Variability Gauge Analysis for Check DUT Tx Output Power > Limit",
			"Gauge R&R"},
			"Variance Components for Gauge R&R",
			OutlineBox,
			{Close( 1 )}
		)
	)
);
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: GR&R calculation in script

Here is a simple example that pulls a vector of data from the R&R report, and then places it into a new report.  You should be able to go from here to just getting the data you need, and passing it on to the next steps in your script.

txnelson_0-1670346874037.png

names default to here(1);
dt = open("$SAMPLE_DATA/Variability Data/Gasket.jmp");

Variability Chart(invisible,
	Y( :Y ),
	X( :Operator, :Part ),
	Model( "Crossed" ),
	Historical Sigma( 0 ),
	Analysis Type( "Choose best analysis (EMS REML)" ),
	Connect Cell Means( 1 ),
	Show Grand Mean( 1 ),
	XBar Control Limits( 1 ),
	S Control Limits( 1 ),
	Mean of Std Dev( 1 ),
	Gauge RR( 6, 0, 0, 0 ),
	Gauge RR Report( 1 )
);
rp = Current Report();
// Get the Variation data from the Output Display
VariationText = rp["Gauge R&R"][StringColBox(1)] << get;
Variation = rp["Gauge R&R"][NumberColBox(2)] << get;
// Get the Summary and Gauge R&R Statistics
Stats = rp["Gauge R&R"][NumberColBox(5)] << get;
StatsText = rp["Gauge R&R"][StringColBox(5)] << get;

// Build a new report
NW = New Window("my report",
	table box(
		string col box("Meas Source", variationText),
		number col box("Variation", variation)
	),
	spacer box(0,20),
	table box(
		number col box("", stats), string col box("", statsText)
	)
);

rp << close window;
 

txnelson_1-1670346944453.png

The reading and manipulating of Display objects is documented in the Scripting Guide in the JMP Documentation Library, available under the Help pull down menu. 

Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: GR&R calculation in script

Here is a simple example that pulls a vector of data from the R&R report, and then places it into a new report.  You should be able to go from here to just getting the data you need, and passing it on to the next steps in your script.

txnelson_0-1670346874037.png

names default to here(1);
dt = open("$SAMPLE_DATA/Variability Data/Gasket.jmp");

Variability Chart(invisible,
	Y( :Y ),
	X( :Operator, :Part ),
	Model( "Crossed" ),
	Historical Sigma( 0 ),
	Analysis Type( "Choose best analysis (EMS REML)" ),
	Connect Cell Means( 1 ),
	Show Grand Mean( 1 ),
	XBar Control Limits( 1 ),
	S Control Limits( 1 ),
	Mean of Std Dev( 1 ),
	Gauge RR( 6, 0, 0, 0 ),
	Gauge RR Report( 1 )
);
rp = Current Report();
// Get the Variation data from the Output Display
VariationText = rp["Gauge R&R"][StringColBox(1)] << get;
Variation = rp["Gauge R&R"][NumberColBox(2)] << get;
// Get the Summary and Gauge R&R Statistics
Stats = rp["Gauge R&R"][NumberColBox(5)] << get;
StatsText = rp["Gauge R&R"][StringColBox(5)] << get;

// Build a new report
NW = New Window("my report",
	table box(
		string col box("Meas Source", variationText),
		number col box("Variation", variation)
	),
	spacer box(0,20),
	table box(
		number col box("", stats), string col box("", statsText)
	)
);

rp << close window;
 

txnelson_1-1670346944453.png

The reading and manipulating of Display objects is documented in the Scripting Guide in the JMP Documentation Library, available under the Help pull down menu. 

Jim