Agents4PLC: Automating Closed-loop PLC Code Generation and Verification in Industrial Control Systems using LLM-based Agents
Zihan Liu, Ruinan Zeng, Dongxia Wang, Gengyun Peng, Jingyi, Wang, Qiang Liu, Peiyu Liu, Wenhai Wang

TL;DR
This paper presents Agents4PLC, a framework that automates PLC code generation and verification using LLM-based multi-agent systems, incorporating retrieval-augmented generation and advanced prompting to improve industrial control system safety and correctness.
Contribution
Introduction of Agents4PLC, a novel multi-agent framework that automates PLC code creation and verification with enhanced techniques, and the establishment of a benchmark for verifiable PLC code generation.
Findings
Agents4PLC outperforms previous methods on the benchmark.
The framework achieves higher accuracy in code correctness and verification.
Enhanced prompt strategies improve code generation quality.
Abstract
In industrial control systems, the generation and verification of Programmable Logic Controller (PLC) code are critical for ensuring operational efficiency and safety. While Large Language Models (LLMs) have made strides in automated code generation, they often fall short in providing correctness guarantees and specialized support for PLC programming. To address these challenges, this paper introduces Agents4PLC, a novel framework that not only automates PLC code generation but also includes code-level verification through an LLM-based multi-agent system. We first establish a comprehensive benchmark for verifiable PLC code generation area, transitioning from natural language requirements to human-written-verified formal specifications and reference PLC code. We further enhance our `agents' specifically for industrial control systems by incorporating Retrieval-Augmented Generation (RAG),…
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.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsIndustrial Automation and Control Systems · Petri Nets in System Modeling · Flexible and Reconfigurable Manufacturing Systems
