Towards quality analysis of MES through CMM data interoperation

The implementation of MBD/MBE (Model-based Design and Engineering) in the product design and manufacturing can effectively support multi-step data interoperation among “Design-Manufacture-Measurement.” Due to the limited data interoperation functions provided by the current CMM software (Coordinate Measurement Machine), most studies of MBD/MBE focused on designing the upstream. In contrast, the downstream (the underlying measurement data utilization) research is less. MES has an essential function in managing the manufacturing quality that analyses the condition and its development trend by collecting the manufacturing process quality data. Insufficient use of the underlying measurement data will lead to limited MES functions, especially for the capability of decision-making in intelligent manufacturing systems. The paper presents a measurement data interoperation method based on the interoperation layer method to support the quality analysis in MES (Manufacturing Execution System), discusses the relevant critical logic and data processing flow of the layer. It is verified that it can provide more comprehensive measurement data for quality management in the workshop.


Introduction
Quality management is a crucial activity in discrete manufacturing. One of MES's primary functions in the workshop is to provide related management functions for quality management. Quality management must not only collect the processing quality data of parts but also carry out relevant quality data analysis to find the causes of quality problems and channels and improvement methods to improve product quality in the product design, product manufacturing, and maintenance of production machine tools, etc. The analysed result can be used in different production stages to improve and enhance the quality of these activities and ultimately achieve continuous product quality improvement.
CMM (Coordinate Measurement Machine) is one of the main methods of quality inspection widely used in the manufacturing workshop. Enterprises use CMM inspection results to provide users with reliable parts manufacturing quality reports. Data analysis can provide necessary data for equipment maintenance management, manufacturing process route improvement. The reasonable use of CMM to ensure the manufacturing system quality can help to continue producing high-quality parts. As a result, CMM plays a vital role in product quality management, and it has become one of the hot issues in manufacturing technology [1]. Recently, CMM technology and measurement software technology has developed rapidly, making the parts inspection process more automated. Because the technology provides the more possibility of using the inspection data, the manufacturing quality management module of MES helps improve the production process. It provides more great conditions for it [2].

Study Motivations
There is usually a long delay between manufacturing, CMM inspection, and part process evaluation. When the production system has problems meeting the design or process parameters requirements, the quality assurance team has to identify and correct it as soon as possible through quality management mechanisms. Researching the CMM data interoperation mechanism is conducive to solving three critical problems that are ubiquitous in intelligent manufacturing systems and urgently need to address.
(1) For the maintenance of crucial manufacturing machine tools, it's vital to establish the prediction models of machine tool accuracy and cutting tool parameter by applying big data and artificial intelligence technology via linking CMM measurement data and the cutting tools' use data through MES. It can help carry out predictive maintenance, avoid the economic losses caused by improper maintenance schedule or the critical equipment shutting down, and reduce the maintenance cost. (2) Correlate the CMM measurement data through the MES, associate the processing data of the geometric features of the part with the process model, analyze the correlation between the process parameters and the actual part processing quality data, to improve the processing process and process parameters. (3) Through the MES correlation CMM measurement data, the geometric feature processing data is associated with the design model to realize the design-manufacturing data model associated maintenance, integrate processing cost and other factors, and improve the design model.
The format and content of the measurement report provided by the CMM software are fixed (i.e., pre-defined). If the data and evaluation items required for subsequent quality management cannot be obtained directly from the report, it should find the other methods, such as manual calculation. Therefore, to support the above three key issues, it is necessary to establish a CMM data interoperation mechanism. When the measurement software provides the APIs, the original measurement data can be accessed during the measuring by calling them, then calculates the required dimensional tolerances and geometric tolerances of the specific features with the data via calling the geometric fitting algorithms module. It is only carried out when the data analysis for quality management is a need that can't be gotten directly from the measurement report, and it does not aim to replace the CMM measurement reports but just a supplement. The whole process is automatically done without any interference or man-machine interaction, and thus it can avoid the human error. The other way to access the original measurement data is to use the DMIS program produced by CMM software. The method of processing the obtained information is the same as above mentioned.

State-of-the-art
To solve the problem of data interoperation in all aspects of design, process, manufacturing, and inspection, ISO proposed STEP AP 242 (ISO 10303-242) "3D Engineering Based on Management Model" specification, which guides users how to capture semantic product manufacturing through 3D models Information (PMI) helps model information to be used by downstream manufacturing links to support smart manufacturing. In a multi-disciplinary collaborative work environment, by MBD/MBE modelling methods, the models begin to replace traditional engineering drawings and documents. Many scholars have carried out relevant research for this.
Venkiteswaran [3] et al. developed a semantic converter from AP 203 model to AP 242 model by establishing an additional internal constraint tolerance diagram (CTF) file method in the design model, which supports downstream applications to automatically obtain the semantic GD&T in the part model, such as Computer-Aided Process Design (CAPP), Computer-Aided Inspection (CAI), Computer-Aided Tolerance System (CATS) and CMM. Trainer believes that although the use of this STEP-AP242 model with embedded PMI has the capability of one-way data exchange between CAD-CAM and CAD-CMM, Trainer [4] and Hedberg [5] believe that the research on the interaction between CAD and CMM in the interoperation process is still not enough, that is, the feedback from CAM and CMM to CAD model research is not enough.
At present, the application of MBD is mainly at the upstream end of the design, and the use in the downstream manufacturing and inspection process has not yet been universally applied, and it still needs more effort. To this end, Yang [6] proposed and developed a manufacturing agent module for 3 process engineers to connect the design phase with the manufacturing phase in a real threedimensional environment, discussed the system framework and core functional modules, and developed a prototype system.
In terms of CMM-CAD data integration, Martins [7] uses the data interface to import CMM data into CAD, integrates the measurement point cloud with the three-dimensional CAD model, and develops software tools used for inspection, and takes the bifurcated metal plate as an example. Michaloski [8] explored a web real-time quality report method based on MTConnect, taking CMM detection data interoperation as an example, and setting up an MT-Connect-XML web real-time quality result case to illustrate the application.
In summary, there are two primary deficiencies in the current data interoperation related to quality inspection. (1) Most studies mainly focus on MBD/MBE modeling and support the information transmission in passive direction from the upstream design end (CAD model PMI) to the "Process-Manufacturing-Inspection" downstream. The downstream quality inspection (including CMM) carries out the inspection process planning based on the model PMI, and there is less attention to the interoperation between the quality inspection data and the quality management, process improvement, and design model optimization. (2) The current CMM testing data interoperation research is mainly carried out around the inspection report created by the CMM system. Due to the limitation of the content and format of the inspection report, if it needs to analyze the more information than the CMM report, it still needs the original measurement data. Unfortunately, there is not much research report in this area.

Requirement Analyses
We use UML's USER-CASE diagram to describe the requirements of the CMM data interoperation layer. In the CMM interoperation scenario, the roles involved are CMM operator, CMM data user, MES system user, CAD/CAPP designer, and workshop equipment, a maintenance engineer. The activities related to each role are described below.  CMM operator initiates the activities, which involves measurement moving path planning, the implementation of online/offline inspection, error evaluation for the inspected parts based CAD model. When performing an online/offline check, the CMM software records the DMIS automatically that stores the commands and original data in the measurement process according to the DMIS specifications to form a DMIS file. It is designed for professional users to programming the expected inspection scheme. In contrast，the result is output to the report by the CMM software for the general users when the machining error evaluation is done based on the CAD model, which is also the content of most current research on CMM data interoperation. CMM data users call the APIs of CMM-DIL (Data Interoperation Layer) interface to generate the additional geometric elements from the original measurement data (e.g., the axis of a cylinder, the center of a circle, or the vector of the plane from a circle element), which don't include in the CMM output inspection report but needed for quality management, CAD/CAPP improvement, etc. These data can be output to the DFM (Design for Manufacturing) system as essential information to improve the related CAD model; CAPP can use the data to verify if it needs to improve the planned operation steps; the data also can be used by the equipment management team to analyze the operating status of critical equipment in a workshop.
Also, the MES production quality manager adopts statistical analysis methods to report the quality problems found to the relevant departments. For example, the product designers and manufacturing process planners improve the CAD/CAPP models via the personalized geometric evaluation result supported by the CMM-DIL. The workshop equipment maintenance engineer can formulate a reasonable equipment maintenance plan or improve the existing maintenance plan based on the quality report of the quality manager of the workshop via MES.

Key Activities Analyse
To the problem of full use of CMM measurement information, the key is to design a reasonable CMM-DIL module to obtain the CMM original measurement commands and data reliably in real-time. In this manner, the CMM system's information can be organized as a service for the users who require by calling the personalized data definition tool provided by CMM-DIL. The following is an analysis of the critical activities of the CMM raw data acquisition process.
Activity 1: For a specific element required to inspect, the CMM operator runs an online/offline measurement task through human-computer interaction. Online mode is for a real inspection, and offline is for DMIS programming. If it did automatically, the DMIS program (complete or partial) run could be managed by the CMM software. The measurement commands and data are sent to MDE (Measurement Device Equipment) one by one according to the I++ protocol, and the MDE will guide the measurement machine to perform the inspections. Activity 2: After receiving the measurement command, MDE drives the probe, touches the surface of the part, and triggers the measurement signal. The motion controller latches the measurement point data, and then reliably feeds it back to the CMM software according to the I++ protocol. The CMM measurement software will save the current measurement point data.
Activity 3: After the CMM GUI receives the measurement points feedback from the motion controller, the number of measurement points on the measurement dialog interface starts to count in reverse order (n=n-1). If the number of measurement points required at this time is zero, the measurement software will automatically jump to activity five and complete the current measurement; otherwise, it will wait for the next measurement point of the MDE. Activity 4: CMM operators can increase or decrease the current number of measurement points in the measurement dialog box through human-computer interaction.
Activity 5: After the measurement software obtains the current measurement point, the reverse count is zero. The measurement software will automatically finish the current measurement task, perform geometric fitting based on the acquired measurement point, and perform error calculations based on the theoretical value and the actual measurement value. Activity 6: After the geometric element is fitted in measurement software, the original measurement data (including measurement commands and actual measurement point data) are transferred to the DDE memory through the APIs of the CMM software.
Activity 7: CMM-DIL can access the DMIS program of the measurement software through the DMIS interface and obtain the measurement system's current measurement object and its original measurement data by analyzing DMIS. Activity 8: Use the APIs to access the DDE memory, obtain the current measurement object and original data, and save it in the personalized format.
Activity 9: Customize the required measurement data through the GUI, and then store the current measurement raw data in the DDE memory obtained by CMM-DIL in a predefined format.
Activity 10: According to the items subscribed in Activity 9, the geometric element evaluation result by the CMM-DIL is automatically obtained.
The following study of the CMM-DIL module logic design is given below through the above discussion and analysis of the raw measurement data acquisition activity.

The CMM-DIL Module Logic Design
At the end of the element measurement, the measurement software writes the measure raw data into the DDE memory according to a particular standard format, and then the CMM-DIL monitors the changes in the DDE memory data and calls API to access the measure raw data in the DDE memory. Therefore, the process for CMM-DIL to access these data can be summarized as follows.
First of all, the CMM-DIL monitors the data changes in the DDE memory through the CMM software's AIP. When the CMM software finishes a measurement task and writes the original data into the DDE memory, the CMM-DIL can detect this change; then, the CMM-DIL creates a temporary measurement original object according to the read measurement command and later measures the original one by one. After reading a complete measure task and its unique data, the CMM-DIL will end the current data reading activity (Refer to Fig.3 When detects that the DDE memory data has changed via the CMM-DIL, it calls the API provided by the CMM software modules to sequentially read the original measurement data in the memory for the above-mentioned typical measurement elements. For example, we can realize it by calling the RealTimeDataCall.dll library offered by DIRECT-DMIS, or PC-PCDLRN.dll provided by PC-DMIS, which are two kinds of CMM software; and then send it to the users who need the data by the predefined geometric evaluation format.   Figure 3 Flow of CMM-DIL access the measurement raw data via DDE memory

Conclusion
The CMM measurement report (format and content) provided by the CMM software is usually fixed. If the required data used for quality analysis cannot be obtained directly from the report, it should be solved in other ways, e.g., manual calculation, but it may introduce calculation errors. This research aims at the quality management of critical business activities in the discrete manufacturing industry. By collecting real-time measurement raw data from the CMM software, it provides more abundant inspection data for quality analysis. This research aims not to replace the measurement results/reports of the CMM software, but to provide a lower-level and more comprehensive real-time data for quality analysis in MES to support better quality analysis and improvement based on the measurement data analysis.