An AI Agent Programmed a Siemens S7-1500 Through an MCP Bridge — Here's the SCL and the Race Conditions It Caught
Описание и применение
LLM‑агент создал программу управления конвейером на Siemens S7‑1500, используя MCP‑bridge и TIA Portal, обеспечив детерминированные выходы и полную проверку в симуляторе.
Задача
Automate the creation of a conveyor‑sorting control program for a Siemens S7‑1500 using an LLM agent and an MCP bridge, ensuring correct engineering decisions, deterministic outputs, and full verification in simulation.
Результат
The LLM agent built the verification environment first, then produced a fully deterministic SCL function block that met all engineering requirements, compiled without errors, and passed 14 automated test cases in simulation.
Рабочий процесс
- Check for existing CPU and add PLC_1
- Compile and start S7‑PLCSIM to confirm download/run
- Create FB_ConveyorSort and write state machine in SCL
- Create required UDTs
- Instantiate FB in OB1 with DB_ConveyorSort_1
- Compile and download program
- Deliver state transition table, 14 test cases, and race/boundary analysis
Доказательства
We built an MCP server that drives Siemens TIA Portal V19 through the Openness API, pointed an LLM agent at it, and gave it a real engineering task: implement a conveyor‑sorting control program for an S7‑1500 (CPU 1511‑1 PN), verified in S7‑PLCSIM.
The whole loop: add CPU → compile → start simulator → create FB/UDTs → write SCL → compile → download → verify.
It built the verification environment first. Good sign.
Section 0 writes every output to a deterministic value at the top of the cycle (requirement #6).
- Дата записи: 2026-10-12T15:41:18.303Z