550,190 active members*
2,978 visitors online*
Register for free
Login Register
Beckhoff Automation Blog

TwinCAT seamlessly integrates an open, real-time-capable machine learning solution into control tech

April 2019
Author: Beckhoff
Company: Beckhoff Automation GmbH & Co. KG
TwinCAT seamlessly integrates an open, real-time-capable machine learning solution into control tech
TwinCAT 3: Machine learning for all areas of automation
Seamlessly integrated, open and real-time machine learning for control systems
Beckhoff now offers a machine learning (ML) solution that is seamlessly integrated into TwinCAT 3 software. Building on established standards, TwinCAT 3 Machine Learning brings to ML applications the advantages of system openness familiar from PC-based control. In addition, the TwinCAT solution supports machine learning in real-time, allowing it to handle even demanding tasks like motion control. These capabilities provide machine builders and manufacturers with an optimum foundation to enhance machine performance, e.g. through prescriptive maintenance, process self-optimisation and autonomous detection of process anomalies.

The fundamental concept of machine learning is to no longer follow the classic engineering route of designing solutions for specific tasks and then turning these solutions into algorithms, but to learn the desired algorithms from exemplary process data instead. With this alternative approach, powerful ML models can be trained and then used to deliver superior or better-performing solutions. In automation technology, this opens up new possibilities and optimisation potential in many areas, including predictive maintenance and process control, anomaly detection, collaborative robotics, automated quality control and machine optimisation.


The models to be learned are trained in an ML framework, such as MATLAB®or TensorFlow, and then imported into the TwinCAT runtime via the Open Neural Network Exchange Format (ONNX), a standardised data exchange format used to describe trained models. The TwinCAT runtime incorporates the following new functions for this purpose:

    • the TwinCAT 3 Machine Learning Inference Engine for classic ML algorithms, such as support vector machine (SVM) and principal component analysis (PCA)
    • the TwinCAT 3 Neural Network Inference Engine for deep learning and neural networks, such as multilayer perceptrons (MLPs) and convolutional neural networks (CNNs)


Model results are directly executable in real-time

Inference, i.e. the execution of a trained ML model, can be performed directly in real-time with a TwinCAT TcCOM object. With smaller networks, system response times of less than 100 µs corresponding to a TwinCAT cycle time of 50 µs are supported. Models can be called via PLC, C/C++ TcCOM interfaces or a cyclical task.

Through seamless integration with the control technology, the multi-core support provided by TwinCAT 3 is also available for machine learning applications. This means, for instance, that different task contexts can access a particular TwinCAT 3 Inference Engine without restricting each other. All the fieldbus interfaces and data available in TwinCAT can be fully accessed as well. This allows ML solutions to use immense amounts of data, for example, for complex sensor data fusion (data merging), and it also means that real-time interfaces to actuators are available to enable, among other things, optimal control.

 Machine Learning

➥ Further Information: TwinCAT 3

 Download: Presskit (ZIP)


Blog Archiv

December 2021
May 2021
September 2020
August 2020
March 2020
February 2020
December 2019
November 2019
October 2019
June 2019
May 2019
April 2019
March 2019
February 2019
October 2018
September 2018
August 2018
February 2018
September 2017
February 2016
January 2016
December 2015