AI Tools for PLC Programmers: What's Available in 2026
AI code assistants have taken over the software development world. GitHub Copilot, ChatGPT, Claude, Cursor -- every programmer seems to have an AI helper now. But what about PLC programmers? Can these tools actually help with Structured Text, Function Block Diagrams, and CODESYS projects?
The short answer: yes, but with caveats. Here's a practical rundown of what's available and what actually works.
General-Purpose AI Chatbots
ChatGPT, Claude, Gemini
What they can do:
- Generate Structured Text code from descriptions
- Explain existing PLC code
- Help debug logic errors
- Answer IEC 61131-3 questions
- Convert pseudo-code to ST
What they can't do:
- See your CODESYS project
- Write code directly into your IDE
- Know your specific hardware or libraries
- Guarantee IEC 61131-3 compliance
Best for: Quick questions, learning ST syntax, generating code snippets you'll adapt manually.
How to use them effectively: Be specific in your prompts. Instead of "write a motor controller", say:
"Write a CODESYS Structured Text function block called FB_MotorControl with BOOL inputs bStart, bStop, bEmergency (NC), a REAL input rCurrent, BOOL outputs bRunning and bFault, an INT output nFaultCode. Include overcurrent protection at 20A, start delay of 500ms, and fault reset via bStop when conditions are clear."
The more detail you provide, the better the output.
Pros and Cons
| Pros | Cons | |------|------| | Free or cheap | No project context | | Available immediately | Copy-paste workflow | | Good for learning | May generate non-standard ST | | Handle many languages | Don't know your hardware |
General Code Assistants (Copilot, Cursor)
GitHub Copilot
GitHub Copilot works inside VS Code and JetBrains IDEs. It can autocomplete Structured Text if you have .st files open, but it wasn't trained primarily on PLC code.
Reality check: Copilot's ST suggestions are hit-or-miss. It works well for simple patterns but struggles with CODESYS-specific constructs like VAR_IN_OUT, PERSISTENT variables, and library-specific function blocks.
Cursor
Cursor is an AI-first code editor. Similar to Copilot but with a stronger chat interface. Same limitation: it doesn't understand CODESYS project structure or PLC-specific patterns deeply.
Best for: Programmers who already work with .st files in a text editor outside CODESYS.
CODESYS-Specific AI Tools
PLC Assist
PLC Assist is built specifically for CODESYS developers. Unlike general-purpose tools, it:
- Connects to your running CODESYS instance via a bridge script
- Reads your project tree -- sees every POU, GVL, DUT, method, property, and library
- Writes code directly into your CODESYS project (with review before applying)
- Keeps your code local -- only chat messages are sent to the AI, not your project code
- Understands IEC 61131-3 patterns natively
The difference is context. When you say "add a timeout to FB_Sequence", it reads your actual FB_Sequence code and modifies it appropriately, rather than generating a generic template.
How to Choose
Use a general chatbot (ChatGPT, Claude) when:
- You want to learn Structured Text
- You need a quick code snippet
- You're researching a programming pattern
- You want an explanation of existing code
Use a code assistant (Copilot, Cursor) when:
- You edit
.stfiles in a text editor - You want inline autocomplete while typing
- You're comfortable adapting suggestions manually
Use a CODESYS-specific tool (PLC Assist) when:
- You want AI that sees your actual project
- You need code written directly into CODESYS
- You work with complex projects (many POUs, GVLs, DUTs)
- You want your PLC code to stay on your machine
- You need IEC 61131-3 accuracy
Tips for Using Any AI Tool with PLC Code
1. Always Specify the Language
AI tools default to popular languages. Always start your prompt with context:
"In CODESYS Structured Text (IEC 61131-3), write..."
2. Include Variable Types
Don't just say "a temperature variable". Say "rTemperature : REAL" so the AI uses correct IEC 61131-3 types.
3. Mention CODESYS-Specific Features
If you need PERSISTENT variables, VAR_IN_OUT, R_TRIG/F_TRIG, or specific library blocks, mention them explicitly.
4. Review Everything
No AI tool -- general or specialized -- should be trusted blindly for PLC code. Always review, test in simulation, and validate before deploying to real hardware.
5. Start with Low-Risk Code
Use AI for:
- Boilerplate (VAR declarations, FB scaffolding)
- Documentation and comments
- Utility functions (moving average, string helpers)
- Data type definitions
Keep manual control over:
- Safety interlocks
- Emergency stop logic
- Timing-critical sequences
- Any SIL-rated functions
The Bottom Line
AI tools for PLC programming are real and useful today. General chatbots are a good starting point, but purpose-built tools like PLC Assist are where the real productivity gains happen -- because they understand your project, not just the language.
The automation engineers who adopt these tools now will have a significant advantage. The learning curve is minimal, and the time savings on boilerplate alone make it worthwhile.
PLC Assist is an AI-powered engineering assistant for industrial automation. Start free -- 25 AI requests, no credit card required.