Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net
 SPC Control Chart Tools for .Net
 Target Line when showing Spec Limits
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

toddpie42

USA
7 Posts

Posted - 24 Nov 2015 :  12:45:17  Show Profile  Reply with Quote
I am using a SPCBatchVariableControlChart chart along with AddSpecLimit() to show our specifications on the chart, but I can't find a way to show the target line. Because after the call to AutoCalculatePrimaryControlLimits(), the SPC_CONTROL_TARGET gets set to the mean value. I want to show both the calculated mean and the target on the chart. Any ideas on how to accomplish this without affecting alarming and calculations?

Me.PrimaryChart.AddSpecLimit(SPCChartObjects.SPC_LOWER_SPEC_LIMIT, ...
Me.PrimaryChart.AddSpecLimit(SPCChartObjects.SPC_UPPER_SPEC_LIMIT, ...

Me.PrimaryChart.GetControlLimitData(SPCChartObjects.SPC_CONTROL_TARGET).LimitValue = target.Value

Me.AutoCalculatePrimaryControlLimits() 'URG. Resets the target to the mean.

quinncurtis

1586 Posts

Posted - 24 Nov 2015 :  13:03:15  Show Profile  Reply with Quote
If the process is anywhere near in-control then the target value (which you set explicitly) is going to be right on top of the calculated target value (which you are calling the mean calculated by AutoCalculateControlLimits), at least within the line thickness of the control lines, so most of the time only the topmost one will show. Is this what you want or expect?

What validity is there in setting an explicit target value, not calculated from the data, but then using UCL and LCL values calculated from the standard deviation of the data? This will produce invalid, non-symmetric results if the target is significantly different from the calculated mean. If you have an explicity target value, you should also have explicit UCL and LCL control limit values, therefore you do not need to call AutoCalculateControlLimits.

Exactly what control rules do you expect to use in your SPC charts?

There may be a way to accomplish that, but first I need to know what you actually expect.
Go to Top of Page

toddpie42

USA
7 Posts

Posted - 24 Nov 2015 :  13:16:01  Show Profile  Reply with Quote
Yes, I agree the lines may be right on top of each other and I expect that --IF (a big IF) our process is in control. The way I have my chart set up is that users can toggle the spec limits and (wishfully) the target on/off the chart to see how aligned the process is to the specs. So if there is overlap, they can simply toggle off the spec limts/target.

Here are the rules I'm using:
Me.PrimaryChart.AddControlRule(1, 1, 1, -3, False) '1 Point beyond 3 sigmas +/- (out of 3 sigma control)
Me.PrimaryChart.AddControlRule(2, 1, 1, 3, False) '1 Point beyond 3 sigmas +/- (out of 3 sigma control)
Me.PrimaryChart.AddControlRule(1, 2, 3, -2, False) '2 Points out of 3 beyond 2 sigma +/-
Me.PrimaryChart.AddControlRule(2, 2, 3, 2, False) '2 Points out of 3 beyond 2 sigma +/-
Me.PrimaryChart.AddControlRule(1, 7, 7, 0, False) '7 points in a row above center
Me.PrimaryChart.AddControlRule(2, 7, 7, 0, False) '7 points in a row below center
Me.PrimaryChart.AddControlRule(7, 7, 7, 0, False) '7 points in a row trending up or down
and of course once the spec limits are added, then those act as rules too.
Go to Top of Page

quinncurtis

1586 Posts

Posted - 24 Nov 2015 :  14:13:12  Show Profile  Reply with Quote
You can try this. You can force the target to a specific value, and have it excluded from the AutoCalculatePrimaryControlLimits calculation, using the ChartData.ProcessMean property. You can toggle it in and out using ChartData.ProcessMeanOverride

Me.ChartData.ProcessMean = 303 ' this sets ProcessMeanOverride property true by default
Me.ChartData.ProcessMeanOverride = true

I don't see a way to add another independent target value to the plot, and have it displayed though. I will continue to look at it.

Also, as I said previously, using a mean from a previous sample population (for the target) and a standard deviation from the current (for the control limits) is certainly invalid. You should either be using target and control limit values from a previous sample population, or from the current population, but not mixing the two, otherwise the results will be offset and non-symmetric.
Go to Top of Page

toddpie42

USA
7 Posts

Posted - 24 Nov 2015 :  14:29:38  Show Profile  Reply with Quote
I agree, messing with overiding the mean is not something I want to do. Another thought is there a way using the base 2DChart parent to easily draw a horizontal (constant) line on the chart at a specific value?
Go to Top of Page

quinncurtis

1586 Posts

Posted - 24 Nov 2015 :  14:39:39  Show Profile  Reply with Quote
No, you can't just draw lines on the chart using the Charting Tools methods. It has to be integrated in with all of the SPC stuff or it will not update properly when the spc chart is redrawn due to scrolling and other events which modify the screen. If you want us to create something very specific for you, we can do that under contract.

I'm still not certain what you want though. What do you expect the control rules to be evaluated against? Is it the explicit target that you set, or the calculated mean based on the current population? If you want it to be the explicit target value that you set, then you must use the ProcessMeanOverride.

When you use the ProcessMeanOverride, the calculated UCL and LCL control limits will use the overridden ProcessMean value in the control limit calculations, not the current population mean.
Go to Top of Page

quinncurtis

1586 Posts

Posted - 24 Nov 2015 :  15:01:19  Show Profile  Reply with Quote
If all you want to do is add an externally set target value to the chart, you can just add it as another spec limit, and disable the alarm processing.

Dim pobd As SPCControlPlotObjectData = Me.PrimaryChart.AddSpecLimit(SPCChartObjects.SPC_UPPER_SPEC_LIMIT, 33.1, "T", New ChartAttribute(Color.Orange, 3.0))
pobd.ControlLimitRecord.AlarmEnable = False
Go to Top of Page

toddpie42

USA
7 Posts

Posted - 24 Nov 2015 :  15:07:41  Show Profile  Reply with Quote
The mean and target are two different things. For example I have a process were spec limits are 0 to 100. My target value is 50. A current run generates data that varies between 20 and 30. I use the chart to plot all that data and calculate control limits and a mean. Just for the example lets say those control limits calculated out at 15 and 35 with a mean of 25. The process is in control, and within my spec limits, but it's off target and that's important to us.

Currently with your current version have a nice plot that shows 5 lines: at 0 (spec), 20 (lcl), 25(mean), 30 (ucl), and 100 (spec). But the problem is I can't get one more line to show the desired target value (50). This target of 50 should have NO impact on any calculations. It's just a reference line and it's not the mean.

It's not a big deal, the user needs to assume the target is half way between the two spec lines (which isn't always true) and eyeball it. So it's not worth paying for a solution. I was hoping that the chart would be able to show this key piece of data. Thanks for your help.
Go to Top of Page

quinncurtis

1586 Posts

Posted - 24 Nov 2015 :  15:15:56  Show Profile  Reply with Quote
See my previous post. Add another spec limit and use it as a the target line.
Go to Top of Page

toddpie42

USA
7 Posts

Posted - 24 Nov 2015 :  15:20:33  Show Profile  Reply with Quote
That's PERFECT! Works great. Thanks again.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07