AI for PLC programming means using large language models to generate, explain, document and check control code, from structured text functions to whole program skeletons built from an I/O list. In 2026 it is a real productivity tool for controls teams, especially for documentation, code review, boilerplate and finding your way around unfamiliar projects. It is not a substitute for an engineer who understands the machine, and every line it writes still has to be tested like any other code.

What the vendors offer now

Siemens and Microsoft introduced the Siemens Industrial Copilot in October 2023, built on Azure OpenAI Service, to generate, optimize and debug automation code. Siemens said customer data is not used to train the models (Siemens press release, October 2023). Rockwell's FactoryTalk Design Studio includes a generative AI copilot that takes natural-language prompts to generate code, explain selected rungs, routines or whole projects, and resolve errors, with AI agents that turn specifications and I/O lists into project content subject to engineer approval (Rockwell FactoryTalk Design Studio).

Beckhoff announced TwinCAT Chat in 2023, bringing LLMs into the TwinCAT engineering environment with one-click actions such as optimize, document, complete and refactor (Beckhoff, November 2023). Beckhoff was candid that early versions sometimes invented motion functions that did not exist. That candor is the right attitude for everyone using these tools.

Driving Innovation in Industrial Automation with FactoryTalk Design Studio and Generative AI

Rockwell Automation

This video is hosted on YouTube. Playing it loads content from Google, which may set cookies.

Watch on YouTube
Rockwell Automation on generative AI in FactoryTalk Design Studio.

What the research shows

Academic work points to the same conclusion: AI-generated control code gets much better when it is checked automatically. The LLM4PLC study combined a language model with syntax checkers, formal verification and feedback loops. It raised the generation success rate from 47% to 72% and the expert code-quality score from 2.25 to 7.75 out of 10 (Fakih et al., LLM4PLC, arXiv 2024). In other words, the model alone is not the product. The pipeline around it is.

TaskAI usefulness todayHuman check needed
Explaining an unfamiliar programHighSpot-check against the code
Writing rung comments and documentationHighReview for accuracy
Generating structured text functionsMedium to highFull test
Building a project skeleton from an I/O listMediumArchitecture review and test
Safety logicLowDo not delegate
Rows of Peregrine supercomputer cabinets with mountain artwork at a U.S. Department of Energy laboratory in Golden, Colorado
Most PLC copilots run on cloud computing. Check where your code and data go before you paste a project into any tool.

The risks controls teams must manage

  • Plausible but wrong code. Generated logic often looks right and compiles. Interlocks, edge cases and timing are where it fails.
  • Invented functions. Models can call instructions or library blocks that do not exist on your platform or firmware.
  • Data exposure. PLC programs contain process know-how. Know the tool's data handling and your company's policy.
  • Skill erosion. Junior engineers still need to learn why the code works, or they will not catch the errors.
  • Standards drift. Generated code ignores your naming and structure rules unless the tool is given them.

NIST's AI Risk Management Framework, with its Govern, Map, Measure and Manage functions and a generative AI profile published in July 2024, is a sensible structure for writing a team policy (NIST AI RMF). It does not need to be long: approved tools, what data may be shared, what must be reviewed and how AI-assisted changes are recorded.

Where AI helps most on real projects

In our own work, the biggest gains are not in writing new logic. They are in the jobs engineers dislike and often skip. Documenting an inherited program with no comments. Producing a cross-reference of every place a tag is written. Turning an I/O list into consistent tag declarations and alarm text. Drafting test cases from a functional specification. Explaining a 15-year-old routine to a new engineer before a migration. These are tasks where a wrong answer is easy to spot and the time saved is large.

Code review is the other strong use. Asked the right questions, a model will point out a timer that is never reset, an output written in two routines or an alarm with no acknowledgment path. It will also raise false alarms, so treat its findings as a list to check, not a verdict. New control logic is a different matter. A sequence for a machine that has never run before depends on details no model has seen: how this conveyor behaves when a carton tips, how long this valve really takes to close. AI can draft the structure, but the engineer must own the behavior.

A safe workflow we use

  1. The engineer defines the function: inputs, outputs, states and failure behavior, in writing.
  2. AI drafts the code or documentation using the team's standard and library as context.
  3. Automatic checks run: syntax, naming rules, forbidden instructions, cross-reference.
  4. The engineer reviews every line, as for a junior colleague's code.
  5. The code is tested in emulation against a simulated machine, including fault cases.
  6. The change record notes that AI assistance was used.

Language standards still matter. IEC 61131-3, the standard for PLC programming languages, was revised as edition 4.0 in May 2025 (IEC webstore). Structured text is the easiest language for AI tools to read and write, which is one more reason to agree where your plant allows structured text and where ladder stays the rule.

AI for controls teams with LADX

In the U.S. we offer AI assistance for PLC programming through LADX, our AI product for controls teams. We use it inside the workflow above: AI speeds up drafting, documentation and review, and engineers stay responsible for what goes into the controller. If you want to see how it would fit your team, contact us or read about our industrial AI service. For the code that AI is meant to support, our controls engineering team and our guide to virtual commissioning show how everything gets tested before site.