@isw-bibliothek

Generating PLC Code with Universal Large Language Models

, , , , and . 2024 IEEE 29th International Conference on Emerging Technologies and Factory Automation (ETFA), page 1-8. (September 2024)
DOI: 10.1109/ETFA61755.2024.10711113

Abstract

Control software for production systems is typically developed by domain experts, despite its high complexity. The increasingly available Large Language Models (LLMs) can assist developers with code generation and debugging. However, their suitability for generating control software for production systems is still unexplored. Therefore, this study explores the generation of Structured Text (ST) according to IEC-61131-3 by different LLMs. We selected 21 coding examples that are representative of PLC programming and developed an approach for comparing the outputs of different LLMs using metrics for testing generated code (CodeBERTScore, pass@k, generation time). The strategies for prompt optimization that were developed as part of this work can be directly used for improved ST generation. Our results show that, at the time of the study, ChatGPT-4 had the highest reliability in generating syntactically correct ST code that expresses the desired functionality.

Links and resources

Tags