通過列循環[範圍檢查]我想根據已經填充的規格限制應用範圍檢查的一些指導。
這一項測試有87個篩選限制,我想應用範圍檢查以幫助建立規格限制。
我知道我可以使用腳本來完成我想要完成但我無法弄清楚如何應用範圍檢查(LELE(16,46)),例如..
感謝您的時間
// dtsplitmeas is the table that is split
cols = dtsplitmeas << get Column names( string );
// dtlim is _SPEC LIMITS_ .jmp attached to this thread
// dtrange is _RANGE CHECK_ .jmp attached to this thread
// Assign Spec Limit script
For( i = 1, i <= N Cols( dtsplitmeas ), i++,
limrow = Try( (dtlim << get rows where( dtlim:SPEC_COL_NAMES == cols[i] ))[1], . );
If( Is Missing( limRow ) == 0,
specs = {LSL( . ), USL( . ), Target( . ), Show Limits( 1 )};
specs["LSL"] = dtlim:LSL[limrow];
specs["USL"] = dtlim:USL[limrow];
Column( dtsplitmeas, Char( cols[i] ) ) << set property( "spec limits", Eval( specs ) );
);
);
回复:循環通過[範圍檢查]這適合我。 我把try更改為只檢查它是否有行,以防因任何原因失敗,我不想默默地傳遞錯誤。
Names default to here(1);
dtsplitmeas = Data Table("sample data");
dtlim = Data Table("_ SPEC LIMITS_");
dtrange = Data Table( "_ RANGE CHECK_" );
// dtsplitmeas is the table that is split
cols = dtsplitmeas << get Column names( string );
// dtlim is _SPEC LIMITS_ .jmp attached to this thread
// dtrange is _RANGE CHECK_ .jmp attached to this thread
// Assign Spec Limit script
For( i = 1, i <= N Cols( dtsplitmeas ), i++,
limrow = dtlim << get rows where( dtlim:SPEC_COL_NAMES == cols[i] );
If( nrows(limrow),
specs = {LSL( . ), USL( . ), Target( . ), Show Limits( 1 )};
specs["LSL"] = dtlim:LSL[limrow[1]];
specs["USL"] = dtlim:USL[limrow[1]];
Column( dtsplitmeas, Char( cols[i] ) ) << set property( "spec limits", Eval( specs ) );
//this assumes that the spec_col_names are exactly the same in both tables
Eval(EvalExpr(
Column( dtsplitmeas, char(cols[i])) << Set Property("Range Check",
LELE(Expr(dtrange:rangeA[limrow[1]]), Expr(dtrange:rangeB[limrow[1]]))
)
));
);
);回复:循環通過[範圍檢查]這是一個如何做到這一點的例子:
Names Default To Here( 1 );
dtsplitmeas = Data Table( "sample data" );
dtrange = Data Table( "_ RANGE CHECK_" );
// dtsplitmeas is the table that is split
cols = dtsplitmeas << get Column names( string );
// dtlim is _SPEC LIMITS_ .jmp attached to this thread
// dtrange is _RANGE CHECK_ .jmp attached to this thread
// Assign Spec Limit script
For( i = 1, i <= N Cols( dtsplitmeas ), i++,
rangerow = Try( (dtrange << get rows where( dtrange:SPEC_COL_NAMES == cols[i] ))[1], . );
If( Is Missing( rangeRow ) == 0,
Eval(
Substitute(
Expr(
Column( dtsplitmeas, Char( cols[i] ) ) <<
Range Check( LELE( __low__, __high__ ) )
),
Expr( __low__ ), dtrange:rangeA[rangerow],
Expr( __high__ ), dtrange:rangeB[rangerow]
)
)
);
);回复:循環通過[範圍檢查]非常感謝。我會盡快嘗試..
D.
回复:循環通過[範圍檢查]由於SPEC_COL_NAMES在每個表中都是相同的,您是否可以將rangeA和rangeB添加到同一個表中,除了spec_limits之外還要從中拉出它?
回复:循環通過[範圍檢查]@txnelson
一段時間後,你為我提供了一個很棒的腳本,它可以顯示不同的列,創建日誌,圖形圖,然後附加該日誌。
我希望用控製圖做同樣的事情,但Yaxis的87種不同的表達式可以完成,但我想知道你是否可以應用限制和範圍檢查相同的概念?我們的測試越來越精細,在這個原始帖子的情況下,我有504個篩選條件。87個actaul測試輸出,417個計算輸出。
提前致謝
doDistrPlot = Function(
{dtsplitmeas, Yaxis },
Eval(
Substitute(
Expr(
gb = Control Chart Builder(
Size( 734, 854 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
Y( Eval( Yaxis )) // Is evaluated in the same manner as the limits and range check.
),
Chart( Position( 1 ), Limits( Sigma( "Moving Range" ) ) ),
Chart( Position( 2 ), Limits( Sigma( "Moving Range" ) ) )
)
)
)
);
(gb << Top Report )[Text Box( 1 )] << Delete;
Report( gb )[Outline Box( 1 )] << Set Title( Eval Insert( Yaxis ) );
);
cols = dtsplitmeas << get Column names( string );
jjr1 = New Window( "Journal Window", << Journal );
For( i = 1, i <= N Cols( dtsplitmeas ), i++,
Yaxis = dtlim << Get Rows Where( dtlim:SPEC_COL_NAMES == cols[i] );
doDistrPlot( dtsplitmeas, Yaxis );
jjr1 << Append( Report( gb ) );
gb << Close Window;
);回复:循環通過[範圍檢查]如果只為Yaxis的一個值運行函數,它是否會為您提供所需的控製圖?我懷疑它沒有。 你有一個Eval(替換(Expr()))實例,它看起來不應該工作,因為它沒有指定任何替換元素。
你需要採取嬰兒步驟來運行函數,然後開始添加循環。
但首先,我認為您需要花費大量時間閱讀“腳本編寫指南”
幫助==>圖書==>腳本指南
回复:循環通過[範圍檢查]再次感謝你們的幫助。但是,我收到此錯誤“列'RF_IN_4_LPF_THRU到BM_A_OUT S21狀態1 @ 10.25GHz'的範圍外數據將被設置為缺失。繼續?
我記得當我手動設置範圍時看到這個彈出... 當你在他身邊跑的時候會發生這種情況嗎?
注意:我仍然收到錯誤...