file_path = pick file(
"Select Excel File", "$Documents",
{"All Files|jmp;jsl;xlsx;xlsm", "JMP Files|jmp;jsl", "Excel Files|*"},
1, //select item
0, //save file
"Daily_Cpk.xlsx", //selected by default
);
dt = open(file_path);
//Xaxis = {"db_data_source_cd"};
Yaxis = {"offset_micron"};
//data = {"datatag_cd"};
summarize(uparam=by(datatag_cd));
nw = new window("Daily Line Machine Cpk",
Distribution(
Stack(1),
Continuous Distribution(
Column(:offset_micron),
Horizontal Layout(1),
Vertical(0),
Capability Analysis(
//Spec Limits(
datatag_cd[i] == "THA_X", LSL( -150 ), USL( 150 ),
datatag_cd[i] == "THA_Y", LSL( -150 ), USL( 150 ),
datatag_cd[i] == "THA_Theta", LSL( -300 ), USL( 300 ),
//)
)
),
By(:db_data_source_cd,:datatag_cd)
)
);
The code is working, only left the part for datatag_cd: parameter for X and Y, I would like to set the limit to +-150. However, the charts generated are all spec limits for Theta only. How do I make the spec limit works?
I would most likely send separate messages to separate distribution platforms. Script below might give some ideas
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp");
nw = New Window("Daily Line Machine Cpk",
dists = dt << Distribution(
Stack(1),
Continuous Distribution(
Column(:Measurement),
Horizontal Layout(1),
Vertical(0),
),
By(:operator)
)
);
specs = Associative Array();
specs["Cindy"] = {0.2, 2};
specs["George"] = {0.3, 3};
specs["Tom"] = {0.4, 4};
For Each({dist}, dists,
cur_report = Report(dist);
curname = Word(-1, cur_report[OutlineBox(1)] << get title, "=");
Eval(EvalExpr(
dist << Capability Analysis(
LSL(Expr(specs[curname][1])),
USL(Expr(specs[curname][2]))
)
));
cur_report[AxisBox(1)] << Min(specs[curname][1] - 0.2);
cur_report[AxisBox(1)] << Max(specs[curname][2] + 0.2);
);
Depending on what type of report you need, you might want to also check other platforms JMP has to offer: process capability, process screening (some might require you to split your data though)