AI for PLC programming is useful today for drafting Structured Text, explaining unfamiliar code, generating test cases and producing first-pass documentation. It is not yet reliable enough to write production logic unsupervised, and it should never touch safety functions without the same verification you would apply to a junior engineer's work. Used as an assistant inside a disciplined workflow, it saves real hours.
What the major vendors now offer
In April 2024 Siemens announced that its Industrial Copilot was connected to the TIA Portal, able to generate and explain SCL code and help create an initial visualisation in WinCC Unified (Siemens press release). Rockwell Automation and Beckhoff have also added AI assistance to their engineering tools, and a number of independent tools target ladder logic and Studio 5000. The common thread is that all of them generate text-based code, mostly IEC 61131-3 Structured Text, far better than they handle graphical languages.
Industrial Copilot Engineering: Siemens introduces generative AI-powered product for the industry
Siemens Knowledge Hub
This video is hosted on YouTube. Playing it loads content from Google, which may set cookies.
Watch on YouTubeWhat the research says
The most cited academic work is LLM4PLC, published in January 2024. The authors found that general-purpose models such as GPT-4 failed to produce valid PLC programs on their own. Wrapping the model in a loop with grammar checkers, compilers and formal verification raised the generation success rate from 47% to 72%, and expert-rated code quality from 2.25 to 7.75 out of 10. The lesson for practitioners is clear: the value comes from the verification loop, not the model alone.
Where AI helps controls engineers now
| Task | Usefulness today | Notes |
|---|---|---|
| Drafting Structured Text function blocks | High | Scaling, filtering, state machines, string handling |
| Explaining inherited code | High | Good for undocumented networks and cryptic tag names |
| Writing test cases from a specification | High | Speeds up virtual commissioning preparation |
| Commenting and documentation | High | Still needs a human review for accuracy |
| Converting between languages or platforms | Medium | Helpful first pass for migrations; check every timer and edge |
| Ladder logic generation | Low to medium | Graphical languages are harder for text models |
| Safety PLC logic | Do not use unsupervised | Must follow the safety lifecycle and validation |
Where it fails, and why
- No knowledge of your machine. The model does not know your I/O, your sensor quirks or why line 3 has a two-second delay. It will invent plausible tags.
- Scan-cycle thinking. Models trained mostly on general software write sequential code that ignores how a PLC scans, latches and resets.
- Vendor dialect. Siemens SCL, Rockwell ST and CODESYS ST differ in small ways that break compilation.
- Timing and edge cases. Timers, one-shots and restart behaviour after a power loss are exactly where generated code goes wrong.
- Confidence. Output reads well even when it is wrong, which is the most dangerous property in a control system.

A safe workflow for AI-assisted PLC code
- Start from a written functional specification; give the assistant the relevant section, not a vague prompt.
- Provide your tag list and data types so it cannot invent signals.
- Generate small units: one function block, one state machine, one alarm handler.
- Compile in the real engineering tool and fix every warning.
- Run the block against a simulated machine with normal, fault and restart test cases.
- Peer review by an engineer who understands the process, then commit to version control.
- Keep safety functions out of scope unless your safety lifecycle explicitly covers tool-assisted code.
How to evaluate an AI coding tool for your controls team
Run a short, honest trial before buying. Pick five tasks your engineers did last quarter: a scaling block, a state machine for a simple station, an alarm handler, a code explanation and a documentation job. Give each tool the same inputs and score the results on four things: does it compile first time in your engineering software, does it pass your test cases in simulation, how long did review take, and did it invent any tags or functions. Track the time saved after review, not the time to first draft.
Check also which version of the standard the tool targets. IEC 61131-3 reached its fourth edition in May 2025, adding UTF-8 strings and listing features added, removed or deprecated since 2013. Your platform may support a subset, and generated code should match what your controller actually compiles.
What this means for team structure
AI does not remove the need for controls engineers; it shifts their time towards specification, testing and review. Teams that already write specifications and test in simulation get the most from assistants, because they can check output quickly. Teams that commission by trial and error on site will find AI amplifies the problem. The most useful skill to build now is writing precise specifications and test cases, covered in our functional specification guide and our overview of IEC 61131-3 languages.
Where Wartens fits
Through LADX, Wartens works on AI assistance for PLC programming, aimed at in-house controls engineering teams, and on expert-verified PLC training data. Our view is shaped by our own engineers: AI drafts, and humans specify and review.
If you want to trial AI assistance with your controls team, or need expert-verified PLC data for a model, see our industrial AI service or get in touch. For the engineering itself, see automation engineering.



