A software bridge that lets an AI agent work inside Siemens TIA Portal V20: generate SCL / LAD blocks, import them, compile and wire them into the program — validated end to end.
Tools≈ 30 over MCP
Layersagent · gateway · TIA
ValidatedXML → compile → OB1
Role
Architecture and development, from the gateway to the PLC test blocks
Context
R&D · 2026
Stack
TIA Portal V20
Openness API
MCP
SCL
LAD
ISA-88
RAG
01AI agentMCP client · RAG
02Gatewayself-hosted · ≈ 30 tools
03Local serviceOpenness API
04TIA Portal V20import · compile
05PLC programSCL / LAD blocks
Fig. 06.1 — Three-layer bridge
The problem
Writing, importing and wiring PLC blocks in TIA Portal is still largely manual, even for repetitive operations such as adding a function block or checking that the project compiles.
Architecture
An AI agent talks to a self-hosted gateway exposing around thirty tools over MCP (Model Context Protocol).
The gateway drives a local service that controls TIA Portal V20 through Siemens' Openness API.
A vector database feeds the agent with technical documentation, for context-aware answers (RAG).
Validated pipeline
Generate SCL and LAD blocks in TIA Portal's XML format.
Import them into the project.
Compile at block, software and hardware level.
Create the instance data blocks.
Wire several function calls into the main program.
Test case: an ISA-88 compliant sorting block, imported, compiled without errors and persisted in the project.
TIA Portal: an SCL function block in the project, monitored online.
Result
A working, repeatable chain that speeds up selected automation tasks with agentic AI.