TechnologyMarch 9, 2020

Using OPC UA and MQTT to access CNC controller data

Access to the data in the SINUMERIK 840D sl CNC controller via the standards OPC UA and MQTT.

Use of a gateway along with OPC UA and MQTT, can provide access to S7 controller machine tool data. This allows important spindle and axis data, such as torque and power consumption, to be read out, processed and become available for condition monitoring, predictive maintenance, and data logging or analysis tasks.

To fully implement Industrie 4.0 applications in the future, the internal data of CNC controllers needs to be available in a digitalized way. Since many machine tools, however, already have been developed years ago, these controllers often do not provide any open and standardized interface for data integration. But now, new gateway technology opens the door to external access to SIMATIC S7 controllers, as well as NC and drive data of the SINUMERIK 840D solution line.

The SINUMERIK 840D CNC controller from Siemens has been available on the market for about 25 years and is used in many machine tools for implementing milling, turning, grinding, nibbling and punching technologies. However, when checking the requirements for a future use, it turns out that only the data from the integrated SIMATIC S7 controller can be re-used outside the machine tool, while the NC and drive data is not accessible by external applications. Thus, the CNC controller prevents the integration in an overall application by not providing open and standardized communication capabilities.

Access to controller data

The uaGate 840D gateway can be connected directly to the SINUMERIK 840D sl CNC controller without requiring a system adaptation and any additional licenses.

The uaGate 840D gateway can be connected directly to the SINUMERIK 840D sl CNC controller without requiring a system adaptation and any additional licenses.

The uaGate 840D gateway from Softing is dealing with this challenge and, for the first time, provides access to the complete machine tool data. This allows important spindle and axis data, such as torque and power consumption, to be read out and processed using the OPC UA and MQTT communication technologies.

Together with the associated alarms, this data for instance becomes available for condition monitoring, predictive maintenance, data logging or analysis tasks. In addition, this gateway allows to generally integrate the SINUMERIK 840D sl CNC controller into Industrie 4.0 applications. This solution works with newer and older SINUMERIK 840D Solution Line versions using the NCU Type 7×0.3 and a software version newer than V4.3.

Pre-configured symbol file

For using uaGate 840D the gateway just needs to be connected to a free Ethernet slot – either X120 (operator panel) or X130 (company network). Once the gateway has been integrated into the network, commissioning the gateway becomes very easy by making use of the symbol files already pre-configured in the firmware upon delivery. The symbol files take care of establishing two connections, one to the NC section including drive data, axis data, program data, tool data and specific NC alarms and one to the PLC section of the integrated SIMATIC S7-300 controller with its DB data, alarms and messages.

As a result, data including spindle speed, override, actual distance and remaining distance of four axes, as well as temperature, torque, and power consumption of the four motors connected to the drive modules are immediately accessible using the OPC UA standard.

The uaGate 840D gateway solution also provides an effective tool for downloading symbol files from STEP7 and TIA Portal projects referring to the S7-300 controller integrated in SINUMERIK 840D. Once downloaded and adapted according to individual needs, customers can import these symbols into the uaGate 840D gateway.

The NC variables can be loaded into the gateway using the Siemens tool NC-Var-Selektor available as part of the Sinumerik Toolbox. As a result, the controller data as well as the NC and drive data is accessible immediately via OPC UA without requiring any modifications in the SINUMERIK 840D CNC controller.

By default, the uaGate 840D creates an ability to read and write variables in the integrated SIMATIC S7-300 controller, however customers have the chance to define these as read-only, if required. The variables of NC part configuration are defined as read-only for precautionary reasons.

Range of applications

The uaGate 840D can be used in a variety of different applications. One application is the acquisition of operating data. Here, users determine which data on the workpiece or tool is read from the machine tool and collected at what time. The recorded data can then be used for visualization purposes or for evaluations. For predictive maintenance, high frequency data like positions, currents and control deviations are monitored.

Users thereby evaluate the tool quality and tool wear by minimizing scrap, increasing tool life and ensuring higher overall product quality. Plus, the service life of tools is maximized. One customer reports: “We have successfully installed the gateway in our gear cutting machine for analyzing data such as rolling force. This enables us to estimate the hardness of the components and to create specific maintenance and inspection measures for the machines. Thus, in the end we can reduce machine failures.”

Machine tool manufacturers are also using the collected data for determining an optimal choice of tools: “It is not uncommon that 500 tools and more are used in a modern production line, resulting in an almost infinite number of different sorting options. When re-sorting the tools to the optimal positions, we can significantly reduce waiting times in the production process.” Customers, in addition, use the tool and machine data provided by uaGate 840D to improve tool installation and calibration.

Advantages of gateway solution

Use of the uaGate 840D gateway allows access to the complete set of SINUMERIK 840D data and alarms.

Use of the uaGate 840D gateway allows access to the complete set of SINUMERIK 840D data and alarms.

Using the uaGate 840D gateway provides significant advantages for customers. First, the uaGate 840D can process up to 20,000 symbols in total. It also provides read optimization to summarize drive data and to read the values of several drives simultaneously using just one request, resulting in higher performance. Furthermore, the gaeway supports subscribing to all the drive data, alarms and values from the PLC and NC area.

The gateway is backwards compatible up to software version V4.3, which is beneficial to customers, since users are often cautious to migrate to a newer software version due to possible problems arising during production or to reduce potential liability and warranty issues. When using the gateway, customers can access the complete alarm list including the individual active/inactive time stamps.

Plus, the gateway provides convenient browsing of the complete integrated namespace and subscription by any OPC UA Client. Finally, the pre-configured symbol files allow for a fast start-up configuration and the MQTT interface makes uaGate 840D a solution for integrating Industrie 4.0 and cloud applications.

Comprehensive solution

As a result, the gateway offers easy access to the SIMATIC S7 controller as well as NC and drive data. Product manager Sebastian Schenk gives a short overview of the uaGate 840D development: “In the past, we often received inquiries as to whether we could not use our knowledge of Siemens and the OPC UA standard for a product for SINUMERIK 840D integration. In fact, we have managed to develop this gateway in a very short time.

This offers customers a simple and practical solution for implementing Industrie 4.0 applications. Especially, the included pre-configured symbol files support to setup the data exchange with just a few clicks. And we are not at the end of our development efforts: Based on specific customer requests we are currently performing first tests for accessing the data in SINUMERIK 840D pl CNC controllers as well.”

Application report by Softing