cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
js1985
Level II

JMP script to create control charts with phases

Hi everyone,

I'm asking your support because I need to create control chart with fixed limits and phases and I want to get a script out of it.

I managed to created a DT with the limit keys and values and to create the control charts I need from "legacy control charts>Levey-Jennings" and then to get limits from the DT created before.

Now, when I save the script I'm not getting any reference to the limits DT therefore if I rerun it I'm getting automatically calculated limits.

Can you please give me an hint on how to embed the "get limits" function in the script?

Below the piece of script I obtained so far.

Thanks.

 

Control Chart(
	Sample Label( :Data ),
	Phase( :Phase ),
	KSigma( 3 ),
	Chart Col( :Li, Levey Jennings( Phase Level( "1" ), Phase Level( "2" ) ) ),
	Chart Col( :Na, Levey Jennings( Phase Level( "1" ), Phase Level( "2" ) ) ),
	Chart Col( :Mg, Levey Jennings( Phase Level( "1" ), Phase Level( "2" ) ) ),
	Chart Col( :Al, Levey Jennings( Phase Level( "1" ), Phase Level( "2" ) ) ),
	Chart Col( :Cr, Levey Jennings( Phase Level( "1" ), Phase Level( "2" ) ) ),
	Chart Col( :Ni, Levey Jennings( Phase Level( "1" ), Phase Level( "2" ) ) ),
	Chart Col( :Ga, Levey Jennings( Phase Level( "1" ), Phase Level( "2" ) ) ),
	Chart Col( :K, Levey Jennings( Phase Level( "1" ), Phase Level( "2" ) ) )
);

 

5 REPLIES 5

Re: JMP script to create control charts with phases

JMP is looking for the pre-determined control limit information in a data column property. Define this property for each data column that is to be plotted before launching the control chart.

Georg
Level VII

Re: JMP script to create control charts with phases

In addition to markbailey's outline here is an example (from scripting index + added spec limits) that illustrates how this can be done

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" );

dt:Weight << Set Property(
	"Control Limits",
	{Levey Jennings( Avg( 20.396875 ), LCL( 19 ), UCL( 21 ) )}
);
		
obj = dt << Control Chart(
	Sample Size( :Sample ),
	KSigma( 3 ),
	Chart Col( :Weight ),
	Chart Type( Levey Jennings )
);
Georg
js1985
Level II

Re: JMP script to create control charts with phases

Thanks Mark and Georg,

the solution to set the limits into the column property is working but doesn't fit my need to "store" historical limits in the control chart.

I need to store all my data in a DT where I indicate the corresponding phases, the script should pickup the data and plot them against the limits and phases store in the limits DT. How can I replicate in a script the "get limits" function which is in the legacy control chart menu?

 

Re: JMP script to create control charts with phases

You can also store the limits in a data table instead of a specific column property. Have you read the documentation for the legacy control charts?

Re: JMP script to create control charts with phases

Here is a blog post that details how to do this with the newer control chart builder platform.  

Creating a phase control chart with historical limits for each phase - JMP User Community

This functionality will not work for legacy Levey Jennings charts.