Programmer people working laptops or smartphones with AI, artificial intelligence software engineer coding on laptop computers with technology icons and binary code, big data, AI bot digital machine

Artificial intelligence assistants help programmers ease the coding load

March 17, 2025
Generative AI supports engineers by automating coding tasks and giving them time for higher-level programming

Machine builders and system integrators are experimenting with the benefits of artificial intelligence (AI), just like many other industries. The popularity and ubiquitous nature of generative AI has piqued the interest of OEM and integrator engineers, as well. Practical applications of AI for engineers programming code have real benefits and are being implemented into daily workflow. AI tools are more advanced with certain programming languages, and true AI-enhanced programmable logic controller (PLC) code needs a highly customized generative AI. Read this article to learn more about the difference between artificial intelligence and machine learning.

What is generative AI? And how can it help controls programming?

Generative AI has the most potential for influencing the work of machine builders and system integrators. Whether experimenting with generative AI or thinking about and planning for its future potential in machines themselves, many are taking cues from the information technology (IT) sector.

Get your subscription to Control Design’s daily newsletter.

IT has long been using AI to boost programmer productivity, says Chris Gibson, director of emerging technology growth at A&E Engineering, a system integrator and CSIA member. “We’re starting to see this trend extend into the controls world, as well,” he adds.

Generative AI should be thought of as an assistant, not a complete replacement for human intervention or programming engineers.

Aaron Dahlen, applications engineer at DigiKey, describes the relationship like that of a conductor and the musician. “Programming has become a hybrid activity with the programmer acting as the conductor and the AI as the musician,” Dahlen says.

“With regard to machine design, we see a continued trend to network the industrial controllers to collect data. We also see a tension as some designers move the data to the cloud or local servers, while others move the computational power to the edge of the machinery, leveraging the capability of modern PLCs,” Dahlen says. “At DigiKey, we have seen this trend reflected in our growing sales of industrial products.”

Chatbots and generative AI tools like OpenAI’s ChatGPT and Google’s Gemini are popular and familiar, but the term “generative AI” also covers content creation for images, music, videos and other audio. Large language models (LLMs) are a specific type of generative AI that are trained on large amounts of text data with deep learning models that use natural language processing (NLP), another subfield of AI, to produce text. Natural language processing allow LLMs to read human language by encoding and processing the data, which, in this case, is text.

Pradeep Paul, director of manufacturing intelligence at E Tech Group, says LLMs can be trained and used to address complex programming issues, but using LLMs for controls programming will require vast quantities of code examples, code documentation and even natural language descriptions of the designed functionality. “This data allows the model to learn syntax, common patterns and the relationships between code and its purpose,” Paul says.

A general-purpose LLM must also be fine-tuned or customized on datasets for the specific automation vendor platform or protocols. “This fine-tuning adapts the model to the vendor's unique instruction sets, libraries and best practices,” Paul adds. “This addresses the challenge of proprietary function libraries.”

Finally, reinforcement learning can further refine the model. “Engineers or automated systems can provide feedback on the generated code, rewarding the model for correct and efficient solutions, and penalizing errors. This iterative process improves the model's accuracy and ability to handle complex scenarios,” Paul says.

How to build a customized AI model into the controls programming workflow

Once trained, AI models can save significant development time in complex applications, performing tasks like code generation, automated documentation, code error detection and debugging, code optimization and test case generation. “Natural language prompts can generate functional code blocks, reducing the time spent writing code from scratch. This is especially helpful for repetitive tasks or complex logic,” Paul says.

E Tech Group has experimented with industry-specific generative AI tools like Rockwell Automation’s FactoryTalk Design Studio and other platforms, and its engineers are still learning how to best incorporate them into the workflow, but the potential is huge, Paul says. “We’ve played around with it, but it’s still very nascent,” he adds.

Right now, E Tech Group is working to incorporate generative AI into its standard coding workflow. “We maintain a robust, in-house code base that typically addresses approximately 80% of project requirements,” he adds. “To finalize deployment, we’ve created AI-driven internal tools.”

These tools excel at automating repetitive coding, such as templating programming for multiple tags. Instead of manual, tag-by-tag development, engineers can upload a CSV file, enabling the tools to rapidly generate and replicate the necessary programming logic, resulting in substantial time savings.

Coding documentation and debugging: using AI for programming specs, testing and investigation

Generative AI tools also have potential to help with generating function requirement specifications (FRS), which are developed from the customer requirements for an automation project, and then E Tech Group builds out code from the FRS. However, defining detailed specifications often requires preliminary coding to solidify design elements.

“Sometimes it’s hard to build out your functional spec without doing some upfront coding to iron out design components,” Paul says. With an AI tool, it’s easy to give it the general inputs, and it will generate a framework for a function requirement specification with all the required components, without the need to do any sample coding.

“AI can also help generate test cases automatically, ensuring more comprehensive testing and reducing the time spent on manual test creation,” Paul says. After the FRS, engineers write the test protocols to test the functional requirements and all the features, and AI can help draft test protocols.

Documentation in general can be a tedious but necessary task for engineers, and AI can help generate the needed documentation from the code itself. E Tech Group also takes on projects started by other companies or projects that require integrating systems from different vendors and equipment, which might not be following the same programming practices as E Tech Group engineers.

The potential is there, Paul says, for generative AI to do some of the reverse-engineering of the present code, instead of its engineers spending hours trying to understand the intention behind old code. It could produce at least some documentation and a summary of the code’s intent, Paul says. Some engineers at E Tech Group are working with generative AI tools to try reverse-engineering code.

Once code is written, AI can step in again to assist. “AI models can be trained to identify potential errors in code, suggesting fixes or highlighting areas that need review. This can drastically reduce debugging time,” Paul says. “The AI can analyze existing code and suggest optimizations for performance, memory usage or readability.”

Generative AI platforms are also well-suited to work with more traditional programming languages like Python, SQL or .NET, Paul says. E Tech Group also uses these more traditional languages for building interfaces for historians and customer application programming interfaces (APIs), for example. The basic, free versions of ChatGPT or Gemini are great at finding flaws in code for those widely used languages, Paul says. He predicts that in the future those tools will do even more than error detection and provide better code practices and suggestions to improve the formatting. Already, it has cut down on the need for as many subject matter experts at E Tech Group and given younger engineers more tools to advance their coding skills faster.

Paul says generative AI is helping younger engineers to hone their programming skills and expand their language knowledge. They can use Rockwell Automation’s FactoryTalk Design Studio to develop code structure based on specific requirements and then compare that to the in-house code base and learn how they are different and why one works better than the other.

“We use a lot of software and a lot of different platforms,” he says. “Every system is a little different.” This can make using generative AI for PLC programming more complicated. “With PLC programming, because every vendor has its own different methodology of program structure and code modules, it becomes hard to have a general-purpose tool for that,” Paul says. That’s where the custom AI tools can come in, but those take significant time to develop. It will significantly change engineering workflows and employee hiring practices, as E Tech Group has already seen during the development of in-house AI tools.

About the Author

Anna Townshend | Managing Editor

Anna Townshend has been a writer and journalist for 20 years. Previously, she was the editor of Marina Dock Age and International Dredging Review, until she joined Endeavor Business Media in June 2020. She is the managing editor of Control Design and Plant Services.

Sponsored Recommendations

2025 State of Technology Report: HMIs, IPCs and Enclosures

Industrial manufacturing equipment often relies on human-machine interfaces, industrial PCs and enclosures to ensure system reliability and optimal performance. These components...

Custom Encoder Created for Large Rotational Applications

Large rotational applications like MRI machines, excavators, mobile equipment, forklifts and stagecraft require precise motion feedback for optimal performance, safety and efficiency...

See How One Company Customized Motion Feedback for Material Handling Applications

Encoders can be used in material handling on sorters, conveyors, in automated storage retrieval systems, on mobile equipment, automated mobile robots and more. See how one company...

Absolute vs Incremental Encoders: Which One Does Your System Need?

The right encoder makes all the difference. Incremental encoders are perfect for tracking speed and direction in dynamic motion. Absolute encoders? They remember exact positioning...