Pith. sign in

Training LLMs for Generating IEC 61131-3 Structured Text with Online Feedback

1 Pith paper cite this work. Polarity classification is still indexing.

1 Pith paper citing it
abstract

IEC 61131-3 Structured Text (ST) is a widely used programming language for programmable logic controllers (PLCs) in automation systems. However, generating ST code with LLMs poses unique challenges due to limited data in public training datasets and the complexity of ST language syntax. This paper proposes an approach to fine-tune LLMs for the generation of ST code that leverages a preference-based learning method through an online process involving compiler feedback and evaluation from an LLM-based ST expert. In this framework, the model is iteratively refined and generates new training samples, which are subsequently evaluated by a compiler for syntactical correctness and by a specialized LLM that excels at assessing semantic accuracy, though it is not optimized for code generation itself. This approach results in marked improvements for the trained LLM, leading to higher compilation success rates and better semantic precision. As a result, the framework proves highly suitable for industrial automation applications and outperforms state-of-the-art models.

citation-role summary

background 1

citation-polarity summary

fields

cs.SE 1

years

2024 1

verdicts

CONDITIONAL 1

roles

background 1

polarities

support 1

representative citing papers

citing papers explorer

Showing 1 of 1 citing paper.

  • AutoPLC: Generating Vendor-Aware Structured Text for Programmable Logic Controllers cs.SE · 2024-12-03 · conditional · none · ref 16 · internal anchor

    AutoPLC combines retrieval from vendor-specific code libraries, LLM-based planning and API recommendation, and compiler feedback from real PLC IDEs to generate compilable Structured Text code for Siemens SCL and CODESYS ST at over 90% compilation pass rates.