Entwicklung eines modularen Quelltextgenerators für Kommunikationsabläufe in Feldbussystemen

  • Michael Hinterberger

Student thesis: Master's Thesis

Abstract

Fieldbuses are used in the automation industry to control components of industrial
plants. Although the communication processes always follow the same patterns, the
same or similar functions are often re-implemented, especially in new projects. This
leads to increased time and cost expenditure and makes error analysis more difficult,
especially in the case of inconsistent log messages.
As a remedy, in this thesis a modular source code generator is developed. This source
code generator creates source code for fieldbus communication. The amount of source
code that has to be created manually should be minimized. First, automatic source
code generation is discussed in theory. Due to the specific requirements for the generated
source code and the possibility of using a simple source code generator, machine learning
(ML) is not utilized.
After the description of the communication protocol, some requirements are described. Among other things, the format of the input information for the source code
generator should be interchangeable, as the underlying fieldbus can change between applications. The input information contains the metadata about the information to be
transmitted.
A first version of the input information for the source code generator in the form of
an Excel file is presented. The generated files and the generated programming interface
for the client projects are also shown. The metadata of the information to be transferred
is necessary for the source code generation. An intermediate representation in a fixed
format is set up for this metadata.
The implementation of the source code generator is then described. The first part
of the source code generator converts the input information from Excel files into the
intermediate representation and can be exchanged to support other input formats. The
actual source code generation takes place in the second part of the source code generator
and uses templates for the target language. In this thesis, templates are created for the
C++ language. The implementation of a supporting C++ library is described. Recurring
functions from the generated source code are collected in this library. By exchanging
the templates, source code for other programming languages can be created.
Finally, the implemented source code generator and the generated C++ source code
are tested. For this purpose, an Excel file is created for the test. The source code is
generated from the Excel file and integrated into a test project. Some data is transferred
and some error states are generated. The analysis of the test results confirms the correct
functioning of the generator. The test results show that the source code generator fulfills
all defined requirements and significantly reduces the manual effort required to create
the bus access source code.
Date of Award2024
Original languageGerman (Austria)
SupervisorFranz Leopold Wiesinger (Supervisor)

Cite this

'