Development of Real Time Machine Tools Component Utilization Data Acquisition for developing Dynamic Model of Maintenance Scheduling

. Maintenance scheduling accuracy of CNC machine tools components should be calculated based on actual data utilization of each component. Actual usage of each component can be approached by component grouping based on machine operation phase utilization, which is divided into Power-On, cutting and noncutting phase. This paper describes a study on development of machine monitoring data utilization for obtaining real time information of spindle and machine axis positions as well as current consumption of spindle servo motor. Data collection was conducted by a termination method on wiring feedback control of spindle encoder signal and axes encoder signals. On the other hand, current consumption of spindle servo motor was measured by a CT current transducer. Afterward, a WEMOS microcontroller was used to process and to transfer data wirelessly to a Raspberry which acted as a broker. The data will used to update the data status of CNC Machine Tools utilization database, where it was communicated by using a MQTT protocol. A monitoring system has been developed and resulted the real time information of machine phase utilization. It will be further utilized as primary data input for building a dynamic maintenance model.


Introduction
Reliability factor of machine tools has a big influence on product quality and productivity of manufacturing industry. Reliability of machine tool will continuously decrease with time usage and at certain condition it will quickly decrease when the machine tools continuously receives different operating conditions beyond its ideal operating condition [1,2]. Generally, equipment reliability decrease is due to failure on machine component. It is measured by two factors, (i) life time and usage and (ii) life time and number of failure. Maintenance activity for recovering reliability is machine component replacement at certain period, which causes the component is to be 'as good new' [3]. Therefore, proper maintenance should be done by company as a reliability improvement in order to convey high machine tools reliability, so it can maximize availability of machine tools with minimum maintenance cost.
The aim of this research is to build the dynamic maintenance model for machine tools as the first step to realize the maintenance intelligent of CNC machine tool, in which each machine component has ability to define the needs of self-maintenance activities based on its real usage condition. Implementation of ADiMS (Autonomous Distributed Manufacturing system) concept and objectoriented modelling on dynamic maintenance model are used to represent the dynamic machine operation conditions and directly generate the accurate maintenance policy in real time (iterative maintenance schedule). Hence, maintenance scheduling outcome is accurate, such as time interval of age replacement each component is calculated based on its actual usage. It determine real time usage of each component is approached by component grouping based on its operation phase utilization, which is divided into Power-On, cutting and noncutting phase. In Figure  1. The Venn diagram shows three groups machine utilization phase. Power on phase is the status at when the machine's main switch is turned on, Noncutting phase is the status when the machine's actuator system such as spindle and axis machine are running without cutting of the workpiece, noncutting phase is such as machine start up, setting zero point and other axis movement activities without cutting load. And cutting phase is the status when the spindle is running and axis machine is moving with cutting of the workpiece.

Machine data Utilization as main requirement data input for dynamic maintenance model
Dynamic maintenance model requires main data input such as production data and machine data utilization in real time. Therefore, real time usage-phase monitoring system for CNC machine tools should be developed for obtaining real time information about actual usage of machine component.

State of the art
There are some researches in this area related to machine tools, its monitoring device and those kind of sensors. Mori et al. [4] told about the evolution process of machine tools from MT 1.0 to MT 3.0, there are some efforts to make machine tools faster, more accurate, reliable, flexible and safer have never stopped. Today's machine tools have also become more economical and resource-efficient. Moriwaki [5] presented a comprehensive survey about machining centers continue to offer more functions. Abele et al. [6] and Neugebauer et al. [7] stated technologies for machine tool components (e.g. bearing, spindle unit, control unit and drivers) have also contributed to the continued technological enhancement of machine tools. Today, machine tools step into the era of Industry 4.0. Xu [8] discussed about machine tools 4.0 is introduced as a new generation of machine tools that are smarter, well connected, widely accessible, more adaptive and more autonomous. Machine tools autonomous is defined as ability to make decisions related to the production system and also self-maintenance activities of its machine. Liu [9] stated about machine Tool 4.0 is a future development trend of machine tools. It is known as Cyber-Physical Machine Tool (CPMT), based on recent advancements of information and communication technology such as Cyber-Physical system (CPS), Internet of Things (IoT) and cloud-based solution, provides a promising solution for Machine 4.0. CPMT is defined as the integration of the machine tool, machining processes, computation and networking, where embedded computations monitor and control the machining processes, with feedback loops in which machining processes can effect computations and vice versa. Liu et al. [10] stated about CPMT comprises three main components, i.e. Physical devices, networks and machine tool cyber twin as the virtual model of machine tools, Physical devices consist of machine tool equipment and monitoring devices or data acquisition that function as monitoring of machine tools. Harja et al. [11] stated the monitoring data of each CNC machine controller can only be accessed by its own application software and access authority by theirs own maintenance machine maker technician. Hence, machine tools user cannot access these machine tools data monitoring. There are several researcher build monitoring device by utilize kind of sensors such as current sensor, accelerometer sensor, RFID sensor and etc. Cai et al. [12] presented techniques of building "digital twins' virtual machine tools by using sensory data integration and machining information fusion for cyber-physical manufacturing. It use current sensor and axis accelerometer to monitor the operation condition. Manufacturing and sensor data are demonstrated the prediction capability of surface roughness model. Zhong et al. [13] introduced an IoT-enabled real time machine status monitoring. Its research use various sensors such as RFID readers and tags, vibration sensors, temperature sensors and force sensors. Kuo et al. [14] reported approach to predicting the operational work status of manufacturing machines through the use of add-on triaxial accelerometers for collecting data.
The state-of-the-art work in this are shows that researcher are striving to implement the CPS technology in machine tools, especially focuses on the development of specific intelligent functions for machine tool. It beginning from development the monitoring device of machine tools. Nonetheless, most of monitoring device researcher are doing add on sensor to get data monitoring of machine tools. It is require huge investment in implementation, although data monitoring can tapped from the electronic components pins of CNC machine that represent the activation of operation condition. Few studies have been attempted to develop maintenance intelligent function for machine tools.
To address these issues, this paper propose development of real time machine tools component utilization data acquisition for developing dynamic model of maintenance scheduling. Data collection is conducted by combination method between termination method and add-on sensor. The key components and functions included in system architecture of data acquisition are proposed and explained. The experimental results validated the feasibility and advantages of the proposed monitoring system.

Research question
Real time (actual) data utilization of each component should be acquired directly from the CNC machine tools controller. There are two barriers in CNC controller for this necessity, those are controller protocols differences and limited access for direct acquisition to CNC machine controller. Therefore, for common condition, the monitored data of machine utilization cannot be acquired and inputted into maintenance model that is being developed.
The objective of this study to develop CNC Machine Tools Component Utilization Data Acquisition for developing Dynamic Model of Maintenance Scheduling. It is focused for obtaining real time information of spindle and axes positions of CNC machine tools as well as current consumption of spindle servo motor, by hence cutting and noncutting phase can be defined.

Material and methodology
There are several stages for developing real time machine tool data acquisition: determination of research object of CNC machine, identification of certain component pins that can be utilized as sources of required data signal on each event data to be retrieved, development of device interface, and finally conducting experiment to test functionality of the developed monitoring system.

CNC machine of research object
Generally, there are similarities among CNC machine architecture and installation of control and feedback signals. CNC controller is connected to several actuators such as axes servo motor or spindle servo motor through servo driver interfaces, coolant and lubrication motor pump, lamps, alarm and some other actuators through relay interfaces. Encoder devices are embedded on servo motor actuator and connected to CNC controller as feedback signals for controlling the accuracy of axes movement and spindle rotation. A CNC machine tools utilized for the research object in this study is VMC 250 (Vertical Milling CNC) with Siemens 802C controller. This was selected due to its availability factor and CNC machine architecture similarity factor

Event data on operation and identification of activation component pins
Information of machine phase utilization is initiated (triggered) from operation data which is detected by sensors. Each operation phase always has duration time, started by start event and ended by finish event. Each event of operation phase autonomously results in certain additional attributes. Figure 2. Shows examples of certain attributes of axes movement operation. After an event start is executed, the operation has real start time of operation. After event ending is executed, operation has complete data such as operation duration and other required data of axes movement.

Fig. 2. Event of operation phases with certain additional attributes.
Prior to real data acquisition, component pins of the controller must be firstly identified. This was conducted by tracing and analyzing control signals, in this case CNC VMC 250 machine controller. The results were the electronic pin positions of the corresponding CNC machine representing the activation of each machine utilization status. Table 1 shows the component pins and sensor which were utilized to acquire the required data signal on each event data.  Figure 3 shows the system architecture for the data acquisition. The machine utilization data acquisition was conducted by a termination wiring method between CNC controller and feedback control of spindle/axes encoder signals. Simultaneously, current consumption of spindle servo motor was measured by a CT current transducer. The monitoring devices consisted of termination board for data tapping and adds-on current transducer and a signal conditioning circuit. Afterward, a WEMOS D1 mini microcontroller was used to process and to transfer required data wirelessly to a Raspberry which acted as a broker. Its data will used for updating operation data status of server database, where the communication was conducted by using a MQTT protocol. User can access the dashboard which displayed a monitoring phase utilization and current axes position.  Fig. 3. System architecture of data acquisition. Figure 4 shows the scheme of flow information system. It is shown that data signal (pin A, pin B and pin Z) of each axis or spindle encoder are directly acquired form feedback control position of CNC controller. Data signal is further processed by signal conditioning circuit which consisting of several stages: as capacitor coupling, voltage dividing, low pass filter and Schmitt trigger circuit. When axes movement are executed, microcontroller will count number of pulses and determine its movement direction. The result defines a machine axes data. On MQTT protocol, A WEMOS microcontroller is a MQTT client that can transfer (publish) message topic and message data wirelessly to raspberry which acted as a broker [19].  Table 2 shows name of message topic and data topic on each data machine axis, where each machine axis has unique name of message topic for distinguishing from the other ones. For example, X axis have message topic "X_Axis/start" and "X_Axis/end". The message data name is then called as "XAxisData" which joins data event as machine ID, number of pulses and movement direction.  Current consumption value of spindle servo motor is conducted by using a CT current sensor. Microcontroller reads current value and then compares it with a predetermined threshold to determine cutting or noncutting condition. Microcontroller publishes message topic in "Power_On/start" or "Power_On/end", where it depends on real current data value. Algorithm program is written by using python coding in raspberry, but it is written by using micro python coding in WEMOS microcontroller.

Architecture and information flow of machine data utilization monitoring
Raspberry receipt (subscribe) each message data from microcontroller client, sorts the topic based on message topic name, and processes message data by splitting the event data into origin data as machine ID, number of pulses and movement direction. Those data are used for updating the operation data status on tables of server database. The information of machine phase utilization and current axes movement in database are retrieved and processed by using Microsoft visual studio program and then send them, in real time, to the dashboard system.  Figure 6a shows non-cutting operation phase of the machine tool when machine spindle is running while Figure 6b shows that machine Z-axis is moving. Figure 7a shows noncutting operation phase when X and Y axes of machine move without work piece cutting.

Discussion and future work
a. Noncutting operation with XY axis is moving b. Cutting operation phase  Figure 7b shows the cutting operation phase where the movement of X and Y axes were conducted by work piece cutting. MPU percentage graph show power on operation phase have been done in 10 min and 41 s, its power-on time duration was used 11 % for cutting operation phase and 65 % for noncutting operation phase.The workpiece cutting was detected by a current sensor which measured the current consumption of spindle servo motor. Cutting operation was determined when current value exceeded cutting current value threshold.
Future work is summarized as follows, firtsly, the main focus will be on the implementation of artificial intelligent in maintenance machine tools, data monitoring will be further utililized as primary data input for building a dynamic maintenance model which generate the self-maintenance activities of its machine tools. Secondly, limited number of data sensors and local database were implemented on the current device interface development. In order to fully explore the potentials of the model, a further study will conducted by: (i) extending multiple sensors in the experiment for building a complete machine monitoring system; (ii) using cloud storage through internet for enhancing the system capability, because data base on local PC has limited computation capability and limited storage space.

Conclusion
CNC machine tools monitoring system has been successfully developed, which is capable to provide real time information about machine phase utilization and its percentage, machine axes positions and spindle rotational speed. Machine axes positions and spindle rotation speed are determined by filtering and processing signals from each axis encoder data signal. Cutting and noncutting operation phase are defined by analyzing both axis movement and current consumption of spindle servo. It will be further utilized as primary data input for building a dynamic maintenance model for iterative maintenance scheduling.