A Novel Integration between Service Oriented IoT based Monitoring with Open Architecture of CNC System Monitoring

Smart factories are focusing on bridging the gap between physical to cyber-physical systems through software applications. This article proposed an ecient and sucient data acquisition, storing and processing real-time monitoring information, response, and feedback in milling process monitoring. A methodology to enable integration between service oriented IoT based monitoring with interpreted information for open Architecture CNC system was presented. The proposed system comprises four main layers: the perception layer, communication layer, application layer, and CNC machine. The developed system was validated through two case studies. First, the developed system successfully enabled data ow through the validation, from CNC machine back to CNC machine. Secondly, the reading of temperature, vibration and electric current monitoring is higher for the worn cutting tool than the new cutting tool. Third, the percentage difference between new and worn cutting tools for temperature monitoring is up to 3.38 %, and for vibration monitoring, it is up to 78.93 %. Fourth, the electric current reading is proportional to cutting force as the reading of electric current on cutting insert is higher than reading before cutting tool insert with percentage differences more than 8.33% up to 20%. Based on the ndings, it was summarized that the developed integrated monitoring system is feasible enough based on the performance and highly sensitive to any changes that occurred during the machining process, specically on the cutting tool condition. In the future, this integrated monitoring system could be applied to other Open CNC machine-based plug and play.


Introduction
Machine tool is one of the most critical resources that facilitate smart factories. The CNC system under the machine tool works as a brain for a machine tool. The CNC system enables the machining process to be executed by allowing machine control movement automatically. Machine tool possessed much advancement since it was introduced. Today, it has become a modern and highly sophisticated CNC machine tool [1] [2]. Although many advancements have been made, the commercial system is still closed in nature. Users were not able to make any modi cations without vendor intervention. The CNC system has become exclusive all the time due to the unstandardized hardware and software on the CNC system [3]. With proprietary software, the user is unable to do any modi cation to adapt to new or other features. Furthermore, this proprietary software is also tightly integrated with a vendor speci ed hardware platform which offers limited capabilities such as limited memory capacity, limited CPU performance and others. Besides that, users cannot migrate the CNC software seamlessly to a more powerful platform [3] [4] [5].
As smart factories become fundamental, users' needs CNC technology to be easily integrated with other manufacturing resources such as computers, measurement devices, robots, and cyberspace [6] [7]. To deal with the issue, an Open CNC technology is urged [8] [9][10] [11] [12]. One of the direct methods to support Open CNC technology was replacing the G-code programming standard with a new and powerful standard called STEP-NC. Through this method, the STEP-NC program is used directly to handle CNC systems [3]. Open CNC-based systems STEP-NC provides universal, interoperable, and two-way information ows in the production chain [13]. In 2020, Jokanovic., [8] summarized the Open CNC system into two that includes an Open CNC system based on a Personal computer (PC) and motion control card and software-based CNC system. Both approaches functionality is pro cient by the utilization of software on PC. Good openness, low cost and high performance to price ratio made PC a preferred hardware platform for open CNC systems [14]. The software-based CNC system was developed entirely in software. However, the Open CNC system, which is based on PCs and motion control cards, combines the reusability of software with a redesigned hardware platform for increased interoperability, portability, exibility, and open system. [15]. Most of the developed Open CNC monitoring systems were developed through software-based Open CNC systems. The system was developed using general-purpose, objectoriented programming languages such as C, C++, JAVA, VB, and others as reported by Liu et al., 2020 [16], Jokanovic., 2020 [8], Guo [21] and others developed a STEP compliant monitoring system. However, their developed system was based on an indirect STEP compliant monitoring system. Most of the reported research based on indirect STEP compliance monitoring does not offer response and feedback solutions as the initial machining information such as spindle speed, feed rate, and others is complicated to be extracted [22] [23]. On the other hand, an Open CNC based PC and motion control card compliant with STEP-NC enable interpreted information of STEP-NC compliant system to be extracted and utilized for machining parameter response and feedback.
Based on the previous study, an Open CNC system based on PC and motion control card compliant with STEP-NC, which is available until now, was developed for machining, interpreter and monitoring purposes by Lee et al., [24], Elias et al., [15], Latif et al., [25], Adam [26], Hatem et al., [27][28] and Dharmawardhana et al., [29]. Lee et al. developed a STEP-NC compliant milling machine using XML format and enabled the modi cation of the XML-based STEP-NC le with some intelligence. Elias et al. developed an open STEP-NC controller [15]. The developed system is an open-loop system that does not support response and feedback options during the machining operation, enabling modi cation of machining parameters before or after the machining operation is completed. Latif et al. [25] conducted research on developing a new interpreter module for open architecture control-based CNC systems. The developed system is a closedloop interpreter which enables interpreted information to be modi ed. The developed system also includes some monitoring features; however, the monitoring features are only available to visualize the live machining operation, which does not offer any data acquisition, response, and feedback option.
Adam [26] developed a sustainable platform controller for STEP-NC compliant open CNC system. The study focused on drill bit monitoring, live thermal monitoring, remote monitoring, and augmented reality.
The monitoring information from the live thermal monitoring was developed to be visualized only. Live thermal monitoring was implemented by applying a speci c and expensive device and does not offer data acquisition, response, and feedback. Hatem et al. developed a novel integrating between tool path optimization using an ACO algorithm and interpreter for open architecture CNC system. The developed optimisation system enables consistent enhancements of approximately 10.41% and 16.58% for milling and drilling machining. Dharmawardhana et al. [29] developed STEP-NC Compliant Intelligent CNC Milling Machine with an Open Architecture Controller. The system was developed on a Raspberry Pi single-board computer, using the C++ language, which focuses on low-cost Open CNC Pc-based system development. Although there is an effort to include monitoring in their Open CNC system, their monitoring system was developed based on component-based technology that does not support service-oriented technology. Service-Oriented Architecture (SOA) is the evolution of CBSD. SOA is composed of more domain logic, enabling extendibility, recon gurability, interoperability and cross-platform portability [3]. SOA has been introduced to address the Dynamic Link Library (DLL Hell) issues of CBSD [30]. "DLL Hell" issues happened due to an incompatible version of the component on which the component was compiled. SOA enables to cover the emergence of varying platforms, varying protocols, various devices, the internet and others by enabling information to be subscribed by other independent software via RESTful HTTP APIs or lightweight messaging [31] [32]. Therefore, in this article, a novel solution that integrated service oriented IoT based monitoring with interpreted information for open Architecture CNC system was proposed. This study was the extension of the work that had been done by Elias et al., [15], Latif et al [25]and Adam [26]. An interpreted STEP-NC information will be utilized to enable response and feedback during machining operation based on the monitoring information gathered. The overall structure of this article is organized as follows. First, an introduction, followed by the integrated system architecture, service oriented IoT based monitoring, Open Architecture of CNC machine monitoring, Result, discussion, and conclusion.
Integrated System Architecture The integrated system architecture is illustrated in Figure 1. It is governed by two major parts that are machining and monitoring. Each machining and monitoring part consists of hardware and software. The monitoring hardware and software was implemented through a service oriented IoT architecture, while the machining hardware and software were implemented in a single computer and National Instrument LabView platform. Finally, the service-oriented architecture IoT based monitoring is integrated into the machining system to enable response and feedback based on the monitoring information.

Service-oriented IoT based monitoring
The development of service oriented IoT architecture consists of four major layers: the Perception layer, the Communication Layer, the Application layer, and the CNC milling machine. Figure 3 shows the process of integrating each layer. The service-oriented IoT architecture enables the CNC milling process to be sensed through monitoring devices in the Perception layer (1), sent to the cloud through MQTT Protocol on Communication layer (2), then subscribed by Node-RED in the application layer (3). In the application layer, the monitoring information in the Node-RED is subscribed by ThingSpeak (4) to enable an interface between ThingSpeak and CNC milling machine. Then, the information in the ThingSpeak is sent to the CNC milling machine (5). Finally, the monitoring information is displayed on monitoring module (6) under the National Instrument LabVIEW platform to enable monitoring software and machining software integration and enable response and feedback option during the machining operation. The monitoring module includes a temperature monitoring module, vibration monitoring module and electric current monitoring module.

Open Architecture of CNC machine monitoring
The development of the Open Architecture of CNC machine monitoring starts with the development of 14649 interpreter module [33], 3-D simulation module [33], machine motion control module [15][33], control action module, temperature monitoring module, vibration monitoring module, electric current monitoring module and monitoring control action module. 14649 interpreter module was utilized to interpret Example 1 STEP-NC Part 21 code, 3-D simulation to perform graphical machining simulation after interpretation and before real machining, machine motion control module to control the direction of X, Y, and Z axis and spindle movement and control action module to enable information shared globally to the monitoring control action module for feedback purpose during machining. The three monitoring modules, temperature monitoring, vibration monitoring, and electric current monitoring, are responsible for enabling monitoring information from a service-oriented IoT architecture to be entered into the Open Architecture of a CNC machine to monitor and respond The monitoring control action module was design to feedback with a new spindle speed value into machine motion control module based on the monitoring information, condition and response alert received from the temperature monitoring module or vibration monitoring module or electric current monitoring module. Figure 4 shows the process implemented from Example 1 STEP-NC part 21 design until Example 1 part machined based on the developed module.
The temperature condition limit is set based on the cutting tool material softening point, as shown in Table 1, while vibration is set based on the vibration severity per ISO10816, as shown in Figure 5. The vibration monitoring module with the submodule and sub-sub module and vibration algorithm design is as shown in Figure 6.  Figure   7. Each case study was machined using two different cutting tools: a new and worn cutting tool.
Based on the monitoring information generated after machining operation completion, the comparison of temperature, vibration, and current monitoring between the new cutting tool and the worn cutting tool is discussed in the next section. Figure 8 refers to the result of temperature monitoring for case study 1 and case study 2. From the result of case study 1, it was found that the temperature of the worn cutting tool is higher than the temperature of the new cutting tool in the time domain for both sensor thermocouple and infrared sensor with a percentage of 0.23% and 3.38%, respectively. However, there are slight differences in the reading for case study 2, for the temperature of the new and worn cutting tool in the time domain for both sensor thermocouple and infrared sensor with the percentage difference between the new and worn cutting tool of each sensor are 0.00% and 1.18% respectively. This is due to the cutting tool's temperature in a cold environment during machining. The starting temperature of the new cutting tool and the worn cutting tool is 24.37 and 23.62. The ndings of maximum temperature between the new and worn cutting tool of case study 1 and case study 2 are summarized in Table 2. Figure 9 shows the vibration monitoring result of case study1 and case study 2. The vibration signal results shown in the time domain indicated that the pattern of the peak-to-peak signals of the new cutting tool and worn cutting tool closely revealed the pattern of the signal changes. It was found that the maximum amplitude of the worn cutting tool is higher than the maximum amplitude of the new cutting tool, as summarized in Table 3. This is due to the interaction of the broken ute of the cutting tool and the workpiece [32][33]. Based on the reading of vibration for new and worn cutting tools, it was found that the percentage difference between vibration of new and worn cutting tools for case study 1 and case study 2 are 44.77% and 78.93 on the X-axis, 58.21% and 26.61% in Y-axis and 27.97 and 6.41% in Z-axis respectively.  Based on the electric current graph in Figure 10, the electric current results in the time domain show that the electric current signals depend on the cutting tool condition. The electric current will increase as the cutting tool is worn. The machining process utilized more force to cut the workpiece if the cutting tool is worn. By comparing the result from both case study 1 and case study 2, it was found that the cutting tool's reading will increase whenever a cutting tool is inserted. The ndings from both case studies are summarized in Table 4.

Discussion
Furthermore, each reading difference was analysed and summarized that the percentage difference between before cutting tool insert and on cutting tool insert is more than 8.33% up to 20% for case study 1 and case study 2. However, the reading difference is very small because the workpiece's material is very soft: Delrin. Considering Table 4, this approved that the cutting force applied to the workpiece is proportional to the electric current applied to cut the workpiece.
As a summary of the temperature, vibration, and electric current monitoring results, it was calculated that the developed service-oriented IoT-based monitoring with open architecture for CNC system monitoring is feasible enough to enable monitoring information ow based on the ability to transfer monitoring information from CNC machine to CNC machine, and the developed system is highly sensitive to any changes that occurred during the machining process, speci cally on the cutting tool condition. Therefore, this system is suitable for real-time monitoring of the machining process.

Conclusion
In the era of Industry 4.0, one of the critical criteria for smart factories is bridging the gap between physical to cyber-physical systems through a software application. This type of integration provides a solution for e cient and su cient information management from data acquisition, storing and processing real-time monitoring information, response, and feedback in milling process monitoring. In this study, an approach to integrating service-oriented IoT-based monitoring with open Architecture of CNC system monitoring was presented. The main objective of this study was to provide a methodology to integrate service oriented IoT based monitoring with open Architecture of CNC system monitoring. From the methodology proposed, the developed system was implemented and validated through two case studies. The result from the implementation and validation shows that the developed methodology enables monitoring information ow from CNC machine back to CNC machine and enables response and feedback as any undesirable condition occurs during the machining operation. The reading of temperature, vibration and electric current monitoring is higher for the worn cutting tool than the new cutting tool. The percentage difference between new and worn cutting tools is up to 3.38 percent for temperature monitoring and up to 78.93 percent for vibration monitoring. The electric current reading is proportional to cutting force as the reading of electric current on cutting insert is higher than reading before cutting tool insert with percentage differences more than 8.33% up to 20%. With this implementation methodology, the conventional machine could also be retro tted to cope with Industry 4.0 concept called Machine tool 4.0.
Additionally, with the developed system, information retrieval issues were resolved. Moreover, this developed system may be adapted and adopted with the Open PC-based CNC system established [29] to create a full Raspberry Pi-based Open PC-based CNC system and a low-cost way to enhance Open PCbased CNC system development. Through that, big data will be fully utilized in future work to evaluate machining performance, quality assessment, benchmarking, and service purposes. Other than that, the information would be utilized for optimization based on real-time using machine learning algorithms such as the SVM or RVM approach. It performs best in terms of generalization capability, fast response, and high accuracy for decision-making. However, this study could be a foundation for fully utilising the con guration system for other manufacturing processes such as inspecting, assembling, sizing, etc., toward smart factories.
Declarations Figure 1 Integrated system Architecture   Vibration severity based on machine class category  Temperature monitoring for case study 1 and case study 2 Vibration monitoring for case study 1 and case study 2 Electric current monitoring for case study 1 and case study 2