Industrial AI at SPS | Codesys
From Code Assistant to Chatbot – AI in Codesys
Codesys pursues a pragmatic AI approach: instead of unpredictable control logic, the company relies on assistance systems. Whether chatbot, automated code suggestions, or error handling – developers should save noticeable time, work more productively, and even enjoy it more. Bernhard Reiter explains the approach.
What role does AI play in your automation software?
Theoretically, there are several fields of application for AI in automation. For example, artificial intelligence could independently implement decision heuristics in control logic or optimize control algorithms. With the exception of computer vision systems, however, these use cases are rarely found in automation systems. The reason: AI-generated interventions are difficult to reproduce – and that’s a no-go for industrial applications.
A much more practical approach is to use AI as support in engineering, to simplify and accelerate the creation of program code and other engineering tasks. For SPS 2025, we will therefore be offering an integrated Codesys chatbot for the Codesys online help system, which will answer technical application questions. In addition, we will present results of our current development progress. For example, we use AI to automatically generate basic applications, receive improvement suggestions for compile errors, or analyze existing program code. The goal is to soon offer the Codesys community further benefits. In other words: even though Codesys already provides many comfort features, AI will make application development significantly more efficient.
How can AI specifically make PLC programming more efficient?
Monotonous and repetitive tasks annoy both us and our users! AI will make working more enjoyable by, for example, automatically creating program modules and their instances, recognizing manually typed programming instructions and completing them independently, or providing concrete suggestions for fixing translation errors or problem areas ("code smells").
AI will also be able to instantly generate usable code based on existing Codesys projects or libraries, code that would otherwise be quite time-consuming to write manually. Inexperienced application developers, in particular, will gain a faster sense of achievement this way. For these users, AI can also explain the function and structure of existing program code.
Another unpopular task where AI will help: testing application code. Codesys already provides an integrated tool for automated testing. However, users first need to create test scripts or code. This is exactly where AI can support them – thereby implicitly contributing to code quality.
How can AI be integrated into Codesys?
I’ve already mentioned the chatbot for our online help – we’ll be integrating it into the help system by the end of the year. A groundbreaking innovation is the Model Context Protocol (MCP). As a standardized interface, it enables the direct connection of tools such as the Codesys Development System to large language models (LLMs), i.e. generative AI systems. Together with the integrated command interface in Codesys, complex tasks can be handed over to the AI, which then executes them autonomously. In a Codesys project, processes that would otherwise be manual are thus performed automatically, as if by magic. Initial tests with Claude from Anthropic are already producing remarkable results.
Another approach we are researching: fine-tuning a local, highly optimized LLM for a specific application, in our case PLC code. This type of AI use works without an internet connection and is therefore interesting for companies whose machines and systems need or should operate offline.
How do you ensure data quality for AI functions?
To ensure data quality, AI benefits from the same things that help humans: clear variable names or coding guidelines, understandable comments, and clean documentation of the Codesys functions and libraries used.
In addition, AI itself helps assess the quality of generated code: if it cannot understand a manually created or generated project, Codesys users are unlikely to understand it either – especially if they are less experienced. High-quality documentation helps both human and machine users.
Ultimately, however, it always remains the responsibility of the user to decide which code is loaded onto a machine or system. Even though AI provides enormous support in quality assurance, it does not replace professional testing or validation of the software created.
What role does explainable AI play?
In many areas, the explainability of AI-generated suggestions is crucial for assessing their quality and usefulness. The advantage of generative AI in the field of automation technology: it can explain quite well how it arrived at its results.
The challenge, however, is to maintain oversight when an AI independently makes changes to existing projects. Tools for version control can help here. With Codesys Git, users can document exactly who made which changes, when, and why.
How do you support customers during introduction?
So far, no AI-based Codesys products have been released. Nevertheless, we are already working internally and with beta users – for example, with the chatbot for the Codesys online help.
As with other Codesys products, the introduction of additional AI tools will first be tested with beta users before being rolled out more widely. And of course, we use both traditional and modern channels for introduction – from documentation to YouTube videos. Since the AI products are intuitive to use, we assume that the Codesys community will benefit without requiring extensive training.
Naturally, we will also provide guidance and recommendations for using the tools. One example: for information security reasons, companies should carefully consider whether to share concrete project content externally or, conversely, run LLMs exclusively on local servers.
Which partnerships are driving this topic forward?
On the one hand, partners we already know from research projects. On the other hand, we are in close communication with technology providers such as Intel, for whom Codesys acts as a multiplier and who provide us with valuable input in the field of AI.
Where do you see PLC programming with AI in five years?
Even with AI support, the exciting and challenging core tasks will continue to be carried out by highly qualified application specialists. However, they will be able to work more efficiently and creatively, as the “AI servant” will take over tedious tasks.
At the same time, the focus and thus the competence requirements will shift away from pure implementation – coding – toward precise problem description, so that the AI can implement the desired solution. I see this development as independent of AI. The better, more structured, and more abstractly an automation task is thought through and described, the better its realization will be.
Even without AI, Codesys users already benefit from such concepts today, for example by using the Codesys Application Composer: it generates complete application code based on modules.
As AI creates ever larger parts of an application, testing and version control will certainly become more prominent topics in the coming years.
| SPS 2025 |
|
The 'sps - smart production solutions' will once again take place on its traditional date at the end of November: From November 25 to 27, 2025, everything in Nuremberg will once again revolve around the latest trends in automation technology. A special focus this year will be on 'Industrial AI'. Find out which strategies exhibitors are pursuing with regard to artificial intelligence and which products and solutions they will be showing at SPS in our online special "Industrial AI at SPS". Click here! |












