spc cChart

Textile Defect Monitoring with Western Electric Rules

Scénario de test & Cas d'usage

Business Context

A textile manufacturer needs to monitor the number of weaving defects per standard roll of fabric. The Quality Assurance team wants to automatically detect not just outliers (points beyond control limits), but also specific non-random patterns indicating machine drift, such as 9 consecutive points on one side of the average (Test 2).
About the Set : spc

Statistical Process Control (control charts).

Discover all actions of spc
Data Preparation

Creating a dataset simulating 20 days of fabric roll inspections. Days 10-19 show a slight systematic increase in defects to trigger Test 2.

Copied!
1 
2DATA mycas.FabricRolls;
3INPUT Day date9. Defects;
4FORMAT Day date9.;
5DATALINES;
601JAN2024 5 02JAN2024 4 03JAN2024 6 04JAN2024 5 05JAN2024 20 06JAN2024 5 07JAN2024 4 08JAN2024 5 09JAN2024 6 10JAN2024 8 11JAN2024 8 12JAN2024 9 13JAN2024 8 14JAN2024 9 15JAN2024 8 16JAN2024 8 17JAN2024 9 18JAN2024 8 19JAN2024 9 20JAN2024 4 ;
7 
8RUN;
9 

Étapes de réalisation

1
Load data and verify structure (implicit in data prep).
Copied!
1/* Data loaded in prep step */
2
Execute cChart with Test 1 (Outliers) and Test 2 (Shift in process average) enabled.
Copied!
1 
2PROC CAS;
3spc.cChart / TABLE={name='FabricRolls'} processValue='Defects' subgroupValue='Day' primaryTests={test1=true, test2=true};
4 
5RUN;
6 

Expected Result


The action should generate a c-chart. The point on 05JAN2024 (20 defects) should be flagged by Test 1 as an outlier. The sequence from 10JAN2024 to 19JAN2024 should trigger Test 2 (9 consecutive points above the center line), indicating a shift in the manufacturing process.