Request a quote
Benešl Automation / Articles / ChatGPT and Siemens PLCs
Technical article · AI and Siemens PLCs

ChatGPT and Siemens PLCs: what AI can and cannot do in TIA Portal

ChatGPT, Claude or Copilot can write a piece of SCL code in seconds. So Siemens PLC programmers ask whether artificial intelligence can save them work in TIA Portal too. It can, but only for some tasks. Here is what a chat on its own handles, where it fails and what changes once the AI can see the project itself.

Ing. Tomáš Benešl · 21 October 2026 · 5 min read

What ChatGPT can do without access to the project

A chat on its own is a good assistant for working with text. In Siemens PLC programming it has proven useful mainly here:

  • Explaining someone else's code. You paste a network in SCL or STL and the AI describes what it does, including edge cases.
  • Drafting an SCL block. From a description like “pump with dry-run protection” it writes an FB skeleton with an interface, timers and state logic.
  • Calculations and conversions. Scaling analog values, data type conversions, working with strings and time.
  • Documentation. Variable comments, network descriptions, text for the operating manual.
  • Finding causes. Why a block might leave an output on and what to look at while debugging.

For a programmer who knows SCL this is a quick first draft. It is not a finished program, though.

Where ChatGPT fails in TIA Portal

The problem is not that the AI cannot program. The problem is that it cannot see what you are working with.

  • It does not know your project. It does not know the names of your tags, data blocks and UDTs, or which blocks you already have. It writes generic names that you then replace by hand.
  • It cannot compile the code. You only find errors after pasting it into TIA Portal. Every fix means another round of copying between the chat and the project.
  • It mixes up instructions and dialects. A general model blends S7 SCL with structured text from other systems, invents functions that do not exist in S7 or uses an instruction the S7-1200 does not have.
  • It does not know how the hardware is configured. I/O addresses, CPU type and firmware version cannot be read from a chat.
  • It cannot see LAD and FBD. Graphical networks are hard to paste into a chat, yet most programs on the shop floor are written in LAD.

So the bigger the task, the more time goes into rewriting and fixing. For one new block that is fine; for changes to an existing machine it is not.

The solution: AI connected directly to TIA Portal

The AI needs access to the project. That is exactly what TIA MCP does: software that connects an AI assistant (ChatGPT, Claude, Copilot, Gemini and others) to the project open in TIA Portal through the official TIA Portal Openness interface. It works with TIA Portal V17 to V21 on Windows.

The same AI can then:

  • read blocks, tags, UDTs and hardware and use your real names,
  • check the system instructions for the given CPU family before writing code,
  • write the block into the project, compile it and fix compile errors on its own,
  • work with LAD and FBD blocks too, reading them as readable logic,
  • make a backup before every change that can be restored with one command.

MCP stands for Model Context Protocol. It is a standard through which AI assistants use tools in other programs. A programmer does not need to know it: you give the AI instructions in plain language and see the result in the project.

What to watch out for, even when the AI sees the project

  • You check the logic. A block that compiles is not necessarily a correct block. The AI does not know the machine's process as well as you do, nor the unwritten agreements with the process engineer.
  • The safety program is a different category. F-blocks, emergency stop and protective functions belong to a qualified person and to validation according to the standards. AI can help with checks, but it does not take responsibility for safety.
  • Never download to a machine without testing. Simulation in PLCSIM first, then a test on the machine. In TIA MCP, downloading to a real PLC is disabled by default and requires double confirmation.
  • Be specific. State the CPU, language, names and edge cases. The more precise the request, the fewer the fixes.
  • Mind your data. If the project must not leave the company, use a local model on your own computer.

An example request for the AI

A good request describes behaviour, not syntax. For example:

Write an SCL FB to control a pump on an S7-1500. Inputs: start and stop from the HMI, a low-level switch and a motor starter fault. At low level the pump stops after 5 s and raises a dry-run alarm that is acknowledged from the HMI. Variable names according to the project conventions. Compile the block and fix the errors, do not download anything to the PLC.

A chat on its own returns text that you process further yourself. An AI connected to the project creates the block straight away, compiles it and shows you the result. You review it and test it in simulation.

Summary

ChatGPT is a good adviser for a PLC programmer, but on its own it does not know the project, cannot compile code and makes mistakes with S7 instructions. For AI to really save time in TIA Portal, it has to see the project and be able to compile the code. Responsibility for the logic and for safety stays with the programmer.

Frequently asked questions

Can ChatGPT program Siemens PLCs?

It can draft SCL code and explain an existing program. But it does not know your project, cannot compile the code and sometimes uses an instruction that does not exist in S7. The result always has to be adapted and checked in TIA Portal.

Can ChatGPT work directly in TIA Portal?

Not on its own. With TIA MCP it can: ChatGPT, Claude, Copilot or Gemini then reads and edits the open project through the official TIA Portal Openness interface.

Is it safe to let AI change a PLC program?

Yes, if you review every change and test it in simulation. TIA MCP can run in read-only mode, makes a backup before changing an object in the project and downloads nothing to a real PLC without your permission and confirmation. The safety program must always be validated by a qualified person.

Does it work for LAD and FBD too?

A chat on its own cannot see graphical networks. An AI connected through TIA MCP reads LAD and FBD networks as readable logic and can also create LAD and FBD blocks.

Related articles

Try AI directly in your own project

TIA MCP connects ChatGPT, Claude, Copilot or Gemini to TIA Portal V17–V21. A PRO licence costs €295 per year per computer excluding VAT, and the first 7 days are free.