SemaPLC: An Open-Source Agentic IDE for Generation, Verification, and Simulation of PLC Programs from Natural Language
Programmable logic controllers (PLCs) run much of the world’s industrial automation, but writing and validating their IEC~61131-3 Structured Text (ST) is time-consuming and expert-intensive. Large language models (LLMs) can draft ST from a natural-language description, but existing open-source PLC editors give users no way to check that the generated program behaves as specified, or to simulate it before deployment. We present SemaPLC, an open-source IDE that closes this gap. From a natural-language description, a model-agnostic LLM agent drafts ST and SemaPLC runs a closed loop over it: it compiles, deploys, and verifies the user’s scenarios into a pass/fail behavioral report, repairing the code from feedbacks until it compiles and every scenario passes. It then renders a live in-browser process simulation alongside the ST source, an automatically derived ladder view, and real-time variables, all in synchronized panels. SemaPLC ships as two reusable open-source components, a web IDE and a PLC tool suite. Across classic control scenarios, SemaPLC turns natural-language prompts into behaviorally verified and simulated programs, putting a trustworthy, hardware-free PLC programming agent into a single browser tab.