A Novel Method of PLC Code Generation Based on Large Language Models
At present, large language models are very important and can help solve problems in fields with strong versatility. However, in some industrial control fields, such as the programmable logic controller (PLC) field, the versatility of large language models cannot solve the problem of compiling platform code application well, as the code generation problem in the PLC field is difficult because the code adaptability of different software in the PLC field is not good. This paper proposes a novel method of PLC code generation based on Large Language Models. First, a PLC-100 industrial dataset is constructed, which contains 10 types of 100 prompt words. It covers all aspects of structured text content and can be used as a high-quality prompt set. Second, a PLC code generation method based on GPT-4 with an adaptive evaluation system is proposed using the dataset. The experimental results show that, the dataset and the proposed evaluation algorithm in this paper can be well applied to large model code generation in the field of industrial control.
Authors
- Chunhe Song (ORCID: https://orcid.org/0000-0001-8392-1777)
- J. P. Zheng (ORCID: https://orcid.org/0000-0003-4891-0989)
- Yong Sun (ORCID: https://orcid.org/0009-0006-1796-9207)
- Li Dong (ORCID: https://orcid.org/0000-0002-1612-4716)
Institutions
- University of Chinese Academy of Sciences (CN)
Publication Details
- Published
- 2025-04-25
- DOI
- https://doi.org/10.1109/iccea65460.2025.11102210
- Primary Topic
- Advanced Computational Techniques and Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China