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
Celine1
Level II

How to set control limit based on datatable limit

Greetings, 
I'm using JMP 17, I tried to set control limit based on the datattable. 
when I run the script, it prompts me to set the control limit manually although i have assign the control limit value in script.
Is it able to set the control limit without manual key in (without prompt the windows)?

Celine1_0-1703156171074.png

below is the script that will prompt the set control limit window:

Names Default To Here( 1 );
dt2 = Open( "$SAMPLE_DATA/Little.jmp",invisible );
//[Get Limit]
Limit = New Table("C1",
    New Column("lcl", Character,"Nominal",Set Values({"4"}),
    ),
    New Column("ucl", Character,"Nominal",Set Values({"17"}),
    ),
    New Column("avg", Character,"Nominal",Set Values({"10.7"}),
    ),
    New Column("lcl2", Character,"Nominal",Set Values({"0"}),
    ),
    New Column("ucl2", Character,"Nominal",Set Values({"8"}),
    ),
    New Column("avg2",Character, "Nominal",Set Values({"3"})
    )
);

lcl = Char(Limit:lcl[1]);
ucl = Char(Limit:ucl[1]);
avg = Char(Limit:avg[1]);
lcl2 = Char(Limit:lcl2[1]);
ucl2 = Char(Limit:ucl2[1]);
avg2 = Char(Limit:avg2[1]);


g = dt2 << Control Chart Builder( 
	Variables( Y( :yield ) ), 
	Chart(
		Position( 1 ),
		Limits,
		Warnings( Test 1( 1 ), Test 3( 1 ) ),
		Set Control Limits( {LCL( lcl ), UCL( ucl ), Avg( avg )}) 	
		),
	Chart(
		Position( 2 ),
		Limits,
		Warnings( Test Beyond Limits( 1 ) ),
		Set Control Limits( {LCL( lcl2 ), UCL( ucl2 ), Avg( avg2 )}) 	
	)	
);





 

2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: How to set control limit based on datatable limit

Store the values which are numeric as numeric values and it might work. And if that isn't enough you might have to evaluate them to Control Chart Builder Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute 

-Jarmo

View solution in original post

mmarchandTSI
Level V

Re: How to set control limit based on datatable limit

To add to @jthi's response, I would also avoid giving a variable the same name as a data table column to avoid conflicts.

View solution in original post

2 REPLIES 2
jthi
Super User

Re: How to set control limit based on datatable limit

Store the values which are numeric as numeric values and it might work. And if that isn't enough you might have to evaluate them to Control Chart Builder Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute 

-Jarmo
mmarchandTSI
Level V

Re: How to set control limit based on datatable limit

To add to @jthi's response, I would also avoid giving a variable the same name as a data table column to avoid conflicts.