Problema della tabella dei rendimenti finaleIl signor txnelson è stato così gentile da condividere con me un ottimo script che assegna pass/fail alle colonne e infine un pass/fail finale basato sull'intera riga. Vorrei quella colonna finale in sottocolonne e mentre so come può essere fatto concettualmente, non riesco a capire la sintassi corretta ..
Questo pezzo di codice trova il minimo di TUTTE le colonne, tuttavia vorrei aggiungere sottoinsiemi
Eval( Parse( "dt2 << Nuova colonna( \!"Riga superata/fallita\!", Formula( If( Min(" || foundCols || " ) == 1, 1, 0 ) )" ) );
Colonne:
Riga superata/fallita
Test_1 Passato/Fallito
Test_2 Superato/Fallito
Test_3a Passato/Fallito
Test_3b Passato/Fallito
Test_3c Passato/Fallito
Test_3d Passato/Fallito
Test_3e Passato/Fallito
Test_4_State_1 Superato/Fallito
Test_4_State_3 Superato/Fallito
Test_4_State_4 Superato/Fallito
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\!")"
);
);
);
Ri: problema della tabella dei rendimenti finaleHo dovuto essere un po 'creativo ma ce l'ha fatta ..Sembra un po' goffo ma fa il suo lavoro.. Grazie
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 ) ) )" ) );
Ri: problema della tabella dei rendimenti finalePresumo che la variabile in questione sia "FoundCols".Lo stai impostando su un valore di "", che rende la variabile "FoundCols" una stringa di caratteri, non un elenco.Quindi, più avanti nel codice, controlli se la variabile "FoundCols" è uguale a {}, ovvero non lo è.È uguale a "".Se vuoi inizializzare "FoundCols" su un elenco vuoto, specifica:
FoundCols = {};Ri: problema della tabella dei rendimenti finaleSfortunatamente è ancora lo stesso problema con il messaggio di errore "L'argomento N elementi() deve essere un elenco{579}"
Credo che tu abbia fornito questo pezzo di codice all'inizio del mio viaggio su questa strada...
Oh, e ora abbiamo JMP 15, quindi se c'è un altro modo per farlo, sono tutt'orecchi (occhi)...
Grazie
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]);
)
);Ri: problema della tabella dei rendimenti finaleMi rendo conto di aver fatto un errore nella mia ultima voce.Il codice per popolare NewList deve essere modificato in:
newList = {};
For( i=1,i<=N Items(foundCols),i++,
If(contains(foundCols[i],"Tx"),
insert into( newList, foundCols[i]);
)
);
Prova questo e vedi se aiuta
Ri: problema della tabella dei rendimenti finaleI apolgozie ho finalmente avuto il tempo di rivisitare questo da quando l'ho postato originariamente. Ricevo un errore secondo cui "l'argomento N Items () deve essere un elenco".
foundCols = ""; è il codice originale, non in un elenco.
Ecco cosa penso dovrebbe accadere
listCols = { foundCols };
listCols = Eval List ( listCols );
A questo punto ho tutti i foundCols in un elenco, tuttavia quando eseguo lo script seguente newList non si popola ..
newList = {};
For( i = 1, i <= N Items( listCols ), i++,
If( Contains( listCols, "TX" ),
Insert Into( newList, listCols[i]);
)
);
grazie in anticipo
Ri: problema della tabella dei rendimenti finalePenso che quello che puoi fare sia semplicemente creare un nuovo elenco che contenga solo le colonne con il nome Rx 3, quindi creare una nuova colonna usando quell'elenco per impostare i valori nella nuova colonna.Qualcosa di simile a:
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 ) ) )" ) );Ri: problema della tabella dei rendimenti finaleQuesto è ciò che sto facendo attualmente, tuttavia, poiché analizzando più linee di prodotti che hanno lo stesso Rx nel nome del test, una delle quali ha 300 condizioni diverse all'interno di quell'Rx, speravo di farlo in modo dinamico in modo che funzionasse su qualsiasi prodotto esistente e in arrivo. .
Ri: problema della tabella dei rendimenti finaleVorrei solo creare in modo interattivo una nuova colonna, quindi andare nell'editor di formule e selezionare solo le colonne dello stato Rx da valutare
Ri: problema della tabella dei rendimenti finaleGrazie. Se non ti dispiace, potresti per favore aiutarmi nella parte successiva?
Questo codice prende tutte le colonne {foundCols} che contengono "Pass/Fail" e trova il valore minimo e assegna in modo definitivo pass o 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>Come si potrebbero ottenere diverse combinazioni di foundCols, ad esempio, voglio solo le colonne con 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" )};
Ri: problema della tabella dei rendimenti finaleC'è un semplice errore di sintassi nell'istruzione Eval(Parse()).Un ")" è stato tralasciato.Ecco una versione funzionante
Eval( Parse( "dt2 << New Column( \!"Row Pass/Fail\!", Formula( If( Min(" || foundCols || " ) == 1, 1, 0 ) ) )" ) );