FInal Yield Table ProblemMr. txnelson was kind enough to share with me a great script that assigns pass/fail to columns and then ultimately a final Pass/Fail based on the entire row. I would like to that final column into sub columns and while i know how it can be done conceptually, i can't figure out the correct syntax..
This piece of code finds the minimum of ALL columns however i would like to add subsets
Eval( Parse( "dt2 << New Column( \!"Row Pass/Fail\!", Formula( If( Min(" || foundCols || " ) == 1, 1, 0 ) )" ) );
Columns:
Row Pass/Fail
Test_1 Pass/Fail
Test_2 Pass/Fail
Test_3a Pass/Fail
Test_3b Pass/Fail
Test_3c Pass/Fail
Test_3d Pass/Fail
Test_3e Pass/Fail
Test_4_State_1 Pass/Fail
Test_4_State_3 Pass/Fail
Test_4_State_4 Pass/Fail
colList = dt2 << Get Column Names( numeric, string );
foundCols = "";
For( i = 1, i <= N Items( colList ), i++,
Spec = Column( dt2, colList[i] ) << Get Property( "Spec Limits" );
dt2 << Clear Select;
If( Is Empty( Spec ) == 0,
dt2 << New Column( (Column( dt2, colList[i] ) << Get Name) || " Pass/Fail" );
If( Is Missing( Try( Spec["LSL"], . ) ) == 0,
dt2 << Select Where( As Column( dt2, colList[i] ) < Spec["LSL"] );
Try( Column( dt2, N Cols( dt2 ) )[dt2 << get selected rows] = 0 );
);
If( Is Missing( Try( Spec["USL"], . ) ) == 0,
dt2 << Select Where( As Column( dt2, colList[i] ) > Spec["USL"], Current Selection( "Extend" ) );
Try( Column( dt2, N Cols( dt2 ) )[dt2 << Get Selected Rows] = 0 );
);
dt2 << invert row selection;
Try( Column( dt2, N Cols( dt2 ) )[dt2 << Get Selected Rows] = 1 );
Column( dt2, N Cols( dt2 ) ) << Set Property( "Value Labels", {1 = "Pass", 0 = "Fail"} );
If( foundCols == "",
foundCols = ":Name(\!"" || (Column( dt2, colList[i] ) << Get Name) || " Pass/Fail\!")",
foundCols = foundCols || ", " || ":Name(\!"" || (Column( dt2, colList[i] ) << Get Name) || " Pass/Fail\!")"
);
);
);
Re: FInal Yield Table ProblemI had to get a bit creative but it got it.. It looks a bit clumsy but it gets the job done.. Thank you
ycols_3 = dt3 << Get Column Names( Numeric, Continuous );
yPassFail = {};
For( i = 1 , i <= N Items( ycols_3 ), i++,
If( Contains( ycols_3[i], "Pass/Fail" ),
Insert Into( yPassFail, ycols_3[i]);
)
);
Show( yPassFail );
txList = {};
For( i = 1 , i <= N Items( yPassFail ), i++,
If( Contains( yPassFail[i], "TX S12 State 01" ),
Insert Into( txList , yPassFail[i]);
)
);
rxList = {};
For( i = 1 , i <= N Items( yPassFail ), i++,
If( Contains( yPassFail[i], "RX S21 State 03" ),
Insert Into( rxList , yPassFail[i]);
)
);
deltaAmpList = {};
For( i = 1 , i <= N Items( yPassFail ), i++,
If( Contains( yPassFail[i], "Delta Amp" ),
Insert Into( deltaAmpList , yPassFail[i]);
)
);
txList = Char( txList );
rxList = Char( rxList );
deltaAmpList = Char( deltaAmpList );
Eval( Parse( "dt3 << New Column( \!"Tx_Spar\!", Formula( If( Min(" || txList || " ) == 1, 1, 0 ) ) )" ) );
Eval( Parse( "dt3 << New Column( \!"Rx_Spar\!", Formula( If( Min(" || rxList || " ) == 1, 1, 0 ) ) )" ) );
Eval( Parse( "dt3 << New Column( \!"Rx_SparDelta\!", Formula( If( Min(" || deltaAmpList || " ) == 1, 1, 0 ) ) )" ) );
Re: FInal Yield Table ProblemI assume the variable in question is "FoundCols". You are setting it to a value of "", which makes the variable "FoundCols" a character string, not a list. Then later in your code, you check to see if the variable "FoundCols" is equal to {}, which is it is not. It is equal to "". If you want to initialize "FoundCols" to an empty list, specify:
FoundCols = {};Re: FInal Yield Table ProblemUnfortunately it is still the same issue with the Error Message "N Items() argument must be a list{579}"
I believe you provided this bit of code back in the beginning of my journey down this path..
Oh and we have JMP 15 now so if there is another way of doing it i am all ears (eyes)...
Thank You
colsToPassFail = dt3 << get column names( numeric, String );
Show( colsToPassFail );
foundCols = "";
For( i = 1, i <= N Items( colsToPassFail ), i++,
Spec = Column( dt3, colsToPassFail[i] ) << Get Property( "Spec Limits" );
dt3 << Clear Select;
If( Is Empty( spec ) == 0,
dt3 << New Column( ( Column( dt3, colsToPassFail[i] ) << Get Name) || " Pass/Fail" );
If( Is Missing( Try( spec["LSL"], . ) ) == 0,
dt3 << Select Where( As Column( dt3, colsToPassFail[i] ) < spec["LSL"] );
Try( Column( dt3, N Cols( dt3 ) )[dt3 << Get Selected Rows] = 0 );
);
If( Is Missing( Try( spec["USL"], . ) ) == 0,
dt3 << Select Where( As Column( dt3, colsToPassFail[i] ) > spec["USL"], Current Selection( "extend" ) );
Try( Column( dt3, N Cols( dt3 ) )[dt3 << Get Selected Rows] = 0 );
);
dt3 << Invert Row Selection;
Try( Column( dt3, N Cols( dt3 ) )[dt3 << Get Selected Rows] = 1 );
Column( dt3, N Cols( dt3 ) ) << set property( "Value Labels", {1 = "Pass", 0 = "Fail"} );
If( foundCols == {},
foundCols = ":Name(\!"" || (Column( dt3, colsToPassFail[i] ) << Get Name) || " Pass/Fail\!")",
foundCols = foundCols || ", " || ":Name(\!"" || (Column( dt3, colsToPassFail[i] ) << Get Name) || " Pass/Fail\!")"
);
);
);
dt3 << Clear Select;
txList = {};
For( i = 1 ,i <= N Items( foundCols ), i++,
If( Contains( foundCols[i], "TX" ),
Insert Into( txList, foundCols[i]);
)
);Re: FInal Yield Table ProblemI realize that I made an error in my last entry. The code to populate the NewList needs to be changed to:
newList = {};
For( i=1,i<=N Items(foundCols),i++,
If(contains(foundCols[i],"Tx"),
insert into( newList, foundCols[i]);
)
);
Try this and see if it helps
Re: FInal Yield Table ProblemI apolgozie i finally got time to revisit this since I originally posted. I am getting an error that "N Items() argument must be a list".
foundCols = ""; is the original code, not in a list.
Here is what i think should happen
listCols = { foundCols };
listCols = Eval List ( listCols );
At this point I have all the foundCols into a list however when i run the below script newList doesn't populate..
newList = {};
For( i = 1, i <= N Items( listCols ), i++,
If( Contains( listCols, "TX" ),
Insert Into( newList, listCols[i]);
)
);
Thanks in advance
Re: FInal Yield Table ProblemI think what you can do is to simply create a new list that contains only the columns with the Rx 3 name, and then create a new column using that list to set values in the new column. Something like:
newList = {};
For( i=1,i<=N Items(foundCols),i++,
If(contains(foundCols,"Rx 3"),
insert into( newList, foundCols[i]);
)
);
Eval( Parse( "dt2 << New Column( \!"Rx 3 Row Pass/Fail\!", Formula( If( Min(" || newList || " ) == 1, 1, 0 ) ) )" ) );Re: FInal Yield Table ProblemThat is what i am currently doing however because analyzing multiple product lines that have the same Rx in the test name one of which has 300 different conditions inside that Rx i was hoping to do this dynamically so it would work across any exisiting and upcoming products..
Re: FInal Yield Table ProblemI would just interactively create a new column, and then go into the Formula Editor and select just the Rx state columns to be evalueated
Re: FInal Yield Table ProblemThank you. If you don't mind could you please help me the next part?
This code takes all columns {foundCols} that have the 'Pass/Fail' in it an finds the min value and utlimitately assigns pass or fail.
<SPAN class="token function">Eval</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token function">Parse</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"dt2 << New Column( \!"Row Pass/Fail\!", Formula( If( Min("</SPAN> <SPAN class="token operator">||</SPAN> foundCols <SPAN class="token operator">||</SPAN> <SPAN class="token string">" ) == 1, 1, 0 ) ) )"</SPAN> <SPAN class="token punctuation">)</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN>How would one get different combinations of the foundCols say for instance i just want the columns with Rx State 3?
foundCols = {:Name( "7200_VDD_Dig_Rx Pass/Fail" ),
:Name( "7200_Analog_Rx Pass/Fail" ),
:Name( "CH9 Rx State 3 Pass/Fail" ),
:Name( "CH8 Rx State 3 Pass/Fail" ),
:Name( "CH7 Rx State 3 Pass/Fail" ),
:Name( "CH6 Rx State 3 Pass/Fail" ),
:Name( "CH5 Rx State 3 Pass/Fail" ),
:Name( "CH4 Rx State 3 Pass/Fail" ),
:Name( "CH3 Rx State 3 Pass/Fail" ),
:Name( "CH2 Rx State 3 Pass/Fail" ),
:Name( "CH15 Rx State 3 Pass/Fail" ),
:Name( "CH14 Rx State 3 Pass/Fail" ),
:Name( "CH13 Rx State 3 Pass/Fail" ),
:Name( "CH12 Rx State 3 Pass/Fail" ),
:Name( "CH11 Rx State 3 Pass/Fail" ),
:Name( "CH10 Rx State 3 Pass/Fail" ),
:Name( "CH1 Rx State 3 Pass/Fail" ),
:Name( "CH0 Rx State 3 Pass/Fail" ),
:Name( "CH0 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH1 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH10 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH11 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH12 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH13 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH14 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH15 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH2 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH3 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH4 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH5 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH6 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH7 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH8 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "CH9 Rx State 4 Delta Amp Pass/Fail" ),
:Name( "7100_VDD_Dig_Tx Pass/Fail" ),
:Name( "7100_Analog_Tx Pass/Fail" ),
:Name( "CH0 Tx State 1 Pass/Fail" ),
:Name( "CH1 Tx State 1 Pass/Fail" ),
:Name( "CH10 Tx State 1 Pass/Fail" ),
:Name( "CH11 Tx State 1 Pass/Fail" ),
:Name( "CH12 Tx State 1 Pass/Fail" ),
:Name( "CH13 Tx State 1 Pass/Fail" ),
:Name( "CH14 Tx State 1 Pass/Fail" ),
:Name( "CH15 Tx State 1 Pass/Fail" ),
:Name( "CH2 Tx State 1 Pass/Fail" ),
:Name( "CH3 Tx State 1 Pass/Fail" ),
:Name( "CH4 Tx State 1 Pass/Fail" ),
:Name( "CH5 Tx State 1 Pass/Fail" ),
:Name( "CH6 Tx State 1 Pass/Fail" ),
:Name( "CH7 Tx State 1 Pass/Fail" ),
:Name( "CH8 Tx State 1 Pass/Fail" ),
:Name( "CH9 Tx State 1 Pass/Fail" ),
:Name( "801 Pass/Fail" ),
:Name( "802 Pass/Fail" ),
:Name( "803 Pass/Fail" ),
:Name( "804 Pass/Fail" ),
:Name( "805 Pass/Fail" ),
:Name( "806 Pass/Fail" ),
:Name( "807 Pass/Fail" ),
:Name( "821 Pass/Fail" )};
Re: FInal Yield Table ProblemThere is a simple syntax error in your Eval(Parse()) statement. A ")" was left out. Here is a working version
Eval( Parse( "dt2 << New Column( \!"Row Pass/Fail\!", Formula( If( Min(" || foundCols || " ) == 1, 1, 0 ) ) )" ) );