IT in Manufacturing

Seamless acquisition and analysis of plant data

Technews Industry Guide: Maintenance, Reliability & Asset Optimisation 2019 IT in Manufacturing

PC-based control and TwinCAT automation software together provide the techno-logical foundation for the advanced Industry 4.0 and Internet of Things architectures that enable highly intelligent machines. TwinCAT Analytics, as a basis for comprehensive analysis functions, provides an important component of such architectures. It supports, for example, the ability to investigate the potential for machine optimisations, to facilitate both predictive maintenance and subsequent behavioural analyses and to manage a long-term data archive. TwinCAT Analytics also helps innovative machine builders create entirely new business models.

Even an intelligent machine may sometimes experience malfunctions. At such times, true intelligence can be recognised in the methods provided by the machine for analysing the problem. Naturally, malfunctions will always be costly and time-consuming. However, they are all the more annoying if vital machine data

and production parameters are no longer available that could otherwise be used to analyse and avoid these problems in the future. The end result is often that problematic behaviour cannot be analysed, and additional data logging mechanisms must be implemented. Even then, analysis cannot proceed until the

problem occurs again. Specifically positioned to solve this lack of information, TwinCAT Analytics collects all process-related data for every machine cycle. This produces a complete log of all machine procedures. Depending on requirements, the data can be collected and analysed locally on the machine’s computer, or within a cloud-based solution in a private network, or over the Internet. Cloud-based solutions are particularly suitable for developing new business models, because they not only enable users to analyse behaviours after the event, but they can also analyse the data itself in order to take preventive action on the appropriate machine. Here, the key idea is ‘predictive maintenance’, something that machine manufacturers can offer as a revenue-generating service to their end customers.

No data? No analysis.

The basis of effective analysis is seamless data acquisition; users can enable this functionality by running the TwinCAT Analytics Logger on the control computer. It can also be easily configured in the engineering environment of TwinCAT 3: in the configuration interface, users simply activate the checkboxes for the data to be cyclically collected from the process image or application. The user can also specify whether the data should be stored locally or transmitted using a communication protocol. For either case, one can set up a ring buffer, useful to help ensure that local storage does not exceed the maximum possible storage capacity. If the data is communicated directly, a ring buffer can also bridge a temporary loss of connection.

IoT communication and cloud technology promote highly flexible analysis architectures

Direct transfer of data with the TwinCAT Analytics Logger is particularly suitable for developing new business models. It relies on so-called ‘IoT communication protocols’, which offer outstanding features for using cloud services. IoT protocols always set up an outgoing connection to a message broker. This decouples the communication so that the network nodes – unlike those using conventional client/server communication protocols – do not need to know one another. The communication participants all operate as the client. In this case, the TwinCAT Analytics Logger that runs on a control computer is an IoT client, ‘publishing’ data to a message broker and storing it in what is called a ‘topic’. Note that topics can be hierarchical.

The message broker maintains a list of ‘interested parties’ for corresponding topics, and other IoT clients can subscribe to these topics and their data. For example, an analysis server may be interested in the logger’s data or even a mobile application on a smartphone. Both of them are IoT clients, both subscribe to an appropriate topic and each receives a copy of the data. The beauty of IoT protocols is in their outgoing connections, because firewalls usually only block incoming connections. An elaborate opening of ports is no longer necessary. A further advantage of IoT technology is evidenced by the complete flexibility that can be achieved: users can leverage the identical mechanisms within a local network architecture and for communicating with Internet-based services. Cloud providers such as Amazon Web Services and Microsoft Azure have their own IoT message brokers that can be used for communication. The best-known protocols here are currently MQTT (MQ Telemetry Transport) and AMQP (Advanced Message Queuing Protocol), which are both supported by TwinCAT.

The TwinCAT Analytics infrastructure

As previously stated, the IoT interface gives machine manufacturers and end users great freedom when setting up TwinCAT Analytics. Naturally, the TwinCAT Analytics PLC library can be used to analyse the recorded data locally on any machine. If a machine controller should not be powerful enough to carry out the analysis locally, IoT connectivity enables the analysis of data in a local cloud by the end user. This means that machine operators can analyse their machines in their own network environment. In this case, TwinCAT Analytics can run on a server and analyse a number of machines at this one production site.

You can alternately install TwinCAT Analytics on a virtual machine. The obvious way of doing this is to use a public cloud. Here, you can flexibly lease and use processor power, storage space and IT infrastructure from vendors such as Microsoft Azure. This greatly simplifies the global connection of machines to the analytics system. Another variant is for machine manufacturers to operate as service providers for their machines and either analyse the generated data in the cloud, or use the cloud only as a ‘transmission medium’ and perform the analysis on a server within their own IT infrastructure. If end users – who are of course interested in high machine availability, high productivity and high product quality – prefer to hire external analysts, they can provide them with the necessary access data for the message broker, the topic architecture and the data description. In this way, a third-party analyst can access the necessary data and offer its customers appropriate services.

Big data brings big benefits

TwinCAT Analytics not only provides data using the IoT protocol, it also answers the question of how to use the data. Simply generating enormous amounts of data is not enough, these data volumes also have to be managed. The core element, the TwinCAT Analytics Workbench, makes exactly that possible, providing the ability to analyse data directly online or offline. Online means that the Analytics Workbench uses the IoT communication protocol to subscribe, on the message broker, to the topic corresponding to the machine that is to be analysed. Offline is an option if the machine has previously stored its data using Beckhoff Cloud Storage. The Cloud Storage facility integrates itself seamlessly into all the variants of the previously described Analytics infrastructure, both in the cloud and in a local IT network environment. The Workbench can then access this historical data and analyse it.

The TwinCAT Analytics Workbench

TwinCAT Analytics Workbench is based on a TwinCAT runtime system that can be configured and programmed using the TwinCAT Engineering Environment. The big advantage is that machine manufacturers do not need to make any changes when switching between the programming environment for the controller and the environment of the analysis software. They can directly apply their years of programming expertise when using the Workbench. This makes it very easy to implement their own analysis algorithms, reuse algorithms previously used for different machines, or alternatively, to use algorithms from the TwinCAT Analytics PLC library. This incorporates modules for counting flanks, analysing maximum and minimum values, evaluating the timing of machine cycles, and calculating the energy consumption per unit time of a selected component.

Particularly when evaluating the timing of machine cycles, it is useful to identify the shortest, longest and average runtimes. This enables you to recognise potential optimisations or to derive indicators for predictive maintenance. For example, a status analysis can easily determine whether a rotating milling head is frequently stationary, running with speed a, b or c, or is in an error state. Such results can be clearly displayed in a histogram, which is why the familiar TwinCAT Charting Tool, ‘TwinCAT Scope’ is such a crucial feature of Analytics Workbench. This particularly applies to interactions with the Analytics Configurator that is also embedded in the TwinCAT engineering environment. It means that you can compile a post-scope configuration for previously recorded data in order to get a fresh graphical display of the data curves.

The Analytics Configurator

For viewing data, the Analytics Configurator already uses the same algorithms that are used in the analytics library. The data streams from the selected periods are analysed in the Configurator and displayed directly. Significant values obtained in this way can easily be dragged-and-dropped into the charting interface of TwinCAT Scope. Scope then automatically navigates to the corresponding locations in order to illustrate their relation to other signals. This makes it much easier to locate the needle in the ‘big data haystack’. It also markedly simplifies engineering using the Analytics Configurator. Since all algorithms come from the same source, you can take the configuration that was set up in the Configurator, together with all the selected variables and their corresponding limit values, and feed it into the PLC. This enables switching from offline analysis to online analysis using data streamed from the cloud.

The TwinCAT Analytics Workbench Base

The functionality described here refers to the TwinCAT Analytics Workbench Base. This incorporates a TwinCAT PLC runtime system, the Analytics PLC library, an IoT connection for streaming data, the Analytics Configurator and ScopeView Professional. The Workbench can also be extended by installing packages for Condition Monitoring, C++ and MATLAB/Simulink. In particular, integrating MATLAB/Simulink into the TwinCAT runtime system offers comprehensive access to useful toolboxes that answer tough analytical questions. For example, one such toolbox deals with machine learning and optimisation.

In addition to the dedicated extensions of TwinCAT Analytics, other TwinCAT standard tools can also be used. The TwinCAT Database Server can store online and offline data in a variety of databases. An analytics system can also be supplied with data using the widely used automation protocol, OPC UA. In addition, Beckhoff provides converters from OPC UA to IoT protocols in order to give, for example, third-party controllers access to analysis functions. Another very important solution is TwinCAT 3 HMI, which enables you to design intuitive dashboards based on HTML5 for the Analytics Workbench. This creates an Analysis Cockpit that can then be used to display all the results for a given machine or a number of machines. A hierarchical structure makes it possible to display much deeper levels of detail.

Forward-looking automation with TwinCAT Analytics

Industry 4.0 and IoT technologies, and particularly the use of clouds, are increasingly dissolving the hierarchies of conventional communication architectures. All network nodes, from real-time field devices to ERP systems, can now communicate with each other. TwinCAT Analytics suits this trend extremely well, by incorporating not just a single product, but a complete solution. The IoT communication protocols used handle the data transport and give the infrastructure maximum flexibility. The Analytics Workbench itself takes over machine-related evaluations, visualisations and pre-processing of data, as well as long-term database storage. Extended data analysis and machine learning for the purpose of machine optimisation can be implemented in TwinCAT through the seamless integration of MATLAB/Simulink or other cloud services accessible via IoT protocols. Analytics Workbench makes all of these functions available and is itself directly integrated into the familiar TwinCAT environment in Microsoft Visual Studio. This robust analysis of machine data serves as a key factor for numerous new business models, as well as for future-proof and efficiency-optimised automation.

For more information contact Michelle Murphy, Beckhoff Automation, +27 11 795 2898,,


Share this article:
Share via emailShare via LinkedInPrint this page

Further reading:

Yokogawa’s Smart Terminal Automation Solution
April 2019, Yokogawa South Africa , IT in Manufacturing
Yokogawa has accumulated more than two decades of experience in the automation of such terminals and supplied its Terminal Automation Solution to suit varying customer needs.

Listening to the Voice of the Machine
April 2019, Parker Hannifin Sales Company South , IT in Manufacturing
The value of discrete IoT.

Measurement data on the lookout for artificial intelligence
April 2019, Phoenix Contact , IT in Manufacturing
In the global race for competitive prices, it is the most efficient processes that win the race.

System integrated, high end measurement technology
April 2019, Beckhoff Automation , System Integration & Control Systems Design
The EtherCAT measurement modules from Beckhoff offer a right-fit solution by allowing high performance measurement technology to be incorporated directly into the control systems.

IoT-enabled field services improve industrial asset availability
Technews Industry Guide: Maintenance, Reliability & Asset Optimisation 2019 , IT in Manufacturing
Today, many equipment manufacturers are reclaiming the service relationship from the distribution channels with a modern field service management system and remote monitoring.

Understanding how predictive analytics tools benefit power utility management
Technews Industry Guide: Maintenance, Reliability & Asset Optimisation 2019, IS³ - Industry Software, Solutions & Support , IT in Manufacturing
This paper reviews how predictive analytics tools can be applied to both utility operations and maintenance.

Faster results with a digital twin
April 2019, Siemens Digital Industries , IT in Manufacturing
High tech company Grenzebach’s portfolio includes the simulation of material flow in complex plants in the glass industry. To achieve this, Grenzebach uses Siemens’ simulation solutions. Together, the ...

Mining in the Industry 4.0 era
April 2019 , IT in Manufacturing
Pitram from Micromine can assist mining operations to automate and boost efficiency.

Stepping carefully into the Fourth Industrial Revolution
April 2019 , IT in Manufacturing
Rapid advances in technology and artificial intelligence in the mining industry raise issues like data protection, intellectual property ownership and legal liability. In the current absence of specific ...

Paving the way to digitalisation in oil and gas
April 2019, RJ Connect , IT in Manufacturing
Oil and gas are still indispensable fuels for the global economy, and exploring for new sources of oil and gas remains a lucrative and attractive endeavour. New oil platforms, rigs and pipelines are constantly ...