Choose Language Hide Translation Bar
Yngeinstn
Community Trekker

Write Limits to a Data Table from a Limits Table

txnelson,

 

post this add-in a while ago.. It is very useful however i would like to know how to incorperate this into a script without having to do all the selections. That is unless there is a better version of this somewhere.. The post was back 5 years ago so i am not sure if there is something newer.

 

dave

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Write Limits to a Data Table from a Limits Table

An Include() function operates just as if you have typed the code directly into your script.  So, if you had a script

x = 22;

and saved it in a file called

     c:\myfile.jsl

and then had a script

Names Default to Here( 1 );
x = 44;
include( "c:\myfile.jsl" );
print( x );

the value printed out would be 22.  The code would be interpreted just as if you had a script

Names Default to Here( 1 );
x = 44;
x = 22;
print( x );

Now concerning the code that you have incorporated into your script.....it creates new columns that have "0"s and "1"s.  There are no values of "Pass" or "Fail".  That said, yes, "Pass" and "Fail" are displayed, but that is because of the Column Property, "Value Labels" having been set.  The Value Labels do not change the actual values in the columns, it only changes the displayed values.

 

I suggest that you spend some time reading the following:

     Help==>Books==>Using JMP

     and

     Help==>Books==>Scripting Guide

Jim

View solution in original post

0 Kudos
8 REPLIES 8
txnelson
Super User

Re: Write Limits to a Data Table from a Limits Table

The Write Limits to a Data Table from a Limits Table has been updated.  Also, it has been added to the Semiconductor Toolkit

If you download and install the latest version from the File Exchange, you can see the JSL used.

Jim
0 Kudos
Yngeinstn
Community Trekker

Re: Write Limits to a Data Table from a Limits Table

I am waiting for our IT department to role out the licenses for JMP 14. The semiconductor tool kit doesn't work for 12, or at least the one that i downloaded..

 

I am going to go to the file exchange and see the code..

 

I am also using a couple of other scripts [Tabulate Yield Script.jsl] and one that you post in a reply.. Let me check out that file and i will get back to you shortly.

 

Thanks

 

 

0 Kudos
jerry_cooper
Staff (Retired)

Re: Write Limits to a Data Table from a Limits Table

When you do get version 14 installed, you may want to check out the Manage Spec Limits platform under the Analyze -> Quality and Process menu. 

Yngeinstn
Community Trekker

Re: Write Limits to a Data Table from a Limits Table

The P.O was placed, approved and now we are just waiting for the roll out.. I am on the list for the 1st round of distribution but it taking forever..

 

I want the dashboard sooooo bad..

 

Thanks for the info.. I am going to have to start watching YouTube videos on JMP 14

0 Kudos
Yngeinstn
Community Trekker

Re: Write Limits to a Data Table from a Limits Table

Mr. txnelson,

 

I opened the Add-In and was able to extract the script in order to incorporate it into mine. However, i am having issue running it. I have tried the Include() and then referencing the main; part in my script and then did an Open( "xxxxxx", Run JSL( 1 ) ); and even an Open( "xxxxx", main);

 

Neither of those methods worked. Could you please give me some advice on how to get it to execute.

 

Thanks is advance..  After this gets resolved i have a couple more questions to ask of you..

 

dt_tablelimits_tx = Open( "limitstable.jmp", invisible);

current data table ( ::dt_testdata_tx );

// Trying to open and run the "Write Limits to Table" script

// The script you wrote to assign value labels based on the "Write Limits to Table"

	dt = current data table();
	// Get all numeric columns
	colList = dt << get column names( numeric, string );

	foundCols = "";

	// Loop across the columns and generate the test pass/fails
	For( i = 1, i <= N Items( colList ), i++,
		spec = Column( dt, colList[i] ) << get property( "Spec Limits" );
		dt << clear select;
		If( Is Empty( spec ) == 0,
			dt << New Column( (Column( dt, colList[i] ) << get name) || " Pass_Fail" );
			If( Is Missing( Try( spec["LSL"], . ) ) == 0,
				dt << select where( As Column( dt, colList[i] ) < spec["LSL"] );
				Try( Column( dt, N Cols( dt ) )[dt << get selected rows] = 0 );
			);
			If( Is Missing( Try( spec["USL"], . ) ) == 0,
				dt << select where( As Column( dt, colList[i] ) > spec["USL"], current selection( "extend" ) );
				Try( Column( dt, N Cols( dt ) )[dt << get selected rows] = 0 );
			);
			dt << invert row selection;
			Try( Column( dt, N Cols( dt ) )[dt << get selected rows] = 1 );
			Column( dt, N Cols( dt ) ) << set property( "Value Labels", { 0 = "Fail", 1 = "Pass" } );
			If( foundCols == "",
				foundCols = ":Name(\!"" || (Column( dt, colList[i] ) << get name) || " Pass/Fail\!")",
				foundCols = foundCols || ", " || ":Name(\!"" || (Column( dt, colList[i] ) << get name) || " Pass/Fail\!")"
			);
		);
	);
dt << clear select;

// The script you wrote called Tabulate Yield has ... Pass_Fail == "Pass" however I can only get it to populate using .. Pass_Fail == 1

	dt << New Column( "TxCH0 Numberic Pass", formula( value_ss_TxCH0 Pass_Fail == 1 ) );
	dt << New Column( "TxCH1 Numberic Pass", formula( value_ss_TxCH1 Pass_Fail == 1 ) );
	dt << New Column( "TxCH2 Numberic Pass", formula( value_ss_TxCH2 Pass_Fail == 1 ) );
	dt << New Column( "TxCH3 Numberic Pass", formula( value_ss_TxCH3 Pass_Fail == 1 ) );
	dt << New Column( "TxCH4 Numberic Pass", formula( value_ss_TxCH4 Pass_Fail == 1 ) );
	dt << New Column( "TxCH5 Numberic Pass", formula( value_ss_TxCH5 Pass_Fail == 1 ) );
	dt << New Column( "TxCH6 Numberic Pass", formula( value_ss_TxCH6 Pass_Fail == 1 ) );
	dt << New Column( "TxCH7 Numberic Pass", formula( value_ss_TxCH7 Pass_Fail == 1 ) );
	dt << New Column( "TxCH8 Numberic Pass", formula( value_ss_TxCH8 Pass_Fail == 1 ) );
	dt << New Column( "TxCH9 Numberic Pass", formula( value_ss_TxCH9 Pass_Fail == 1 ) );
	dt << New Column( "TxCH10 Numberic Pass", formula( value_ss_TxCH10 Pass_Fail == 1 ) );
	dt << New Column( "TxCH11 Numberic Pass", formula( value_ss_TxCH11 Pass_Fail == 1 ) );
	dt << New Column( "TxCH12 Numberic Pass", formula( value_ss_TxCH12 Pass_Fail == 1 ) );
	dt << New Column( "TxCH13 Numberic Pass", formula( value_ss_TxCH13 Pass_Fail == 1 ) );
	dt << New Column( "TxCH14 Numberic Pass", formula( value_ss_TxCH14 Pass_Fail == 1 ) );
	dt << New Column( "TxCH15 Numberic Pass", formula( value_ss_TxCH15 Pass_Fail == 1 ) );

	new column ( "TxTally" ) << formula( sum(
		:TxCH0 Numberic Pass, :TxCH1 Numberic Pass, :TxCH2 Numberic Pass, 
		:TxCH3 Numberic Pass, :TxCH4 Numberic Pass, :TxCH5 Numberic Pass, 
		:TxCH6 Numberic Pass, :TxCH7 Numberic Pass, :TxCH8 Numberic Pass, 
		:TxCH9 Numberic Pass, :TxCH10 Numberic Pass, :TxCH11 Numberic Pass, 
		:TxCH12 Numberic Pass, :TxCH13 Numberic Pass, :TxCH14 Numberic Pass, 
		:TxCH15 Numberic Pass
		)
	);
	
	dt << select where( :TxTally != 16 ) << delete rows;
	
	show( LotListSQLString );



 

 

 

 

 

0 Kudos
Yngeinstn
Community Trekker

Re: Write Limits to a Data Table from a Limits Table

Mr. txnelson,

Could you please give me a hand with the Write Limits to a Data Table script.. I replied at the bottom of this thread..
Dave
0 Kudos
txnelson
Super User

Re: Write Limits to a Data Table from a Limits Table

An Include() function operates just as if you have typed the code directly into your script.  So, if you had a script

x = 22;

and saved it in a file called

     c:\myfile.jsl

and then had a script

Names Default to Here( 1 );
x = 44;
include( "c:\myfile.jsl" );
print( x );

the value printed out would be 22.  The code would be interpreted just as if you had a script

Names Default to Here( 1 );
x = 44;
x = 22;
print( x );

Now concerning the code that you have incorporated into your script.....it creates new columns that have "0"s and "1"s.  There are no values of "Pass" or "Fail".  That said, yes, "Pass" and "Fail" are displayed, but that is because of the Column Property, "Value Labels" having been set.  The Value Labels do not change the actual values in the columns, it only changes the displayed values.

 

I suggest that you spend some time reading the following:

     Help==>Books==>Using JMP

     and

     Help==>Books==>Scripting Guide

Jim

View solution in original post

0 Kudos
Yngeinstn
Community Trekker

Re: Write Limits to a Data Table from a Limits Table

I apologize as my post was a bit premature.. I was able to figure out how to step into the .jsl (Write Limits...) from my script... I now need to step from that .jsl into the Tabulate Yield .jsl..

 

 

0 Kudos