An AI Agent Programmed a Siemens S7-1500 Through an MCP Bridge — Here's the SCL and the Race Conditions It Caught
说明与用途
LLM 代理使用 MCP 桥和 TIA Portal 为 Siemens S7‑1500 生成了一个传送带分拣控制程序,确保了确定性输出并完成了完整的仿真验证。
问题
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