16 KiB
SPC Attribute Charts
1. Function Overview
SPC Attribute Charts belong to the quality management module of the MES system. They are used to perform statistical process control analysis on discrete quality data (such as number of defective products, number of defects) in production processes. Unlike variable charts, attribute charts focus on countable quality characteristics such as whether a product is qualified or the number of defects. By generating SPC control charts including DPMO, P Chart, NP Chart, C Chart, and U Chart, they help quality managers monitor trends in non-conforming product rates and defect rates during production processes and detect quality abnormalities in a timely manner.
Core Functions:
- Query quality data by process unit, SPC item, time range, and batch number
- Automatically extract defect types from process data and perform subgroup grouping statistics
- Generate five types of attribute SPC control charts: DPMO, PChart, NPChart, CChart, UChart
- Support interactive functions such as automatic control limit calculation, abnormal point highlighting, and chart scrolling
2. Term Explanation
| Term | Definition | Description |
|---|---|---|
| SPC Attribute Charts | SPC Attribute Charts | Statistical process control reports for countable quality characteristics (e.g., number of defective products, number of defects) |
| DPMO | Defects Per Million Opportunities | Measures the number of defects occurring in every million error opportunities, a comprehensive indicator for evaluating process quality level |
| PChart | P Chart, Proportion Nonconforming Control Chart | Monitors the proportion of nonconforming items in each subgroup as a percentage of total inspected quantity, subgroup sizes can vary |
| NPChart | NP Chart, Number Nonconforming Control Chart | Monitors the absolute number of nonconforming items in each subgroup, requires equal subgroup sizes |
| CChart | C Chart, Number of Defects Control Chart | Monitors the total number of defects in each subgroup, suitable for scenarios with constant defect opportunities |
| UChart | U Chart, Defects per Unit Control Chart | Monitors the average number of defects per unit product, suitable for scenarios with non-constant defect opportunities |
| Subgroup | Subgroup | A group of sample data collected under similar time conditions in SPC analysis |
| Defect Types | Defect Types | Classification of different defects occurring in the process, such as scratches, deformation, bubbles, etc., each corresponding to a specific NG code |
| Process Unit | Working Subclass | Standardized operation unit in production process, the minimum granularity for SPC monitoring |
| SPC Render Configuration | SPC Render Configuration | Configuration items defining data sources, subgroup sampling parameters, and control limits for SPC reports |
Comparison of Five Attribute Control Charts:
| Control Chart | Data Type | Application Scenario | Subgroup Size Requirement |
|---|---|---|---|
| DPMO | Defect count/Opportunity count | Measure overall quality level, can be used for quality comparison between different products/processes | Requires defined error opportunities |
| PChart | Nonconforming rate (decimal/percentage) | Monitor nonconforming product proportion in production process | Subgroup sizes can vary |
| NPChart | Number of nonconforming items (integer) | Monitor absolute number of nonconforming items in each subgroup | Subgroup sizes must be equal |
| CChart | Number of defects (integer) | Monitor total defects in fixed area | Defect opportunities must be constant |
| UChart | Defects per unit (decimal) | Monitor average defects per unit product | Subgroup sizes can vary |
3. SPC Attribute Charts Interaction Flow
3.1 General Query Condition Description
All five attribute control charts share the same query condition interface. After users filter data using the following conditions, the system automatically generates charts according to the corresponding control chart type.
Operation Path: Go to [Quality Management] → [SPC Statistical Process Control] → [SPC Attribute Charts], select the corresponding control chart type.
Query Condition Field Description:
| Field | Description | Required |
|---|---|---|
| Process Unit | Select the production process unit to view, dropdown list comes from all processes configured in the system | Yes |
| Item | Select the specific SPC monitoring item (data node), options are filtered based on process unit | Yes |
| Time Range | Start and end time for querying data, default is the previous 24 hours from current time | Yes |
| Batch Number | Filter data by production batch, query all batches if not filled | No |
Function Screenshot:
Operation Steps:
- Go to [Quality Management] → [SPC Statistical Process Control] → [SPC Attribute Charts], select the desired control chart type (DPMO / PChart / NPChart / CChart / UChart) in the left navigation
- Select the process to monitor in the [Process Unit] dropdown
- Select the SPC configuration item in the [Item] dropdown (item list will be automatically filtered based on selected process)
- Set the query start and end time in the [Time Range] selector
- (Optional) Enter batch number in the [Batch Number] input box for precise filtering
- Click [Query] button, the system will automatically retrieve data and generate the corresponding control chart
[Note] Click [Reset] button to clear all query conditions and restore default state.
3.2 Data Query and Chart Generation
Based on the query conditions selected by the user, the system extracts SCADA real-time data for the corresponding process from the MES data collection database, groups the data into subgroups by hour granularity, counts the occurrence of each defect type within each subgroup, then automatically calculates control limits and draws the control chart.
Data Query Flow Description:
sequenceDiagram
participant User as User
participant MESFrontend as MES Frontend
participant EdgeManager as EdgeManager Service
participant Database as SCADA Database
User->>MESFrontend: 1. Select process unit, item, time range, batch
User->>MESFrontend: 2. Click [Query]
MESFrontend->>EdgeManager: 3. Send query request (including process code, item code, time range, etc.)
EdgeManager->>Database: 4. Query SCADA real-time data table
Database-->>EdgeManager: 5. Return raw data (collected value + collection time)
EdgeManager->>EdgeManager: 6. Group by hour and assign subgroup IDs
EdgeManager->>EdgeManager: 7. Count defect types and occurrences for each subgroup
EdgeManager-->>MESFrontend: 8. Return subgroup statistical data
MESFrontend->>MESFrontend: 9. Render corresponding type of SPC control chart
MESFrontend-->>User: 10. Display control chart and statistical information
Flow Description:
| Step | Actor | Action | Description |
|---|---|---|---|
| 1-2 | User | Set query conditions and submit | Select process unit, item, time range, and batch |
| 3 | MES Frontend | Send query request | Send query via EdgeManager service interface, query parameters include: action (fixed as get_node_subgroup_sampling_type), process code, item code, sampling time range, batch number, etc. |
| 4 | EdgeManager | Query database | Dynamically assemble data table name (format: hf_mes_scada_data_capture_node_data_{process_code}_{node_code}), query raw collected data by time range |
| 5 | Database | Return raw data | Return collected values and corresponding collection times |
| 6 | EdgeManager | Subgroup grouping | Sort and number all raw data by hour (HOUR) using ROW_NUMBER, assign sample serial numbers to each subgroup |
| 7 | EdgeManager | Defect type statistics | Count occurrence of each defect type (NG code) in each subgroup, generate defect_types statistics |
| 8 | EdgeManager | Return statistical data | Return structured data including subgroup number, sampling time, and defect type statistics |
| 9 | MES Frontend | Render control chart | Select corresponding rendering method based on control chart type (DPMO/PChart/NPChart/CChart/UChart) |
| 10 | User | View control chart | Display complete control chart including data points, control limits, abnormal highlights, etc. |
3.3 DPMO (Defects Per Million Opportunities)
3.3.1 DPMO Description
DPMO (Defects Per Million Opportunities) is a comprehensive indicator for measuring process quality level, representing the number of defects actually occurring in every million error opportunities. A lower DPMO value indicates a higher process quality level. The DPMO control chart helps quality managers determine whether the process is in a stable and controlled state by monitoring changes in DPMO values across subgroups.
Application Scenarios:
- Need to measure and compare quality levels between different products and processes
- Need to benchmark quality indicators against Six Sigma levels (e.g., 3.4 DPMO = Six Sigma level)
- Scenarios with non-constant defect opportunities
3.4 PChart (Proportion Nonconforming Control Chart)
3.4.1 PChart Description
PChart (P Control Chart, Proportion Nonconforming Control Chart) is used to monitor the proportion of nonconforming items in each subgroup as a percentage of total inspected quantity. PChart focuses on the percentage of nonconforming items in the sample, subgroup sizes can vary, and control limits adjust with subgroup sizes, forming stepped control boundaries.
Application Scenarios:
- Variable subgroup sizes (e.g., different numbers of products inspected each day)
- Need to monitor trends in nonconforming product rates during production
- Each product is only judged as conforming or nonconforming (binary classification)
3.5 NPChart (Number Nonconforming Control Chart)
3.5.1 NPChart Description
NPChart (NP Control Chart, Number Nonconforming Control Chart) is used to monitor the absolute number of nonconforming items in each subgroup. Unlike PChart, NPChart displays the actual count of nonconforming items rather than proportions. NPChart requires equal sample sizes for each subgroup; otherwise, control limits will no longer be valid.
Application Scenarios:
- Fixed subgroup sizes (e.g., inspecting 100 products per batch)
- Need to visually display trends in nonconforming item counts
- Easy for on-site personnel to understand and use (directly read nonconforming counts)
3.6 CChart (Number of Defects Control Chart)
3.6.1 CChart Description
CChart (C Control Chart, Number of Defects Control Chart) is used to monitor the total number of defects in each subgroup. CChart focuses on scenarios where multiple defects may exist on one product (e.g., multiple scratches on a panel). Therefore, CChart counts total defects rather than nonconforming item counts. CChart requires constant defect opportunities (i.e., inspected areas/ranges must remain consistent).
Application Scenarios:
- Inspecting fixed areas or fixed quantities of products (e.g., each glass sheet, each sheet of material)
- A product may have multiple different types of defects
- Need to monitor trends in overall defect counts
[Precautions]
- Defect opportunities must remain constant (e.g., inspecting the same area or same quantity of products each time)
- CChart focuses on defect counts rather than nonconforming item counts; one product may have multiple defects
3.7 UChart (Defects per Unit Control Chart)
3.7.1 UChart Description
UChart (U Control Chart, Defects per Unit Control Chart) is used to monitor the average number of defects per unit product. Unlike CChart, UChart is suitable for scenarios with non-constant defect opportunities (e.g., different lengths of fabric inspected each day, different areas). It normalizes defect counts by unit size, calculating average defects per unit, with control limits adjusting as subgroup sizes change.
Application Scenarios:
- Variable inspection areas or product quantities (e.g., different lengths of fabric inspected daily)
- Need to compare defect levels between inspection batches of different sizes
- A product may have multiple defects, and quantities inspected may vary
4. Control Chart Interactive Function Description
All five attribute control charts provide the following common interactive functions:
| Function | Description |
|---|---|
| Automatic Control Limit Calculation | System automatically calculates Upper Control Limit (UCL) and Lower Control Limit (LCL) based on collected subgroup data |
| Abnormal Point Highlighting | Data points exceeding control limits are highlighted for quick anomaly identification |
| Scroll Bar | When there are many subgroups, supports horizontal scrolling to view complete control chart data |
| Calculated Value Display | Display statistical calculation values for each subgroup (e.g., nonconforming rate, defect count) |
| Alarm Status Display | Mark alarm status information for each subgroup on the chart |
| Chart Control Switch | Support enabling/disabling various auxiliary display options for the control chart |
[Note] Control charts are generated based on industry-standard QC SPC control chart algorithm libraries, with control limit calculations following standard statistical process control formulas to ensure accuracy and authority of analysis results.
5. Precautions
-
SPC Render Condition Prerequisite Configuration: Before using SPC attribute charts, you need to complete SPC configuration for corresponding process units and data nodes in [SPC Render Condition Configuration]. Otherwise, the corresponding monitoring items cannot be selected in the "Item" dropdown.
-
Data Source Description: Data for SPC attribute charts comes from SCADA real-time collection data in the MES system. Data collection frequency and subgroup intervals are determined by parameters in SPC render condition configuration. Data is stored in the system's data collection tables, and the frontend obtains processed subgroup statistical data through the EdgeManager service interface.
-
Subgroup Size Requirements: NPChart requires equal sample sizes for each subgroup. If actual data has inconsistent subgroup sizes, control limit calculations may be inaccurate. It is recommended to uniformly set subgroup sampling parameters in SPC render condition configuration.
-
Defect Type Statistics: Defect types (NG codes) come from defect classification information recorded by equipment or manually during production. The system groups and counts using NG codes as unique identifiers for defect types. Please ensure standardization of the NG coding system.
-
Time Granularity: The system groups data into subgroups by hour granularity. The subgroup sampling interval configuration determines the time span between adjacent subgroups. If configured as 2 hours, collected data for every 2 hours will be merged into one subgroup.






