Skip to main navigation Skip to search Skip to main content

Design and Development of a Template Creator for Simplified PLC Code Generation

  • Sarah Reitzinger

    Student thesis: Master's Thesis

    Abstract

    Software for programmable logic controllers (PLCs) in industrial plants is increasingly
    generated automatically rather than written by hand. The Automation Portal, developed
    by FILL Gesellschaft m.b.H., follows this approach and assembles complete TIA Portal
    projects from reusable library projects. The templates that define the structure of the
    generated code rely on textual keywords, short annotations that mark the sections to
    be replaced during generation. Their number grows with the functionality of the library
    projects. Templates therefore become difficult to read, error-prone to write, and costly
    to maintain, and few automation engineers can handle them effectively.
    This work is situated at the intersection of industrial automation, template-based
    code generation, and visual domain-specific languages. Established approaches reduce
    repetitive engineering effort effectively, but expose textual markers, XML models, or
    substitution languages directly to the user. None of them provides a dedicated graphical
    environment for authoring the generation logic itself, which is the gap addressed in this
    thesis.
    The Template Creator was designed and implemented as a prototype integrated
    into the Automation Portal. Blockly was selected as the visual programming framework
    and embedded into the existing C# WPF application. Keywords are replaced by an
    explicit rule concept, comprising textual replacement, numerical replacement, option,
    and extension rules, each provided as a dedicated block. Components of a loaded li
    brary project, such as program blocks and data types, can be reused directly within
    templates. The visual workspace is parsed into the abstract syntax tree already used by
    the application, so the established code generator and the workflow of the programmer
    remain unchanged.
    The prototype was evaluated through a capability assessment and user feedback,
    collected as a qualitative questionnaire and a weighted comparison across three template
    creation tasks of increasing complexity. All keyword functionality could be expressed
    through rules and visual constructs, and keyword-specific syntax errors are eliminated
    by design. Experts estimate an effort reduction of roughly one third and consider a
    full migration realistic. Since the evaluation rests on a small group of domain experts,
    its results are best understood as strong indications of the practical usefulness of the
    approach. A larger quantitative study and a pilot migration of existing templates are
    the natural next steps towards adoption.
    Date of Award2026
    Original languageEnglish (American)
    Awarding Institution
    • FH OÖ
    SupervisorFranz Leopold Wiesinger (Supervisor)

    Studyprogram

    • Embedded Systems Design

    Cite this

    '