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

Institutions

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

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Novel Method of PLC Code Generation Based on Large Language Models

Chunhe Song, J. P. Zheng, Yong Sun, Li Dong
Advanced Computational Techniques and Applications
article

A Novel Method of PLC Code Generation Based on Large Language Models

Chunhe Song, J. P. Zheng, Yong Sun, Li Dong
article en

Abstract

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.

University of Chinese Academy of Sciences (CN)
National Natural Science Foundation of China
Openalex Percentile: Top 90%
Advanced Computational Techniques and Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.