<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: tia-forge</title>
    <description>The latest articles on DEV Community by tia-forge (@tiaforge).</description>
    <link>https://dev.to/tiaforge</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4179613%2Fddd904c9-5210-4f7a-be21-51476a4ccf54.png</url>
      <title>DEV Community: tia-forge</title>
      <link>https://dev.to/tiaforge</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tiaforge"/>
    <language>en</language>
    <item>
      <title>Compilation is not correctness: 301 PLC tasks, 11.92 points of LLM code that compiles and misbehaves</title>
      <dc:creator>tia-forge</dc:creator>
      <pubDate>Thu, 26 Nov 2026 08:24:10 +0000</pubDate>
      <link>https://dev.to/tiaforge/compilation-is-not-correctness-301-plc-tasks-1192-points-of-llm-code-that-compiles-and-misbehaves-gld</link>
      <guid>https://dev.to/tiaforge/compilation-is-not-correctness-301-plc-tasks-1192-points-of-llm-code-that-compiles-and-misbehaves-gld</guid>
      <description>&lt;p&gt;A shift register, written in Structured Text. The reference implementation assigns the bits in reverse order, which preserves the old values. The model-generated one assigns them forward, starting with &lt;code&gt;Q0 := D0&lt;/code&gt;. Both compile. Both run. Both end with the same output.&lt;/p&gt;

&lt;p&gt;At scan 11 the &lt;code&gt;set&lt;/code&gt; branch drives the register to &lt;code&gt;1111&lt;/code&gt;. At scan 12, a shift with &lt;code&gt;D0 = 0&lt;/code&gt; produces &lt;code&gt;0111&lt;/code&gt; in the reference and &lt;code&gt;0000&lt;/code&gt; in the candidate — the new value walked across all four bits. At scan 14 the &lt;code&gt;reset&lt;/code&gt; branch makes them agree again.&lt;/p&gt;

&lt;p&gt;If your acceptance test is "imports with 0 compile errors", this program passes. If it's "check a few properties", it depends on which property. If it's "look at the final outputs", it passes too. Only a per-scan comparison catches it.&lt;/p&gt;

&lt;p&gt;That's the whole argument of a 2026 paper from Beihang University — &lt;em&gt;Compilation Is Not Correctness: Scan-by-Scan Evaluation of LLM-Generated PLC Programs&lt;/em&gt; (&lt;a href="https://arxiv.org/abs/2610.28675" rel="noopener noreferrer"&gt;arXiv:2610.28675&lt;/a&gt;) — and the numbers are worse than the anecdote suggests.&lt;/p&gt;

&lt;h2&gt;
  
  
  What they built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;CycleBench&lt;/strong&gt;: 301 Structured Text tasks (287 function blocks + 14 programs), 684 scenarios, &lt;strong&gt;61,424 scans&lt;/strong&gt;. Each task ships with a reviewed public spec (behaviour requirements, POU identity, I/O interface, initial values, parameters), a hidden reference implementation, hidden input scenarios, and the expected per-scan output trace.&lt;/p&gt;

&lt;p&gt;The evaluator compiles both sides with a pinned Matiec → C → GCC pipeline, drives reference and candidate in fresh sessions with identical inputs, identical public initial values and a virtual clock advanced one scan interval at a time, then compares &lt;strong&gt;every declared output and inout after every scan&lt;/strong&gt;. No trajectory alignment. The first scan counts. All tasks stay in the denominator — missing candidates, interface violations, build failures and runtime failures are all failures, classified by stage.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gap: 11.92 points
&lt;/h2&gt;

&lt;p&gt;Across 8 LLMs × 4 baseline methods = &lt;strong&gt;9,632 results&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Compiles&lt;/th&gt;
&lt;th&gt;Passes execution&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;All baseline results&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;83.99%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;72.07%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best method (CycleGen)&lt;/td&gt;
&lt;td&gt;94.89%&lt;/td&gt;
&lt;td&gt;83.31%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That's &lt;strong&gt;11.92 points&lt;/strong&gt; (95% bootstrap CI [9.63, 14.43]) of programs that build and then behave wrong. The gap exists in &lt;em&gt;every&lt;/em&gt; model–method combination, including combinations with a compile rate above 99%.&lt;/p&gt;

&lt;p&gt;It also gets worse with size: grouping by reference length, the gap is &lt;strong&gt;3.67 points for 1–20 line programs and 24.07 points for programs over 80 lines&lt;/strong&gt;. Longer, more stateful programs are exactly where compilation stops telling you anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it hides: transient mismatches and sampling phase
&lt;/h2&gt;

&lt;p&gt;The failures don't usually sit at the end of the trace. &lt;strong&gt;144 of 157&lt;/strong&gt; audited behavioural failures &lt;em&gt;re-converge inside the scenario&lt;/em&gt;, and in &lt;strong&gt;115 of 157&lt;/strong&gt; no mismatch run lasts more than 5 consecutive scans.&lt;/p&gt;

&lt;p&gt;So the natural habit — "check every Nth scan" — is a sampling problem, not a coverage problem:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Observation policy&lt;/th&gt;
&lt;th&gt;Behavioural failures missed (of 157)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Every scan&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Every 2 scans&lt;/td&gt;
&lt;td&gt;11 (7.01%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Every 5 scans&lt;/td&gt;
&lt;td&gt;34 (21.66%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Every 10 scans&lt;/td&gt;
&lt;td&gt;47 (29.94%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Last scan only&lt;/td&gt;
&lt;td&gt;98 (62.42%)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Even with scenario endpoints always checked. And the phase matters: shifting &lt;em&gt;which&lt;/em&gt; scans you look at — same programs, same inputs — moves the miss rate for stride 5 between &lt;strong&gt;12.10% and 28.03%&lt;/strong&gt;. No fixed phase finds everything.&lt;/p&gt;

&lt;p&gt;The paper's second example is a timer, which is the version PLC engineers will recognise instantly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight pascal"&gt;&lt;code&gt;&lt;span class="cm"&gt;(* candidate: uses the previous scan's input *)&lt;/span&gt;
&lt;span class="no"&gt;TOF0&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;pir_active&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;PT&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="c1"&gt;#20s);&lt;/span&gt;
&lt;span class="cm"&gt;(* ... manual override update ... *)&lt;/span&gt;
&lt;span class="n"&gt;pir_active&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;stairs_pir_sensor&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="n"&gt;lights_buttons_state&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;stairs_light&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;lights_buttons_state&lt;/span&gt; &lt;span class="k"&gt;OR&lt;/span&gt; &lt;span class="no"&gt;TOF0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;Q&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The off-delay timer is called before &lt;code&gt;pir_active&lt;/code&gt; is assigned, so it consumes the value from the previous scan. The lamp is wrong at scan 7 and correct again at scans 8–9. Look at the later scans and you will never know.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the failures cluster (use this as a checklist)
&lt;/h2&gt;

&lt;p&gt;Of the 157 audited behavioural failures:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Share&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Public output update&lt;/td&gt;
&lt;td&gt;27.4%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Arithmetic / boundary logic&lt;/td&gt;
&lt;td&gt;22.3%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Timing / call order&lt;/td&gt;
&lt;td&gt;15.9%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reset / priority&lt;/td&gt;
&lt;td&gt;9.6%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;State retention / overwrite&lt;/td&gt;
&lt;td&gt;8.9%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edge detection&lt;/td&gt;
&lt;td&gt;8.3%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Initialisation&lt;/td&gt;
&lt;td&gt;5.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The first three categories are &lt;strong&gt;65.6%&lt;/strong&gt; of behavioural failures. Note what dominates: not fancy algorithms, but &lt;em&gt;when a value is written&lt;/em&gt;, &lt;em&gt;which boundary condition was missed&lt;/em&gt;, and &lt;em&gt;whether a stateful block was called before its inputs were current&lt;/em&gt;. Compile errors, by contrast, are boring: 53.42% of them are malformed statements or declarations — the compiler already tells you about those.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generation can improve, but it doesn't close the gap
&lt;/h2&gt;

&lt;p&gt;The authors then built &lt;strong&gt;CycleGen&lt;/strong&gt;: generate k candidates, repair compile errors with bounded compiler feedback, write runtime self-tests in a separate model context, and pick the candidate that passes the most self-tests.&lt;/p&gt;

&lt;p&gt;Execution pass rate goes &lt;strong&gt;74.63% → 83.31%&lt;/strong&gt; (+8.68 points). The ablation is the interesting part, because it prices each piece:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Configuration&lt;/th&gt;
&lt;th&gt;Compiles&lt;/th&gt;
&lt;th&gt;Executes&lt;/th&gt;
&lt;th&gt;Avg tokens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Direct, 1 candidate&lt;/td&gt;
&lt;td&gt;84.93%&lt;/td&gt;
&lt;td&gt;74.63%&lt;/td&gt;
&lt;td&gt;1,929&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5 candidates, take first valid&lt;/td&gt;
&lt;td&gt;92.23%&lt;/td&gt;
&lt;td&gt;79.94%&lt;/td&gt;
&lt;td&gt;9,740&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;+ compiler-guided repair&lt;/td&gt;
&lt;td&gt;94.85%&lt;/td&gt;
&lt;td&gt;81.69%&lt;/td&gt;
&lt;td&gt;11,922&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;+ self-test selection&lt;/td&gt;
&lt;td&gt;94.89%&lt;/td&gt;
&lt;td&gt;83.31%&lt;/td&gt;
&lt;td&gt;18,197&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two things worth internalising:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Diminishing returns are brutal.&lt;/strong&gt; k=5 → k=8 buys 0.87 points going in… and then loses 4 passes while spending &lt;strong&gt;38.8% more tokens&lt;/strong&gt;. The observed k=5 dominates its own extensions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model-written tests are a signal, not an oracle.&lt;/strong&gt; Only &lt;strong&gt;54.35%&lt;/strong&gt; of self-test suites accepted all bound reference cases; mutation detection was 73.33%; only 43 of 192 suite slots caught &lt;em&gt;any&lt;/em&gt; mutant. Using them to &lt;em&gt;rank&lt;/em&gt; candidates is useful. Using them to &lt;em&gt;declare correctness&lt;/em&gt; is not.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the gap persists at the top: &lt;strong&gt;CycleGen still leaves 11.59 points&lt;/strong&gt; between compiling and behaving.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means if you're shipping generated PLC code
&lt;/h2&gt;

&lt;p&gt;Three layers, and the paper's 11.92-point gap is the cost of skipping the middle one:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Structural validation&lt;/strong&gt; — parse, interface check, compile. Fast, cheap, and provably insufficient on its own.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-scan behavioural regression&lt;/strong&gt; — same inputs, same initialisation, same logical clock, compare every declared output on every scan. This is the layer that catches the shift register and the timer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full-machine and on-hardware verification&lt;/strong&gt; — PLCSIM Advanced or the real controller, when you care about communication, motion, I/O channels and scan jitter.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We build for layers 2 and 3. &lt;a href="https://tia.hubwiz.com/tia-link/en" rel="noopener noreferrer"&gt;TiaLink&lt;/a&gt; drives a local TIA Portal over Openness (V17–V21): it indexes the project into a knowledge graph — call relations, cross-references, DB member reads and writes, dangling references — so a change's blast radius is visible before you write, and LAD blocks go through a LadDoc schema check before import and compile. Our cloud simulator handles the per-scan execution side with deterministic scan semantics, timer ticks injected via &lt;code&gt;tickMs&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Boundaries (what we did not do)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;We did not run CycleBench.&lt;/strong&gt; We did not reproduce its scores. This is our reading of the paper, with the tables re-checked against the PDF.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic scan semantics is not physical real time.&lt;/strong&gt; Injected scan intervals make regression repeatable; they do not reproduce scan jitter, communication timing or hardware response.&lt;/li&gt;
&lt;li&gt;Our simulation path covers a &lt;strong&gt;subset&lt;/strong&gt; of IEC 61131-3 (IF/CASE/FOR/WHILE, arrays and structs, timers, edges), not the whole language, and not communication, technology objects, motion control, safety programs or hardware channels.&lt;/li&gt;
&lt;li&gt;Passing the benchmark means "matches a reference on the provided finite scenarios" — not functional correctness, termination, or physical safety. The authors say this themselves, and it's worth repeating because it is the most common way this kind of result gets over-read.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Paper: Jinyun Chen, Juntao Hu, Haochen Li, Wentao Song, Ningbo Gu, Jianwei Niu, Qing Gao, Rui Wang. &lt;em&gt;Compilation Is Not Correctness: Scan-by-Scan Evaluation of LLM-Generated PLC Programs.&lt;/em&gt; &lt;a href="https://arxiv.org/abs/2610.28675" rel="noopener noreferrer"&gt;arXiv:2610.28675&lt;/a&gt;, October 2026.&lt;/p&gt;

&lt;p&gt;If you're evaluating LLM-generated PLC code today, the cheapest thing you can steal from this paper is the acceptance rule: &lt;strong&gt;a task passes only if every declared output matches on every scan.&lt;/strong&gt; Everything else — properties, sampled scans, final values — is a filter that lets a known class of bug through.&lt;/p&gt;

</description>
      <category>plc</category>
      <category>ai</category>
      <category>testing</category>
      <category>programming</category>
    </item>
    <item>
      <title>AI + TiaLink: a TIA Portal PLC project becomes a 3D scene in 80 minutes</title>
      <dc:creator>tia-forge</dc:creator>
      <pubDate>Tue, 24 Nov 2026 04:45:14 +0000</pubDate>
      <link>https://dev.to/tiaforge/ai-tialink-a-tia-portal-plc-project-becomes-a-3d-scene-in-80-minutes-156o</link>
      <guid>https://dev.to/tiaforge/ai-tialink-a-tia-portal-plc-project-becomes-a-3d-scene-in-80-minutes-156o</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Project: &lt;code&gt;PLC_SCADA_HMI&lt;/code&gt; from &lt;a href="https://github.com/rassulz/multirobot_painting_control_system" rel="noopener noreferrer"&gt;multirobot_painting_control_system&lt;/a&gt; (TIA Portal V19, MIT)&lt;br&gt;
Tools: TiaLink (Openness bridge) + three.js r150.1&lt;br&gt;
Output: one ~680 KB HTML file, double-click to run&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A PLC project in TIA Portal is a tree: devices, blocks, tag tables, HMI screens. It has logic. It has no sense of space.&lt;/p&gt;

&lt;p&gt;Nothing in the scene below was hand-written. The human side of this job was two things only — an open TIA Portal project, and a running commentary of "this looks wrong". Reading the project, building the geometry, writing the state machine and hunting the six bugs came from an agent shuttling between a gateway and a headless browser. This post is that run, plus the six traps it walked into that I only caught by staring at screenshots.&lt;/p&gt;

&lt;p&gt;Stack: TiaLink reads the project, three.js draws it. The artifact is a single ~680 KB HTML file with no external dependency. Wall clock: about 80 minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start here: TiaLink turns the project into readable data
&lt;/h2&gt;

&lt;p&gt;The hard part of PLC visualisation is rarely the 3D. It's knowing what is &lt;em&gt;in&lt;/em&gt; the project.&lt;/p&gt;

&lt;p&gt;TiaLink connects over TIA Portal Openness to the project that is currently open, and exposes devices, CPUs, blocks, tag tables and HMI screens as structured data. You query the project instead of clicking down a tree.&lt;/p&gt;

&lt;p&gt;The project here is &lt;code&gt;PLC_SCADA_HMI&lt;/code&gt;, TIA Portal V19, from the open-source repo &lt;a href="https://github.com/rassulz/multirobot_painting_control_system" rel="noopener noreferrer"&gt;&lt;code&gt;rassulz/multirobot_painting_control_system&lt;/code&gt;&lt;/a&gt; — an MIT-licensed multi-robot painting line with an S7-1500, WinCC, MATLAB/Simulink and CAD material. Only the TIA Portal project is used here.&lt;/p&gt;

&lt;p&gt;Four tool groups covered everything the scene needed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;tialink_health&lt;/code&gt; — is the gateway attached to a project, and what prerequisite is missing&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tialink_devices&lt;/code&gt; — devices, CPU types, PROFINET stations&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tialink_model&lt;/code&gt; — all blocks, tag tables, UDTs and source files in one call (far cheaper than exporting one at a time)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tialink_context_*&lt;/code&gt; — the project knowledge graph: index, summary, search, nodes, edges, blocks, impact&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That returned the cast list:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;4 devices&lt;/strong&gt;: S7-1500 station (CPU 1513F-1 PN), ET 200SP remote IO (IM 155-6 PN ST), &lt;code&gt;HMI_1&lt;/code&gt;, &lt;code&gt;PC-System_1&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5 PLC blocks&lt;/strong&gt;: OB1 &lt;code&gt;Main&lt;/code&gt;, FB2 &lt;code&gt;Auto_mode&lt;/code&gt;, FB3 &lt;code&gt;Manu_mode&lt;/code&gt;, plus two instance DBs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;51 PLC tags&lt;/strong&gt; across &lt;code&gt;Main_variables&lt;/code&gt; and &lt;code&gt;additional_variables&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3 HMI screens&lt;/strong&gt;: &lt;code&gt;Main Part&lt;/code&gt;, &lt;code&gt;Error_Status&lt;/code&gt;, &lt;code&gt;PID&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PROFINET&lt;/strong&gt; subnet &lt;code&gt;PN/IE_1&lt;/code&gt;, PLC &lt;code&gt;172.31.17.15&lt;/code&gt;, ET 200SP &lt;code&gt;.16&lt;/code&gt;, HMI &lt;code&gt;.25&lt;/code&gt;, PC station &lt;code&gt;.99&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those five lines decide who stands on the line, who moves, who displays, and where alarms come from.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb9ri3quulvh0knsfi514.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb9ri3quulvh0knsfi514.gif" alt="PLC_SCADA_HMI 3D control scene: conveyor, painting gantry, pick-and-place arm, HMI operator station and the status panel on the right" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The devices, tags and HMI screens TiaLink read back, rebuilt as an interactive 3D line. Belt running, gantry spraying, RB-102 palletising, the status card on the right flipping between RUNNING and IDLE (~3 s loop). &lt;a href="https://tia-forge.github.io/plc-scada-hmi-3d/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=plc-scada-hmi-3d&amp;amp;utm_content=demo" rel="noopener noreferrer"&gt;Play with it here →&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  TiaLink does not hand you 3D models
&lt;/h3&gt;

&lt;p&gt;Worth stating plainly: TiaLink gives you the logical structure of a control project, not CAD geometry. No 3D model of this line exists inside TIA Portal, so every conveyor, arm, fan and cabinet in the scene is built procedurally from the device name and its role in the process.&lt;/p&gt;

&lt;p&gt;TiaLink owns &lt;em&gt;what is true&lt;/em&gt;. three.js owns &lt;em&gt;what it looks like&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The whole run is read-only: no block modified, no tag changed, no project saved. The scene is an offline interpreter, not a simulator that writes back to the PLC.&lt;/p&gt;

&lt;h2&gt;
  
  
  The constraint: one file, zero external assets
&lt;/h2&gt;

&lt;p&gt;The requirement was blunt: a single HTML file, generated procedurally, no external elements.&lt;/p&gt;

&lt;p&gt;Which rules out a CDN, glTF loading, external textures and web fonts. What worked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;three.js r150.1's UMD build, inlined into the HTML (that release still ships a directly inlinable UMD file — no build step needed)&lt;/li&gt;
&lt;li&gt;no &lt;code&gt;&amp;lt;script src&amp;gt;&lt;/code&gt;, no &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;, no &lt;code&gt;url(...)&lt;/code&gt;, no network request anywhere in the page&lt;/li&gt;
&lt;li&gt;every machine built from Box / Cylinder / Torus / Cone&lt;/li&gt;
&lt;li&gt;every label, HMI screen, floor marking and particle sprite drawn with Canvas 2D at runtime&lt;/li&gt;
&lt;li&gt;camera control without OrbitControls — about sixty lines of drag / zoom / pan&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The cost is size: three.js is ~600 KB on its own, the final HTML ~680 KB. What you buy is a single file you can send anyone; they double-click it, and there is no server, no half-loaded frame with a broken image.&lt;/p&gt;

&lt;h2&gt;
  
  
  From TiaLink data to objects
&lt;/h2&gt;

&lt;p&gt;The layout follows the project's device relationships, not artistic licence:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;TiaLink / project element&lt;/th&gt;
&lt;th&gt;In the 3D scene&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CV-101 conveyor&lt;/td&gt;
&lt;td&gt;Belt along X, scrolling texture, rollers, drive motor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RB-101 painting robot&lt;/td&gt;
&lt;td&gt;Gantry spanning the conveyor, carriage and nozzle on the beam&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RB-102 pick-and-place&lt;/td&gt;
&lt;td&gt;Two-link arm with gripper, palletising finished parts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FN-101 fan&lt;/td&gt;
&lt;td&gt;Axial fan behind the line, blades spinning, air particles&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ZS-101 … ZS-104&lt;/td&gt;
&lt;td&gt;Four photoelectric sensors along the line, red beams turning green on trigger&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PS101–PS104 / ES101&lt;/td&gt;
&lt;td&gt;Operator panel front-left, five clickable 3D buttons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HMI_1&lt;/td&gt;
&lt;td&gt;Operator station, screen showing MAIN PART / PID / ERROR STATUS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PLC_1 / ET 200SP&lt;/td&gt;
&lt;td&gt;Control cabinet and remote IO station in the background&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WP101–WP104&lt;/td&gt;
&lt;td&gt;Workpieces on the belt: paint them, then stack them&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;HMI_1&lt;/code&gt; and &lt;code&gt;PC-System_1&lt;/code&gt; show the same screens in the project, so the scene uses &lt;code&gt;HMI_1&lt;/code&gt; for the operator station rather than have two screens telling one story.&lt;/p&gt;

&lt;p&gt;Spatially: the conveyor is the spine, painting happens left-of-centre, pick-and-place at the right end, panel and HMI on the operator side, PLC cabinet and ET 200SP pushed to the background. The default camera then shows field devices and control hardware in one frame.&lt;/p&gt;

&lt;h2&gt;
  
  
  Modelling: no model files, only geometry and Canvas
&lt;/h2&gt;

&lt;p&gt;No external asset anywhere, so all visual detail is code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Belt&lt;/strong&gt;: Canvas draws dark rubber with cross ribs, becomes a &lt;code&gt;RepeatWrapping&lt;/code&gt; texture, &lt;code&gt;offset.x&lt;/code&gt; scrolls at runtime&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safety markings&lt;/strong&gt;: Canvas yellow-black hatching, laid as two floor bands&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Floor text&lt;/strong&gt;: "LINE 01 · PLC_SCADA_HMI" drawn to Canvas, used as a transparent decal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Device labels&lt;/strong&gt;: each is a 512×104 Canvas with a rounded plate and text, mapped onto a Sprite&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HMI screen&lt;/strong&gt;: a 768×480 Canvas repainted every 120 ms — title, three tabs, line schematic, counters, PID trend, alarm list&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operator panel&lt;/strong&gt;: a 768×448 Canvas for the plate, button wells and silkscreen, with 3D buttons layered on top&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Particles&lt;/strong&gt;: one 64×64 radial-gradient Canvas for soft dots, shared by spray and airflow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Materials: &lt;code&gt;MeshStandardMaterial&lt;/code&gt; with environment reflection for metal, where the environment map is itself a Canvas-drawn equirectangular gradient — no HDR file. Lighting is Hemisphere + Directional (2048 shadow map) + a few cool/warm point lights, which fixes the shadow direction and gives the HMI and panel local brightness.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making it move: a very small line state machine
&lt;/h2&gt;

&lt;p&gt;This is not simulation software. It is closer to a control-logic interpreter. All state lives in one object:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;S&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;running&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'AUTO'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;estop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;sims&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;cv&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rb101&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rb102&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;jog&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;cv&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rb101&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rb102&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;painted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;delivered&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;belt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;fan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;sprayOn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;62&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pv&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;34&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;kp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ki&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.08&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;kd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.02&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each frame does four things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Derive target states for belt, fan, spray and arms from &lt;code&gt;running / mode / estop / sims&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Ease speeds with exponential interpolation, so nothing snaps&lt;/li&gt;
&lt;li&gt;Advance the part queue, spray progress, arm phases and pallet stacking&lt;/li&gt;
&lt;li&gt;Repaint the HMI Canvas, the status card and the button lamps&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Auto / manual / e-stop / fault map directly onto &lt;code&gt;Main&lt;/code&gt; calling &lt;code&gt;Auto_mode&lt;/code&gt; and &lt;code&gt;Manu_mode&lt;/code&gt;, and onto the real tags &lt;code&gt;PS101–PS104&lt;/code&gt;, &lt;code&gt;ES101&lt;/code&gt;, &lt;code&gt;ALM_*&lt;/code&gt;, &lt;code&gt;SIM_*&lt;/code&gt;. The scene only translates them into visible motion.&lt;/p&gt;

&lt;p&gt;In auto mode the belt carries parts into the spray zone. The gantry locks onto the nearest unpainted part, the nozzle emits particles, and the part's colour lerps from bare metal grey to the target colour. After spraying, the part travels to the end of the line and RB-102 runs:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;approach → down → grab → lift → swing → place → release → retract → home&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Grab and place both use two-link inverse kinematics. The pallet takes 8 slots in a 2×2×2 stack; past 8, the oldest box is recycled so a demo can run forever.&lt;/p&gt;

&lt;p&gt;In manual mode the auto cycle is off and the four jog buttons drive CV, FN, RB-101 and RB-102. E-stop freezes every motion and lights the red beacon. Fault simulation injects &lt;code&gt;SIM_CV101 / SIM_RB101 / SIM_RB102 / SIM_FN101&lt;/code&gt; individually, and the matching device plus its alarm change together.&lt;/p&gt;

&lt;h2&gt;
  
  
  HMI and interaction: a 2D interface inside 3D
&lt;/h2&gt;

&lt;p&gt;The HMI screen is a live Canvas texture, not a static image:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MAIN PART&lt;/strong&gt;: line schematic, part positions, sprayed / delivered / alarm counters&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PID&lt;/strong&gt;: setpoint, process value, Kp/Ki/Kd, trend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ERROR STATUS&lt;/strong&gt;: four alarms, SIM state, Repair all&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fic2ckuvco5cumr6mrcr2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fic2ckuvco5cumr6mrcr2.jpg" alt="The three HMI screens: MAIN PART line overview, PID loop tuning, ERROR STATUS faults and simulation" width="800" height="1844"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;code&gt;HMI_1&lt;/code&gt;'s MAIN PART, PID and ERROR STATUS screens — repainted every frame, not pasted on. MAIN PART is in stopped state here; the MANU button overlapping the MODE/BELT readouts is a first-pass layout defect.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;None of it is invented: the screen names are the project's three Screens, the alarm names are real tags like &lt;code&gt;ALM_XA101_CV101&lt;/code&gt;, and the PID fields match Setpoint / K_p / K_i / K_d on the HMI.&lt;/p&gt;

&lt;p&gt;Clicking the screen raycasts to get UVs: hit the tab strip and the x coordinate selects the screen; hit anywhere else and it cycles.&lt;/p&gt;

&lt;p&gt;The five panel buttons are separate cylinder / mushroom meshes. A raycast hit fires START / STOP / AUTO / MANUAL / E-STOP. The HTML panel on the right handles fault injection, jogging, the PID setpoint and camera reset. Keyboard is mapped too: Space start/stop, A auto, M manual, E e-stop, R reset, H cycle the HMI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx4r07c67l6g26oi2avpd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx4r07c67l6g26oi2avpd.jpg" alt="Close-up of the operator panel and HMI_1 with SIM_FN101 injected, HMI on ERROR STATUS" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Panel and &lt;code&gt;HMI_1&lt;/code&gt; close up. &lt;code&gt;SIM_FN101&lt;/code&gt; injected, HMI switched to ERROR STATUS; all five panel buttons are independent raycast targets.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Six traps, and how they surfaced
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. The "supplement angle" in the IK
&lt;/h3&gt;

&lt;p&gt;The first arm looked like a crane, and the wrist never reached the target. The elbow term was wrong:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// wrong: this is the supplement angle, the arm comes up short&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;a2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;acos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;L1&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;L1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="no"&gt;L2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;L2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="no"&gt;D&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;D&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;L1&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;L2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The cosine numerator has to be &lt;code&gt;D² - L1² - L2²&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;D&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hypot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dy&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;a1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;atan2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dy&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
         &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;acos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;L1&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;L1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="no"&gt;D&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;D&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="no"&gt;L2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;L2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;L1&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;D&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;a2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;acos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;D&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;D&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="no"&gt;L1&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;L1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="no"&gt;L2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;L2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;L1&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;L2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The symptom is what makes this expensive: the arm moves fine, but at grab time the part "jumps" under the gripper, because the wrist was ~0.8 m off target and the part was force-snapped to the wrong pose. Doing the triangle on paper once beats watching the animation for ten minutes.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. pointer-events on the HUD
&lt;/h3&gt;

&lt;p&gt;Every button on the page was dead; clicks landed on the canvas. Cause:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nn"&gt;#hud&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;pointer-events&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nn"&gt;#hud&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;pointer-events&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;  &lt;span class="cm"&gt;/* the ID specificity beat the children's auto */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;#hud &amp;gt; *&lt;/code&gt; outranks &lt;code&gt;.toolbar { pointer-events: auto }&lt;/code&gt;, so buttons looked clickable and passed every click straight through. Deleting the second rule and setting &lt;code&gt;auto&lt;/code&gt; explicitly on the cards and toolbar that need interaction fixed it.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Particles culled by the frustum
&lt;/h3&gt;

&lt;p&gt;Spray and airflow particles updated every frame and never appeared. They were all initialised at &lt;code&gt;y = -40&lt;/code&gt;; &lt;code&gt;BufferGeometry&lt;/code&gt; computed the bounding sphere on the first frame, marked the object off-screen, and never recomputed it after positions changed — so &lt;code&gt;Points&lt;/code&gt; was culled wholesale.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;sprayPts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="no"&gt;THREE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Points&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sprayGeo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sprayMat&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;sprayPts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;frustumCulled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For dynamic point and line objects, turning frustum culling off is the cheap answer.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. The held part became a roadblock
&lt;/h3&gt;

&lt;p&gt;The part queue only let the head of the queue stop at the pickup position. To prevent overlap, the code looked for "the part in front" as a blocker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;blocker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'reserved'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'held'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blocker&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;frontLimit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;blocker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;1.18&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Problem: a &lt;code&gt;held&lt;/code&gt; part's x follows the arm out to the pallet (~8.2), which pushed the downstream limit past the end of the belt. Fix: only queued parts block, and the cap is pinned to the pickup position:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;blocker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'reserved'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blocker&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;frontLimit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;4.72&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blocker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;1.18&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. The 3D e-stop was hidden behind the HMI screen
&lt;/h3&gt;

&lt;p&gt;The e-stop button sat at the panel's bottom-right, which projected onto the HMI screen in screen space. The raycast returns the closer HMI, so every e-stop press switched screens instead.&lt;/p&gt;

&lt;p&gt;This is not a rendering bug — it's 3D UI layout. Screen-space occlusion matters as much as world-space placement. Moving the e-stop to the panel's bottom-left with its label to the right of the button cleared the HMI and matched real panel habits.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. A 19 cm grab offset
&lt;/h3&gt;

&lt;p&gt;Wrist target 1.92 m, fingertip offset 0.5 m, so the fingertip lands at 1.42 m — exactly the top face of the part. Minus half the part height, 0.19 m, that's 1.23 m. The first version skipped the conversion, so the part sank into the belt when grabbed. Validating wrist → fingertip → part-centre once for grab and once for place removed it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Symptom → cause cheat sheet
&lt;/h3&gt;

&lt;p&gt;None of the six symptoms point at their own cause, which is why the table is worth keeping (in the order I hit them):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Trap&lt;/th&gt;
&lt;th&gt;What you see&lt;/th&gt;
&lt;th&gt;One-line fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;IK supplement angle&lt;/td&gt;
&lt;td&gt;Arm moves, part "sucks" to the gripper, wrist ~0.8 m off&lt;/td&gt;
&lt;td&gt;Cosine numerator &lt;code&gt;D² − L1² − L2²&lt;/code&gt;; split &lt;code&gt;a1&lt;/code&gt; into two terms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;#hud &amp;gt; *&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Buttons look clickable, clicks pass through&lt;/td&gt;
&lt;td&gt;Delete the blanket rule; set &lt;code&gt;auto&lt;/code&gt; explicitly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dynamic particles&lt;/td&gt;
&lt;td&gt;Particles update, frame stays clean&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;frustumCulled = false&lt;/code&gt; on dynamic &lt;code&gt;Points&lt;/code&gt; / &lt;code&gt;Line&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Queue blocking&lt;/td&gt;
&lt;td&gt;Downstream part runs off the end of the belt&lt;/td&gt;
&lt;td&gt;Only &lt;code&gt;reserved&lt;/code&gt; parts block; cap with &lt;code&gt;Math.min(4.72, …)&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3D button occlusion&lt;/td&gt;
&lt;td&gt;Pressing e-stop switches the HMI screen&lt;/td&gt;
&lt;td&gt;Screen-space occlusion steals rays too — move the button&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Grab height&lt;/td&gt;
&lt;td&gt;Part sinks 19 cm into the belt&lt;/td&gt;
&lt;td&gt;Wrist → fingertip → part centre, twice (grab, place)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Verification: use a headless browser, just don't run it in real time
&lt;/h2&gt;

&lt;p&gt;All visual and interaction checks ran in headless Chrome + Playwright. Software rendering (SwiftShader) is very slow: tens of seconds to first frame, then about 1 fps. Wait 9 seconds and simulation time may have advanced 2 — early on this reads as "the belt is not moving".&lt;/p&gt;

&lt;p&gt;So a logic-only debug entry point went in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;__step&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;updateSim&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To see the line 32 seconds from now, call &lt;code&gt;__step(640)&lt;/code&gt; — returns in milliseconds. Then read &lt;code&gt;__debug.parts&lt;/code&gt; and &lt;code&gt;__debug.robot&lt;/code&gt; to confirm the queue, the spraying and the palletising. Screenshots still go through real rendering; they just watch, they don't wait.&lt;/p&gt;

&lt;p&gt;That same debug hook also verified:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;toolbar START/STOP/AUTO/MANUAL/E-STOP/RESET&lt;/li&gt;
&lt;li&gt;the SIM switches, Repair all and manual jog&lt;/li&gt;
&lt;li&gt;switching all three HMI screens&lt;/li&gt;
&lt;li&gt;raycast clicks on the 3D panel buttons&lt;/li&gt;
&lt;li&gt;sidebar collapse and toolbar wrap at 820 px&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Time ledger
&lt;/h2&gt;

&lt;p&gt;Requirement to final file, wall clock ~80 minutes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Understand the project, settle on one file&lt;/td&gt;
&lt;td&gt;8 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Base scene&lt;/td&gt;
&lt;td&gt;26 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Visual tuning (camera, lights, proportions, palette)&lt;/td&gt;
&lt;td&gt;14 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interaction and line animation&lt;/td&gt;
&lt;td&gt;12 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Debugging&lt;/td&gt;
&lt;td&gt;14 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Packaging, mobile layout, preview&lt;/td&gt;
&lt;td&gt;6 min&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Roughly 17 screenshot checks, 25 code/build iterations, 2 arm rebuilds. The time did not go into placing geometry. It went into:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Making it look right&lt;/strong&gt; — camera, light and scale, over and over&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Making it move right&lt;/strong&gt; — IK, grab height, queue blocking&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Making it clickable&lt;/strong&gt; — HUD pointer events, 3D button occlusion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Making it verifiable&lt;/strong&gt; — headless rendering is too slow, so a single-step tool had to exist first&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What I'd change on a rebuild
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Write the debug shell first (camera presets, &lt;code&gt;__step&lt;/code&gt;, state snapshots), then sculpt&lt;/li&gt;
&lt;li&gt;Unit-test the IK as pure math, before it drives an animation&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;frustumCulled = false&lt;/code&gt; on dynamic particles, by default&lt;/li&gt;
&lt;li&gt;Declare &lt;code&gt;pointer-events&lt;/code&gt; per HUD child; never a blanket &lt;code&gt;#hud &amp;gt; *&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Fix reference framing and lighting up front to cut rework&lt;/li&gt;
&lt;li&gt;Verify logic with fixed-step simulation, not with a headless browser's frame rate&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The deliverable
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;PLC_SCADA_HMI_3D.html&lt;/code&gt;, ~680 KB, three.js inlined, no CDN, no external images, models or fonts at runtime. Open it and you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;drag to orbit, wheel to zoom, right-drag or Shift-drag to pan&lt;/li&gt;
&lt;li&gt;start/stop, change mode, e-stop from the toolbar or the 3D panel&lt;/li&gt;
&lt;li&gt;click the HMI tab strip to switch MAIN / PID / ERROR&lt;/li&gt;
&lt;li&gt;inject any of four faults, Repair all, jog manually&lt;/li&gt;
&lt;li&gt;change the PID setpoint and watch the process value and trend&lt;/li&gt;
&lt;li&gt;append &lt;code&gt;#auto&lt;/code&gt; to the URL to start the demo immediately&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is not a precise digital twin and not a replacement for TIA/PLCSIM. It is closer to a 3D diagram you can argue in front of: devices, tags, modes, alarms and HMI screens compressed into one space, so "what is this line doing, why did it stop, what happens next" is visible at a glance.&lt;/p&gt;

&lt;p&gt;The real result was not getting three.js to run. It was confirming one thing: &lt;strong&gt;TiaLink turns a PLC project from one &lt;code&gt;.ap19&lt;/code&gt; file into queryable data, and three.js turns that data into a space people can discuss.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the project came from
&lt;/h2&gt;

&lt;p&gt;The TIA Portal project used here is &lt;a href="https://github.com/rassulz/multirobot_painting_control_system" rel="noopener noreferrer"&gt;rassulz/multirobot_painting_control_system&lt;/a&gt; (MIT License): a multi-robot painting line with two Waveshare RoArm-M2-S painting arms, a KUKA KR10 R1100-2 pick-and-place robot, a conveyor and an S7-1513F-1 PN PLC, with a MATLAB/Simulink monitoring layer.&lt;/p&gt;

&lt;p&gt;The 3D scene is a procedural visualisation of its PLC/HMI data. Mechanical structure is simplified and does not represent exact proportions or cycle times of the original equipment; the scene code is separate from the original project, and copyright in the original project stays with its author.&lt;/p&gt;




&lt;h2&gt;
  
  
  Turning your next PLC project into an interactive scene
&lt;/h2&gt;

&lt;p&gt;Three steps is the short path:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the target project in TIA Portal — TiaLink attaches to the project you have open, it will not open one for you&lt;/li&gt;
&lt;li&gt;Call &lt;code&gt;tialink_health&lt;/code&gt; and confirm &lt;code&gt;attached: true&lt;/code&gt; (writes return 503 when it is false, and it names the missing prerequisite)&lt;/li&gt;
&lt;li&gt;Call &lt;code&gt;tialink_model&lt;/code&gt; to get blocks, tag tables, UDTs and source files in one call — that list is your cast for the scene&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;TiaLink exposes devices, blocks, tags and HMI screens through TIA Portal Openness as data an AI agent can read. The scene above starts from exactly that data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://tia.hubwiz.com/tia-link?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=plc-scada-hmi-3d&amp;amp;utm_content=cta-footer" rel="noopener noreferrer"&gt;Meet TiaLink →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Full write-up with all screenshots: &lt;a href="https://www.hubwiz.com/blog/tialink-plc-scada-hmi-3d-scene/?utm_source=devto&amp;amp;utm_medium=syndication" rel="noopener noreferrer"&gt;AI + TiaLink: a TIA Portal PLC project becomes a 3D scene in 80 minutes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I work on TiaLink — the Openness gateway and the agent harness are my team's tools.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>plc</category>
      <category>threejs</category>
      <category>ai</category>
      <category>automation</category>
    </item>
    <item>
      <title>Ladder to SCL conversion: the six things every converter silently drops</title>
      <dc:creator>tia-forge</dc:creator>
      <pubDate>Thu, 19 Nov 2026 10:26:25 +0000</pubDate>
      <link>https://dev.to/tiaforge/ladder-to-scl-conversion-the-six-things-every-converter-silently-drops-4849</link>
      <guid>https://dev.to/tiaforge/ladder-to-scl-conversion-the-six-things-every-converter-silently-drops-4849</guid>
      <description>&lt;p&gt;Converting ladder to SCL looks like a translation problem. It isn't. The syntax maps almost one-to-one — a contact becomes &lt;code&gt;AND&lt;/code&gt;, a coil becomes an assignment — and the resulting program compiles cleanly on the first try.&lt;/p&gt;

&lt;p&gt;Then it behaves differently, and the difference only shows up in the field.&lt;/p&gt;

&lt;p&gt;That gap is worth naming precisely, because "convert our ladder to SCL" is now a thing people ask AI to do, and the failure mode is not a compile error you can catch in review. Six things get dropped, and every one of them is a behaviour change.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Scan order, which was doing real work
&lt;/h2&gt;

&lt;p&gt;Ladder networks execute top to bottom; inside a network, left to right. A coil that appears in two networks is evaluated twice per scan, and the last write wins.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ladder: network 3 sets Motor, network 7 resets it
IF #ConditionA THEN #Motor := TRUE; END_IF;
IF #ConditionB THEN #Motor := FALSE; END_IF;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works — &lt;em&gt;as long as the order survives&lt;/em&gt;. Reorder the two blocks for readability during cleanup and you've inverted the logic. In ladder, the order was the structure; in SCL it's an accident of text layout that nothing enforces.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do:&lt;/strong&gt; one write point per output. Rewrite the two networks into a single &lt;code&gt;IF / ELSIF&lt;/code&gt; chain that computes the value once, and the conversion stops depending on position.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Set / Reset coils and their memory
&lt;/h2&gt;

&lt;p&gt;LAD &lt;code&gt;(S)&lt;/code&gt; and &lt;code&gt;(R)&lt;/code&gt; coils latch across the whole scan; a later network can reset what an earlier one set, and the interleaving is often the point (start/stop with a seal-in).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;IF #Start THEN #Motor := TRUE; END_IF;
IF #Stop  THEN #Motor := FALSE; END_IF;   // order decides the winner
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A converter that emits these in a different order — or that "optimises" them into one &lt;code&gt;IF&lt;/code&gt; — changes which condition wins when both are true in the same scan. That's the case your safety test never exercises and your operators hit every shift change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do:&lt;/strong&gt; decide explicitly. Either keep the exact order and document that it matters, or rewrite as a state machine where "stop dominates start" is visible in the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Edge detection had hidden state
&lt;/h2&gt;

&lt;p&gt;A positive-edge contact &lt;code&gt;(P)&lt;/code&gt; is not "the input is true". It carries a memory bit per instance — &lt;code&gt;#prev&lt;/code&gt;. Convert it to &lt;code&gt;IF #Start THEN …&lt;/code&gt; and you've turned a one-shot into a level, and now something fires every scan instead of once.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Edge := #Start AND NOT #PrevStart;
#PrevStart := #Start;
IF #Edge THEN /* … once per rising edge … */ END_IF;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three lines, one of which people forget (&lt;code&gt;#PrevStart&lt;/code&gt;), which is why converted code often "works" in simulation for a second and then doesn't. Count the edge contacts in the source block &lt;em&gt;before&lt;/em&gt; converting — that count is the number of &lt;code&gt;R_TRIG&lt;/code&gt;/memory variables the SCL version must declare.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Timers: the call must happen every scan, unconditionally
&lt;/h2&gt;

&lt;p&gt;LAD puts a timer box in the network; it is called exactly once per scan, wherever it sits, whatever the rungs upstream are doing.&lt;/p&gt;

&lt;p&gt;In SCL, &lt;code&gt;TON&lt;/code&gt; is a function block with an instance. Call it inside an &lt;code&gt;IF&lt;/code&gt; and it stops timing whenever the condition is false — the timer freezes, and the delay becomes "3 seconds of whatever else was happening".&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// correct: call unconditionally, use the outputs afterwards
#TonDelay(IN := #Start, PT := T#3S);
IF #TonDelay.Q THEN /* … */ END_IF;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same for counters and for any instruction with an instance. This is the single most common defect in machine-translated ladder, and it does not show up in a compile.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Branches don't all have a textual shape
&lt;/h2&gt;

&lt;p&gt;Most branches map to &lt;code&gt;OR&lt;/code&gt; inside an &lt;code&gt;AND&lt;/code&gt;. Two kinds don't:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A coil inside a branch.&lt;/strong&gt; Ladder can energise an output in one leg of a parallel path; SCL has no expression-level assignment. It has to become a separate statement, and then you're back to scan-order semantics (point 1).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nested branches with negation on the branch itself.&lt;/strong&gt; &lt;code&gt;NOT (A OR B)&lt;/code&gt; versus &lt;code&gt;(NOT A) AND (NOT B)&lt;/code&gt; — equivalent, but a converter that negates the wrong level produces something that passes casual reading.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What to do:&lt;/strong&gt; flatten branches bottom-up, and keep the result grouped by network so a reviewer can match one SCL &lt;code&gt;IF&lt;/code&gt; to one ladder network. Anything that doesn't flatten cleanly should be flagged, not guessed.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. The comments, titles and cross-references
&lt;/h2&gt;

&lt;p&gt;Ladder carries maintenance knowledge that isn't logic: network titles that say &lt;em&gt;why&lt;/em&gt;, element comments on a contact named &lt;code&gt;M47.2&lt;/code&gt; that explain what it really is, and cross-references that tell you what else touches the output.&lt;/p&gt;

&lt;p&gt;No converter preserves these by default, and the resulting SCL is technically equivalent and operationally worse. The person at 3 a.m. now reads &lt;code&gt;IF #bFault2 THEN&lt;/code&gt; with no idea which sensor that is.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do:&lt;/strong&gt; carry network titles into block comments, carry element comments into inline comments, and keep the tag names symbolic. If the source uses absolute addresses, converting to SCL is the moment to fix that — not to freeze it in place.&lt;/p&gt;

&lt;h2&gt;
  
  
  And the parts that don't convert at all
&lt;/h2&gt;

&lt;p&gt;Worth saying out loud, because tools that promise "any ladder to SCL" are lying by omission:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;STL / GRAPH / FBD&lt;/strong&gt; — different representations, not different syntax. GRAPH in particular has step/transition semantics with no textual equivalent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Indirect addressing&lt;/strong&gt; (pointer/register-indirect, &lt;code&gt;M[#index]&lt;/code&gt; patterns) — mechanically translatable only if you know the original's bounds, which the ladder never had to state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jump/label pairs&lt;/strong&gt; — &lt;code&gt;JMP&lt;/code&gt; skips code, so outputs downstream hold their previous value. In SCL that "hold" has to be modelled explicitly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blocks that mix languages per network&lt;/strong&gt; — half of them convert, and the half that doesn't is the interesting half.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The check that makes conversion trustworthy
&lt;/h2&gt;

&lt;p&gt;Do not review converted SCL by reading it. Run both versions.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Extract the source block, convert it, keep both.&lt;/li&gt;
&lt;li&gt;Write three scenarios: normal cycle, one sensor stuck, both commands true simultaneously.&lt;/li&gt;
&lt;li&gt;Step both implementations scan by scan against the same input sequence, and diff &lt;strong&gt;every output, every scan&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The first scan where they diverge points at the network that was mistranslated — usually one of the six above.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's a mechanical, repeatable check, and it's the reason we run a cloud simulator alongside the renderer: conversion without equivalence testing is a code review with no test suite. On a machine with a real cycle time, "it compiled" has never been the claim that matters.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I work on the tooling below; the conversion failure modes are ours to own and Openness/SimaticML are Siemens'. &lt;a href="https://tia.hubwiz.com/lad?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=ladder-to-scl-losses" rel="noopener noreferrer"&gt;LadDoc Cloud&lt;/a&gt; — ladder IR → validated SimaticML. &lt;a href="https://tia.hubwiz.com/render?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=ladder-to-scl-losses" rel="noopener noreferrer"&gt;LAD Render Cloud&lt;/a&gt; — SimaticML → PNG, to compare the two versions visually. &lt;a href="https://tia.hubwiz.com/sim?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=ladder-to-scl-losses" rel="noopener noreferrer"&gt;PLC Cloud Sim&lt;/a&gt; — step-run LAD and SCL against the same scenarios and diff the outputs. 100 free calls each; &lt;a href="https://tia.hubwiz.com/tia-link?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=ladder-to-scl-losses" rel="noopener noreferrer"&gt;TiaLink&lt;/a&gt; for the on-premises project side.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>plc</category>
      <category>siemens</category>
      <category>scl</category>
      <category>mcp</category>
    </item>
    <item>
      <title>Your agent generated ladder logic. TIA Portal rejected the XML. Here is why.</title>
      <dc:creator>tia-forge</dc:creator>
      <pubDate>Thu, 19 Nov 2026 09:39:30 +0000</pubDate>
      <link>https://dev.to/tiaforge/your-agent-generated-ladder-logic-tia-portal-rejected-the-xml-here-is-why-2pnl</link>
      <guid>https://dev.to/tiaforge/your-agent-generated-ladder-logic-tia-portal-rejected-the-xml-here-is-why-2pnl</guid>
      <description>&lt;p&gt;Ask a model to write ladder logic and it will happily produce something that reads correctly. Ask it to produce &lt;strong&gt;SimaticML&lt;/strong&gt; — the XML TIA Portal actually imports — and the first import attempt usually fails with an error that names a &lt;code&gt;UId&lt;/code&gt; you never wrote.&lt;/p&gt;

&lt;p&gt;That's not a model problem. SimaticML isn't a document format with a bit of structure; it's a &lt;strong&gt;graph&lt;/strong&gt; dressed as XML. Once you see it that way, generation, validation and rendering all fall into place.&lt;/p&gt;

&lt;p&gt;Here's the shape of the problem, the four things that break first, and the pipeline that makes it verifiable without a TIA Portal licence.&lt;/p&gt;

&lt;h2&gt;
  
  
  The structure, in one block
&lt;/h2&gt;

&lt;p&gt;A minimal LAD network, exported from TIA Portal, looks like this (abridged):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Document&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;SW.Blocks.FC&lt;/span&gt; &lt;span class="na"&gt;ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;AttributeList&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;Name&amp;gt;&lt;/span&gt;FC_Motor&lt;span class="nt"&gt;&amp;lt;/Name&amp;gt;&amp;lt;Number&amp;gt;&lt;/span&gt;1&lt;span class="nt"&gt;&amp;lt;/Number&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;ProgrammingLanguage&amp;gt;&lt;/span&gt;LAD&lt;span class="nt"&gt;&amp;lt;/ProgrammingLanguage&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/AttributeList&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;ObjectList&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;SW.Blocks.CompileUnit&lt;/span&gt; &lt;span class="na"&gt;ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="na"&gt;CompositionName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"CompileUnits"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;AttributeList&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;NetworkSource&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;FlgNet&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;Parts&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;Access&lt;/span&gt; &lt;span class="na"&gt;Scope&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"GlobalVariable"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="nt"&gt;&amp;lt;Symbol&amp;gt;&amp;lt;Component&lt;/span&gt; &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Start"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;/Symbol&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;/Access&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;Part&lt;/span&gt; &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Contact"&lt;/span&gt; &lt;span class="na"&gt;UId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"21"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;Part&lt;/span&gt; &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Coil"&lt;/span&gt;    &lt;span class="na"&gt;UId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"22"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;/Parts&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;Wires&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;Wire&lt;/span&gt; &lt;span class="na"&gt;UId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"31"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;Powerrail/&amp;gt;&amp;lt;NameCon&lt;/span&gt; &lt;span class="na"&gt;UId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"21"&lt;/span&gt; &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"in"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;/Wire&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;Wire&lt;/span&gt; &lt;span class="na"&gt;UId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"32"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;NameCon&lt;/span&gt; &lt;span class="na"&gt;UId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"21"&lt;/span&gt; &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"out"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;NameCon&lt;/span&gt; &lt;span class="na"&gt;UId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"22"&lt;/span&gt; &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"in"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;/Wire&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;Wire&lt;/span&gt; &lt;span class="na"&gt;UId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"33"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;NameCon&lt;/span&gt; &lt;span class="na"&gt;UId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"22"&lt;/span&gt; &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"out"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;Powerrail/&amp;gt;&amp;lt;/Wire&amp;gt;&lt;/span&gt;
              &lt;span class="nt"&gt;&amp;lt;/Wires&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/FlgNet&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;/NetworkSource&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/AttributeList&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/SW.Blocks.CompileUnit&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/ObjectList&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/SW.Blocks.FC&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/Document&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three levels matter: &lt;strong&gt;block&lt;/strong&gt; (FC/FB/OB + attributes), &lt;strong&gt;CompileUnit&lt;/strong&gt; (one per network), and &lt;strong&gt;FlgNet&lt;/strong&gt; (the graph: &lt;code&gt;Parts&lt;/code&gt; are boxes, &lt;code&gt;Wires&lt;/code&gt; are edges between &lt;em&gt;pins&lt;/em&gt;, not between boxes).&lt;/p&gt;

&lt;h2&gt;
  
  
  The four things that break first
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. &lt;code&gt;UId&lt;/code&gt; is identity, and it must be consistent everywhere.&lt;/strong&gt; Every &lt;code&gt;Part&lt;/code&gt; gets a &lt;code&gt;UId&lt;/code&gt;; every wire endpoint references &lt;code&gt;NameCon UId="…" Name="pin"&lt;/code&gt;. A generator that renumbers parts between passes produces XML that parses fine and imports as garbage — or gets rejected with &lt;code&gt;Part with UId 21 not found&lt;/code&gt;. Generate UIds deterministically (walk the IR in a fixed order) and the diffs stay readable too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Wires are pin-to-pin, and the power rail is a node.&lt;/strong&gt; &lt;code&gt;&amp;lt;Powerrail/&amp;gt;&lt;/code&gt; appears as an endpoint exactly like a pin. So a rung is not a list of elements left-to-right; it's a path from the rail through contacts into coils, back to the rail. Any branch is a second path, and the ordering of &lt;code&gt;&amp;lt;Wire&amp;gt;&lt;/code&gt; elements matters — depth-first, matching the branch nesting, or you get layout errors that don't point at the actual cause.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Branches are &lt;code&gt;OpenCon&lt;/code&gt; / &lt;code&gt;CloseCon&lt;/code&gt; pairs.&lt;/strong&gt; Parallel paths are expressed by opening a branch marker before the first wire of the branch and closing it after the last. Unbalanced or nested-out-of-order markers are the most common reason a block renders as spaghetti, or refuses to import at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. A block can mix languages per network.&lt;/strong&gt; &lt;code&gt;ProgrammingLanguage&lt;/code&gt; exists both on the block and inside each &lt;code&gt;CompileUnit&lt;/code&gt;. Real projects have blocks where network 1 is LAD and network 7 is SCL. Code that assumes one language per block works on your test file and fails in the wild.&lt;/p&gt;

&lt;p&gt;And one that isn't a graph problem: &lt;strong&gt;not everything can be ladder.&lt;/strong&gt; Global DBs, instance DBs and UDTs have no ladder diagram to draw, and FBD / GRAPH / STL are different representations entirely. Tools should reject these explicitly (&lt;code&gt;UNSUPPORTED_DOCUMENT&lt;/code&gt;, &lt;code&gt;UNSUPPORTED_LANGUAGE&lt;/code&gt;) rather than emit an empty image and let you guess.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pipeline that actually holds together
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LadDoc IR ──validate──► SimaticML ──render──► PNG ──import──► TIA Portal ──simulate──► PASS/FAIL
   (text)                (XML)      (eyeball)                 (project)            (behaviour)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each arrow is a gate, and each gate catches a different class of mistake:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IR → validate.&lt;/strong&gt; A ladder description in text (series/parallel, contacts, coils, timers) is what a model writes well. Validate it as a &lt;em&gt;document&lt;/em&gt; — unknown symbol, duplicate tag, a coil with no driver — before any XML exists. Validation is binary: one issue, no output. You never hand TIA Portal something that can't import.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IR → SimaticML must be deterministic.&lt;/strong&gt; Same input, byte-identical XML. That's what makes review possible: the diff of two generated blocks shows the logic change, not &lt;code&gt;UId&lt;/code&gt; churn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;XML → PNG before import.&lt;/strong&gt; Rendering the block server-side — no TIA installed — turns "trust the model" into "look at the picture". You catch the inverted contact, the coil on the wrong side of the rail, the branch that merged into the wrong pin. This is the cheapest review step in the whole chain and almost nobody does it, because they assume rendering needs the engineering tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Import → simulate.&lt;/strong&gt; "Compiles" and "works" are different claims. Running the block against a scenario (&lt;code&gt;start pressed, no fault, 3 s later the motor output is on&lt;/code&gt;) and getting PASS/FAIL back is the only signal an agent can act on by itself.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical limits worth designing around
&lt;/h2&gt;

&lt;p&gt;From the hosted renderer we run, the numbers that shape the design: 4 MiB of XML per request, image side capped at 20,000 px, and 120 requests/minute. A 300-network block will exceed the image limit long before it exceeds anything else — so the API takes a &lt;code&gt;network&lt;/code&gt; parameter and renders one network at a time, with &lt;code&gt;scale&lt;/code&gt; for legibility. If your tool renders whole blocks only, the big ones will fail on the largest projects, which is exactly where you wanted the help.&lt;/p&gt;

&lt;p&gt;The other limit is human: 300 networks of generated ladder is not reviewable. Render one network, show it next to the diff, and let the engineer approve a screen at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is worth doing
&lt;/h2&gt;

&lt;p&gt;The reason to go through SimaticML instead of writing SCL is that &lt;strong&gt;ladder is what technicians read at 3 a.m.&lt;/strong&gt;. SCL is fine for the engineer who wrote it; the person maintaining the machine reads rungs. An AI that can only emit SCL has produced code the plant can't service — and an AI that can produce importable LAD, with the layout rendered for review and the behaviour simulated before download, fits into the workflow that already exists.&lt;/p&gt;

&lt;p&gt;That's the whole trick: not a better model, but gates on either side of it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I work on the tooling below. The design notes are ours; Openness and SimaticML are Siemens'.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://tia.hubwiz.com/lad?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=simaticml-ladder-pipeline" rel="noopener noreferrer"&gt;LadDoc Cloud&lt;/a&gt; — ladder IR → validated, deterministic SimaticML (V19), over MCP. &lt;a href="https://tia.hubwiz.com/render?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=simaticml-ladder-pipeline" rel="noopener noreferrer"&gt;LAD Render Cloud&lt;/a&gt; — SimaticML → PNG ladder diagram, no TIA Portal needed. &lt;a href="https://tia.hubwiz.com/sim?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=simaticml-ladder-pipeline" rel="noopener noreferrer"&gt;PLC Cloud Sim&lt;/a&gt; — run LAD/SCL against a scenario, get PASS/FAIL. 100 free calls each. For the on-premises half — reading and writing real projects through Siemens Openness, with the guard set — &lt;a href="https://tia.hubwiz.com/tia-link?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=simaticml-ladder-pipeline" rel="noopener noreferrer"&gt;TiaLink&lt;/a&gt; (commercial).&lt;/em&gt;&lt;/p&gt;

</description>
      <category>plc</category>
      <category>siemens</category>
      <category>xml</category>
      <category>mcp</category>
    </item>
    <item>
      <title>An AI agent can already read Siemens TIA Portal. Writing back is where it breaks.</title>
      <dc:creator>tia-forge</dc:creator>
      <pubDate>Thu, 19 Nov 2026 08:09:32 +0000</pubDate>
      <link>https://dev.to/tiaforge/an-ai-agent-can-already-read-siemens-tia-portal-writing-back-is-where-it-breaks-3pbn</link>
      <guid>https://dev.to/tiaforge/an-ai-agent-can-already-read-siemens-tia-portal-writing-back-is-where-it-breaks-3pbn</guid>
      <description>&lt;p&gt;An AI agent can already open a Siemens TIA Portal project and read it: block interfaces, hardware tree, tag tables, the SCL inside each FB. That part is solved — Siemens Openness has been scriptable for years, and wrapping it in MCP takes a weekend.&lt;/p&gt;

&lt;p&gt;Writing back is where it falls apart. Not because the model writes bad SCL, but because five specific things go wrong the first time an agent touches a live engineering project, and none of them are visible in a chat window.&lt;/p&gt;

&lt;p&gt;If you're building this — an MCP server for PLC tooling, or a gateway like the one we maintain — these are the failures to design against from the start, in the order we hit them.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Structure is not data, and OPC UA only gives you data
&lt;/h2&gt;

&lt;p&gt;The reflex is to read through the PLC: OPC UA, browse the tag tree, done. That works for values. It does not give you the program: block interfaces, DB layouts, network titles, comment text, the declaration table.&lt;/p&gt;

&lt;p&gt;For anything that involves &lt;em&gt;editing&lt;/em&gt; a program you need the engineering tool's API (Openness on Siemens, the scripting API on CODESYS, L5X on Rockwell). Two different data sources with two different security models — plan for both, because "read the current value of this tag" and "show me what this block does" are different questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The read-modify-write race is the real killer
&lt;/h2&gt;

&lt;p&gt;The model reads a block, spends 40 seconds reasoning, produces a modified version. Meanwhile someone else — a colleague, a batch job, the agent's own previous call — changed the same block. Your write now silently reverts their change.&lt;/p&gt;

&lt;p&gt;Nothing about the output looks wrong. That's what makes it dangerous: it is valid SCL, it compiles, and it deletes a fix.&lt;/p&gt;

&lt;p&gt;The fix is cheap and non-negotiable: read the block's revision id (or timestamp + hash), send it back with the write, and reject the write if it no longer matches. Optimistic concurrency, applied to control code. Same idea as &lt;code&gt;If-Match&lt;/code&gt; on an HTTP PUT — nothing novel, just usually missing in AI tooling.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. One tool that both reads and writes will eventually change a setpoint
&lt;/h2&gt;

&lt;p&gt;Split the tool surface by trust level:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read tools&lt;/strong&gt; — free to call, no confirmation, no side effects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write tools&lt;/strong&gt; — one tool per kind of change, each requiring an explicit target and expected current state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never&lt;/strong&gt; a single &lt;code&gt;update_block(text)&lt;/code&gt; that can do both, and never a generic "execute SCL".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An agent that can rewrite a logic block and also write a setpoint will, sooner or later, decide the setpoint is the problem. Design the API so it can't.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Compile latency forces coarse-grained tools
&lt;/h2&gt;

&lt;p&gt;Every Openness round-trip on a real project is slow — compile, download and read-back are minutes, not milliseconds. If your tool list has 60 granular calls, the agent burns its context and the operator's patience walking them one by one, and half the calls fail on state that changed between them.&lt;/p&gt;

&lt;p&gt;The shape that actually works is coarse: &lt;em&gt;apply this block → compile → tell me the first error, with its network number&lt;/em&gt;. One tool call, one verifiable outcome, and the error text is what the model needs for the next attempt. Granularity should match the editor's own save points, not its keystrokes.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Without a verification oracle, the agent cannot know it succeeded
&lt;/h2&gt;

&lt;p&gt;"Compiles" is not "works". The agent needs an oracle it can't argue with: run the logic against a scenario and get PASS/FAIL back.&lt;/p&gt;

&lt;p&gt;That's why the most useful MCP server in this stack is the simulator, not the code writer. A cloud LAD/SCL runner that takes a block plus a scenario (&lt;code&gt;start button pressed, E-stop not pressed, 3 s later conveyor motor = on&lt;/code&gt;) and returns a pass/fail with the first divergence is what lets an agent iterate on its own — reject its own drafts, without a PLC and without a human in the loop.&lt;/p&gt;

&lt;p&gt;Once you have that, the loop becomes: draft → simulate → fix → simulate → propose. The human moves from writing code to approving a diff that already has a passing scenario attached.&lt;/p&gt;

&lt;h2&gt;
  
  
  The guard set we ended up with
&lt;/h2&gt;

&lt;p&gt;Six things, in this order, before any write reaches a real project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dry-run by default&lt;/strong&gt; — the tool produces a diff, not a change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intent echo&lt;/strong&gt; — the agent must restate target, expected current value and new value in one call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version guard&lt;/strong&gt; — reject if the object changed since the read.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compile gate&lt;/strong&gt; — the write only counts if the project compiles afterwards.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit row&lt;/strong&gt; — who, what, before, after, which agent session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rollback&lt;/strong&gt; — the previous version is kept and restorable with one call.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Plus one policy decision: anything that changes a setpoint, a safety-relevant parameter or a hardware configuration requires a human approval step, no matter how good the scenario result was.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to measure
&lt;/h2&gt;

&lt;p&gt;If you're evaluating this kind of tooling (ours or anyone's), don't measure "did it generate valid SCL" — every decent model does. Measure how it behaves when the input is wrong: does a sensor that never comes on produce one specific labelled fault, or an endless wait? Does a stale block version get rejected, or silently overwrite? Does the agent stop at the guard, or route around it?&lt;/p&gt;

&lt;p&gt;That's the difference between a demo and something you'd let near a machine.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I work on &lt;a href="https://tia.hubwiz.com/tia-link?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=tia-portal-mcp-guards" rel="noopener noreferrer"&gt;TiaLink&lt;/a&gt;, a commercial TIA Portal MCP gateway that implements the guards above — on-premises, driving Siemens Openness on the same machine as TIA Portal.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you want to try the pieces without installing anything or buying a licence, three hosted MCP services take plain SimaticML over Streamable HTTP and give 100 free calls on signup:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;a href="https://tia.hubwiz.com/sim?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=tia-portal-mcp-guards" rel="noopener noreferrer"&gt;PLC Cloud Sim&lt;/a&gt; — LAD/SCL simulation with scenario PASS/FAIL&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;a href="https://tia.hubwiz.com/render?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=tia-portal-mcp-guards" rel="noopener noreferrer"&gt;LAD Render Cloud&lt;/a&gt; — SimaticML → PNG ladder diagram, so you can see the layout before importing&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;a href="https://tia.hubwiz.com/lad?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=tia-portal-mcp-guards" rel="noopener noreferrer"&gt;LadDoc Cloud&lt;/a&gt; — LadDoc IR → importable SimaticML&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;No affiliation with Siemens implied; Openness is their interface, the guards and mistakes above are ours.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>plc</category>
      <category>siemens</category>
      <category>mcp</category>
      <category>ai</category>
    </item>
    <item>
      <title>The DSH TIA Portal plugin: prove the agent touched a tool before you let it touch a project</title>
      <dc:creator>tia-forge</dc:creator>
      <pubDate>Tue, 17 Nov 2026 07:58:20 +0000</pubDate>
      <link>https://dev.to/tiaforge/the-dsh-tia-portal-plugin-wire-an-mcp-gateway-by-talking-then-verify-with-three-prompts-32mo</link>
      <guid>https://dev.to/tiaforge/the-dsh-tia-portal-plugin-wire-an-mcp-gateway-by-talking-then-verify-with-three-prompts-32mo</guid>
      <description>&lt;p&gt;Installing an MCP plugin so an AI agent can drive TIA Portal takes three clicks. The part that decides whether the whole exercise is useful is the next question: &lt;strong&gt;did it actually call a tool, or did it write convincing steps from memory?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The failure is quiet. You get a well-formatted, plausible, fully fabricated procedure. It never touched the project. The cheap test is one prompt — "which project are you connected to, and how many devices does it have?" If the answer does not match your screen exactly, nothing after that point is real.&lt;/p&gt;

&lt;p&gt;The setup that makes this testable: a &lt;strong&gt;local&lt;/strong&gt; MCP gateway running on the same Windows machine as TIA Portal (Openness is a local COM API, so the gateway cannot live elsewhere), plus a desktop AI client that speaks MCP. Everything else is conversation — you tell the agent the gateway address, it writes its own config, restarts once, and reports back the project name and device count.&lt;/p&gt;

&lt;p&gt;Then verify in three steps before any real work: list and count the available capabilities; read-only list devices, blocks and tag tables and compare with your screen; ask a version-specific question and require a tool call alongside the answer. A correct answer without a tool call is luck.&lt;/p&gt;

&lt;p&gt;Measured on TIA Portal V19 with a bare CPU 1516-3 PN/DP: adding a CPU &lt;strong&gt;34.1 s&lt;/strong&gt;, importing an SCL block as an FB &lt;strong&gt;11.8 s&lt;/strong&gt;, compiling that block &lt;strong&gt;1.4 s&lt;/strong&gt;, exporting &lt;strong&gt;0.1 s&lt;/strong&gt;. Those numbers tell you when "slow" is normal — tens of seconds to create a CPU is expected, and interrupting it usually leaves the block inconsistent.&lt;/p&gt;

&lt;p&gt;A full walkthrough — the install, the four verification prompts, eight real error messages with their causes (&lt;code&gt;VAR area is not allowed for blocks of type OB&lt;/code&gt;, &lt;code&gt;invalid value for "VERSION"&lt;/code&gt;, and friends), and three safety habits — is in the original article:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full article (Chinese):&lt;/strong&gt; &lt;a href="https://www.hubwiz.com/blog/deepseek-harness-tiaforge-plugin/" rel="noopener noreferrer"&gt;DeepSeek DSH × TIA Portal: install the plugin, wire the gateway in four prompts, verify in three&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The gateway used here is TiaLink, deployed on the same machine as TIA Portal; cloud simulation and ladder rendering are metered per call.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>automation</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>One prompt, 18 files, one NaN: what 'one-shot' 3D scene generation actually looks like</title>
      <dc:creator>tia-forge</dc:creator>
      <pubDate>Wed, 11 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/tiaforge/one-prompt-18-files-one-nan-what-one-shot-3d-scene-generation-actually-looks-like-26lf</link>
      <guid>https://dev.to/tiaforge/one-prompt-18-files-one-nan-what-one-shot-3d-scene-generation-actually-looks-like-26lf</guid>
      <description>&lt;p&gt;"One-shot" 3D generation gets read as: type a sentence, get a picture.&lt;/p&gt;

&lt;p&gt;Here is the actual log from a single prompt given to Claude Fable 5.2 on the day it launched (November 9): &lt;strong&gt;18 files written&lt;/strong&gt;, &lt;strong&gt;12 shell commands run&lt;/strong&gt;, &lt;strong&gt;17 files read back&lt;/strong&gt;, a browser opened for visual acceptance, and one &lt;strong&gt;NaN&lt;/strong&gt; found by reading pixel values out of the render buffer — and fixed — before the picture was considered done.&lt;/p&gt;

&lt;p&gt;The author's own definition of "one-shot" is narrow and useful: &lt;strong&gt;one prompt, no second conversation, no manual post-processing.&lt;/strong&gt; No retouching. Which is not the same as no tools.&lt;/p&gt;

&lt;p&gt;The two 3D outputs were a 360° "early morning seaside lighthouse fishing harbour" and a 3D web page of the Apple Jing'an store in Shanghai.&lt;/p&gt;

&lt;h2&gt;
  
  
  The output is 18 files, not one HTML blob
&lt;/h2&gt;

&lt;p&gt;From the model's own progress report inside the log:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"All &lt;strong&gt;18 files&lt;/strong&gt; are written (the page, the &lt;strong&gt;local Three.js library&lt;/strong&gt;, and &lt;strong&gt;17 modules&lt;/strong&gt;). Now moving into browser acceptance: syntax check first, then actually open it and look."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That single line rules out the "it spits out an HTML file" picture. It split the scene into modules, vendored Three.js locally — because the prompt demanded the thing run offline — and then went into the browser to check the result.&lt;/p&gt;

&lt;p&gt;And that browser step was real: "12 commands run, 17 files read."&lt;/p&gt;

&lt;h2&gt;
  
  
  The prompt is a checklist, not a mood board
&lt;/h2&gt;

&lt;p&gt;The most transferable page of the whole experiment is the requirement block. Roughly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Build a 360° immersive scene of a seaside lighthouse harbour at dawn with Three.js, openable by double-clicking &lt;code&gt;index.html&lt;/code&gt; (&lt;strong&gt;offline, classic script tags, no ES modules&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All assets must be generated procedurally in code — no external images or models.&lt;/strong&gt; Low-poly for distant objects, detail preserved up close; &lt;strong&gt;seeded randomness so every run is identical&lt;/strong&gt;; keep the polygon count and post-processing cost in budget so it stays smooth; &lt;strong&gt;zero console errors&lt;/strong&gt;. Write the code module by module, and report progress after each file.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Two things follow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"All code, no assets" is a prompt constraint, not a model capability.&lt;/strong&gt; Skip that sentence and the model will happily reach for textures and GLBs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The other bullets are acceptance criteria wearing aesthetic clothes.&lt;/strong&gt; "Offline, no ES modules" pins the delivery format. "Seeded randomness" pins reproducibility. "Module per file, report progress" pins maintainability. "Zero console errors" pins verifiability. None of them say "make it atmospheric" — that is the part you cannot check.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it found its own bug
&lt;/h2&gt;

&lt;p&gt;The log entry that matters most:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The frame is broadly fine — composition and silhouettes are OK, and the console is clean. But &lt;strong&gt;lit objects render black, the sea is blown out, and the lighthouse beam has a bright artifact at the tip.&lt;/strong&gt; Let's find the cause first."&lt;/p&gt;

&lt;p&gt;"&lt;strong&gt;Read the pixel values of the render buffers at each stage&lt;/strong&gt; to locate where the black and the blown-out areas come from."&lt;/p&gt;

&lt;p&gt;"Root cause found: &lt;strong&gt;in the sky shader, the back-to-sun azimuth combined with the pow/normalize terms at zenith produces NaN&lt;/strong&gt;, which is baked into the environment map and breaks every lit material and reflection. I'll add guards everywhere a shader can hit a negative base or a zero vector."&lt;/p&gt;

&lt;p&gt;"With the NaN gone the frame is correct: sunrise, reflection band, lighthouse, water reflections all present. Now checking south and west faces."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is four steps: &lt;strong&gt;render a frame → read pixels → localise to a shader → guard and re-render.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is not generation. That is debugging — of shaders the model had written minutes earlier.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the pretty frame costs
&lt;/h2&gt;

&lt;p&gt;The lighthouse scene ran for tens of minutes. The second one is the honest number: &lt;strong&gt;about 2.5 hours&lt;/strong&gt; for the Apple store page, split roughly into ~1 hour spent searching for press coverage and zooming through &lt;strong&gt;close to a hundred reference photos&lt;/strong&gt;, and ~1 more hour modelling.&lt;/p&gt;

&lt;p&gt;Budget-wise: &lt;strong&gt;10 tasks in 4 hours burned about 24% of the quota.&lt;/strong&gt; The author's conclusion was blunt — expensive enough that he would keep daily work on a cheaper mix of models.&lt;/p&gt;

&lt;p&gt;One detail worth keeping: he noticed image previews appearing inside the model's thinking summaries. &lt;strong&gt;It was looking at what it drew&lt;/strong&gt; — not writing blind.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to copy
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Write the prompt as acceptance criteria, not as a brief.&lt;/strong&gt; "Offline-runnable / seeded randomness / zero console errors / one module per file" beats any amount of "make it feel calming".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tell it to render a frame and inspect it.&lt;/strong&gt; Explicitly: check for black lit surfaces, blown highlights, missing faces in the distance. Reading the buffer is what made the NaN findable at all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask for source, not artifacts.&lt;/strong&gt; You want &lt;code&gt;index.html&lt;/code&gt; plus modules — diffable, parameterisable, committable. A baked GLB can only be regenerated.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What this doesn't prove
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It is one person's test, not a reproduction.&lt;/strong&gt; Timings, quota burn and model behaviour are all self-reported.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"One-shot" does not mean "no tools".&lt;/strong&gt; It used a browser, a local Three.js copy, web search, and roughly a hundred reference photos. The claim is only: no second prompt, no hand retouching.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The video pipeline is unstated.&lt;/strong&gt; A 40-second tribute clip is mentioned; how the frames were produced and encoded is not described, so don't infer it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The scale is one small scene and one building.&lt;/strong&gt; No production line, no city, no engineering-grade tolerance — that is the industrial path (C# / parametric scene code), which this experiment never touches.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why this is the interesting half of the 3D story
&lt;/h2&gt;

&lt;p&gt;Most of the discourse is about &lt;em&gt;can it generate&lt;/em&gt;. The useful question, once code is the output format, is &lt;em&gt;can you accept it&lt;/em&gt;. Here the answer was mechanical: the model could read its own pixels, so a wrong blank could be turned into a located bug, then into a guard clause, then into a correct frame.&lt;/p&gt;

&lt;p&gt;The next time someone says "one prompt, one 3D scene", ask what was in the log.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;数字生命卡兹克 (@Khazix0918), &lt;em&gt;Testing Claude Fable 5.2&lt;/em&gt; (2026-11-09, X Article, Chinese): &lt;a href="https://x.com/Khazix0918/article/2119941585538572390" rel="noopener noreferrer"&gt;https://x.com/Khazix0918/article/2119941585538572390&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Model release details and quota figures as reported in that article.&lt;/li&gt;
&lt;li&gt;Companion piece: &lt;em&gt;AI stopped generating meshes and started writing code — four paths to 3D&lt;/em&gt;: &lt;a href="https://dev.to/tiaforge/ai-stopped-generating-meshes-and-started-writing-code-four-paths-to-3d-and-the-missing-acceptance-3ijl"&gt;https://dev.to/tiaforge/ai-stopped-generating-meshes-and-started-writing-code-four-paths-to-3d-and-the-missing-acceptance-3ijl&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>javascript</category>
      <category>threejs</category>
      <category>webdev</category>
    </item>
    <item>
      <title>AI stopped generating meshes and started writing code: four paths to 3D, and the missing acceptance test</title>
      <dc:creator>tia-forge</dc:creator>
      <pubDate>Wed, 11 Nov 2026 15:58:19 +0000</pubDate>
      <link>https://dev.to/tiaforge/ai-stopped-generating-meshes-and-started-writing-code-four-paths-to-3d-and-the-missing-acceptance-3ijl</link>
      <guid>https://dev.to/tiaforge/ai-stopped-generating-meshes-and-started-writing-code-four-paths-to-3d-and-the-missing-acceptance-3ijl</guid>
      <description>&lt;p&gt;Here is the number that made me look twice: a &lt;strong&gt;4B&lt;/strong&gt; model that outputs a single HTML file — three.js included, geometry and lights written as code — has &lt;strong&gt;319,000 downloads&lt;/strong&gt; and 967 likes on Hugging Face. It runs on a laptop in Q4.&lt;/p&gt;

&lt;p&gt;Not a frontier model. Not a mesh generator. Four billion parameters writing JavaScript.&lt;/p&gt;

&lt;p&gt;Within about two weeks, three more efforts landed on the same shape: Google treating a declarative subset of three.js as a &lt;strong&gt;compiler input&lt;/strong&gt;, a Blender-side framework that edits scenes through &lt;strong&gt;bpy code&lt;/strong&gt;, and an AR system that generates a &lt;strong&gt;pixel shader per frame&lt;/strong&gt; from a sentence.&lt;/p&gt;

&lt;p&gt;What they share is the output format. &lt;strong&gt;Code, not mesh files.&lt;/strong&gt; No external assets, no textures baked to disk — the scene is a program.&lt;/p&gt;

&lt;p&gt;That changes what you can do with the result, and it changes what "correct" means.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why code is the right output
&lt;/h2&gt;

&lt;p&gt;Generative mesh pipelines (Trellis, Meshy and friends) produce &lt;strong&gt;one file&lt;/strong&gt;. It looks good, and if you want it different you regenerate and hope.&lt;/p&gt;

&lt;p&gt;A code pipeline produces &lt;strong&gt;a program&lt;/strong&gt;: parameterised, readable, diffable, version-controlled. "Make the lamp warmer and move the desk 20 cm left" becomes a few changed parameters instead of another sampling run.&lt;/p&gt;

&lt;p&gt;The cost is equally clear: &lt;strong&gt;the code running is not the same as the picture being right.&lt;/strong&gt; That is a software problem, not a rendering problem — which is why this round of work keeps circling back to verification.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path A — three.js becomes the scene language
&lt;/h2&gt;

&lt;p&gt;This is the mainstream path, because models are already good at front-end code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Qwen3.5-4B-3D-Coder&lt;/strong&gt; (CCORE, a fine-tune on Qwen3.5-4B, Apache 2.0) is the flag-bearer: the output is an HTML file that pulls in three.js and builds the scene procedurally. 319k downloads, 967 likes, and the companion &lt;code&gt;ThreeJS-3D-Scenes&lt;/code&gt; dataset is public.&lt;/p&gt;

&lt;p&gt;The interesting part is the size. &lt;strong&gt;4B&lt;/strong&gt; means the pipeline doesn't need a frontier model — GGUF Q4/Q8 runs locally. The model card also ships an optional vision projector (&lt;strong&gt;644 MiB&lt;/strong&gt;) that lets it build a voxel scene from a reference image.&lt;/p&gt;

&lt;p&gt;There is a GLB variant with 43k downloads that exports the three.js scene for Godot — worth noting because it folds code back into an asset format, giving up the editability that made it interesting.&lt;/p&gt;

&lt;p&gt;Google went the other way. &lt;strong&gt;Three-Live&lt;/strong&gt; doesn't trust model-written code inside a webview; it takes a declarative subset of three.js as a &lt;strong&gt;DSL&lt;/strong&gt;, executes it in a sandbox, and serialises the result to GLB / USDZ in &lt;strong&gt;2–5 milliseconds&lt;/strong&gt;. Their thesis: code is untrusted input, so treat it as compiler input.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path B — bpy, where "correct" is a state you can check
&lt;/h2&gt;

&lt;p&gt;three.js answers "viewable in a browser". Blender answers "deliverable, renderable, inside a pipeline".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BlenderFORGE&lt;/strong&gt; (arXiv 2611.10768) is the most complete attempt so far: open-weight multimodal models edit explicit scenes by writing &lt;strong&gt;bpy&lt;/strong&gt;, and the tasks are shaped so state is verifiable — object placement, shape-key editing, &lt;strong&gt;lighting adjustment&lt;/strong&gt;, &lt;strong&gt;material modification&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Their starting point is blunt: most existing systems lean on closed model APIs and &lt;strong&gt;lack a deterministic, state-verifiable execution environment&lt;/strong&gt;, so you can neither train nor evaluate properly.&lt;/p&gt;

&lt;p&gt;The architecture gives the trick away. In the middle of the pipeline sits a &lt;strong&gt;Blender Sandbox&lt;/strong&gt; with two tools — a code executor and a preview renderer. The model changes something, runs it, looks at it, decides again. That is not one-shot generation; it is iterative editing with feedback.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path C — don't generate geometry, generate the shader
&lt;/h2&gt;

&lt;p&gt;If all you need is to change how something &lt;strong&gt;looks&lt;/strong&gt;, the cheapest move is to skip geometry entirely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ShadAR&lt;/strong&gt; (arXiv 2610.19998) does exactly that: you say "blur all the people", it parses intent with &lt;strong&gt;GPT-5.2&lt;/strong&gt;, locates the targets with &lt;strong&gt;YOLOv26&lt;/strong&gt;, generates a &lt;strong&gt;pixel shader&lt;/strong&gt;, and injects it into the AR passthrough — live. Not an offline render of one frame; every frame.&lt;/p&gt;

&lt;p&gt;It's proof that lighting and post-processing are already inside the real-time pipeline for generated code. The engineering-side equivalent is a coding agent writing GLSL demos, or two models racing to write a Minecraft shader pack from scratch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path D — industrial scenes want dimensions, not atmosphere
&lt;/h2&gt;

&lt;p&gt;Industry flips the problem: the requirement is &lt;strong&gt;exact size and placement&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SceneGenAgent&lt;/strong&gt; (ACL 2025) generates industrial scenes in &lt;strong&gt;C#&lt;/strong&gt;, and puts the difficulty where it belongs — &lt;strong&gt;spatial layout planning&lt;/strong&gt;. Not "does it look like a factory", but are the positions, spacings and orientations right. The loop is structural planning → code generation → verification.&lt;/p&gt;

&lt;p&gt;For anyone building line/plant tooling, this is the most useful of the four: in industrial scenes, "right" can be written down as a constraint.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gap all four share
&lt;/h2&gt;

&lt;p&gt;Every path above solves &lt;em&gt;generation&lt;/em&gt;. What blocks deployment is &lt;em&gt;acceptance&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;EMNLP 2026 has a paper that names it: &lt;strong&gt;&lt;a href="https://aclanthology.org/2026.emnlp-main.2310/" rel="noopener noreferrer"&gt;Apples on the Table?&lt;/a&gt;&lt;/strong&gt; points out that text-to-3D-scene evaluation either compares "does it look like the prompt overall" or &lt;strong&gt;skips spatial reasoning altogether&lt;/strong&gt; — nobody checks "X must appear to the left of Y". Their LEGO benchmark does fine-grained constraint checking.&lt;/p&gt;

&lt;p&gt;BlenderFORGE's failure analysis is what that gap looks like in practice. Two trajectories: a model decides the nightstand is "to the left of the bed" and moves it left — further from the target; another misreads 90° as 180° and spins the armchair too far.&lt;/p&gt;

&lt;p&gt;Red text in the figure marks the reasoning that failed. &lt;strong&gt;The code executed. The picture was wrong.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is the sentence to remember from this whole wave: the distance between "it generates" and "it generated the right thing" is not model capability. It's verification.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four paths, side by side
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;th&gt;Editable&lt;/th&gt;
&lt;th&gt;Deterministic&lt;/th&gt;
&lt;th&gt;How you'd verify it&lt;/th&gt;
&lt;th&gt;Fits whom&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;A. three.js&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Single-page HTML / GLB&lt;/td&gt;
&lt;td&gt;Strong — code diffs&lt;/td&gt;
&lt;td&gt;Yes — same code, same frame&lt;/td&gt;
&lt;td&gt;Screenshot diff + constraint checks&lt;/td&gt;
&lt;td&gt;Web/XR, embedding in a product, CI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;B. bpy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.blend&lt;/code&gt; + renders&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;State assertions (placement, lights, materials)&lt;/td&gt;
&lt;td&gt;Stills, video, DCC pipelines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;C. shader&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;GLSL / pixel shader&lt;/td&gt;
&lt;td&gt;Medium — pixels, no geometry&lt;/td&gt;
&lt;td&gt;Yes, per frame&lt;/td&gt;
&lt;td&gt;Frame-by-frame visual regression&lt;/td&gt;
&lt;td&gt;Post-processing, AR filters, stylisation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;D. C# / parametric&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Industrial scene code&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Constraint solving on size and layout&lt;/td&gt;
&lt;td&gt;Lines, plants, digital twins&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Three questions to ask any 3D pipeline
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Is the output code or a file?&lt;/strong&gt; A file means every change is a regeneration. Code means a one-line diff — and whether it can live in your VCS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can acceptance be automated?&lt;/strong&gt; If "correct" can be written as constraints (position, size, material, light parameters), it can go into CI. If it's "looks about right", it's an inspiration tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does it know what it is changing?&lt;/strong&gt; Iterative editing with a run-look-decide loop was an order of magnitude more reliable than one-shot generation in everything above — because every edit gets feedback.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What we didn't do
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;We ran none of this locally.&lt;/strong&gt; Download counts, parameter sizes and task definitions come from the model cards, papers and Google's blog post. Nobody in this article has published a benchmark of the GGUF build on real hardware yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The four paths are not exclusive.&lt;/strong&gt; Three-Live is path A plus a compiler; BlenderFORGE is path B plus reinforcement learning; ShadAR is path C plus object detection. Real products will be combinations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The scale is small.&lt;/strong&gt; A 4B model, four edit categories, single-scene demos. &lt;strong&gt;None of them has been tested at the scale of a building or a production line.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Qwen3.5-4B-3D-Coder (CCORE, Apache 2.0): &lt;a href="https://huggingface.co/ccore/Qwen3.5-4B-3D-Coder" rel="noopener noreferrer"&gt;https://huggingface.co/ccore/Qwen3.5-4B-3D-Coder&lt;/a&gt; — GLB variant: &lt;a href="https://huggingface.co/ccore/Qwen3.5-4B-GLB-3D-Coder" rel="noopener noreferrer"&gt;https://huggingface.co/ccore/Qwen3.5-4B-GLB-3D-Coder&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Open Source Blog, &lt;em&gt;Three-Live&lt;/em&gt;: &lt;a href="https://opensource.googleblog.com/2026/11/introducing-three-live-ai-generated-3d-ar-webxr.html" rel="noopener noreferrer"&gt;https://opensource.googleblog.com/2026/11/introducing-three-live-ai-generated-3d-ar-webxr.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;BlenderFORGE&lt;/em&gt; (arXiv 2611.10768): &lt;a href="https://arxiv.org/abs/2611.10768" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2611.10768&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;ShadAR&lt;/em&gt; (arXiv 2610.19998): &lt;a href="https://arxiv.org/abs/2610.19998" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2610.19998&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;SceneGenAgent&lt;/em&gt; (ACL 2025): &lt;a href="https://aclanthology.org/2025.acl-long.873/" rel="noopener noreferrer"&gt;https://aclanthology.org/2025.acl-long.873/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Apples on the Table?&lt;/em&gt; / LEGO benchmark (EMNLP 2026): &lt;a href="https://aclanthology.org/2026.emnlp-main.2310/" rel="noopener noreferrer"&gt;https://aclanthology.org/2026.emnlp-main.2310/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>threejs</category>
      <category>3d</category>
    </item>
    <item>
      <title>1.2 billion commits a week, still stuck in review: the four stages of agentic engineering</title>
      <dc:creator>tia-forge</dc:creator>
      <pubDate>Sun, 08 Nov 2026 06:36:28 +0000</pubDate>
      <link>https://dev.to/tiaforge/12-billion-commits-a-week-still-stuck-in-review-the-four-stages-of-agentic-engineering-1jek</link>
      <guid>https://dev.to/tiaforge/12-billion-commits-a-week-still-stuck-in-review-the-four-stages-of-agentic-engineering-1jek</guid>
      <description>&lt;p&gt;GitHub took more than 1.2 billion commits in a single week this October — 400% more than a year earlier, and more than the whole of 2025 combined.&lt;/p&gt;

&lt;p&gt;Now ask yourself: do you feel 400% more productive than last year?&lt;/p&gt;

&lt;p&gt;Writing software was never only "writing". Once AI accelerates the implementation step, the pressure moves somewhere else. A Faros AI study found that when a team goes from low to high AI adoption, &lt;strong&gt;pull requests spend 441% longer in review&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Nick Liffen and Philip Holleran at GitHub split a developer's work into four stages — Plan, Build, Verify, Observe — and go stage by stage on what agents can take over and which judgement still has to stay with a human. What follows is that breakdown, plus a table that makes the differences obvious, and one cold shower at the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plan: give the human and every agent the same material
&lt;/h2&gt;

&lt;p&gt;You know this scene. You need to change an API. The design lives in one tool, a compatibility requirement is buried in Slack, and an old PR explains why the current implementation has to work the way it does. To write a useful plan you have to stitch those details together, compare a few options, and confirm with everyone how existing clients keep working. What looks like straightforward planning turns into hours of searching, cross-checking, and follow-up questions. Implementation hasn't started and you are already tired.&lt;/p&gt;

&lt;p&gt;What the agent is good for here: gathering the scattered context into one place, reasoning through the trade-offs, and turning those decisions into an implementation plan.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plan where the team already works.&lt;/strong&gt; Pull PMs, designers, analysts and stakeholders into Copilot in Slack or Teams, with the context of connected tools, so assumptions get checked live.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Turn agreed requirements into executable work.&lt;/strong&gt; Have Copilot open GitHub issues with the context and acceptance criteria, and split out the tasks that can be handled separately.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't let routine triage eat planning time.&lt;/strong&gt; Use GitHub Agentic Workflows to label issues and estimate complexity; hand low-complexity work straight to Copilot and keep your time for harder judgement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Give complex work the planning it deserves.&lt;/strong&gt; Plan Mode in the Copilot surface you already use, to compare options and refine the plan — which you review and approve before implementation starts.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Build: keep more than one thing moving
&lt;/h2&gt;

&lt;p&gt;The plan can become code, but reality has other plans. An agent is halfway through a task, your next meeting starts in five minutes, and someone in that meeting points out an edge case the implementation has to handle. Everyone wants something at once, and you cannot be in three places.&lt;/p&gt;

&lt;p&gt;What the agent is good for: keeping work moving while you are not chained to the machine that started it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Continue on another device.&lt;/strong&gt; Session continuity lets you pick up the same Copilot session in a different client.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Close the laptop; the job keeps running.&lt;/strong&gt; Copilot runs tasks in cloud sandboxes, so execution does not occupy your machine and you can leave and come back.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't let tasks contaminate each other.&lt;/strong&gt; The Copilot app gives each session its own copy of the repo, so an implementation task and a docs update don't share a half-finished working tree.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Carry project knowledge into every task.&lt;/strong&gt; Repository instructions record conventions and verification commands; shared memory stores facts Copilot can reuse across the repo. Copilot Dreaming reviews eligible past sessions and PR feedback to keep that memory fresh, and proposes updates to instructions or skills.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Match the model to the task.&lt;/strong&gt; Copilot Fusion lets you pick model and reasoning depth per task, and pull in extra models to double-check a plan — a trade between quality, cost and latency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep company rules wherever you work.&lt;/strong&gt; Enterprise managed settings carry your policies and configured tools across Copilot surfaces.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Verify: spend attention where it is worth spending
&lt;/h2&gt;

&lt;p&gt;You spend an hour steering the agent to the right place, feel it has finally landed, and open a PR labelled "small refactor". It touches 47 files. The only thing you want a human to look at is the shared validation logic, but it is buried under updates to every endpoint that calls it, formatting changes, and hundreds of lines of generated tests. You start wondering how long approval will take, given the queue already on the team's review board.&lt;/p&gt;

&lt;p&gt;That queue is what the 441% looks like in practice. You can shorten the wait from both ends: make changes easier for humans to review, and let Copilot clear routine checks and fixes before a human opens the diff.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stack small PRs instead of building one large change.&lt;/strong&gt; Stacked pull requests split dependent work into smaller pieces, each reviewable on its own, with the dependency visible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stop routine quality issues before they eat review time.&lt;/strong&gt; GitHub Code Quality checks changes against coding practices and org standards before they reach a human reviewer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Match review help to the change.&lt;/strong&gt; Copilot code review gives lighter analysis for simple changes and deeper analysis for complex ones — you can set the depth or let Copilot decide per PR.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cover more repos with security scanning.&lt;/strong&gt; AI Scan finds vulnerabilities in languages and files outside CodeQL's coverage; AI secret detection helps catch unstructured secrets such as passwords, which pattern matching tends to miss.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hold new dependencies to policy.&lt;/strong&gt; License compliance checks dependencies against company rules before merge; GitHub's package firewall (public beta for npm) can block downloads that violate configured security policies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Handle findings and follow-ups without babysitting every PR.&lt;/strong&gt; Agentic Autofix proposes fixes for security issues, and Agent Merge handles failing checks, review comments and merge conflicts — and, if you configure it, Copilot can even merge once verification passes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Observe: learn from what shipped
&lt;/h2&gt;

&lt;p&gt;The change is approved, deploy checks pass, and you cross it off. The next morning the on-call dashboard shows intermittent timeouts and support reports a few large customers affected. Now you are matching logs, release history and customer feedback while someone asks whether to roll back. Yesterday's "all checks passed" sounds less reassuring today.&lt;/p&gt;

&lt;p&gt;What the agent is good for: putting operational evidence next to engineering context so you can decide the next step on evidence.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Check assumptions against real behaviour.&lt;/strong&gt; With observability tools and business data connected through something like Fabric, Copilot can help identify which requests and which customer segments are affected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Record findings where someone can act on them.&lt;/strong&gt; Have Copilot draft an issue with supporting evidence and acceptance criteria, including regression tests for the failure this exposed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Carry the useful lesson into later work.&lt;/strong&gt; Look at what Dreaming suggests — it uses sessions and repo activity to refine memory, skills and code review guidance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The table worth taking away
&lt;/h2&gt;

&lt;p&gt;The GitHub post reads like a product guide: every stage sounds right, but it is hard to act on. Compressed into one table, the differences become obvious:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;Who leads&lt;/th&gt;
&lt;th&gt;Artifact that should survive&lt;/th&gt;
&lt;th&gt;Most common failure&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Plan&lt;/td&gt;
&lt;td&gt;Human leads, agent gathers and asks&lt;/td&gt;
&lt;td&gt;A reviewable plan, acceptance criteria, scoped issues&lt;/td&gt;
&lt;td&gt;The plan only exists in a chat nobody reopens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Build&lt;/td&gt;
&lt;td&gt;Agent does most, human sets direction&lt;/td&gt;
&lt;td&gt;Isolated working copies, small individually reviewable PRs&lt;/td&gt;
&lt;td&gt;Session lost on one machine; several tasks sharing one unfinished tree&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Verify&lt;/td&gt;
&lt;td&gt;Machines first, human second&lt;/td&gt;
&lt;td&gt;Smaller diffs, routine checks cleared, review focused on intent&lt;/td&gt;
&lt;td&gt;The review queue balloons — that is the 441%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Observe&lt;/td&gt;
&lt;td&gt;Human leads, agent connects evidence&lt;/td&gt;
&lt;td&gt;Issues with evidence and regression tests&lt;/td&gt;
&lt;td&gt;Treating "all checks passed" as a conclusion&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The column to watch is the last one. Only Verify fails &lt;strong&gt;visibly&lt;/strong&gt; (the queue grows, the PR gets fat). The other three fail quietly: the plan was never written down, the session was lost, and after deploy there is only "checks passed".&lt;/p&gt;

&lt;p&gt;So if you want to change something, start with "every stage must leave behind something another person can open" — not with swapping models.&lt;/p&gt;

&lt;h2&gt;
  
  
  One cold shower
&lt;/h2&gt;

&lt;p&gt;These capabilities ship according to GitHub's plans and preview states. The package firewall is public beta for npm; Agent Merge, Copilot Fusion and friends each have their own toggles. The post describes capability boundaries, not what you can switch on tomorrow.&lt;/p&gt;

&lt;p&gt;The one thing you can do immediately, with no plan and no vendor, is make the change smaller.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published in Chinese on &lt;a href="https://www.hubwiz.com/blog/agentic-engineering-four-stages-review-bottleneck/?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=agentic-engineering-review-bottleneck" rel="noopener noreferrer"&gt;hubwiz.com&lt;/a&gt;. This is an edited English version of a Chinese write-up that compiles the GitHub Blog post "Beyond code generation: A developer's guide to agentic engineering" (Nick Liffen &amp;amp; Philip Holleran, 2026-11-06) and the Faros AI review-dwell finding; the numbers are quoted from those sources and were not independently reproduced here.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>github</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>AI agents can write SCL. TIA Portal MCP is what lets them open the project.</title>
      <dc:creator>tia-forge</dc:creator>
      <pubDate>Sat, 07 Nov 2026 03:20:54 +0000</pubDate>
      <link>https://dev.to/tiaforge/an-ai-agent-wrote-the-scl-it-still-couldnt-open-tia-portal-564j</link>
      <guid>https://dev.to/tiaforge/an-ai-agent-wrote-the-scl-it-still-couldnt-open-tia-portal-564j</guid>
      <description>&lt;p&gt;A few weeks ago a model wrote a conveyor-sorting state machine for an S7-1500 in about ninety seconds. Clean SCL, correct state numbering, IEC timers instead of hand-rolled scan counting. It compiled on the first try.&lt;/p&gt;

&lt;p&gt;Then it stopped. Not because it ran out of ideas — because it had no way to open the project, add the CPU it had just written code for, or check whether the block it produced even fits the hardware on the bench.&lt;/p&gt;

&lt;p&gt;That gap is the whole story of AI in industrial automation right now. The model is good enough. The &lt;strong&gt;connection&lt;/strong&gt; is missing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing code was never the hard part
&lt;/h2&gt;

&lt;p&gt;Watch an experienced controls engineer for an hour and count how much of the hour is "typing logic". It's small. The rest is: reading the existing project, checking which DB members a network already writes, adding a module, assigning an IP, wiring an IO system, compiling, downloading to a simulator, forcing an input, reading the tag back.&lt;/p&gt;

&lt;p&gt;An LLM can do the first thing on that list from a paste. It cannot do any of the others unless something exposes them as callable operations.&lt;/p&gt;

&lt;p&gt;That is what an MCP server does here. Not a chatbot with TIA Portal documentation in its context — a &lt;a href="https://tia.hubwiz.com/tia-link/en" rel="noopener noreferrer"&gt;TIA Portal MCP server&lt;/a&gt; turns TIA Portal operations into tools the agent can call and whose results the agent can read back.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a TIA Portal MCP server actually exposes
&lt;/h2&gt;

&lt;p&gt;Concretely, the useful surface is not one big "do PLC things" tool. It's a set of operations grouped by what they touch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read&lt;/strong&gt; — project tree, block source, tag tables, UDTs, cross-references, HMI screens, hardware configuration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Understand&lt;/strong&gt; — index the project into a knowledge graph: blocks and interfaces, who calls whom, which DB members a network reads or writes, dangling references, what a change would break.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write&lt;/strong&gt; — create or rewrite SCL, import SimaticML (LAD included), edit block interfaces, compile one block or the whole PLC.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configure&lt;/strong&gt; — add a CPU, insert modules, create subnets, wire IO systems, assign IP addresses and PROFINET device names.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify&lt;/strong&gt; — unit-level scenario suites against a simulator (PASS/FAIL, CI-friendly), and machine-level runs on S7-PLCSIM Advanced with tag values compared against expectations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Archive&lt;/strong&gt; — save, export SimaticML, archive the project so the change has a before/after.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The list matters less than the order it allows:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;read the block → propose a change → dry-run → write → compile → simulate → read back → keep or roll back.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That ordering is the difference between "the model wrote something plausible" and "the model changed the project, and here is the evidence". Every step leaves an artifact a human reviewer can check without re-running the session.&lt;/p&gt;

&lt;p&gt;If you are evaluating a &lt;a href="https://tia.hubwiz.com/tia-link/en" rel="noopener noreferrer"&gt;TIA Portal AI tool&lt;/a&gt;, the question to ask is not "can it write SCL". Almost everything can. The question is whether it can &lt;em&gt;read back what it wrote&lt;/em&gt;, and whether it can be stopped before the write lands.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part people underestimate: project context
&lt;/h2&gt;

&lt;p&gt;Feed a model a single FB and it writes good code. Feed it a 400-block project and ask for a change to network 7 of FB_ConveyorSort, and it will happily use a tag name that exists in a different DB, or call a function block whose interface it guessed.&lt;/p&gt;

&lt;p&gt;This is why the "understand" step above exists. In practice the first useful query is not &lt;em&gt;generate&lt;/em&gt; but &lt;em&gt;what does this project already do&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which blocks call this FB, and with which instance DBs&lt;/li&gt;
&lt;li&gt;which DB members this network reads and writes&lt;/li&gt;
&lt;li&gt;which references dangle after the last import&lt;/li&gt;
&lt;li&gt;which of these tags are already used elsewhere with a different type&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An agent that skips this step produces code that compiles and then surprises you at commissioning. The failure is not the model's ability — it's that nobody gave it the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Guardrails, because writing is the easy half
&lt;/h2&gt;

&lt;p&gt;Three rules that turned out to be non-negotiable:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dry run before every write.&lt;/strong&gt; The write is previewed as a diff against the current project. Nothing touches the file until a human or the agent's own policy accepts it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compile is a gate, not a formality.&lt;/strong&gt; A block that does not compile is never downloaded. This sounds obvious until you watch an agent retry a download four times against a stale compile.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simulation decides, not confidence.&lt;/strong&gt; S7-PLCSIM Advanced runs the scenario and returns tag values; pass/fail is a comparison, not an opinion. Changes stay reversible at block level, so a bad edit is a diff, not an incident.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And the limit, stated plainly: &lt;strong&gt;safety stays in hardware.&lt;/strong&gt; Emergency stop, hardwired interlocks and timing tuning are not verified in a simulator. What the agent verifies is the software part — logic, structure, interfaces, compile cleanliness, scan-cycle behaviour. Anything that could hurt a person belongs to a hardwired circuit and an engineer's signature.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three ways teams automate TIA Portal today
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;What it touches&lt;/th&gt;
&lt;th&gt;Where it breaks&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GUI automation (click the window)&lt;/td&gt;
&lt;td&gt;The UI&lt;/td&gt;
&lt;td&gt;Any dialog change or language switch breaks the script, and almost nothing reads back reliably&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Openness scripts (C# / PowerShell, one per task)&lt;/td&gt;
&lt;td&gt;The API&lt;/td&gt;
&lt;td&gt;Precise, but a human writes one script per task and the agent cannot explore beyond it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MCP server (Openness exposed as tools)&lt;/td&gt;
&lt;td&gt;The API, via MCP&lt;/td&gt;
&lt;td&gt;The agent picks the tool and reads the result — which is exactly why write paths need guardrails&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The first two are what most teams already have, and neither is wrong. An MCP server pays off when the same &lt;em&gt;kinds&lt;/em&gt; of operations repeat: another motor, another interlock, another block to port from an old project. For a one-off script, it's overkill.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting it
&lt;/h2&gt;

&lt;p&gt;The server runs on the same Windows machine as TIA Portal, because Openness only exists there. Clients can sit anywhere on the LAN. Any MCP client that speaks Streamable HTTP with a bearer token works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Claude Code&lt;/span&gt;
claude mcp add &lt;span class="nt"&gt;--transport&lt;/span&gt; http tialink http://192.168.1.110:8080/mcp &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &amp;lt;token&amp;gt;"&lt;/span&gt;
claude mcp list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"tialink"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://192.168.1.110:8080/mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Bearer &amp;lt;token&amp;gt;"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"timeout"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;180&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clients that only speak stdio use a small MIT-licensed forwarder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx tialink-mcp &lt;span class="nt"&gt;--url&lt;/span&gt; http://192.168.1.110:8080/mcp &lt;span class="nt"&gt;--token&lt;/span&gt; &amp;lt;token&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One practical note: &lt;strong&gt;raise the client timeout.&lt;/strong&gt; Adding a CPU or importing an SCL block takes tens of seconds on a slower machine, and a 60-second default fails on the "normally slow" operations. That failure looks like a bug in the server and is really a client setting.&lt;/p&gt;

&lt;p&gt;A small &lt;a href="https://github.com/tia-forge/tialink" rel="noopener noreferrer"&gt;batch-copy example&lt;/a&gt; — one device program copied from a spreadsheet of tag names, then compiled and checked — is in the public repo, along with the docs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements and limits, without the marketing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;TIA Portal &lt;strong&gt;V19 / V20 / V21&lt;/strong&gt; on Windows (V21 needs TiaLink 1.5.0 or later).&lt;/li&gt;
&lt;li&gt;The Windows account running the gateway must be in the &lt;strong&gt;Siemens TIA Openness user group&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;A licence is issued &lt;strong&gt;per machine&lt;/strong&gt;, bound to the machine code, and runs offline. &lt;strong&gt;Without it the connection is read-only&lt;/strong&gt; — which is a reasonable default to start from.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commercial, closed-source.&lt;/strong&gt; The public repository holds documentation, examples and the MIT-licensed stdio adapter; the adapter cannot work without the gateway.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Third-party tool&lt;/strong&gt; by Hubwiz. Not a Siemens product, and not an alias for anything Siemens ships.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No cloud, no outbound connection.&lt;/strong&gt; Project data stays on the machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When this is the wrong tool
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You need it today for a one-off.&lt;/strong&gt; Writing the Openness script is faster than wiring an agent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You want the agent to decide safety-relevant behaviour.&lt;/strong&gt; It should not. Hardwired interlock, human sign-off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your TIA Portal version is older than V19.&lt;/strong&gt; Openness coverage drops; the tool surface shrinks accordingly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The project is unversioned and nobody can review a diff.&lt;/strong&gt; Automation without a before/after is how you get a 2 a.m. rollback with no baseline.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The shift worth paying attention to
&lt;/h2&gt;

&lt;p&gt;The interesting change is not "AI writes PLC code". Tools have done that for two years.&lt;/p&gt;

&lt;p&gt;It is that the agent can now &lt;strong&gt;close the loop on the bench&lt;/strong&gt;: propose, write, compile, simulate, read back, and hand you the evidence. Once that loop exists, the human's job moves up a level — from typing the state machine to deciding which change is acceptable, and which part of the system must never be automated at all.&lt;/p&gt;

&lt;p&gt;We built &lt;strong&gt;TiaLink&lt;/strong&gt; for that loop: one MCP endpoint for project read/understand/write, hardware configuration, ladder via a JSON contract, compile, and simulation, on V19–V21. If your team is testing whether an agent can do real work in TIA Portal rather than just talk about it, that's the shortest path we know to find out.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>programming</category>
      <category>mcp</category>
    </item>
    <item>
      <title>Two Routes to Connect AI to TIA Portal: 6 Tools, and Only 4 Can Write LAD</title>
      <dc:creator>tia-forge</dc:creator>
      <pubDate>Thu, 05 Nov 2026 16:17:39 +0000</pubDate>
      <link>https://dev.to/tiaforge/two-routes-to-connect-ai-to-tia-portal-6-tools-and-only-4-can-write-lad-534h</link>
      <guid>https://dev.to/tiaforge/two-routes-to-connect-ai-to-tia-portal-6-tools-and-only-4-can-write-lad-534h</guid>
      <description>&lt;p&gt;Putting an LLM next to a Siemens TIA Portal project in 2026 means picking one of two routes. I picked six tools that have public pages you can actually check: &lt;strong&gt;four can write LAD, only three can run a test&lt;/strong&gt; — and counting LadDoc next to TiaLink is what gets LAD to four.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How this was checked.&lt;/strong&gt; Five of the six entries come from vendor pages read on 2026-10-02 and 10-25; the TiaLink row comes from its own product docs and hands-on use. Every cell a vendor does not state explicitly is marked "not stated" — that is not the same as "missing", and only someone who has installed the thing can tell the difference.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Two routes: whose model is it
&lt;/h2&gt;

&lt;p&gt;Everything on this list falls on one line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Route A — a purpose-built agent.&lt;/strong&gt; The model is fixed, TIA knowledge is baked in, it works out of the box. You describe the job, review the result, sign off. You never pick a model and never touch MCP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Route B — your own agent plus a tool.&lt;/strong&gt; You choose the brain: Claude Code, Codex, Cursor, whatever. The tool layer only supplies hands — read blocks, edit blocks, compile, run a simulation. The tool can be an MCP server, an HTTP API, or a command-line program; the wiring changes, the route doesn't.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Who supplies the model&lt;/th&gt;
&lt;th&gt;What you have to do&lt;/th&gt;
&lt;th&gt;The cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A · purpose-built agent&lt;/td&gt;
&lt;td&gt;The vendor&lt;/td&gt;
&lt;td&gt;Describe, review, sign&lt;/td&gt;
&lt;td&gt;Model is not swappable; offline and intranet use is the vendor's call; switching clients means starting over&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B · your agent + a tool&lt;/td&gt;
&lt;td&gt;You&lt;/td&gt;
&lt;td&gt;Install the tool, configure the client, write prompts, define acceptance&lt;/td&gt;
&lt;td&gt;Free choice, but you own both the tool quality and the model quality&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;A sells an outcome; B sells a capability.&lt;/strong&gt; That single sentence decides everything downstream: do you want an assistant that hands back finished work, or a set of tools you can wire into your own pipeline?&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Six tools, split by route
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Form&lt;/th&gt;
&lt;th&gt;Versions&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Siemens Industrial Copilot&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;In-product add-in&lt;/td&gt;
&lt;td&gt;Recent TIA Portal&lt;/td&gt;
&lt;td&gt;Vendor, fixed, cloud&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Siemens Eigen Engineering Agent&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;In-product add-in&lt;/td&gt;
&lt;td&gt;V19 U5+ / V20 U4+ / V21&lt;/td&gt;
&lt;td&gt;Vendor, fixed, cloud only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;AnyAutomation Studio&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;Desktop IDE&lt;/td&gt;
&lt;td&gt;V15–V21&lt;/td&gt;
&lt;td&gt;Your own key, fully local possible&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Coilmind&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;Desktop client&lt;/td&gt;
&lt;td&gt;V17–V21&lt;/td&gt;
&lt;td&gt;Included, own key optional, local supported&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;T-IA Connect&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;REST + MCP&lt;/td&gt;
&lt;td&gt;V17–V21&lt;/td&gt;
&lt;td&gt;Your own key or a local model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;TiaLink&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;HTTP MCP&lt;/td&gt;
&lt;td&gt;V19–V21&lt;/td&gt;
&lt;td&gt;Any MCP client, local or national models&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Four A, two B. The split is not accidental: A sells convenience, so it bundles model and knowledge; B sells connectivity, so it hands the model back to you.&lt;/p&gt;

&lt;p&gt;What is not in the table, and why: the open-source side has plenty of projects, but they stop at primitives plus generation and leave verification to you; and pasting code into a browser chatbot is not a route at all — it cannot reach the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  A1: vendor agents — deepest, least free
&lt;/h3&gt;

&lt;p&gt;Eigen is the April 2026 generation: an add-in that talks to the project directly, emits SCL and LAD, generates test and validation logic, and also covers HMI scripting, drives and axes, PROFINET topology, and bulk hardware import from a spreadsheet. It coexists with the 2023 chat-style Industrial Copilot rather than replacing it — one answers a question inside TIA Portal, the other finishes the job.&lt;/p&gt;

&lt;p&gt;Its boundaries are all in Siemens' own documentation: fixed model, cloud only, S7-1200 and S7-1500 only, no older TIA versions, not approved for fail-safe programming, and no documented source-control integration. Those are not defects; they are the product definition — it guarantees &lt;em&gt;behaviour Siemens has certified&lt;/em&gt;, not &lt;em&gt;whatever model you want&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Locking the model has a rationale: in industrial software the hard part is not getting an LLM to write code, it is making the result &lt;strong&gt;accountable&lt;/strong&gt; — who verified it, on which version, against which test cases. Fixed model plus a certified behaviour envelope is the shortest path to a closed responsibility chain. The price is that you cannot swap in a model you fine-tuned, and cannot wire generation into your own pipeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deepest integration and least freedom, in the same product.&lt;/strong&gt; If your work is standard TIA Portal, it is the cheapest path; if you need your own agent, your own model, or your own CI, it was never designed to leave you a door.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frfktgh0kcfgufyfo2oqq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frfktgh0kcfgufyfo2oqq.jpg" alt="Siemens Eigen: one engineer, two screens — the project, and the conversation" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Siemens' own launch visual for Eigen (April 2026). The form factor of this generation: a plug-in plus cloud, with the engineer still at the desk.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  A2: third-party purpose-built clients
&lt;/h3&gt;

&lt;p&gt;This group is not tied to a vendor. It ships its own model and its own TIA knowledge, and sells "install it and work".&lt;/p&gt;

&lt;p&gt;AnyAutomation combines an engineering IDE with an agent: versions all the way back to V15, local models (Ollama, LM Studio) as first-class options, SCL unit tests on PLCSIM Advanced, and a diff you approve before anything is imported. Coilmind covers every block type except F-blocks, documents its simulation testing down to PLCSIM Advanced V3–V6, and also lets you swap in your own key.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw2vbkn9u18drirx93zs7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw2vbkn9u18drirx93zs7.jpg" alt="AnyAutomation Studio: project tree on the left, SCL in the middle, the agent on the right" width="799" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AnyAutomation Studio. The line on the right says what this category sells: 12 of 12 test cases passed on PLCSIM Advanced — the verification result is on screen, not in the marketing copy.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The smart part of this group is that it separates the two choices: the model can be yours, the client and the engineering surface stay theirs. You swap the brain, not the hands.&lt;/p&gt;

&lt;p&gt;A category-wide trait: these tools are thick by construction — context, generation and verification arrive bundled, and you have no thinner option. Thin-versus-thick only becomes a real choice on route B.&lt;/p&gt;

&lt;h3&gt;
  
  
  B1: three ways to wire a tool, not one
&lt;/h3&gt;

&lt;p&gt;"Does it support MCP?" answers nothing. MCP is only one of the wirings.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Wiring&lt;/th&gt;
&lt;th&gt;Who works out what tools exist and what arguments they take&lt;/th&gt;
&lt;th&gt;What comes back&lt;/th&gt;
&lt;th&gt;Fits&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MCP (local process)&lt;/td&gt;
&lt;td&gt;The protocol describes itself; the client reads the tool list and schemas&lt;/td&gt;
&lt;td&gt;Structured results&lt;/td&gt;
&lt;td&gt;One person, one machine, one client&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MCP (HTTP endpoint)&lt;/td&gt;
&lt;td&gt;Same, but the service lives independently of the client&lt;/td&gt;
&lt;td&gt;Structured results&lt;/td&gt;
&lt;td&gt;Several clients, scripts, CI sharing one service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HTTP API / CLI&lt;/td&gt;
&lt;td&gt;You, or the agent reading documentation&lt;/td&gt;
&lt;td&gt;Usually text or a JSON string&lt;/td&gt;
&lt;td&gt;Gluing onto existing systems, throwaway scripts&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The difference is &lt;strong&gt;who is responsible for explaining the tool list and its parameters&lt;/strong&gt;: with MCP the model reads it, with HTTP and CLI somebody has to write it down, otherwise the model guesses arguments — which is where hallucinations usually start. CLI has an underrated advantage: no service to install, no client config to edit, any agent with a shell can use it. The price is that arguments have to be assembled correctly every single time, and there is no state to carry between calls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verification splits into two levels, and they get conflated constantly.&lt;/strong&gt; &lt;em&gt;Unit verification&lt;/em&gt; checks what one block or one stretch of logic does for a given set of inputs — fast, no full hardware configuration, a hundred scenarios in a row. &lt;em&gt;Whole-machine verification&lt;/em&gt; checks whether the entire project comes up on a virtual CPU: how OBs are scheduled, how the I/O image updates, how blocks call each other, how the HMI behaves. The first is cheap, the second is real. They are not alternatives; they are two rungs of the same ladder.&lt;/p&gt;

&lt;p&gt;How the two B-route tools split across those rungs:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Unit verification&lt;/th&gt;
&lt;th&gt;Whole-machine verification&lt;/th&gt;
&lt;th&gt;Where context comes from&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;T-IA Connect&lt;/td&gt;
&lt;td&gt;Test harness (running on PLCSIM)&lt;/td&gt;
&lt;td&gt;Not stated&lt;/td&gt;
&lt;td&gt;Project reports and dependencies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TiaLink&lt;/td&gt;
&lt;td&gt;Its own engine, no TIA Portal required&lt;/td&gt;
&lt;td&gt;PLCSIM&lt;/td&gt;
&lt;td&gt;Built-in project knowledge graph&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Same task, different rung and different data source — which decides what the tool can answer for you.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  B2: the two thick ones
&lt;/h3&gt;

&lt;p&gt;T-IA Connect is the broadest in surface area: blocks and snapshots, project reports, a test harness, version management, several hundred tools exposed to an agent, V17 through V21, both REST and MCP. Its approach is to build the engineering platform first, then let an agent connect to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkeccs2sflzsutckhgr8c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkeccs2sflzsutckhgr8c.jpg" alt="T-IA Connect: 316+ API endpoints, 393+ MCP tools, V17–V21, 100% on-premise" width="799" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;T-IA Connect's first screen. "100% on-premise" is a deliberate first-screen claim — that is the first dividing line between this class and cloud offerings.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;TiaLink takes the other path: primitives, generation and whole-machine verification in one endpoint on the same machine — bulk import/export, generate SCL and compile, bulk HMI screen generation, start PLCSIM and run a test, then read the project back. Project-level context lives in the gateway as a knowledge graph; LAD generation is handled by another endpoint in the same product line, on purpose. Section B3 explains why.&lt;/p&gt;

&lt;p&gt;Wiring matters a second time here: a local-process gateway lives inside the client process, so closing the client kills the connection and switching clients means reinstalling; an HTTP endpoint runs on the same machine as TIA Portal and can serve Claude Code, Codex, your own scripts and a CI job at once, without fighting each other; a CLI is the lightest, but stateless — every call reconnects to the project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A gateway is a hand. The capability layer is an eye. With only a hand you have to trust what the AI says; with an eye you can look.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  B3: why three endpoints instead of one program
&lt;/h3&gt;

&lt;p&gt;Compressing each vendor into one table row creates a false impression: that "thick" means "everything stuffed into one binary".&lt;/p&gt;

&lt;p&gt;Split, it is clearer. Producing a LAD block that TIA Portal will import, and running that logic to see if it behaves, are two different jobs: the first is &lt;strong&gt;deterministic generation&lt;/strong&gt; (the same description always produces the same XML, identifiers and wiring assigned automatically, no output at all if validation fails), the second is &lt;strong&gt;deterministic execution&lt;/strong&gt; (same program, same inputs, same result, every time). Written as one program, both get worse.&lt;/p&gt;

&lt;p&gt;So the line is three endpoints, not one program:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Endpoint&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;When you reach for it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Engineering operations (TiaLink, with the project knowledge graph inside)&lt;/td&gt;
&lt;td&gt;Read the project, create and edit blocks, bulk import/export, compile, run PLCSIM, read back after writing; the graph answers "who calls whom, what breaks if I change this"&lt;/td&gt;
&lt;td&gt;TIA Portal is installed and you are changing a real project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LAD generation (LadDoc Cloud)&lt;/td&gt;
&lt;td&gt;JSON ladder description → validation → SimaticML block, importable as-is&lt;/td&gt;
&lt;td&gt;A description has to become an importable block&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unit verification (cloud simulation)&lt;/td&gt;
&lt;td&gt;Executes one block or one stretch of logic scan by scan — scripted cases, exhaustive matrices, seeded fuzzing, invariants&lt;/td&gt;
&lt;td&gt;Behaviour check right after a change; no TIA Portal on the machine; batch regression&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All three are MCP, all three are callable by the same agent, and each works alone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The graph deserves its own paragraph.&lt;/strong&gt; In most tools "context" means the project tree plus a block list — the AI knows which blocks exist, not how they interlock. The project knowledge graph parses an exported project into a queryable model: who calls whom, which network reads or writes which tag, how a signal flows from a physical input to its consumers, which call sites an interface change reaches (transitive, not one hop), dead code, and the classic hazard of several places writing the same signal, plus fan-in, fan-out and call depth. Ask in natural language; the answer carries exact locations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpvx2acvlm5zmp1qyaq5m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpvx2acvlm5zmp1qyaq5m.png" alt="Impact subgraph: changing FB::Auto_mode reaches its call site and instance DB directly, then walks up through the network, the OB and the block file" width="799" height="473"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;One impact graph from the knowledge graph. The question is "what does changing this block touch"; the answer is a transitive closure — call sites, instance DB, the enclosing network and OB, all the way to the block file.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It is a read-only analysis layer; edits happen on the engineering side. &lt;strong&gt;Analysis and execution being separate is itself a safety boundary&lt;/strong&gt;: the thing that can tell you what a change would do has no permission to make it. It has limits, too — it works from an exported snapshot rather than a live controller, covers LAD, SCL and FBD (older languages are recognised but not analysed in depth), and excludes hardware configuration and HMI content.&lt;/p&gt;

&lt;p&gt;One pleasant side effect of the split: &lt;strong&gt;people without TIA Portal can see results first.&lt;/strong&gt; An unfinished block goes to the cloud engine, comes back passing, and only then travels to the machine that has TIA Portal. The reverse holds as well: when an import fails, go back to the generator and read the validation report instead of poking at TIA Portal.&lt;/p&gt;

&lt;p&gt;The cloud engine verifies the &lt;strong&gt;unit&lt;/strong&gt;, not the machine: it executes one ladder rung or one SCL program scan by scan — contacts, coils, timers, counters, edges, block calls, jumps — with scenarios that can be scripted cases, exhaustive matrices, seeded fuzzing, or invariants, returning PASS/FAIL in one call. It does not replace PLCSIM: PLCSIM checks whether the whole project comes up on a virtual CPU (OB scheduling, I/O image, inter-block calls, HMI), and that step still needs TIA Portal.&lt;/p&gt;

&lt;p&gt;Once separated, the value is obvious: unit verification is cheap enough to run after every block edit; whole-machine verification is expensive enough that it only happens at milestones. &lt;strong&gt;Without the cheap rung, every AI edit waits until you have time to open TIA Portal.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What each route struggles with
&lt;/h3&gt;

&lt;p&gt;A's problem in China's plant networks is connectivity: the model lives in a vendor cloud, and the internal network either has no route or needs an approval. That is compliance, not capability, and the bigger the plant the harder it gets. B's problem is scaffolding: a thin wrapper gives you a hand and nothing else — context and acceptance criteria are yours to build. The same route can go smoothly or end in "the AI writes worse code than I do"; the difference is usually not the tool but whether you have an acceptance process (section 6).&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Of six, four can write LAD and three can run a test
&lt;/h2&gt;

&lt;p&gt;The two numbers are not ratings; they are structural. &lt;strong&gt;LAD requires a structured description&lt;/strong&gt; — element identifiers, wiring, branches, ordering — so one wrong identifier kills the whole import. Plenty of tools write SCL; only four write LAD, and LadDoc makes five. &lt;strong&gt;Testing requires an interface to a simulator&lt;/strong&gt;, downloading the block, feeding inputs and reading results; three tools have that whole chain (AnyAutomation, T-IA Connect, Coilmind), and TiaLink makes four.&lt;/p&gt;

&lt;p&gt;Siemens' Eigen says it "generates test and validation logic"; whether that executes on a simulator disagrees across two public sources, so it is not counted.&lt;/p&gt;

&lt;p&gt;All three of those run PLCSIM Advanced, which means whole-machine verification and a Windows box with TIA Portal installed. &lt;strong&gt;Exactly one tool here can do unit verification of a single block without TIA Portal: TiaLink.&lt;/strong&gt; Why that rung deserves its own column is in B3.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Generating is the entry ticket; verifying behaviour is what counts as integration.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. "Wiring AI up" and "integrating AI" are two different things
&lt;/h2&gt;

&lt;p&gt;There is a near-miss worth naming: OPC UA or Modbus can also "connect AI to TIA Portal" — but that path only exposes runtime data: tag values, registers, alarm bits. &lt;strong&gt;An AI that sees tag values still cannot see program blocks, cross-references, or compile errors&lt;/strong&gt;, so it cannot change a program.&lt;/p&gt;

&lt;p&gt;The test is simple: if the AI can see blocks and trigger a compile, that is integration; if it only sees values, that is data collection. You want both eventually, but never confuse them — one of them cannot fix a bug in an FB.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Building your own tool: five traps
&lt;/h2&gt;

&lt;p&gt;Whether you install an existing tool or write your own, these five arrive within the first two days. None of them depends on your language or framework; they come from how TIA Portal is built.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One: a version upgrade splits the assemblies.&lt;/strong&gt; The single engineering assembly of earlier versions was split — as of V21 — into base, PLC, HMI and safety assemblies in a new subfolder. A PLC-only tool must reference both base and PLC; namespaces are unchanged, but reference lists and runtime resolution paths are not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two: Copy Local has to be off.&lt;/strong&gt; Copying the assemblies next to your binary fights the copy TIA Portal already has loaded — at best a load failure, at worst strange behaviour. Reference them, do not copy them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Three: resolve assemblies by name at runtime.&lt;/strong&gt; Since you are not copying, the program has to register a resolver before it touches any engineering type, looking assemblies up by simple name in the TIA Portal install directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Four: build once per major version.&lt;/strong&gt; The binaries are not compatible across versions; one build, one version.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Five: default to a preview mode and return structured results.&lt;/strong&gt; Writes should simulate first and only commit when explicitly allowed; and what comes back to the model should be structured data, not log text — logs invite the model to guess what happened.&lt;/p&gt;

&lt;p&gt;Each of these costs half a day to two days. Together they are the real price of "build it yourself": not the install, but &lt;strong&gt;redoing it every time a version ships&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Acceptance: zero compile errors is only layer one
&lt;/h2&gt;

&lt;p&gt;The most misleading sentence after an AI writes code is "it compiles". Five layers, each proving something different:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Proves&lt;/th&gt;
&lt;th&gt;Cannot prove&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Structural validation (pre-import)&lt;/td&gt;
&lt;td&gt;Syntax is valid, names do not collide&lt;/td&gt;
&lt;td&gt;Whether the logic is right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compile&lt;/td&gt;
&lt;td&gt;Types, references, addresses, instruction usage&lt;/td&gt;
&lt;td&gt;Behaviour across scan cycles&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unit verification (one block / one stretch)&lt;/td&gt;
&lt;td&gt;Behaviour for given inputs, edges, counting, interlocks&lt;/td&gt;
&lt;td&gt;How blocks interlock, how OBs schedule, how the I/O image updates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Whole-machine verification (PLCSIM)&lt;/td&gt;
&lt;td&gt;The project comes up on a virtual CPU; scheduling and I/O image hold&lt;/td&gt;
&lt;td&gt;Real I/O and field disturbances&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read-back comparison&lt;/td&gt;
&lt;td&gt;What is in the project equals what you think you wrote&lt;/td&gt;
&lt;td&gt;Whether the requirement itself is right&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The middle layers are the ones people skip, and they are the valuable ones.&lt;/p&gt;

&lt;p&gt;A real example: during a refactor an impulse timer became an on-delay timer. Compile: 0 errors, 0 warnings. The code looked entirely normal. Under unit verification the motor simply would not turn — the difference was one instruction name, and the compiler cannot object because both are type-correct. After reverting, the same program passed 5,735 scans.&lt;/p&gt;

&lt;p&gt;That is why "it compiles" is not a delivery criterion. It catches wrong types and wrong addresses; it cannot catch wrong semantics — and in control engineering the errors that hurt are almost always semantic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zero compile errors proves it looks like a program. Unit verification proves it means what you think. Whole-machine verification proves it still works once installed.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Choose by the work in front of you
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Your situation&lt;/th&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Standard TIA Portal workflow, want vendor backing&lt;/td&gt;
&lt;td&gt;A1 (Eigen)&lt;/td&gt;
&lt;td&gt;Deepest integration, vendor support when it breaks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Want out-of-the-box, but your own model&lt;/td&gt;
&lt;td&gt;A2 (AnyAutomation / Coilmind)&lt;/td&gt;
&lt;td&gt;The client is theirs, the model can be yours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Need Git, CI, test reports&lt;/td&gt;
&lt;td&gt;B (T-IA Connect)&lt;/td&gt;
&lt;td&gt;Version management and a test harness are part of the product&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Already have an agent, just need hands&lt;/td&gt;
&lt;td&gt;Build your own (section 5)&lt;/td&gt;
&lt;td&gt;Light, hackable, no network needed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Need to know "will this change break another block"&lt;/td&gt;
&lt;td&gt;The thick B side (with a knowledge graph)&lt;/td&gt;
&lt;td&gt;A thin wrapper has no call graph or data flow to query&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;On-site network cannot reach a cloud&lt;/td&gt;
&lt;td&gt;A2 with local models, or the thick B side&lt;/td&gt;
&lt;td&gt;Model runs on the machine, the project never leaves it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Projects on V17 / V18&lt;/td&gt;
&lt;td&gt;A2 (goes back to V15) or the B side&lt;/td&gt;
&lt;td&gt;The vendor agents do not cover older versions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Want to verify logic before TIA Portal is installed&lt;/td&gt;
&lt;td&gt;Unit verification (cloud)&lt;/td&gt;
&lt;td&gt;A single block can return PASS/FAIL without an engineering box&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  8. Three boundaries
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Fail-safe programs are off limits.&lt;/strong&gt; Siemens' own documentation excludes F-programs; third-party tools should not go further. Responsibility for F-program validation sits with people and the certification process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Versions are hard-bound.&lt;/strong&gt; A tool supports the versions it says it supports. Older projects either get their logic verified in simulation first, or need a route with a wider version range.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write protection belongs in the process, not in a warning.&lt;/strong&gt; Preview before write, read back after write, snapshot before bulk changes — those three do more than any "please be careful" notice.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Four questions that come up
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does TIA Portal need anything extra enabled?&lt;/strong&gt; Yes. Openness — the interface that can read and write the project — is not on by default. It must be selected during installation, and the Windows account running the tool has to be in the &lt;code&gt;Siemens TIA Openness&lt;/code&gt; group. Without both, nothing connects, and the error will not tell you why.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does it need internet access?&lt;/strong&gt; Depends which part. Engineering operations do not: the model can run locally and the gateway sits on the same machine as TIA Portal, so the project never leaves it. LAD generation and cloud simulation are online services — useful when there is no TIA Portal yet, or when a batch needs regression. Vendor agents are cloud inference, so connectivity is a hard requirement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Once a gateway is installed, can the AI change programs?&lt;/strong&gt; It can — but do not start there. Let it read only for a week: read blocks, read cross-references, read compile errors, answer questions. When its understanding survives your spot checks, enable writing, and make preview and read-back part of the process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can AI-written ladder logic be downloaded to a real machine?&lt;/strong&gt; Not directly. Even after all five layers, on-site work is only the first small step of the last one: simulate, dry-run, single machine, then commissioning. That order has nothing to do with whether AI wrote the code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;AI tools for TIA Portal compared: who writes LAD, who tests, who runs offline&lt;/em&gt;, svghmi.pro, checked 2026-10-02&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Best AI for PLC Programming 2026: 9 Tools Compared&lt;/em&gt;, anyautomation.ch, 2026-10-25&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Building a Siemens TIA Portal MCP Server on Openness V21: A Hands-On Guide&lt;/em&gt;, controlbyte.tech, updated 2026-10-29&lt;/li&gt;
&lt;li&gt;Siemens Eigen Engineering Agent launch and product pages (version range, cloud-only constraint, fail-safe boundary)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Vendor pricing and licensing change fast, so this piece lists billing models rather than amounts. "Not stated" means the vendor's public pages do not say; it does not mean the capability is absent.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this comparison adds
&lt;/h2&gt;

&lt;p&gt;The two routes are not "new tool versus old tool"; they are two ways of selling. A sells an outcome, B sells a capability — and inside B, thickness varies by an order of magnitude. The open-source projects stop at primitives or generation: light, fast, offline-friendly, but with no cross-reference data and no verifier, &lt;strong&gt;so they can change things without being able to tell you what the change breaks&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The thicker approach is to split the work into three callable endpoints: engineering operations (with the project knowledge graph inside), LAD generation, and unit verification. Each has its own determinism — the same description always produces the same XML, the same project parses to the same graph, the same program with the same inputs always gives the same result — so each can be accepted on its own and still be chained by one agent.&lt;/p&gt;

&lt;p&gt;Context is where the spread is widest: exactly one of the six offers a program-level graph instead of a project tree and a block list. And that graph is read-only, with edits happening on the engineering side: &lt;strong&gt;the thing that can tell you what a change would do has no permission to make it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Selection advice, in reverse order of how people usually ask: first ask whether your model can stay on your machine, then whether you can see and verify what the AI changed, and only then how good its generated code looks. The first two decide whether you can deploy at all; the last one only decides how pleasant it is.&lt;/p&gt;

&lt;p&gt;Three entry points: &lt;a href="https://tia.hubwiz.com/tia-portal?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=connect-ai-tia" rel="noopener noreferrer"&gt;TiaLink&lt;/a&gt; (engineering operations, V19 / V20 / V21, same machine as TIA Portal); &lt;a href="https://tia.hubwiz.com/lad/?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=connect-ai-tia" rel="noopener noreferrer"&gt;LadDoc Cloud&lt;/a&gt; (LAD generation, produces importable blocks); &lt;a href="https://tia.hubwiz.com/sim/?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=connect-ai-tia" rel="noopener noreferrer"&gt;cloud simulation&lt;/a&gt; (run ladder and SCL scan by scan without TIA Portal). Cross-references and call relationships are queried inside the engineering endpoint.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>plc</category>
      <category>automation</category>
      <category>programming</category>
    </item>
    <item>
      <title>AI + PLC Programming: The Missing Layer Is Project Context, Not Model Quality</title>
      <dc:creator>tia-forge</dc:creator>
      <pubDate>Wed, 04 Nov 2026 13:41:17 +0000</pubDate>
      <link>https://dev.to/tiaforge/ai-plc-programming-the-missing-layer-is-project-context-not-model-quality-j1m</link>
      <guid>https://dev.to/tiaforge/ai-plc-programming-the-missing-layer-is-project-context-not-model-quality-j1m</guid>
      <description>&lt;p&gt;Ask an AI agent &lt;em&gt;"who reads and who writes &lt;code&gt;additional_variables.tag3&lt;/code&gt;?"&lt;/em&gt; in a real TIA Portal project, and you can tell within one reply whether it is guessing.&lt;/p&gt;

&lt;p&gt;A grounded answer is four rows: two contacts reading it at lines &lt;strong&gt;152&lt;/strong&gt; and &lt;strong&gt;222&lt;/strong&gt;, two coils writing it at lines &lt;strong&gt;217&lt;/strong&gt; and &lt;strong&gt;262&lt;/strong&gt;, all inside &lt;code&gt;Auto_mode&lt;/code&gt;, network 1. An ungrounded answer is a paragraph that &lt;em&gt;sounds&lt;/em&gt; right.&lt;/p&gt;

&lt;p&gt;That gap — four rows versus a paragraph — is not a model-quality problem. Current models write SCL fine. It is a &lt;strong&gt;project-context&lt;/strong&gt; problem: a PLC project is a graph, and we keep handing the model a stack of files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three ways agents get project context today, and what each one loses
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Answers well&lt;/th&gt;
&lt;th&gt;Silently loses&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Paste the export into the prompt&lt;/td&gt;
&lt;td&gt;"What does this network do?"&lt;/td&gt;
&lt;td&gt;Anything over the window; all cross-block coupling once you truncate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Global search / grep&lt;/td&gt;
&lt;td&gt;"Where does this string appear?"&lt;/td&gt;
&lt;td&gt;Direction (read vs. write, call vs. instance), and the &lt;em&gt;absence&lt;/em&gt; of an expected relation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Let the agent browse and remember&lt;/td&gt;
&lt;td&gt;Short sessions, one block at a time&lt;/td&gt;
&lt;td&gt;Freshness — it may be reasoning over what it read 40 turns ago, and it will not say so&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Chunking is the worst of the three, because the relationships you most need are exactly the ones that cross the chunk boundary. In a ladder program that boundary is everywhere: a coil in network N3 writes a tag that a contact in network N7 reads, and the tag itself is defined in a tag table that is a third file.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a project graph actually holds
&lt;/h2&gt;

&lt;p&gt;The graph we used has four kinds of content, and you need all four:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part&lt;/th&gt;
&lt;th&gt;What's in it&lt;/th&gt;
&lt;th&gt;What it answers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Nodes&lt;/td&gt;
&lt;td&gt;Blocks, networks, interface members, tags, LAD parts (contacts/coils/boxes), SCL statements&lt;/td&gt;
&lt;td&gt;"What is in this project?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edges&lt;/td&gt;
&lt;td&gt;Call, instantiate, type, read, write, wire&lt;/td&gt;
&lt;td&gt;"Who calls whom, who writes this tag?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Provenance&lt;/td&gt;
&lt;td&gt;A label on &lt;em&gt;every&lt;/em&gt; edge: parsed from a call / parsed from an operand / structural containment / tag-table membership / wire&lt;/td&gt;
&lt;td&gt;"Is this claim evidence, or an inference?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unresolved references&lt;/td&gt;
&lt;td&gt;Names that are referenced but defined nowhere in the project; deliberately &lt;strong&gt;not&lt;/strong&gt; forced into an edge&lt;/td&gt;
&lt;td&gt;"What is missing?" — the most valuable list before a handover or a migration&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That third row is the part people skip. In a graph built from a real project, "&lt;code&gt;tag3&lt;/code&gt; is written by a coil in &lt;code&gt;Auto_mode&lt;/code&gt;" and "&lt;code&gt;tag3&lt;/code&gt; is written by a coil in &lt;code&gt;Auto_mode&lt;/code&gt;, &lt;em&gt;per an operand parse&lt;/em&gt;, line 217" are different claims with different trust levels. If your agent cannot separate them, you are back to prose.&lt;/p&gt;

&lt;h2&gt;
  
  
  The run, with numbers
&lt;/h2&gt;

&lt;p&gt;Target: &lt;code&gt;PLC_SCADA_HMI&lt;/code&gt;, an MIT-licensed open-source project (&lt;code&gt;rassulz/multirobot_painting_control_system&lt;/code&gt;), opened in TIA Portal V19 on an &lt;strong&gt;S7-1500 / ET200MP station, CPU 1513F-1 PN&lt;/strong&gt; (&lt;code&gt;6ES7 513-1FL02-0AB0&lt;/code&gt;, firmware V2.9). Read-only the whole way: no imports, no block edits, no save, project dirty flag unchanged.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Measured&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Build time, from scratch&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;1.2 s&lt;/strong&gt; (one sentence to the agent; no further project access after that)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nodes&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;227&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edges&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;517&lt;/strong&gt; — containment 220, calls 2, instantiation 2, reads 87, writes 52, wires 154&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unresolved references&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;8&lt;/strong&gt; (7 "pending", 1 "external")&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Project size&lt;/td&gt;
&lt;td&gt;OB1 (4 networks), 2 FBs, 2 instance DBs, 2 tag tables (51 tags), 0 UDTs, 0 duplicate names&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;1.2 seconds is not the interesting number. The interesting number is &lt;strong&gt;517 edges against 227 nodes&lt;/strong&gt; — the relationship layer is twice the size of the object layer. That ratio is the reason a context window is the wrong container: you don't have a document of 227 things, you have a network of 517 claims about them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three checks before you believe any answer
&lt;/h2&gt;

&lt;p&gt;Any graph-derived answer is only as good as its freshness, and the failure here is silent. Before asking your first real question, get three facts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Which project is the graph attached to?&lt;/strong&gt; (should be the one you're analyzing — here, &lt;code&gt;PLC_SCADA_HMI&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When was it built?&lt;/strong&gt; If you edited a block after the build, the graph is stale and &lt;em&gt;nothing will tell you&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Was it built from the currently open project, or is it a leftover graph from last week?&lt;/strong&gt; A stale graph looks completely healthy. It just describes a project that no longer exists.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If any of the three is unclear: rebuild, then ask. Two related traps: an empty graph gets rejected outright (the previous graph is kept, so you may be looking at yesterday's), and a graph query that hits its result cap says so — "there's more" — which means &lt;em&gt;you have not seen the project&lt;/em&gt;, you have seen a page of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  One probe at a time
&lt;/h2&gt;

&lt;p&gt;The single most repeated mistake in this kind of analysis is batching six questions into one prompt, getting a long answer, and not noticing that section four was truncated. Six probes, six turns, each verifiable on its own:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Probe&lt;/th&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;What a good answer looks like&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Inventory&lt;/td&gt;
&lt;td&gt;What's in this project: blocks (type/number/language/network count), instance DBs, tag tables, UDTs, CPU and order number? List duplicates separately, write 0 where empty&lt;/td&gt;
&lt;td&gt;A table that reconciles against the TIA project tree, with explicit zeros&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Find&lt;/td&gt;
&lt;td&gt;Find &lt;code&gt;Auto_mode&lt;/code&gt; (or &lt;code&gt;CV-101&lt;/code&gt;, or &lt;code&gt;Conveyor&lt;/code&gt;), widening exact → prefix → comment word → contains; tell me which tier matched and whether results were truncated&lt;/td&gt;
&lt;td&gt;The match tier named, plus "there is more" if there is&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Dissect&lt;/td&gt;
&lt;td&gt;Open &lt;code&gt;OB1::Main&lt;/code&gt; once: interface, each network, what it calls, read/write list, unresolved refs inside the block; say which part was truncated&lt;/td&gt;
&lt;td&gt;One block, one page, complete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Relations&lt;/td&gt;
&lt;td&gt;Who reads and who writes &lt;code&gt;additional_variables.tag3&lt;/code&gt;? Reads and writes separately, each with block + network + line + provenance&lt;/td&gt;
&lt;td&gt;Rows, not sentences&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Impact&lt;/td&gt;
&lt;td&gt;If I change or delete &lt;code&gt;FB::Auto_mode&lt;/code&gt;, what is affected? By depth, and through which relation?&lt;/td&gt;
&lt;td&gt;Depth-numbered hits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Gaps&lt;/td&gt;
&lt;td&gt;List every unresolved reference with file and line, mark pending/external, classify truly-missing / external-library / to-be-added; do not guess&lt;/td&gt;
&lt;td&gt;A table you can act on&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Probe 2 is worth its own paragraph. On this project, &lt;code&gt;Auto_mode&lt;/code&gt; matched four things — the FB, a call site &lt;code&gt;Main::N1::I1&lt;/code&gt;, its file, and its network — and the answer came back with "there is more". Without the "was it truncated" question you would have concluded "four references" and been wrong. &lt;strong&gt;Ask about truncation every single time.&lt;/strong&gt; It costs one sentence and it is the difference between an inventory and a sample.&lt;/p&gt;

&lt;h2&gt;
  
  
  The payoff: four rows you can take to a review
&lt;/h2&gt;

&lt;p&gt;Probe 4, verbatim result for &lt;code&gt;additional_variables.tag3&lt;/code&gt;. First the shape, then the table — because the shape is the part prose loses:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk00rrg7p4hbgdeo3ne77.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk00rrg7p4hbgdeo3ne77.png" alt="Relationship subgraph: call site Main::N1::I1 calls FB::Auto_mode, and tag3 is read by two contacts and written by two coils" width="799" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sample subgraph — the full graph is 227 objects / 517 relations. Green = call, blue = read, orange = write, grey dashed = containment and LAD wiring, purple dash-dot = tag-table membership. Figure labels are Chinese; every identifier in it is the one used in the text, and every arrow can be traced back to a line number.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Relation&lt;/th&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;th&gt;Line&lt;/th&gt;
&lt;th&gt;Provenance&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;member of tag table&lt;/td&gt;
&lt;td&gt;&lt;code&gt;additional_variables&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;tag-table containment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;read&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Auto_mode::N1::L13&lt;/code&gt; (contact)&lt;/td&gt;
&lt;td&gt;152&lt;/td&gt;
&lt;td&gt;operand parse&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;write&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Auto_mode::N1::L26&lt;/code&gt; (coil)&lt;/td&gt;
&lt;td&gt;217&lt;/td&gt;
&lt;td&gt;operand parse&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;read&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Auto_mode::N1::L27&lt;/code&gt; (contact)&lt;/td&gt;
&lt;td&gt;222&lt;/td&gt;
&lt;td&gt;operand parse&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;write&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Auto_mode::N1::L35&lt;/code&gt; (coil)&lt;/td&gt;
&lt;td&gt;262&lt;/td&gt;
&lt;td&gt;operand parse&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two things to notice. First, &lt;strong&gt;reads and writes are separate columns of truth&lt;/strong&gt;: 2 reads + 2 writes means a change to this tag touches four ladder positions, all between lines 152 and 262 — that is the entire software blast radius of the change, stated as a list of places. "This tag is used in the auto mode block" is not that; it cannot be checked and it cannot be assigned.&lt;/p&gt;

&lt;p&gt;Second, &lt;strong&gt;the line numbers make the claim auditable&lt;/strong&gt;. Not "trust me, the graph says so" — open the XML, go to line 217, look at the coil. If an audit finds the graph wrong at line 217, you now know something about the graph for every subsequent answer. This is the whole reason to prefer a graph over a summary: it gives reviewers a way to be lazy &lt;em&gt;safely&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Impact analysis: the default edges answer a different question
&lt;/h2&gt;

&lt;p&gt;For &lt;code&gt;FB::Auto_mode&lt;/code&gt;, the default relation set (call / instantiate / read / write) gives:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Depth&lt;/th&gt;
&lt;th&gt;Through&lt;/th&gt;
&lt;th&gt;Hit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;call&lt;/td&gt;
&lt;td&gt;call site &lt;code&gt;Main::N1::I1&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;instantiation&lt;/td&gt;
&lt;td&gt;instance DB &lt;code&gt;InstanceDB::Block_1_DB&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Which reads as one honest sentence: &lt;em&gt;Auto_mode is called from network 1 of the main program and its instance DB is Block_1_DB; change the interface and both need a look.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But "which block does it live inside?" is &lt;strong&gt;not&lt;/strong&gt; in that answer, because containment is not part of the default set. Add containment and walk up — the two layers are drawn on the same figure below: the green/violet edges are what the default relation set can answer, and ①–④ are the containment chain that only appears once you add it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6a6gn8ryqa2umi9r6kx3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6a6gn8ryqa2umi9r6kx3.png" alt="Impact subgraph: call site and instance DB reach FB::Auto_mode directly, while containment walks up through Auto_mode.xml, network Main::N1, OB1::Main, Main.xml" width="799" height="473"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Arrows are drawn in the normal containment direction (outer source file → block → network → inner file). Impact analysis walks them **backwards&lt;/em&gt;&lt;em&gt;, which is why the node nearest &lt;code&gt;FB::Auto_mode&lt;/code&gt; is depth 1, not depth 4.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Above, in table form:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Depth&lt;/th&gt;
&lt;th&gt;Through&lt;/th&gt;
&lt;th&gt;Hit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;containment&lt;/td&gt;
&lt;td&gt;its source file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;containment&lt;/td&gt;
&lt;td&gt;the network it sits in (&lt;code&gt;Main::N1&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;containment&lt;/td&gt;
&lt;td&gt;&lt;code&gt;OB1::Main&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;containment&lt;/td&gt;
&lt;td&gt;the main program's source file&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are two different questions, and conflating them is the fastest way to a wrong edit plan: the first says &lt;strong&gt;who is affected&lt;/strong&gt; (callers, instance DBs, tag readers), the second says &lt;strong&gt;where it is nested&lt;/strong&gt; (file → network → block → file). Keep them as two probes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The most useful output is the list of things that don't exist
&lt;/h2&gt;

&lt;p&gt;Eight references in this project point at objects the project does not define. The graph does not invent edges for them; it puts them in a table:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Reference (written)&lt;/th&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Line&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;pending&lt;/td&gt;
&lt;td&gt;&lt;code&gt;IEC_Timer_0_DB_3&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;blocks/Auto_mode.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;332&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;pending&lt;/td&gt;
&lt;td&gt;&lt;code&gt;IEC_Timer_0_DB_4&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;blocks/Auto_mode.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;337&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;pending&lt;/td&gt;
&lt;td&gt;&lt;code&gt;IEC_Timer_0_DB_1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;blocks/Auto_mode.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;483&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;pending&lt;/td&gt;
&lt;td&gt;&lt;code&gt;IEC_Timer_0_DB_2&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;blocks/Auto_mode.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;488&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;external&lt;/td&gt;
&lt;td&gt;&lt;code&gt;IEC_Timer_0_DB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;blocks/Auto_mode.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;493&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;pending&lt;/td&gt;
&lt;td&gt;&lt;code&gt;IEC_Timer_0_DB_3&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;blocks/Manu_mode.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;232&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;pending&lt;/td&gt;
&lt;td&gt;&lt;code&gt;IEC_Timer_0_DB_4&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;blocks/Manu_mode.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;237&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;pending&lt;/td&gt;
&lt;td&gt;&lt;code&gt;IEC_Timer_0_DB_2&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;blocks/Manu_mode.xml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;323&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Cross-check: all eight are timer coils writing an instance — and both of these FBs have &lt;strong&gt;empty interfaces&lt;/strong&gt;, and no global DB with those names exists. So this is not a parser miss. The blocks reference timer instance DB names that were never created in this project. A search finds the name; only a project-wide graph can tell you the name resolves to nothing.&lt;/p&gt;

&lt;p&gt;Then the compile: &lt;code&gt;No block was compiled. All blocks are up-to-date.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Read that sentence carefully before you put it in a report. It does not mean "the program is fine." It means "nothing needed compiling." A green compile is evidence about the compiler's queue, not about the program — and it is exactly how a dangling timer instance survives to commissioning.&lt;/p&gt;

&lt;p&gt;The last step of the probe is the one only a human can do: classify each row as &lt;strong&gt;truly missing&lt;/strong&gt; (add the object), &lt;strong&gt;external library&lt;/strong&gt; (this project cannot define it; import something), or &lt;strong&gt;to be added later&lt;/strong&gt;. The agent assembles the evidence; the judgment stays with the engineer who owns the machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this cannot do
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It reports &lt;strong&gt;what is&lt;/strong&gt;, never &lt;strong&gt;what should be&lt;/strong&gt;. An empty FB interface and two empty OB networks are facts; whether that is intentional design or a half-finished migration is a conversation with whoever built it.&lt;/li&gt;
&lt;li&gt;It knows nothing about &lt;strong&gt;wiring, channels, or hardware&lt;/strong&gt;. A tag addressed to &lt;code&gt;%I29.4&lt;/code&gt; is a string in a table until someone checks the terminal strip.&lt;/li&gt;
&lt;li&gt;It does not replace a &lt;strong&gt;compile, a simulation, or a safety review.&lt;/strong&gt; Those prove different things, and one never substitutes for another.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unresolved ≠ broken code.&lt;/strong&gt; "Pending" often just means the object never entered this copy of the project.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Do it on your own project in 30 minutes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Pick one project you inherited, not one you wrote. The point is to be surprised.&lt;/li&gt;
&lt;li&gt;Build the graph, then immediately confirm the three checks (project name, build time, current-project origin). Write the build time into your notes — you will need it to know when the graph went stale.&lt;/li&gt;
&lt;li&gt;Inventory probe. Reconcile against the TIA project tree by hand, once. If they disagree, stop; the graph is not trustworthy yet.&lt;/li&gt;
&lt;li&gt;Pick &lt;strong&gt;one&lt;/strong&gt; tag that matters — an output enable, an interlock, a handshake bit — and ask probe 4. Read the four (or forty) rows.&lt;/li&gt;
&lt;li&gt;Sample two or three line numbers back into the XML or the TIA editor. Verify. This is the step everyone skips and the only one that calibrates trust.&lt;/li&gt;
&lt;li&gt;Ask probe 5 twice: default relations, then with containment.&lt;/li&gt;
&lt;li&gt;Ask probe 6, then classify every row yourself. Put the classification in the report, not in your head.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Expect the surprises to come from steps 4 and 6. Impact analysis on a block you "know" is where the containment layers show you the file you forgot, and the tag probes routinely find a writer in a block nobody wanted to touch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Our take: project context is a data structure, not a longer prompt
&lt;/h2&gt;

&lt;p&gt;The industry conversation about AI and PLC programming is mostly about generation — better SCL, better ladder, better conversions. That is the part that got solved first, because it only needs the spec.&lt;/p&gt;

&lt;p&gt;The part that did not get solved is context, and prompt engineering cannot fix it, for a structural reason: &lt;strong&gt;a graph does not fit in a sequence.&lt;/strong&gt; You can always paste more text, but pasting more text makes the coupling you need &lt;em&gt;less&lt;/em&gt; visible, not more, because the relationships are spread across the very boundaries you are introducing.&lt;/p&gt;

&lt;p&gt;Three things are worth taking from this even if you never build a graph:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ask for provenance on every claim.&lt;/strong&gt; "Parsed from an operand, line 217" versus "the block seems to use this tag" — one is evidence, one is a sentence. AI-assisted engineering fails quietly when the two are formatted the same way.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proofread for truncation, not for tone.&lt;/strong&gt; Long outputs from agents are persuasive at the paragraph level and unreliable at the inventory level. The question "did you see all of it?" should be muscle memory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat absence as a finding.&lt;/strong&gt; The eight dangling timer references are worth more than the 87 read edges, because a compile will never tell you about them and a human search will only confirm the name appears somewhere. Missing relations are only visible against a complete model of the project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The lesson this came from is &lt;a href="https://tia.hubwiz.com/learn-lad/ai/project-knowledge-graph/?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=plc-project-knowledge-graph" rel="noopener noreferrer"&gt;Lesson 6 of PLC AI in Practice&lt;/a&gt; — a free, text-based course (no video) that walks the same project through six probes with copy-paste prompts, ~30 minutes. The tool behind it is &lt;a href="https://tia.hubwiz.com/tia-link?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=plc-project-knowledge-graph" rel="noopener noreferrer"&gt;TiaLink&lt;/a&gt;, an MCP gateway that connects TIA Portal to an agent and runs locally, so project data stays in the plant.&lt;/p&gt;

&lt;p&gt;If you'd rather start from the human problem than the tooling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.hubwiz.com/blog/taking-over-legacy-plc-program-4-steps/?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=plc-project-knowledge-graph" rel="noopener noreferrer"&gt;Taking over a legacy PLC program: a 4-step forensics routine&lt;/a&gt; (in Chinese) — what to do in the first 48 hours, before any analysis;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.hubwiz.com/blog/ai-plc-programming-7-lessons-verification/?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=plc-project-knowledge-graph" rel="noopener noreferrer"&gt;AI PLC programming: 7 hands-on lessons, each with a verifiable gate&lt;/a&gt; (in Chinese) — how this lesson fits the series;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.hubwiz.com/blog/tia-portal-openness-mcp-write-guards/?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=plc-project-knowledge-graph" rel="noopener noreferrer"&gt;Write protection in TIA Openness MCP tools&lt;/a&gt; (in Chinese) — why "read-only" has to be designed, not promised.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Disclosure: every measured number above — 227 nodes, 517 edges (220/2/2/87/52/154), 8 unresolved references, 1.2 s build, lines 152–262, the `IEC_Timer_0_DB&lt;/em&gt;` rows — comes from the course's own published run on 2026-10-27 (TIA Portal V19, TiaLink 1.4.0.0). I did not re-run the measurement independently for this post. Prompt examples were written in Chinese in the lesson and are translated here.*&lt;/p&gt;

</description>
      <category>ai</category>
      <category>plc</category>
      <category>automation</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
