cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

phase control chart control limits - no control limits

 

Hi,

I need help scripting a case where no phase control limits should be applied to the first parameter/chart, while the remaining parameters/charts have fixed control limits defined in the same script.

I am currently using the following structure:

 

 
Set Control Limits( { {LCL(.), Avg(.), UCL(.)}, {LCL(1060.2), Avg(1405.3), UCL(1745.1)}, {LCL(12.3), Avg(14.1), UCL(15.8)}, {LCL(16), Avg(22), UCL(28)} } ),

 

The issue is that JMP always displays a dialog asking for the limits of the first chart. I must click OK or Cancel before the script continues. After dismissing the dialog, the first chart correctly shows no fixed control limits, and the other three charts use the limits provided—but I want to prevent the dialog from appearing at all.

2 REPLIES 2
jthi
Super User

Re: phase control chart control limits - no control limits

Does also your first chart (or column) have fixed limits in column prooperties but you just wish to remove them? Or do you have a script which has fixed limits in the script and you just wish to leave one chart without those?

-Jarmo
jthi
Super User

Re: phase control chart control limits - no control limits

Some scripting options with the assumption that the fixed limits are set in script

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


// let JMP set them initially, using hidden not avoid display limit changes
ccb = dt << Control Chart Builder(
	Variables(Subgroup(:Sample), Y(:Weight)),
	Chart(Position(1), Points(Statistic("Average")), Limits(Sigma("Moving Range"))),
	Chart(Position(2), Points(Statistic("Moving Range on Means")), Limits(Sigma("Moving Range"))),
	Chart(Position(3), Points(Statistic("Range")), Limits(Sigma("Range"))),
	Chart(Position(4), Points(Statistic("Range")), Limits(Sigma("Range"))),
	Show Control Panel(0),
	Invisible
);


// don't set them to first chart at all and let JMP do it
// I would use a list of limits and for-loop to set rest of the limits, but you could just copy paste this multiple times
ccb << Chart(Position(2), Set Control Limits({LCL(1), Avg(3), UCL(6)}));
ccb << Chart(Position(3), Set Control Limits({LCL(2), Avg(4), UCL(7)}));
ccb << Chart(Position(4), Set Control Limits({LCL(3), Avg(5), UCL(8)}));

// Show the report again
wait(0);
ccb << show window(1);

Plenty of options for easier limit management, but here is one using list of lists (could also use data table, associative array, ...)

Names Default To Here(1);

CC_LIMITS = { 
	{LCL(1), Avg(3), UCL(6)}, 
	{LCL(2), Avg(4), UCL(7)}, 
	{LCL(3), Avg(5), UCL(8)}
};


dt = Open("$SAMPLE_DATA/Quality Control/Coating.jmp");

ccb = dt << Control Chart Builder(
	Variables(Subgroup(:Sample), Y(:Weight)),
	Chart(Position(1), Points(Statistic("Average")), Limits(Sigma("Moving Range"))),
	Chart(Position(2), Points(Statistic("Moving Range on Means")), Limits(Sigma("Moving Range"))),
	Chart(Position(3), Points(Statistic("Range")), Limits(Sigma("Range"))),
	Chart(Position(4), Points(Statistic("Range")), Limits(Sigma("Range"))),
	Show Control Panel(0),
	Invisible
);


For(i = 2, i <= N Items(CC_LIMITS) + 1, i++,
	Eval(EvalExpr(
		ccb << Chart(Position(i), Set Control Limits(Expr(CC_LIMITS[i-1])));
	));
);

wait(0);
ccb << show window(1);
-Jarmo

Recommended Articles