
Introduction
In this article today we can see in detail about how to create a simple Statistical Process Control (SPC) Cp and CPk Chart.
An automobile manufacturing Industries Quality Check is a very important part for all manufacturing products. The Quality Check can be done using the Statistical Process Control charts. The SPC charts will be used to analyze the performance of each process. In this article today let's see how to analyze the process using Cp, Cpk, Pp and Ppk.
Cp and Cpk - >Process Capability
Cp: measures how well the data fits within the spec limits (USL and LSL).

Cp=(USL-LSL/6SIGMA) -> USL-LSL/6*RBAR/d2
Cpk=min(USL-XBAR/3Sigma,LSL-XBAR/3Sigma)
Pp and Ppk -> Process Performance

https://elsmar.com/Cp_vs_Cpk.html
-
Sum
-
Mean
-
Range
-
Cp
-
Cpk
-
Pp
-
Ppk
-
Display chart with Sum, Mean and Range values.
-
Cp, Cpk, Pp, Ppk with an alert result text warning with Red for NG and Green for OK result.
-
Mean (XBAR) and Range (RBAR) chart with an Alert image with Red for NG and Green for OK result.
-
Automatic Calculate and display the Upper Control Limit (UCL), Lower Control Limit (LCL) value with both XBAR and RBAR values.
-
Save the chart as an image (note: to save the chart image, double-click the chart or right-click and select save as Image).
-
Real Time data Gathering and display the chart.
-
The user can add Chart Watermark text.
- Create a new Windows project.
- Open your form and then from Toolbox > right-click > choose items > browse to select your user control DLL and add.
- Drag the User Control to your Windows Forms form.
- Call the "Bindgrid" method of the user control and pass the DataTable to the User Control and check the result.
- //Global variable Declaration
- #region Local Vairables
- DataTable dt = new DataTable();
- private static readonly Random random = new Random();
- Double gridMinvalue = 1.2;
- Double gridMaxvalue = 2.4;
- int totalColumntoDisplay = 20;
- Double USLs = 2.27;
- Double LSLs = 1.26;
- Double CpkPpkAcceptanceValue = 1.33;
- #endregion
- //Create Datatable Colums.
- public void loadGridColums()
- {
- dt.Columns.Add("No");
- for (int jval = 1; jval <= totalColumntoDisplay; jval++)
- {
- dt.Columns.Add(jval.ToString());
- }
- }
- public void loadgrid()
- {
- dt.Clear();
- dt.Rows.Clear();
- for (int i = 1; i <= 5; i++)
- {
- DataRow row = dt.NewRow();
- row["NO"] = i.ToString();
- for (int jval = 1; jval <= totalColumntoDisplay; jval++)
- {
- row[jval.ToString()] = RandomNumberBetween(gridMinvalue, gridMaxvalue);
- }
- dt.Rows.Add(row);
- }
- dataGridView1.AutoResizeColumns();
- dataGridView1.DataSource = dt;
- dataGridView1.AutoResizeColumns();
- }
Next in the form load I have passed the USL, LSL and Cpk values and DataTable to “shanuCPCPKChart” User Control to generate XBAR and Range Chart with Cp, Cpk, Pp and Ppk results.
- private void Form1_Load(object sender, EventArgs e)
- {
- loadGridColums();
- loadgrid();
- USLs = Convert.ToDouble(txtusl.Text);
- LSLs = Convert.ToDouble(txtLSL.Text);
- CpkPpkAcceptanceValue = Convert.ToDouble(txtData.Text);
- shanuCPCPKChart.USL = USLs;
- shanuCPCPKChart.LSL = LSLs;
- shanuCPCPKChart.CpkPpKAcceptanceValue = CpkPpkAcceptanceValue;
- shanuCPCPKChart.Bindgrid(dt);
- }
- private void timer1_Tick(object sender, EventArgs e)
- {
- loadgrid();
- USLs = Convert.ToDouble(txtusl.Text);
- LSLs = Convert.ToDouble(txtLSL.Text);
- CpkPpkAcceptanceValue = Convert.ToDouble(txtData.Text);
- shanuCPCPKChart.USL = USLs;
- shanuCPCPKChart.LSL = LSLs;
- shanuCPCPKChart.CpkPpKAcceptanceValue = CpkPpkAcceptanceValue;
- shanuCPCPKChart.Bindgrid(dt);
- }



Pratik PimplePosted May 25, 2020, 11:54 PM
Hi sir, i just want to know about "shanuCPCPKChart.Bindgrid(dt);" in Bindgrid method you set all formulas ?
NitinPosted Apr 17, 2015, 6:37 AM
good one
Gowtham RajamanickamPosted Apr 16, 2015, 2:46 AM
great
Sibeesh VenuPosted Apr 15, 2015, 8:36 AM
Good one.
Udaya kumarPosted Apr 15, 2015, 12:37 AM
Super...
Syed ShanuPosted Apr 14, 2015, 6:35 PM
Thank You Rahul
Syed ShanuPosted Apr 14, 2015, 6:35 PM
Thank You Santhakumar
Rahul Kumar SaxenaPosted Apr 14, 2015, 2:23 PM
Good Show...
Santhakumar MunuswamyPosted Apr 14, 2015, 10:12 AM
Thanks for nice article