シール強度データをインポートし、そのデータを使用して管理図を生成するスクリプトがあります。 データセットにはほぼ1年分のデータがありますが、管理図には過去3か月のデータのみを表示する必要があります。スクリプトにはアクティブなシーラー番号のリストがあり、アクティブなシーラーのリストを確認するように設定しました。過去3か月間にそのシーラーのデータがある場合は、サブセットを作成してから管理図を作成します。 それは機能していましたが、最近2つの新しいシーラー番号(11043と12143)をリストに追加すると、スクリプトはそれら2つのシーラーの管理図を生成しません。 私は手動でデータを検索し、過去3か月間に2つの新しいシーラーのそれぞれのデータがあることを知っています。 スクリプトの誤動作の原因となっているこれら2つのシーラーの違いがわかりません。シール強度テストで得られた形式の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か月間にそのシーラーのデータがある場合は、サブセットを作成してから管理図を作成します。 それは機能していましたが、最近2つの新しいシーラー番号をリストに追加したとき、スクリプトはそれら2つのシーラーの管理図を生成しません。 私は手動でデータを検索し、過去3か月間に2つの新しいシーラーのそれぞれのデータがあることを知っています。 スクリプトの誤動作の原因となっているこれら2つのシーラーの違いがわかりません。