PLC programming

hello, i’m a PLC automation programmer, i am curious on how to use AI to program a PLC if i give it access to my hardware, For example i already have at home an automated irrigation system linked via wifi…,can i ask him to enable the water pump for me? I do this by accessing dedicated remote software and clicking on the required button on the touch screen or can be a hardware digital input directly into the PLC.
i asked the AI about PLCs and has some general knowledge of Siemens, Allan Bradley, Omron, etc etc…i want to try to connect it to PLCs and let it try to make programs that would basically let AI control the irrigation or electric rolls over the windows, etc etc…is it possible?

2 Likes

I think AI could improve it but AI can’t program a PLC perfectly. New learner might find it difficult to learn except pro.

1 Like

Hi, a.iacobini.

Thanks for creating this post. It’s really important for me because i’m on industrial automation too.

From my point of view. PLC programming can be complex, as it requires specific knowledge of industrial control logic and corresponding standards, such as IEC 61131-3. For artificial intelligence like ZAP or others, generating codes or programs for PLCs is not complicated as long as the specifications are clearly understood and there is access to the appropriate syntax and semantics of the programming language used, such as Ladder Logic, Structured Text, Instruction List, etc.

Furthermore, the integration of AI systems with PLCs is advancing, allowing applications such as predictive maintenance and process optimization. However, direct programming of PLCs by AI in a practical sense still involves a significant amount of human input and supervision to ensure safety, reliability, and compliance with industrial standards.

This inputs could be described here in the following PLC programming languages matriz i’ve prepared in a .pdf document and converted into a .jpeg image that I attached:

This comparative table outlines what is needed to program and assist users effectively in different PLC programming languages by AI. The requirements vary based on the language’s complexity, the user’s skill level, and the specifics of the application. I think AI can adapt to these varying needs, providing guidance that is most relevant for each programming language and application scenario.

1 Like

I can use chatgpt3.5 to write Mitbishi PLC PROGRAM, however, it needs a training process.
You give some example and ask GPT to output more complicated one. If it correct you ask more, if it not correct you give the correct answer.
Do this continues until all answer is correct.

2 Likes

Hi all, it’s very interesting that you’re looking into the ways that AI can assist in the management of PLC software.

You’re welcome to try PLC Wizz, which features a coding assistant, documentation generation and version control! Visit the website plcwizz(dot)com.

2 Likes

20 yr Controls Engineer. I know this is an old topic but it is one I am actively pursuing. AI can write in both structured text and function block. You can also feed it P&ID with associated ladder logic to teach it how processes work. I believe that for 80% of cases AI can perform very well. All you would need is to set up a written controls narative and feed it the process diagrams and associated PLC layouts.

2 Likes

i recently came across a site called PLCcode.AI which claims to generate PLC code using Neural Networks. Although the site has not been released till now, it looks very promising. Here is the name of the site PLCcode.AI
if anyone has any idea on this or any other tools that we can use for PLC programming using AI tools please do share here as well.

1 Like

ok guys, i have some updates regarding AI controlling PLCs…
1 There is the topic of an AI making programs in Function block / ladder logic or STL, still very difficult and absolutely needs human supervision
2 There is the topic of an AI controlling Inputs and Outputs of a controller, with of course already made program that defined the inputs and outputs
3 after chatting a bit with several AIs they concluded there are more solutions to solve this problem.
AI that can control an API that sends DIO signals to the controller via Ethernet, TCP/IP, MODBUS since the standards are already in place and have been working for years now,
i found some studies LLM4PLC
stands for large language models for Programable logic controllers (they study AI optimizations of PLC programs)
My idea is to have the AI control a small program like Modbus
there are some windows / software automation programs like Powershell that can automate various windows commands.
Or there is an AI operating system SAIL OS and Singularity or similar programs that basically allow an AI to completely control the PC. OthersideAI : A framework to enable multimodal models to operate a computer. but it uses chatgpt and chatgpt is subscription based and i have 20 local LLMS installed that are text based only for the moment.

I am currently working with ChatGPT to develop an API interface (using python) to assist and facilitate with PLC programming. I agree 100% that human interface and management is crucial. We don’t need to worry about being replaced. Yet.

The concept is ambitious. I have an idea of the future where AI and controls engineers work together to troubleshoot process issues and make process updates in real time using wearable tech but that is down the road. If I can get this API interface working and MML model trained then I can start to think about the next steps.