ChatGPT for PLC/DCS Control Logic Generation
Heiko Koziolek, Sten Gruener, Virendra Ashiwal

TL;DR
This paper explores how GPT-4 can generate control logic code for PLCs and DCS from natural language prompts, demonstrating promising syntactic correctness and reasoning skills that could aid control engineers.
Contribution
It presents an exploratory study with a prompt collection and analysis of GPT-4's ability to generate control logic code, forming a basis for a new benchmark.
Findings
GPT-4 generates syntactically correct IEC 61131-3 Structured Text code
Demonstrates useful reasoning skills for control logic tasks
Prompt collection enables future benchmarking of LLMs in control engineering
Abstract
Large language models (LLMs) providing generative AI have become popular to support software engineers in creating, summarizing, optimizing, and documenting source code. It is still unknown how LLMs can support control engineers using typical control programming languages in programming tasks. Researchers have explored GitHub CoPilot or DeepMind AlphaCode for source code generation but did not yet tackle control logic programming. The contribution of this paper is an exploratory study, for which we created 100 LLM prompts in 10 representative categories to analyze control logic generation for of PLCs and DCS from natural language. We tested the prompts by generating answers with ChatGPT using the GPT-4 LLM. It generated syntactically correct IEC 61131-3 Structured Text code in many cases and demonstrated useful reasoning skills that could boost control engineer productivity. Our prompt…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Artificial Intelligence in Healthcare and Education
MethodsMulti-Head Attention · Attention Is All You Need · Test · Softmax · Layer Normalization · Byte Pair Encoding · Dropout · Linear Layer · Label Smoothing · Adam
