Guide · Updated
How does AI automate TIA Portal Openness?
TIA Portal Openness is the API Siemens ships for automating TIA Portal. TIATool wraps it in MCP tools an AI assistant calls: export, build, compile and import, every write backed up first. When no tool fits, the assistant browses the Openness object model, writes a C# script, runs it read-only, then for real, and saves it.
Openness requirements
- TIA Portal V19 or V21 with the TIA Openness option (TIA Portal setup → Options → TIA Openness), licensed and installed on the Windows 10 or 11 (64-bit) PC that runs TIATool.
- Your Windows user in the local group “Siemens TIA Openness”. The TIATool installer adds you; sign out and back in once so Windows applies it.
- One engine per version. V19 and V21 Openness are binary-incompatible, so TIATool ships an engine for each (
tiax.exefor V19,tiax-v21.exefor V21) and picks it from the project file,.ap19or.ap21. - Your own Siemens assemblies. TIATool uses the Openness files of your TIA Portal installation; none are shipped with it.
- A short project path. TIA Portal refuses a project folder path longer than 143 characters, so work from a folder such as
C:\.TIA\ Line3
tiax-agent doctor checks all of this. On a V19 PC that is ready, it prints:
tiax-agent doctor[ OK ] Operating system: Windows x64[ OK ] .NET Framework: 4.8 or later (release 533325)[ OK ] TIA Portal Openness: V19 (API 19.0.0.0)[ OK ] tiax for V19: C:\Program Files\TIATool\tiax.exe[ OK ] Openness user group: current user is in 'Siemens TIA Openness'[ OK ] TIA Portal processes: none running
How the assistant drives Openness
The model never talks to Openness directly. It calls a TIATool tool; tiax-agent checks the arguments, the policy and the licence, then hands the call to the engine for the project’s TIA version. The engine opens TIA Portal without its window, keeps Portal and the project open between calls, and closes Portal after 15 idle minutes to free the Openness licence and memory. Live calls run one at a time; questions about the scanned cache never wait behind them.
| Tool | What it does | Effect |
|---|---|---|
| export_projectPLC blocks, tag tables, types, watch tables and external sources to SIMATIC ML. | PLC blocks, tag tables, types, watch tables and external sources to SIMATIC ML. | Reads or writes |
| build_from_sourceHardware, tag tables and SCL blocks from a source folder, then compile. | Hardware, tag tables and SCL blocks from a source folder, then compile. | Writes |
| compile_projectCompile every PLC and HMI target, or named ones, and save. | Compile every PLC and HMI target, or named ones, and save. | Writes |
| import_blockOne edited SIMATIC ML block, imported inside a transaction. | One edited SIMATIC ML block, imported inside a transaction. | Writes |
| hmi_import_screensHMI screens from SIMATIC ML files, overwritten by name. | HMI screens from SIMATIC ML files, overwritten by name. | Writes |
| hmi_import_tagsHMI tags one per file, the import path that keeps every other tag intact. | HMI tags one per file, the import path that keeps every other tag intact. | Writes |
| add_project_languagesNew project languages; it only ever adds, so no text is lost. | New project languages; it only ever adds, so no text is lost. | Writes |
| hardware_importDevices and modules from an AutomationML file, from EPLAN or an I/O list. | Devices and modules from an AutomationML file, from EPLAN or an I/O list. | Writes |
| library_useA released library type instantiated, or its instances updated. | A released library type instantiated, or its instances updated. | Writes |
| plc_downloadThe compiled program to a PLC or an S7-PLCSIM Advanced instance. | The compiled program to a PLC or an S7-PLCSIM Advanced instance. | Writes |
| project_archiveThe project to a new .zapNN archive, without changing it. | The project to a new .zapNN archive, without changing it. | Reads |
plc_download answers only the prompts the call states: stopping the CPU needs allow_stop, re-initialising data blocks needs allow_reinit, and a password, a firmware change or a module reset cancels the download. An administrator can keep the AI off real PLCs with allow_online: false in the policy file.
When no tool fits: self-extension
Openness can do far more than any fixed tool list. When the assistant needs something no tool covers, it follows one loop, and a write script goes through the same licence, backup, journal and verify gate as every built-in tool:
Reuse
Search the built-in pack first: about 40 live scripts and 10 offline queries, from watch tables to technology objects.
Tools: extension_list · extension_show
Explore
Walk the object model of the project: attributes, compositions and actions, with their exact names and types. Reading changes nothing.
Tools: openness_browse · openness_get
Script
Compile a short C# script against your Openness assemblies; errors come back with line numbers.
Tools: script_check
Read run
mode=readruns inside an Openness transaction that is never committed and never saved.Tools: script_run
Write run
mode=writetakes a new timestamped backup, commits the transaction only when the script returns without an error, saves and journals.Tools: script_run
Verify
Re-export, re-scan and run the verify gate: exactly the intended change, nothing else.
Tools: export_project · refresh_scan · verify_change
Promote
A script that ran becomes a named extension with a parameter schema and the hash of the code that ran.
Tools: extension_save · extension_run
Learn
What failed and what fixed it is recorded with the verbatim error, so
explain_errorfinds it next time.Tools: knowledge_add · explain_error
using System.Linq;using TiaTool.Scripting; public static class Script{ public static object Run(ScriptContext ctx) { var plc = Tia.Plc(ctx, ctx.Arg<string>("plc")); var tables = plc.WatchAndForceTableGroup.WatchTables; ctx.Log($"{plc.Name}: {tables.Count} watch tables"); return tables .Select(t => new { name = t.Name, entries = t.Entries.Count }) .ToList(); }}Scripts pass a guard rail that refuses processes, the registry, the network, loading code, file writes and saving or opening projects. It is a guard rail, not a sandbox: read a write script as you would read a colleague’s change, and try new scripts on a copy of a project. An administrator can switch scripts off or allow read scripts only (allow_scripts). The full loop: self-extension guide.
What Siemens does not expose
Openness covers much of TIA Portal, not all of it. These limits are tested and documented, so the assistant plans around them instead of retrying:
- Basic panels: no HMI-to-PLC tag link through Openness. The link cannot be set on a Basic-panel HMI tag; create those tags in the TIA Portal tag grid.
- Tag-table exports drop the PLC link, so re-importing a whole table destroys every link. TIATool imports HMI tags one per file instead.
- Basic panels have no scripting or indirect tag addressing, one visibility animation per object, and no press-and-hold buttons in generated screens.
- SCL sources cannot declare an OB event class, set every retain attribute, or use a tag-table constant as a CASE label.
- Know-how-protected blocks, ProDiag and some system blocks cannot be exported; the export lists them in its failure ledger.
Every tested limit, with its evidence, is in the capability matrix.
When Openness refuses
- “Security error” or “The operation has timed out” when a project opens
- Usually a TIA Portal process left over from an earlier run. Close TIA Portal and stop what remains:
PowerShell Stop-Process -Name Siemens.Automation.Portal, Siemens.Automation.ObjectFrame.FileStorage.Server -Force - Not in the Openness group
- Add yourself from a Command Prompt run as administrator, sign out and back in, then run
tiax-agent doctoragain:Command Prompt (administrator) net localgroup "Siemens TIA Openness" %USERNAME% /add - The project is open in TIA Portal
- Writes refuse while the TIA Portal window has the project open, so they never fight your unsaved edits. Close it, or read through it with
attach=true. - “The specified path … is too long. A maximum of 143 characters is allowed.”
- Copy the project to a short folder such as
C:\and work there.TIA\ - Any other error
- Ask the assistant to explain it:
explain_errormatches the text against 59 field entries with verbatim error texts, causes and fixes.
Frequently asked questions
Do I need to install Openness separately?
Openness is an option of the TIA Portal setup (Options → TIA Openness). Install it with your licensed TIA Portal V19 or V21, and make sure your Windows user is in the local group “Siemens TIA Openness”; the TIATool installer adds you.
Can the AI use Openness while TIA Portal is open?
Writes refuse while the TIA Portal window has the project open, so they never work against your unsaved edits. Reads such as export_project and list_devices can attach to the open window with attach=true.
Is a C# script written by the AI safe to run?
A read run happens inside a transaction that is never committed, and the project is never saved. A write run takes a new backup, commits only if the script returns without an error, and is journaled and verified. The guard rail catches honest mistakes; it is not a sandbox, so review write scripts like code you run yourself.
Which Openness versions does TIATool support?
V19 and V21. They are binary-incompatible, so TIATool ships one engine per version and picks it from the project file. A project opens in its own version; TIATool never upgrades it.
Does the AI download to real PLCs?
Only when it calls plc_download, and then it answers only the prompts the call states: stopping the CPU needs allow_stop, re-initialising data blocks needs allow_reinit. An administrator can keep the AI off real PLCs with allow_online: false in the policy file.
What happens to a script that works?
extension_save promotes it into a named extension with a parameter schema and the hash of the code that ran, kept in your workspace. The next session finds it with extension_list and runs it with extension_run.
More guides
- MCP server for TIA PortalWhat is an MCP server for TIA Portal?
- AI-written SCLCan AI write SCL for S7-1500 safely?
- Analyse an inherited projectHow do I analyse an inherited TIA Portal project fast?
- Claude and TIA PortalHow do I use Claude with Siemens TIA Portal?
- Cursor and VS CodeCan I use Cursor or VS Code with TIA Portal?
Reference
- Self-extension: explore, script, verify, promote, learn
- Capability matrix: what is proven, with evidence and limits
- Security and data flow: who sees what, and the threat model
- MCP tool reference: every tool with its arguments, effect and status
- Install in three steps
- Pricing: monthly or yearly, every tool included
- Get started: install, connect your AI app and run a first session
- How TIATool compares with other ways to use AI in TIA Portal
- FAQ: install, licensing, data and TIA Portal versions
Try it on your own project.
All 75 tools and every update, running on your engineering PC. After the trial a seat is €99.99 a month or €999.99 a year, one PC per seat.
Every plan starts with a 3-day free trial. A card is required at checkout; cancel in your account before the trial ends and nothing is charged.