cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar

Control Charts use saved Control limits

Hello,

I hope you are doing well.

I have a question about the control limits saved in a data table. Is there any way to propose a textbox to the user showing all the control limits saved in a data table. And the user can put a checkmark to the one to use for the Control chart ?

Thank you very much for your answer and have a nice day,

Jean
3 REPLIES 3
jthi
Super User

Re: Control Charts use saved Control limits

Do you mean Control Limits column properties? This could be done with scripting but I'm not sure if you can "disable" the column properties. So you might have to save them to other table/table variable/variable and then add/remove them as needed.

-Jarmo

Re: Control Charts use saved Control limits

Ah yes, I mean: my question was how can I use the control limits (saved in an other table) with a dynamic textbox ?
jthi
Super User

Re: Control Charts use saved Control limits

Here is fairly simplified example how you could do it.

// https://www.jmp.com/support/help/en/16.2/#page/jmp/example-of-control-limits.shtml#ww1447886

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


dt_specs = New Table("Turbine Specs",
	Add Rows(3),
	New Column("Measurement", Character, Nominal, Values({"Fuel", "MW", "Cool Temp"})),
	New Column("LCL", Numeric, Continuous, Values([200000, 19, 53])),
	New Column("UCL", Numeric, Continuous, Values([250000, 22, 55])),
	invisible
);

possible_measurements = Column(dt_specs, "Measurement") << get values;
nw = New Window("Select Limits", << modal, << return result,
	V List Box(
		Text Box("Select measurements to use predefined specs limits for:"),
		cb_selections = Check Box(possible_measurements, << Set(1))
	);
);

aa_specs = Associative Array();
For Each({selection_idx}, nw["cb_selections"],
	aa_specs[possible_measurements[selection_idx]] = dt_specs[selection_idx, {"LCL", "UCL"}];
);

obj = dt << Control Chart Builder(
	Show Control Panel(0),
	Variables(Y(:Fuel)),
);

If(Contains(aa_specs, "Fuel"),
	Eval(EvalExpr(
		obj << Chart(Position(1), Set Control Limits({
			LCL(Expr(aa_specs["Fuel"][1])), UCL(Expr(aa_specs["Fuel"][2]))
		}))
	));	
);
Write();

How you should do it depends on your starting measurement data, control limit table, how you want to display control charts, how dynamic and robust you need this to be, your scripting skill level and so on

-Jarmo