봉인 강도 데이터를 가져온 다음 해당 데이터를 사용하여 관리도를 생성하는 스크립트가 있습니다. 데이터 세트에는 거의 1년치의 데이터가 있지만 관리도는 지난 3개월 동안의 데이터만 표시하면 됩니다.스크립트에 활성 실러 번호 목록이 있으며 활성 실러 목록을 살펴보고 지난 3개월 동안 해당 실러에 대한 데이터가 있으면 하위 집합을 만든 다음 제어 차트를 생성하도록 설정했습니다. 작동했지만 최근에 두 개의 새로운 실러 번호(11043 및 12143)를 목록에 추가했을 때 스크립트는 이 두 실러에 대한 제어 차트를 생성하지 않습니다. 나는 수동으로 데이터를 검색했고 지난 3개월 동안 두 개의 새로운 실러 각각에 대한 데이터가 있다는 것을 알고 있습니다. 스크립트의 오작동을 일으키는 이 두 실러의 차이점을 알 수 없습니다.나는 우리가 밀봉 강도 테스트에서 얻은 형식의 Excel 파일에 일부 구성된 데이터를 첨부했습니다. 스크립트에 있는 내용은 다음과 같습니다.
//Import file and create data table
DS = Open("Source File Path Here"); //need to check where the file will be stored and what it will be called
DS << Set Name ("Sealer Data - Maximum Load (lbf/in)");
//Sort Data
DS <
//Modify date to display only the date and not the date and time
DS << New Column("Date", Numeric, Continuous, Formula(Short Date(Num(Munger(Char(:End date), 1,10)))));
//Create a subset data table and control chart for each sealer
SL = {07056, 08139, 09066, 10083, 10088, 10532, 11043, 12035, 12036, 12093, 12119, 12143, 12144, 12145, 14122, 14123}; //list modified for 07Feb17
For(i=N Items(SL), i>0, i--,
DS << Select Where (:Sealer Number == SL[i] & :Date >= Short Date(Today() - 90 * 86400));
If( N Row( DS << get selected rows ) == 0, Continue() );
DS << Subset ((Selected Rows), Output Table Name("Sealer_"||char(SL[i])));
IF(SL[i]==12119,
Control Chart(
Sample Label( :Date ),
Group Size( 1 ),
KSigma( 3 ),
Chart Col( :Maximum Load, Individual Measurement),
SendToReport(
Dispatch( {}, "Control Chart", OutlineBox, {Set Title( "Sealer_"||char(SL[i]) )} ),
Dispatch(
{"Individual Measurement of Maximum Load"},
"2",
ScaleBox,
{Format( "Fixed Dec", 12, 1 ), Min( -0.5), Max( 10 ),
Inc(5), Minor Ticks( 1 ),
Add Ref Line( 0.46, Dashed, "Purple", "0.46" ),
Add Ref Line( 0.7, Dotted, "Blue", "0.70" ),
Rotated Labels( "Horizontal" )}
),
Dispatch(
{"Individual Measurement of Maximum Load"},
"1",
ScaleBox,
{Show Minor Ticks( 0 ), Rotated Labels( "Vertical" )}
),
Dispatch(
{"Individual Measurement of Maximum Load"},
"",
AxisBox,
{Add Axis Label( "Maximum Load (lbf/in)" )}
),
Dispatch(
{"Individual Measurement of Maximum Load"},
"IR Chart of IM",
FrameBox,
{Frame Size( 912, 318 ), Line Width Scale( 1.5 )}
),
Dispatch(
{"Individual Measurement of Maximum Load"},
"",
AxisBox( 2 ),
{Add Axis Label( "Date" )}
),
Dispatch(
{"Individual Measurement of Maximum Load"},
"IR Chart of IM",
FrameBox( 2 ),
{Frame Size( 70, 318 )}
),
Dispatch(
{"Individual Measurement of Maximum Load"},
"1",
ScaleBox,
{Inc( 1 ), Minor Ticks( 0 )}
)
),
),
Control Chart(
Sample Label( :Date ),
Group Size( 1 ),
KSigma( 3 ),
Chart Col( :Maximum Load, Individual Measurement),
SendToReport(
Dispatch( {}, "Control Chart", OutlineBox, {Set Title( "Sealer_"||char(SL[i]) )} ),
Dispatch(
{"Individual Measurement of Maximum Load"},
"2",
ScaleBox,
{Format( "Fixed Dec", 12, 1 ), Min( -0.5 ), Max( 5 ),
Inc( 5 ), Minor Ticks( 1 ), Add Ref Line( 0.46, "Dashed", "Purple", "0.46", 1 ),
Add Ref Line( 0.7, "Dotted", "Blue", "0.70", 1 )}
),
Dispatch(
{"Individual Measurement of Maximum Load"},
"1",
ScaleBox,
{Inc( 1 ), Minor Ticks( 0 )}
),
Dispatch(
{"Individual Measurement of Maximum Load"},
"",
AxisBox,
{Add Axis Label( "Maximum Load (lbf/in)" )}
),
Dispatch(
{"Individual Measurement of Maximum Load"},
"IR Chart of IM",
FrameBox,
{Frame Size( 912, 318 ), Line Width Scale( 1.5 )}
),
Dispatch(
{"Individual Measurement of Maximum Load"},
"",
AxisBox( 2 ),
{Add Axis Label( "Date" )}
),
Dispatch(
{"Individual Measurement of Maximum Load"},
"IR Chart of IM",
FrameBox( 2 ),
{Frame Size( 70, 318 )}
)
)
);
);
);
t와 저는 활성 실러 목록을 살펴보고 지난 3개월 동안 해당 실러에 대한 데이터가 있는 경우 하위 집합을 만든 다음 제어 차트를 생성하도록 설정했습니다. 작동했지만 최근에 두 개의 새로운 실러 번호를 목록에 추가했을 때 스크립트는 두 개의 실러에 대한 제어 차트를 생성하지 않습니다. 나는 수동으로 데이터를 검색했고 지난 3개월 동안 두 개의 새로운 실러 각각에 대한 데이터가 있다는 것을 알고 있습니다. 스크립트의 오작동을 일으키는 이 두 실러의 차이점을 알 수 없습니다.
이 코드가 계속되는 경우에 해당하는 것으로 의심됩니다.
DS << Select Where( :Sealer Number == SL[i] & :Date >= Short Date( Today() - 90 * 86400 ) );
If( N Row( DS << get selected rows ) == 0,
Continue()
);
Mark가 제안한 대로 계속에 중단점을 설정하거나 다음 명령문을 추가할 수 있습니다.
Show( i, SL[i], :Date );
로그에서 출력을 확인하십시오. 나는 아마도 데이터 테이블에 현재 행이 없기 때문에 :Date가 틀릴 것이라고 추측할 것이다.