利回り表仕様制限が組み込まれたテーブルを使用して、収量テーブルを取得しようとしています。
どういうわけか、行数部分がゼロしか表示されません。何が間違っているのか、何かヒントはありますか?
Clear Globals();
dt = Current Data Table();
dtYield = New Table( "Yield Table",
New Column( "Column Name", Character, "Nominal" ),
New Column( "Pass Count", Numeric, "Continuous" ),
New Column( "Fail Count", Numeric, "Continuous" ),
New Column( "Yield (Percent)", Numeric, "Continuous", Format( "Percent", 12 ) )
);
// Get all numeric columns
colList = dt << get column names( numeric, string );
// Loop across the columns and generate the test pass/fails
Try(For( i = 1, i <= N Items( colList ), i++,
spec = As Column( dt, colList[i] ) << get property( "Spec Limits" );
//Establish the Notes Value from the Parent Column
dt << clear select;
If( !Is Empty( specs ),
/* Extract spec limits */
lsl = spec["LSL"]; // Lower Spec Limit
usl = spec["USL"]; // Upper Spec Limit
/* Step 5: Evaluate pass and fail counts */
failCount = N Rows( dt << Get Rows Where( Column(dt, colList[i]) <= lsl)) + N Rows( dt << Get Rows Where( Column(dt, colList[i]) >= usl));
passCount = N Rows( dt << Get Rows Where( Column(dt, colList[i]) > lsl & Column(dt, colList[i]) < usl ) );
/* Step 6: Calculate yield */
yield = 100 * passCount / (passCount + failCount);
Show(yield);
/* Step 7: Add results to the yield table */
dtYield << Add Rows(1);
dtYield:Column Name[ N Rows( dtYield ) ] = As Column(colList[i]) << Get Name();
dtYield:Pass Count[ N Rows( dtYield ) ] = passCount;
dtYield:Fail Count[ N Rows( dtYield ) ] = failCount;
dtYield:Yield (Percent)[ N Rows( dtYield ) ] = yield;
);
);<BR />);
自動化とスクリプトRe: 利回り表私はこれを思いつきましたが、もっと良い提案があれば教えてください。
Clear Globals();
dt = Current Data Table();
dtYield = New Table( "Yield Table",
Add Rows(1),
New Column( "Column Name", Character, "Nominal" ),
New Column( "Pass Count", Numeric, "Continuous" ),
New Column( "Fail Count", Numeric, "Continuous" ),
New Column( "Yield", Numeric, "Continuous" ),
);
// Get all numeric columns
colList = dt << get column names( numeric, string );
SpecCols ={};
For Each({colnames, index}, colList,
spec = Column(dt, colnames) << get property( "Spec Limits" );
If( !Is Empty( spec ), Insert Into (SpecCols, colnames)));
// Loop across the columns and generate the test pass/fails
For Each({colnames, index}, SpecCols,
spec = Column(dt, colnames) << get property( "Spec Limits" );
lsl = spec["LSL"]; // Lower Spec Limit
usl = spec["USL"]; // Upper Spec Limit
failCount = N Rows( dt << Get Rows Where((As Column(dt, colnames)[]<LSL>usl)));
passCount = N Rows( dt << Get Rows Where((As Column(dt, colnames)[]>lsl) & (As Column(dt, colnames)[]<USL></USL></LSL>Re: 利回り表選択可能な収穫量しきい値を持つように調整しました。
ex = New Window( "Enter % Pass Threshold",
<<MODAL>usl)));
passCount = N Rows( dt << Get Rows Where((As Column(dt, colnames)[]>lsl) & (As Column(dt, colnames)[]<USL></USL></MODAL>
Re: 利回り表やあ、
仕様制限と収量表を扱う場合、よりすぐに使用できるアプローチを探している場合に備えて、スクリプトを使用せずにこれを行う方法を示す短いチュートリアルが実際にあります。
https://www.youtube.com/watch?v=1CjmA2hZhdg&t=315s
YieldOptiXは、JMPベースのアドインで、仕様限界の取り扱い、歩留まりサマリー、ビニングレポートの作成を自動化します。通常はテストデータで使用されますが、仕様と測定値を含む構造化されたデータセットであれば、どのようなものでも同様の考え方が当てはまります。
独自のワークフローと並行して、よりターンキーなものを探索することに興味がある場合に備えて、共有したいと思います。