Communication methodology between machine tools using MTConnect protocol

Development of smart manufacturing led to a trend of developing autonomous, accessible and cooperative numerical control equipment, which needs a communication subsystem that follows a universal accepted industrial standard. MTConnect has been widely considered as an efficient and sufficient protocol for data collection since its appearance. In this paper, a networked information exchange methodology between computer numerical control systems based on MTConnect technology is proposed, which includes the theoretical architecture of the information exchange module and the implementation of the module based on a CNC systems developed on the TwinCAT platform. A communication system according to the MTConnect protocol for CNC systems was designed, which is able to collect processing data from controllers and transmits those data between controllers by agent and client embedded in the information exchange module. The agent and client which were defined in the protocol were developed through C# language and MTConnect Managed SDK. The proposed methodology was implemented and tested on actual CNC system.


Introduction
In recent years, the rapid development of information technology and network technology has not only made great changes in manufacturing and manufacturing technology, but also promoted the research and application of advanced manufacturing mode of networked manufacturing [1]. Processing production under networked manufacturing has become one of the core contents of current manufacturing research because of the pressure of market competition and the improvement of the enterprise's own management level of production and management [2]. The network production process is changing to the digitalization, flexibility and agility. Full usage of network information technology makes the sharing of manufacturing resources become a reality, and completes the information exchange and integration of manufacturing execution layer. Meanwhile, the shifting of production mode, from mass production to small batch production mode, requires increasing in communication between different numerical control facilities on floor [3]. At present, only researches about ERP (Enterprise resource planning) information management and integration received extensive attention. However, there are few researches on the CNC machining system of the manufacturing executive layer, especially the information exchange among control systems.
There have been a lot of research on data acquisition and monitoring of numerical control system. Liu studied the technology of remote control of CNC machine tools based on MTConnect protocols, which was implemented on a numerical control engraving machine. This paper studied the basic methods of using MTConnect for equipment networking, including the implementation architecture, equipment information model and information collection process of the monitoring system [4]. Seung-Jun Shin designed a virtual machining model to generate monitoring data from process planning data in order to help the process planer to analyze the machining process in a virtual environment [5]. However, most of these researches are focused on the unidirectional data acquisition. This paper proposes a communication scheme based on MTConnect protocol. The theory of MTConnect and its working mechanism are elaborated in the following section. The layout of the communication scheme is described in Section 3, including the system design and the description of system implementation. Section 4 presents a case study to validate the scheme proposed. Finally, a conclusion is given in Section 5.

MTConnect Introduction
MTConnect is a protocol launched by AMT (Association for manufacturing technology) and provides not only a simple software or hardware device, but an open, royalty free device interconnection standard and technology. It uses the internet protocol to transmit data through the network, so as to achieve more extensive interoperability between numerical control facilities. The protocol does not replace the existing known interconnected standards and technologies, however, based upon the widely used Web technology -HTTP and XML (Extensible Mark-Up Language) [6].
There are five components in the architecture of MTConnect: device, adapter, agent, network, and client application, as shown in Figure1. The central part of MTConnect is the MTConnect Agent, which is the only component whose functions, data types are defined by the standard. Agent collects data from devices or adapters, then provides these data to a client application in a standardized format [7]. Adapter is another important part of MTConnect, since it equivalents to a data converter, which transfers proprietary data definition of the device into MTConnect data format. MTConnect is a protocol based on the C/S structure, since the data acquisition process is implemented by the request and response of the Client and Agent separately. There are four types of request send by the client: Probe, Sample, Current, and Asset, presented in Table 1. Probe request is used to retrieve the structure information and querying data items for the components of the devices connected to the Agent. Also, the information of a single device can be acquired using Probe. The samples, events and conditions in time series can be read through Sample request. Meanwhile, the current value of these data can be obtained by Current request. The Asset is something associated with the manufacturing process, however, not a component of a device, like cutting tools. Asset request is used to get the current state of assets. MTConnect typically begins with the probe request to determine the capabilities of the device. When the application determines the data items need to be get from the agent, the client can issue a Current request to get the latest value. Once the current state has been retrieved, the data could be sampled from the agent.

System architecture and design
The communication between numerical control devices involves bidirectional data flow. However, MTConnect is a read-only protocol, as data only come from devices [8]. In order to realize the two-way flow of information between devices, there is a need in the device for both the client and the server side, which refers to the MTConnect Agent. The system architecture that implements the interaction between devices through MTConnect is shown in Figure 2.  In this paper, a communication system of CNC machine tools is designed based on MTConnect, and it is realized on a three axis machine tool. The control part of the NC machine tool is the open CNC system developed by this laboratory. The CNC system is composed of the upper control system based on TwinCAT (The Windows Control and Automation Technology) and the motion control part based on the real time Industrial Ethernet, EtherCAT. Since the control system is the application program based on the windows platform, the software interface is used to integrate the MTConnect agent into the control system as an independent thread. The thread collects data from a numerical control system through the API provided by the manufacturer. In order to realize the bidirectional data flow between machine tools, a client module is integrated in the control system, with interface function to connect with the control system.

Data acquisition
Machine data can be classified as static data and dynamic data [9]. The value of "static machine data" remains unchanged with the execution of programs in the same part processing. It includes the information defined in the STEP-NC file (e.g. three-dimensional geometric information, tool information, manufacturing characteristics and process information) and machine tool's specifications. Dynamic machine data are the core information for machine tool monitoring and the implication of multi machine tool cooperation, including processing information and PLC/NCK motion control information. For the two types of machine tool data, different data updating procedure can be followed. The static machine data can be extracted from the CNC memory. And the dynamic machine data can be updated regularly using the communication interface of CNC system.

Machine Tool Modeling
The information model of the three axis CNC milling machine used in this paper is shown in Figure 4. The milling machine is defined as a device in an agent, consisting of Axes, and Controller; Axes is consist of a spindle and three linear feed axes. However, because the data model defined by MTConnect is relatively simple, the data model is extended to a certain extent to meet the requirement.

Application Example
The communication system has been developed and an application instance has been implemented on the CNC system based on the TwinCAT platform. In the instance, the C# language in the Microsoft Visual Studio platform was used to implement the MTConnect agent and client, based on the MTConnect Manage SDK, which was proposed by MIT for a high speed data acquisition and near real-time data transmission. Meanwhile, an adapter used for the data collection from CNC system was developed using the ADS communication protocol, which is the communication interface of the CNC system. The application is shown in Figure 5.

Conclusion
MTConnect provides a standardized method for networking and interoperability of heterogeneous devices. An implementation scheme of communication between machine tools is proposed based on this standard, and a basic verification system is realized. An independent-developed open CNC system is adopted in the development process, which makes it convenient to integrate MTConnect modules with the CNC system through software interface. The verification system of this paper is based on the current MTConnect specification and development tools. At present, it can only realize the basic communication function, and not yet realize the intelligent communication process. Intelligent communication between machine tools is of great significance for the development of networked manufacturing.