XML Exporter

Classification of the XML Exporters

The XML Exporters provided by Beckhoff can be freely used and changed. They are open source and under MIT license. This offers customers the option of adapting the XML Exporter according to their needs, for example by adding company-specific or project-specific CustomAttributes, cf.XML Tag CustomAttributes.

The XML exporters are provided after installation of the product in the folder
<TwinCATPath>\Functions\TF38xx-Machine-Learning\Utilities\exporter.

XML Exporter 1:

The XML Exporters are based on special versions of the libraries

It is recommended to export created ML models via the ONNX format as well as to convert correspondingly to XML or BML. In the early phase of TwinCAT Machine Learning, the XML Exporters were intended as a transitional solution until all relevant libraries offered comprehensive ONNX support. This is the case today, so XML Exporters are no longer tested and updated with newer libraries.

Direct XML export of an MLP

Only network architectures that have a sequential structure in the following sense are supported: each neuron of one layer is exclusively linked to each neuron of the following layer. It is possible to export layers without bias.

Export from Keras / Tensor Flow

from tensorflow.keras.models import Sequential
model = Sequential()
from keras.layers import Activation, Dense
# this will not work !!!
model.add(Dense(64))
model.add(Activation(‘tanh’))
# this will work
model.add(Dense(64,activation=’tanh’))

Export from MATLAB®

Direct XML export of an SVM

Export from Scikit-learn