mlsanityData to 7 Oct 2026

AutoPLC: Generating Vendor-Aware Structured Text for Programmable Logic Controllers

arXiv 2412.02410 ↗First posted 3 Dec 2024cs.SE cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

Among the programming languages for Programmable Logic Controllers (PLCs), Structured Text (ST) is widely adopted for industrial automation due to its expressiveness and flexibility. However, major vendors implement ST with proprietary extensions and hardware-specific libraries - Siemens' SCL and CODESYS' ST each differ in syntax and functionality. This fragmentation forces engineers to relearn implementation details across platforms, creating substantial productivity barriers. To address this challenge, we developed AutoPLC, a framework capable of automatically generating vendor-aware ST code directly from natural language requirements. Our solution begins by building two essential knowledge sources tailored to each vendor's specifications: a structured API library containing platform-exclusive functions, and an annotated case database that captures real-world implementation experience. Building on these foundations, we created a four-stage generation process that combines step-wise planning (enhanced with a lightweight natural language state machine support for control logic), contextual case retrieval using LLM-based reranking, API recommendation guided by industrial data, and dynamic validation through direct interaction with vendor IDEs. Implemented for Siemens TIA Portal and the CODESYS platform, AutoPLC achieves 90%+ compilation success on our 914-task benchmark (covering general-purpose and process control functions), outperforming all selected baselines, at an average cost of only 0.13 per task. Experienced PLC engineers positively assessed the practical utility of the generated code, including cases that failed compilation. We open-source our framework at https://github.com/cangkui/AutoPLC.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 28 of its 61 references that are in the map. First posted on arXiv 3 Dec 2024.

Builds on

28 of 61 references.

References · 28

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023GPT-4 Technical Reportcited by 18,132
  3. 2021Program Synthesis with Large Language Modelscited by 3,509
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  5. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  6. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  7. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  8. 2024ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Toolscited by 1,096
  9. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  10. 2022A Survey on In-context Learningcited by 717
  11. 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
  12. 2024TrustLLM: Trustworthiness in Large Language Modelscited by 280
16 more
  1. 2023Self-collaboration Code Generation via ChatGPTcited by 255
  2. 2023Planning with Large Language Models for Code Generationcited by 179
  3. 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solvingcited by 177
  4. 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
  5. 2022A Survey on Retrieval-Augmented Text Generationcited by 157
  6. 2021Retrieval Augmented Code Generation and Summarizationcited by 148
  7. 2023Structured Chain-of-Thought Prompting for Code Generationcited by 136
  8. 2023Self-planning Code Generation with Large Language Modelscited by 121
  9. 2023UDAPDR: Unsupervised Domain Adaptation via LLM Prompting and Distillation of Rerankerscited by 37
  10. 2024Agents4PLC: Automating Closed-loop PLC Code Generation and Verification in Industrial Control Systems using LLM-based Agentscited by 25
  11. 2024LLM4PLC: Harnessing Large Language Models for Verifiable Programming of PLCs in Industrial Control Systemscited by 20
  12. 2024VersiCode: Towards Version-controllable Code Generationcited by 14
  13. 2023LLM-based Control Code Generation using Image Recognitioncited by 10
  14. 2023ChatGPT for PLC/DCS Control Logic Generationcited by 9
  15. 2024Automated Control Logic Test Case Generation using Large Language Modelscited by 6
  16. 2024Training LLMs for Generating IEC 61131-3 Structured Text with Online Feedbackcited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 1.

2 papers.