A Case Study- Monitoring and Inspection Based on IoT for STEP-NC Data Model

Cyber-Physical Machine Tools (CPMT) is currently recognized as a new generation of machine tools that align with Industry 4.0 needs as a smart, well connected, advanced accessibility, more adaptive and autonomous solution. It can be achieved through standardized design method and communication protocols. This article presents a case study on monitoring and inspection based on Internet of Things (IoT) for STEP-NC data model toward a CPMT. More specically, the monitoring approach utilizing an IoT based monitoring architecture for machining process monitoring, while the inspection approach using a coordinate measuring machine for machined part inspection. The monitoring and inspection approaches can achieve high accuracy of machining process condition detection and enable measurement of machined parts to full CPMT needs and I4.0. The case study validated that the developed monitoring approach performed well and was highly sensitive to any changes during the machining process, specically on the tool condition. As per the inspection approach, the reliability of the machined model was 99.97%. Based on the results of both the approaches, it is conrmed that both tasks can be designed and support digital factory and other manufacturing process stages in the future such as preventive maintenance, inspecting, sizing, assembling, and others.


Introduction
Machine tools play an essential role in responding to the Cyber-Physical Production System requirements to advance the CNC machine tool, making it well connected, accessible, adaptive, and autonomous toward the Cyber-Physical Machine Tool. In CPMT, the information and communication technology such as cyber-Physical Systems (CPS), Internet of Things (IoT) and cloud technology is adopted and adapted.
As a possible solution of CPMT, [1] describes CPMT as the integration of machine tool, machining process, computation and network that permit machining process monitoring and control. In contrast, [2] describes CPMT as integrating machine tool with machining process in cyber-space through computation and networking ability to create CPS. With CPMT, machining performance and e ciency can be signi cantly improved. Development of CPMT requires integrating machine tool vertically and horizontally [3].
Vertical integration is term as end-to-end digital integration that integrates the entire engineering process, including design, process planning, manufacturing, assembly, etc. STEP-NC called Standard for the Exchange of Product model data compliant with Numerical Control guarantees to resolve G-code drawbacks and enable integration from design to manufacturing without data losses as it is compliant with STEP [4]. Some previous study that had been implemented for open CNC system and open CNC control respectively are [5][6][7][8][9][10][11][12].
Horizontal integration is the integration of machine tools with other manufacturing facilities and resources that include robots, conveyor, measurement devices, and others to realize a collaborative production system [2]. The critical requirement of horizontal integration of machine tool with other manufacturing facilities and resources is divided into three: rst, acquiring accurate and reliable information, secondly, data integration and communication capability, third, advanced human-machine interface. All this capability would be realized through a monitoring system which supports Service-Oriented Architecture.
Coordinate Measuring Machines (CMM) are commonly used as automated inspection machines to measure manufactured products' validity. It is cost-effective to provide precise, more accurate dimensional inspection systems to meet advanced practical product requirements in modern manufacturing. CMM inspection has several bene ts over traditional inspection methods, including versatility, performance, high reliability and accuracy, higher-level of automation and incorporation capabilities. Also, to use CMMs safely and reliably in a computer-integrated manufacturing operation, they must be used in coordination through CAD software. CMM inspection involves CAD inspection planning; it utilizes o ine measuring and simulation, and monitoring and sensing inspection plan execution.

Survey Of Previous Monitoring And Inspection Study
A former researcher has surveyed the recent research that is divided into two parts: machine monitoring and inspection process planning. The discussed details are as follows:

Machine Monitoring
IoT has become the mainstream, and researchers are moving forward to apply wireless sensor network (WSN) to their machine process monitoring. Rizal et al. conducted a series of work in 2014 [13] and 2018 [14] by utilizing a wireless telemetry system and embedded vibration and temperature sensor for tool condition monitoring. Another research proposed by Zedong and Azman [15], presented a CNC machine monitoring system towards I4.0 implementation. The monitoring system employed a WSN to monitor temperature, vibration, humidity, and current performance during the machining process. Similar research conducted by Deng et al. [16] introduced an open CNC architecture to CPS through WSN and low power consumption platforms to enable monitoring and control machining processes. Friedrich Bleicher et al.
Bleicher et al., [17] researched machining process monitoring and control by inventing an embedded WSN and monitoring and control system. Based on the author's knowledge, even though the previous proposed research presented CPS machine tool approaches such as real-time data monitoring and control systems, WSN and others speci c motivation, the research was done under a G-code environment. Due to G-code obstruction, real-time monitoring information becomes more complicated for the next level of operation such as data integration and communication, editing on the shop oor, decision making, control and optimization.
In short, most of the machine process monitoring research presented earlier based on WSN was developed under the G-code environment. Instead, little research was carried out under the Standard for Product Model Data Exchange (STEP-NC) environment which includes Hassan and Kadir [18], Zhong et al. [19]. Hassan and Kadir [18] and Zhong et al. [19] proposed innovations utilizing RFID technology and wired based sensors. However, their approaches lack horizontal integration between machine and connectivity with cyberspace. Furthermore, based on the survey [20], a little study has focused on machining process monitoring solutions based on IoT approach and SOA. IoT and SOA based approaches provide access to the Internet, enable connectivity between machine and devices, the cloud system, and the integration between machine and device which highly support horizontal integration.

Inspection Process Planning
The purpose of the Computer-Assisted Inspection Planning (CAIP) framework is to determine the best possible sequences of inspection steps and the comprehensive inspection technique for each feature. Some surveys intend to discuss the planning process inspection [21][22][23][24], while some conducted with o ine inspection used Coordinate Measuring Machine (CMM) [25][26][27][28][29] and other research discussed online inspection during process. [30][31][32][33].
Based on the previous monitoring and inspection study survey, therefore, to eliminate those issues, this case study launched a new technique of incorporating the monitoring based on IoT and SOA while inspection process planning based on CMM. The monitoring approaches include the integration of Raspberry Pi 3 Model B+, WSN, and NodeMCU for milling process condition monitoring. Raspberry Pi 3 Model B+, a minicomputer function as MQTT server/broker to receive and enable data transfer wirelessly from client to server. It was utilized to overcome the limitation of current Internet-based protocol.
NodeMCU equipped with Wi-Fi module functions as a microcontroller to record all the sensor data and transfer wirelessly to the MQTT server. While Quality decisions have created the inspection approach due to limitations, these approaches can be made depending on product tolerance requirements. Towards this purpose, the CMM system measures the data; the generated feature details will be compared by the Coordinate measuring machine and the (reference data of the model extracted from the CAD system).
The overall structure of this article is organized as follows. First, an introduction, followed by a survey of previous monitoring and inspection study, case study setup, methods, machining process monitoring result, machining part inspection result and conclusion.

Case Study Setup
To demonstrate the effectiveness and performance of monitoring and inspection approaches, a milling process condition monitoring and inspection of machined part were implemented. The machining monitoring and inspection component speci cation and setup are presented in Table 1 and Fig. 1, respectively.  The machining was done by utilizing two types of cutting tools: a new cutting tool and a worn cutting tool. Seven channels of signals that are vibration in X, Y and Z direction, thermocouple (contact sensor) and infrared (non-contact sensor) and spindle electric current are utilized to enable machining process condition monitoring. The machining was implemented based on the cutting parameter, as shown in Table 2.

Methods
In this article, the implementation method is divided into two methods: monitoring implementation and method of inspection implementation. Both methods are explained as follows:

Monitoring methodology
The monitoring information is successfully generated through the integration of hardware and software. The monitoring hardware is deployed on a CNC machine, as illustrated in Fig. 1. The monitoring hardware includes four types of sensor: thermocouple, infrared, vibration, and electric current sensor to sense the cutting tool's temperature, the vibration of the cutting tool and workpiece interaction, and electric current utilized by spindle motor during machining respectively. NodeMCU as a wireless module enables sensed information to transfer to the cloud through Raspberry Pi model 3 b + as MQTT broker to MQTT server. The information then subscribed by IoT platform and CNC machine controller enables monitoring information visualization, alarm signal and control activity on the machining parameter as feedback from the alarm signal. Figure 2 illustrated information transfer from the CNC machine back to the CNC machine based on MQTT. 1. Publisher-Publisher is from where the information is generated and sent to the MQTT broker. In this study, each sensor information is the information generator, and NodeMCU is a wireless module and publisher to enable information to be sent to an MQTT broker. 2. Broker-Broker is like a server that collects the information from all publishers, saves the information, and distributes the subscribers' information. In this study, the Broker is Raspberry Pi, and the subscriber is IoT platform and CNC controller based on STEP-NC. 3. Subscriber-Subscriber is a section which subscribes sense information coming from the publisher. In this study, the subscriber is an IoT platform and CNC controller based on STEP-NC.
The algorithm design for the complete functionality of the monitoring system is, as shown in Fig. 3. It starts with ISO14649 code interpretation, con rmation of the interpreted code through 3-D simulation and starts machining. During machining, the monitoring system starts to sense the temperature, vibration, and electric current information. The information is transferred to the IoT platform and CNC machine controller in real-time. If there is any undesirable condition happening during machining, an alarm will be signalled. Then nally, a control action could be taken to control any undesirable condition during machining.

Inspection Methodology
The processes of measuring machined parts using o ine in CMM and measuring the dimensions of the surface feature of the case study is described, as in Fig. 4 and Fig. 5. Requirements are ful lled by the attributes of the manufacturing operation and the features are created by machining in the milling process. The machine tool involves techniques, cutting tools and xtures that established the measurement and veri cation requirements that need to be tested o ine. The manufacturing characteristics include geometric and dimensional tolerances and speci cations for surface properties and provide a basis for calibration and inspection operations. Meanwhile, if the requirements meet the geometric and dimensional tolerances and speci cations for surface features, in that case, this will ensure inspection and monitoring those speci c performance requirements on each model are satis ed. Therefore, the procedural breakdown eligibility requirements feedback loop on the system will be closed. The Monitoring system based on IoT for STEP-NC was developed. In this system, CNC milling machine, every device, IoT platform and monitoring interface are connected through the same IP address, as shown in Fig. 6. The CNC controller's monitoring interface based on STEP-NC, as in Fig. 7, shows the real-time status of temperature for thermocouple and infrared sensor based on the machining process. The real-time information is displayed and continuously updated. Before machining starts, the user needs to select the material of the cutting tool. From the material type, the safe, warning and danger limit are selected.
Button safe is coloured with green, warning with yellow and danger with red. An alarm will be signalled whenever an undesirable condition happens. The control action button is selected to enable control of the machining parameter. There is also an exit and report generation button under the user interface. After the machining process is completed, the interface is closed by selecting the button, and an automatic report will be generated, as shown in Fig. 8. Figure 8: Temperature monitoring report generation Figure 9 shows another visualization platform for monitoring. This interface could be found directly from the IoT platform. Both interfaces could be accessed online using the same IP address by the machine operator to identify any changes in the machining process in real-time for preventive purposes.   Table 3 is 0.2854 of the case studies based on normality and CMM machine.

Discussion
The case study found that the monitoring system based on IoT for STEP-NC validated and performed well. Real-time information was enabled through a different type of sensor and integrated with the CNC machine controller. IoT based protocols utilized a single IP address to make everything connected to the Internet. The machining information collection was realized based on the implementation of MQTT IoT based application protocol over the different operating system. Based on the monitoring capability testing and result, the monitoring system based on IoT for STEP-NC enables to provide a critical machining process information, increase machining performance, and long tool life utilization. MQTT based protocol has been proven to enable horizontal integration of CNC machine toward CPMT, which is interoperability, connectivity and extendable for control activity. Based on the analysis of the monitoring information generated in real-time during the machining process, it was found that there is a different trend for information generated for the new and worn tool. The worn tool gave a higher reading as compared to a new cutting tool based on temperature, vibration, and electric current reading. Based on the analysis that appears for the case study, the average errors between the normal model with measurement on the CAD system and the measurement based on the CMM is 0.2854.

Conclusion
In Industry 4.0, Cyber-Physical Machine Tools (CPMT) is known as a new generation machine tools with a smart, well connected, advanced accessibility, more adaptive and autonomous facility. The core development of CPMT lies in the vertical and horizontal integration of machine tool, and it is a critical yet challenging task. Due to the lack of previous research, this article proposes a CPMT platform to bridge the research gaps of horizontal integration. This research's main contribution is a case study on the development of monitoring based on IoT architecture to enable interoperable information ow and communication between various machines, monitoring devices and software platforms. Through the case study, it was found that the developed system bridges the gap of interoperability and e ciency of information communication which provide a great outcome for CPMT. With this development, the conventional machine could also be retro tted to be MT4.0.
Furthermore, with this monitoring system, issues to get information were solved, and the future work of this research is to use the big data by implementing Arti cial Intelligent system for decision making. On the other hand, the CMM was conducted; and the measurement of the workpiece features, which have been validated, the model's reliability was 99.97%. However, this study be a foundation for the full utilization of the con guration system. The task can also be designed to support the other manufacturing process stages such as inspecting, assembling, sizing, etc.