cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
RA899
Level III

How to automate managing limits feature through JSL

Hi, 

I'm trying to use JSL to perform manage limits. I'm trying to open a limit table, implement it on the current data table and then save it. The only function I found in the fourm or in the scripting index is to open the manage limits and then manually implement the limit or manually open a data table. 

 

The other methods I found was hard-coding the spec limit using JSL. 

 

Is there are a way I can automate the process through JSL? Assuming I have a limit table and a data table in the same folder. 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How to automate managing limits feature through JSL

I think one of the examples from Scripting Index should get you almost there

jthi_0-1715436272959.png

You just need to add opening your tables, saving of your data table, closing manage limits platform and closing of tables (if needed). Extra things you might want to implement commented out

Names Default To Here(1);

// dt_limits = Open("...");
// dt_meas = Open("...");

dt_limits = New Table("Cities Limits",
	Add Rows(4),
	New Column("Process",
		Character,
		Set Values({"OZONE", "CO", "SO2", "NO"})
	),
	New Column("LSL", Numeric, Set Values([0, 0, 0, 0])),
	New Column("Target",
		Numeric,
		Set Values([0.2, 15, 0.05, 0.035])
	),
	New Column("USL",
		Numeric,
		Set Values([0.4, 30, 0.1, 0.07])
	),
	Set Label Columns(:Process)
);

dt_meas = Open("$SAMPLE_DATA/Cities.jmp");

ml = dt_meas << Manage Limits(
	Process Variables(:OZONE, :CO, :SO2, :NO),
	Load From Limits Table(dtLimits)
);

ml << Save to Column Properties;

// ml << close window;
// dt_meas << Save("...");
// Close(dt_limits, no save);
// Close(dt_meas, no save);
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: How to automate managing limits feature through JSL

I think one of the examples from Scripting Index should get you almost there

jthi_0-1715436272959.png

You just need to add opening your tables, saving of your data table, closing manage limits platform and closing of tables (if needed). Extra things you might want to implement commented out

Names Default To Here(1);

// dt_limits = Open("...");
// dt_meas = Open("...");

dt_limits = New Table("Cities Limits",
	Add Rows(4),
	New Column("Process",
		Character,
		Set Values({"OZONE", "CO", "SO2", "NO"})
	),
	New Column("LSL", Numeric, Set Values([0, 0, 0, 0])),
	New Column("Target",
		Numeric,
		Set Values([0.2, 15, 0.05, 0.035])
	),
	New Column("USL",
		Numeric,
		Set Values([0.4, 30, 0.1, 0.07])
	),
	Set Label Columns(:Process)
);

dt_meas = Open("$SAMPLE_DATA/Cities.jmp");

ml = dt_meas << Manage Limits(
	Process Variables(:OZONE, :CO, :SO2, :NO),
	Load From Limits Table(dtLimits)
);

ml << Save to Column Properties;

// ml << close window;
// dt_meas << Save("...");
// Close(dt_limits, no save);
// Close(dt_meas, no save);
-Jarmo