Development of a Synthesis Method for CNC Machine Tools Remote Monitoring System by Using Web Components

The article shows an approach to the synthesis of monitoring systems for CNC machines. Describes the main Web components and libraries used to collect technological data and display it for various users of CNC machines. The article demonstrates the practical results of the synthesis of the monitoring system for the CNC "AxiOMA Control" with the ability to select the parameters displayed on the Web page for the operator and adjuster of the CNC machine.


Introduction
The current stage of industrial development of the enterprise is focused on their development in accordance with the concept of Industry 4.0, which implies the implementation of digital production with a high degree of interconnection between all levels of the enterprise. Heterogeneous technological equipment from different manufacturers using heterogeneous data exchange protocols complicates the processes of monitoring their functioning and complicates the process of transferring technological information to higher levels of enterprise management [1,2]. An important and necessary task for modern high-tech production is the prompt access to the necessary technological information at the request of users [3]. With the help of information aggregated from technological equipment, it is possible to track not only a variety of data necessary for diagnostics (errors and warnings of CNC systems, information about failures, temperature, vibration in the cutting zone, tool wear, etc.), but also information about the performance of the equipment and the work of its operator (for example, the operating time of the machine, the time of the technological operation, the signal about the completion of the operation).
Most modern systems for monitoring technological equipment are focused on collecting information about the technical parameters of the machine, based on which scheduled preventive maintenance schedules are drawn up [4,5]. As one of the possible solutions, the article considers the use of a singlepage application synthesized for a specific task based on a set of developed Web components and modules for collecting technological data.

Requirements for systems for collecting and remote provision of information about the operation of CNC systems
In modern manufacturing, often one operator can service several CNC machines, on which he needs to monitor the technological process, and these machines can be located at considerable distances from each other [6]. The use of Web-technologies in the creation of software for control systems allows users to organize remote monitoring of the condition of the equipment for users, while the operator can receive information about the operation of CNC machines on a portable mobile device. Web components including: the ability to work from any browser (adaptation for a specific browser is many times easier than developing an application for a new operating system (OS)) and minimal depending on the characteristics of the terminal device, there is no need to support multiple OS.
The creation of human-machine interface (HMI) screens for control systems and monitoring systems is one of the main tasks. Modern screens, including monitoring systems, can be overloaded with unstructured information [7]. At the same time, for different specialists (machine tool adjuster, CNC operator, technologist, etc.), the information required for display may differ.
A well-designed HMI provides the following benefits: • improving the quality of the management process by reducing the number of errors caused by the "human factor"; • saving time when turning on / off the system and between transients; • reduction of time when training personnel to work with the system; • fewer errors and less downtime; • operator comfort.

Possibilities of using Web technologies in monitoring systems
The use of Web applications (one or several page screens) as monitoring systems provides a number of advantages, namely: the application does not need to be specially downloaded and installed on a personal computer or smartphone and additional settings are not required, Web applications are not so demanding on hardware the resources on which they work. One of the biggest advantages of adopting a Web application approach is that there is no need to regularly update versions and maintain outdated versions, which in the industrial sector significantly saves developer resources [8]. Web applications also have limitations. Firstly, it is the need for a network (Internet or Corporate network), since all data is stored not on the device itself, but on the server. When using this approach in industrial enterprises with increased security control, additional difficulties arise that can be solved by using corporate networks. Low requirements for hardware resources of devices, as one of the advantages of Web applications, can also be a disadvantage, for example, if you need to check in real time through the Web page collisions from collisions of machine nodes in full 3D visualization mode or track the current 3D model of the workpiece [9,10].
Monitoring systems of a new class (MDC, Machine Data Collection) are required to ensure the receipt of information about the object (technological equipment) in the required volume and quality to control the technical condition of the object. At the same time, MDC systems do not supplant the concept of SCADA, but they solve a different class of problems [11]. An approach using Web-technologies prepared software components will speed up the process of creating data display screens. Moreover, this approach needs to formalize the steps and describe the application of the component technology for constructing the user interface [12].

Development of a synthesis methodology for monitoring systems for CNC technological equipment
The presented technique consists of separate steps, the result of each of which is submitted as input data to the next step ( Fig. 1). At the first step of the methodology, the analysis of control systems for technological equipment is carried out, which is understood as the process of researching a control system based on its decomposition with the subsequent determination of the static and dynamic characteristics of the constituent elements. At this stage, the analysis object itself is determined, the functional features of the control system (in particular, CNC systems) are determined. At this stage, it is necessary to identify the features of information transfer from the CNC system to other systems: protocols and interfaces for data transfer, the structure and format of data packets, the completeness of the transmitted data [13]. The result of this step is a set of possible polled parameters from the CNC system, external sensors and a list of data transfer protocols required to support.
Next step is the definition of a set of parameters for monitoring individual CNC machines or groups of machines. It should be borne in mind that the set of parameters depends on the task at hand or on the specific role of the operator (chief mechanic, technologist, etc.).
The choice of methods and the development of algorithms for obtaining technical diagnoses of the state of equipment is currently an almost mandatory step, which allows to divide the analyzed data into certain groups both for current visualization and for subsequent in-depth analysis [14,15]. At this step, the maximum permissible values of the parameters are determined, the interconnections of the parameters with each other are built with the possibility of manual adjustment of the parameters.
At the stage of identifying the necessary technologies and libraries for connecting to the control system (CNC), modules are selected both for communication with the CNC itself and sensors, and for transmitting information to the aggregation server (or from the server) of the data and to the visualization system. Different CNC systems and sensors can operate on the basis of a variety of protocols, while the constant support of all solutions in a synthesized system will have certain difficulties. For example, the monitoring system does not need to support API Focas, if the group of target CNC machines does not include Fanuc systems, or, conversely, it is necessary to support the OPC UA protocol if this standard supports several machines from the target group at once [16]. It is also worth considering the possibility of having ready-made toolkits for both collecting and displaying data (Node-Red).
The next step -configuring the base module is quite important, it allows you to select the minimum required set of functions -data collection (without storage) and display as numerical or graphic values without the ability to customize the arrangement of elements. This step creates a configuration file to poll the parameters.
Next, there is a choice of modules depending on the task. For example, to visualize historical data, you need to use a data warehouse. In this case, the use of simple SQL systems is preferable, while NoSQL databases are better suited for deep data analysis. It makes sense to use this option when the synthesized monitoring system works simultaneously with existing MDC systems. Also at this stage, the choice of the supported type of client application is made -it can be only Web-clients of desktop PCs or adaptation for mobile solutions, or only a configurator for setting parameters (in the case of synthesizing a system for a role of the "root" type).
At the penultimate step, the monitoring system is synthesized with the construction of the basic relationships between all modules using a special configuration file. In the file, the structure of the synthesized system is automatically generated, after which user parameters can be added, for example, the polling cycle of the sensors. The last step is the stage of testing and making the necessary adjustments (if necessary), which include changing the visualization components, reconfiguring the configuration file, changing the equipment polling time for various parameters.

Synthesis of a monitoring system for work with the CNC system "AxiOMA Control"
Based on the presented methodology, an algorithm for the monitoring system was developed and implemented. As an example for the implementation of interaction with the monitoring system, the domestic CNC system "AxiOMA Control" was chosen. This CNC has its own OPC UA server for transmitting information about the equipment operation [8]. In this case, it is necessary to implement a communication module (OPC Client) in the monitoring system so that the developed system can receive data. "AxiOMA Control" can transmit all the basic data about the equipment operation.
The list of parameters received from the OPC UA server of the considered CNC is divided into general, channel and axial (Fig. 2). General parameters contain the operating time of the CNC (current and for the entire time of operation of this CNC machine), the number of restarts, the state of the connection. "AxiOMA Control" supports up to eight control channels, each of which can transmit information about its mode (Auto, Manual, Jog, etc.), status (Ready, Run, Error, etc.), the name of the control program, the current percentage of its execution, the current running time of a specific channel, the active Mfunction, the number of interpolated axes on the channel and spindles. In turn, the axes (there can be up to 32 units) contain parameters: axis type (linear, circular or spindle), axis state, command position (set from the CNC), current position (received via feedback), command and current speed, end position, current moment [17]. Each parameter is characterized by its own data type, which should be taken into account when storing or displaying in a Web client. In turn, the axes (there can be up to 32 units) contain parameters: axis type (linear, circular or spindle), axis state, command position (set from the CNC), current position (received via feedback), command and current speed, end position, current moment [10]. Each parameter is characterized by its own data type, which should be taken into account when storing or displaying in a Web client.
When identifying the necessary libraries and technologies for connecting to the CNC system, the OPC UA client and the MQTT subscriber were selected, respectively (for working with external sensors that "publish" information to an external MQTT broker, from where it is collected in the form of a "subscription" to the corresponding "topic "). The set of the described requirements was determined by the requirements for the development of universal solutions that can operate on various platforms that do not require specialized training of specialists to support these solutions [8].
The basic and selectable blocks, which are determined after the first step of the methodology, are implemented using the Python 3 language and additional frameworks. To implement the module for working with the OPC UA server, the Python OPC UA library is used. server or client in several lines. To transfer information between the CNC system, the OPC server and the server of the monitoring system, the TCP / IP protocol is used, and packets containing data in the form of XML and JSON are transmitted. To implement the server, aiohttp is used -this is an asynchronous Web framework in asyncio Python 3.5.3+ for the client and server sides. The server writes data to the database and provides information to the client side. The system server fulfils a request for the operation of technological equipment, and receives data related to critical states of the equipment (Fig. 3).
When information about critical errors in the operation of the object is received from the data collection server, a message is sent to the authorized user via the HTTPS protocol (an extension of the HTTP protocol to support encryption in order to improve security, data in the HTTPS protocol is transferred over the SSL or TLS cryptographic protocols). At the same time, the specified data is recorded for the possibility of their subsequent extraction and analysis.
A component approach is used to visualize data. Components are self-contained code (subsystem) that can be reused by independently deploying it. Components have many provided and required interfaces and are used in large complex applications with tens or hundreds of domain classes. In complex cases of developing large systems, for example, when developing a corporate information system, the use of a component diagram will be required.
The Vue.js framework is used as a rendering component, which allows you to break the application into smaller, reusable parts (components), which can then be used to build a more complex structure ( fig. 4). The first level in the diagram is an information source that provides data through communication protocols. The second level is the monitoring system server, which allows the delivery, processing and storage of data received from equipment and sensors. The third level is the user interface of the monitoring system, which allows you to present information in the form of equipment cards, graphs, tables, reports and other visual elements Based on the proposed methodology, a data visualization system was synthesized, representing a singlepage page with the ability to select the displayed parameters for the CNC machine operator and adjuster. In this case, the choice of components is based on a simple connection of selectable modules and a configuration file without the need to reprogram the entire monitoring system. It is possible to independently customize the interface by each user, including: adding / removing equipment cards, building plans, creating reports with the necessary fields, setting parameters for displaying data from equipment, keeping records of employee work hours, adding / removing employee cards.  Figure 5 shows the main components of the renderer under test for composing a Web page and displaying the required parameters. The elements used do not depend on the lower level of data collection (OPC UA, API) and can be applied, among other things, to other CNC systems for compiling their own pages and displaying parameters depending on the role of the machine operator [11]. The visual display of elements (colors, font size, etc.) can also be configured.

Conclusion
The proposed technique allows synthesizing remote monitoring systems with data visualization via Web pages. This solution differs in ease of use compared to mobile and desktop applications, in which a number of additional settings are required and the issue of supporting outdated versions is required. The screens can be configured depending on the roles used in the access control mechanisms (machine operator, mechanic, technologist, etc.). The proposed technique is generalized and can be applied in monitoring systems operating with other CNC controls. The main condition for the application of this technique is the support of the basic module for collecting information from the target CNC, or the use of REST architecture to collect data from a third-party data aggregation server from CNC systems. The article presents a practical example of the synthesis of a Web page for a monitoring system that interacts with the "AxiOMA Control" CNC control system.