cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
J-Leonard
Level I

Using control limit values later in script

I am working on writing a script with an end goal of generating a control chart with additional reference lines based on the JMP-calculated control limits added to it. What I believe I need to do is find the numeric values for  _KSigma, _Std Dev, _Mean, _LCL, and _UCL. From there, I need to use these values to calculate another reference line that needs to be added back to the original control chart. One of the biggest hurdles I have is that there are two control charts generated from the one data table since I am looking at two different parameters. I have tried quite a few different things, but either they don't work as intended or I don't know how to execute them properly. 

 

 Some of the things I have done so far that were met with minimal success are:
  • Saving the limits from the control chart into a new data table. This works, but I don't know how to save the untitled tables or access the variables that are in the untitled tables. 
  • Have my new reference line be a formula in my chart script. This only halfway works since it'll calculate correctly for the second data table but is not initialized for the first data table. 
Other ideas I had that I am not sure how to execute:
  • Save the desired values from the control chart as variables to use in calculations. That way I could close the first control chart and create a new one.
  • Save the desired values from the control chart to a matrix or list and do calculations from there.
  • Calculate the control limits from the control chart "manually" in JMP, but I don't know the formula.

 

If anyone has any scripting suggestions or other ideas on how to do this, please let me know.

 

I am using JMP 10 to create IR charts that generate the control limits. 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Using control limit values later in script

The references to the data tables are "dt" and "dtLimits".

close( dt, nosave );

will close the data table called Big Class

 

Or if you need to add a new column to that data table it would be

dt << new column("my column", formula(:height*:weight);;

and if you want to reference the limits table, such as to get the _std Dev value for the :height column, you can get it with

height_Std_Dev = dtLimits;height[4];

where the _Std Dev value in in the 4th row of the height column in the dtLimits data table.

or getting fancier

height_Std_dev = :height[(dtLimits << get rows where(:_LimitsKey == "_Std Dev"))[1]];

 

Scoping and data table referencing are documented in the Scripting Guide.  For JMP 10 it is found under

     Help=>Books=>Scripting Guide 

Jim

View solution in original post

6 REPLIES 6
ian_jmp
Staff

Re: Using control limit values later in script

I think it will help others to make good suggestions if you are able to share which JMP Platform you will be using to generate the control limits, please.

J-Leonard
Level I

Re: Using control limit values later in script

I am using JMP 10 to create IR charts that generate the control limits. 

txnelson
Super User

Re: Using control limit values later in script

I believe this will give you a leg up on how to reference the data tables.

names default to here(1);
dt=open("$SAMPLE_DATA\big class.jmp");

cc = Control Chart(
	Group Size(1),
	KSigma(3),
	Chart Col(:height, Individual Measurement, Moving Range),
	Chart Col(:weight, Individual Measurement, Moving Range),
	SendToReport(
		Dispatch(
			{"Individual Measurement of height"},
			"IR Chart of IM",
			FrameBox(2),
			{Frame Size(68, 208)}
		),
		Dispatch(
			{"Moving Range of height"},
			"IR Chart of MR",
			FrameBox(2),
			{Frame Size(68, 208)}
		)
	)
);

dtLimits = cc << in new table;
Jim
J-Leonard
Level I

Re: Using control limit values later in script

Yes, that lets me create two new data tables with the control limits in them. However, I can't (or don't know how to) reference those data tables since they are untitled and unsaved. I need to be able to either save those data tables with a line of script or reference data in the unsaved tables with a line of script. 

txnelson
Super User

Re: Using control limit values later in script

The references to the data tables are "dt" and "dtLimits".

close( dt, nosave );

will close the data table called Big Class

 

Or if you need to add a new column to that data table it would be

dt << new column("my column", formula(:height*:weight);;

and if you want to reference the limits table, such as to get the _std Dev value for the :height column, you can get it with

height_Std_Dev = dtLimits;height[4];

where the _Std Dev value in in the 4th row of the height column in the dtLimits data table.

or getting fancier

height_Std_dev = :height[(dtLimits << get rows where(:_LimitsKey == "_Std Dev"))[1]];

 

Scoping and data table referencing are documented in the Scripting Guide.  For JMP 10 it is found under

     Help=>Books=>Scripting Guide 

Jim
J-Leonard
Level I

Re: Using control limit values later in script

Thank you for the help, I really appreciate it. I think I need a few changes earlier in my script!