Author |
Topic  |
|
elga
9 Posts |
Posted - 12 Jun 2008 : 04:15:12
|
When I set the "ControlLineMode" to CONTROL_LINE_VARIABLE, the SPC chart will not draw the lines for each sigma. I wonder if there are any alternative to combine these two features in one chart. I ever consider the approach to use multiple SPC control limits , nevertheless, it seems can only apply to chart. If I have different control limits for each segment of chart, it may not work. Is there any good recommendation ? |
|
quinncurtis
1586 Posts |
Posted - 12 Jun 2008 : 10:25:50
|
We tested having multiple control limits with the CONTROL_LINE_VARIABLE mode, and it worked as expected. See the image below.
You must take particular care when setting control limits, before you start adding data. We used the following code, added to our TimeVariableControlCharts.MultiLimitXBarRChart example program.
double [] initialControlLimits =
{60, 40, 80, // Target, L3, H3 for Primary Chart
10, 0, 20, // Target, L3, H3 for Secondary Chart
45, 75, // L2, H2 for Primary Chart
50, 70, // L1, H1 for Primary Chart
18, // H2 for Secondary Chart
17}; // H1 for Secondary Chart
chartdata.setControlLimitValues(initialControlLimits);
// Simulating data will draw the control limits using the initial control limit values
simulateData();
double [] changedControlLimits =
{63, 43, 83, // Target, L3, H3 for Primary Chart
12, 0, 22, // Target, L3, H3 for Secondary Chart
48, 78, // L2, H2 for Primary Chart
53, 73, // L1, H1 for Primary Chart
19, // H2 for Secondary Chart
17.5}; // H1 for Secondary Chart
chartdata.setControlLimitValues(changedControlLimits);
// Simulating data will draw the control limits using the newly limits
simulateData();
You can't call autoCalculateControlLimits if you are doing this, because that will override everything.
If you meant something else please describe in more detail.

|
 |
|
elga
9 Posts |
Posted - 13 Jun 2008 : 06:31:11
|
Thank you so much for your instruction and example. Actually, I search a long tim to find this kind of control limits definition in user document but can not find similar example.
One extra question, may I show 3 sigma lines even without invoke useWERuntimeRules()? |
 |
|
quinncurtis
1586 Posts |
Posted - 13 Jun 2008 : 10:18:12
|
The example program TimeVariableControlCharts.MultiLimitXBarRChart creates +- 3 sigma limits, without invoking useWERuntimeRules.
|
 |
|
elga
9 Posts |
Posted - 15 Jun 2008 : 22:44:17
|
Thank you for your help.
Nevertheless, if I use addAdditionalControlLimit() function to add multiple control limits, it will apply to the full time range of one chart. I still need the CONTROL_LINE_VARIABLE mode but combined with manually created +-3 sigma limits. |
 |
|
quinncurtis
1586 Posts |
Posted - 15 Jun 2008 : 23:07:00
|
If you want additional help, you need to explain your problem in much more detail. We don't understand the point you are trying to make, "if I use addAdditionalControlLimit() function to add multiple control limits, it will apply to the full time range of one chart"? , and we aren't sure if you understand the way the software works. |
 |
|
elga
9 Posts |
Posted - 16 Jun 2008 : 05:14:32
|
Sorry, I may not explain my question clear enough. In a word, I want draw a trend chart which can display variable control limits and +-3 sigma lines but don't invoke useWERuntimeRules() function.
In the example code of your reply, it's flexible enough to set control limits and +-3 sigma for each point. However, it should invoke useWERuntimeRules() to show +-3 sigma lines. I don't want to invoke useWERuntimeRules() due to I need to show historic trend chart of on-line SPC which is calculated by another real-time engine that might be different from you library.
In the example program TimeVariableControlCharts.MultiLimitXBarRChart, I found the following code,
double sigma2 = 2.0; double sigma1 = 1.0; // Create multiple limits SPCControlChartData chartData = this.getChartData(); // For PrimaryChart SPCControlLimitRecord lcl2 = new SPCControlLimitRecord(chartData, SPCControlLimitRecord.SPC_LOWERTHAN_LIMIT, 0,"LCLR2", "LCLR2"); SPCControlLimitRecord ucl2 = new SPCControlLimitRecord(chartData, SPCControlLimitRecord.SPC_GREATERTHAN_LIMIT, 0,"UCLR2", "UCLR2");
this.getPrimaryChart().addAdditionalControlLimit(lcl2, SPCChartObjects.SPC_LOWER_CONTROL_LIMIT_2, sigma2); this.getPrimaryChart().addAdditionalControlLimit(ucl2, SPCChartObjects.SPC_UPPER_CONTROL_LIMIT_2, sigma2);
SPCControlLimitRecord lcl3 = new SPCControlLimitRecord(chartData, SPCControlLimitRecord.SPC_LOWERTHAN_LIMIT, 0,"LCLR1", "LCLR1"); SPCControlLimitRecord ucl3 = new SPCControlLimitRecord(chartData, SPCControlLimitRecord.SPC_GREATERTHAN_LIMIT, 0,"UCLR1", "UCLR1");
this.getPrimaryChart().addAdditionalControlLimit(lcl3, SPCChartObjects.SPC_LOWER_CONTROL_LIMIT_1, sigma1); this.getPrimaryChart().addAdditionalControlLimit(ucl3, SPCChartObjects.SPC_UPPER_CONTROL_LIMIT_1, sigma1);
I think the above code will apply lcl2,ucl2,lcl3 and ucl3 to primary chart with sigma2(2.0) and sigma1(1.0) which are not variable.
If my understanding is wrong, please kindly give comment. Thanks. |
 |
|
quinncurtis
1586 Posts |
Posted - 16 Jun 2008 : 08:10:52
|
We are still unclear as to the exact nature of your problem.
We have already demonstrated using an example that the software supports multiple, variable alarm limits, and the example DOES NOT use useWERuntimeRules. In that example, the alarm limits are explicitly set, and are not automatically calculated at +-sigma 1, 2 and 3 control limits.
Is your problem:
You want multiple, variable alarm limits at +-sigma 1, 2, and 3 levels. But you do not have, and do not know how to calculate, the values corresponding to +- sigma 1, 2 and 3 levels and you want the software to calculate them for you. Our autoCalculateControlLimits method is normally used to calculate the sigma limits, but autoCalculateControlLimits will always go back and apply the newly calculated limits to the previously collected data, erasing any old conttrol limit values in the chart. This is what makes the control limits look "fixed", and that is why our example programs that demonstrate variable control limits DO NOT call autoCalculateControlLimits. Do you want a version of autoCalculateControlLimits that calculates the +-sigma 1,2,3 limits, but only applies the limits going forward, and does not erase the old, previously calculated limit values ? This would make the control limits look "variable" since the new limit values would differ slightly from the old limit values. |
 |
|
|
Topic  |
|
|
|