<?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: moss chan</title>
    <description>The latest articles on DEV Community by moss chan (@moss_chan_15cdefc01087a6e).</description>
    <link>https://dev.to/moss_chan_15cdefc01087a6e</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%2F4273643%2Fce7ec5e3-67c6-4180-9b42-9c094a27e8c4.png</url>
      <title>DEV Community: moss chan</title>
      <link>https://dev.to/moss_chan_15cdefc01087a6e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moss_chan_15cdefc01087a6e"/>
    <language>en</language>
    <item>
      <title>Shipping a Zero-Backend Industrial HMI as a Double-Click HTML File (Vue 3 + IndexedDB) - with a Real Injection Molding Flash Case</title>
      <dc:creator>moss chan</dc:creator>
      <pubDate>Wed, 02 Dec 2026 01:01:56 +0000</pubDate>
      <link>https://dev.to/moss_chan_15cdefc01087a6e/shipping-a-zero-backend-industrial-hmi-as-a-double-click-html-file-vue-3-indexeddb-with-a-2h7a</link>
      <guid>https://dev.to/moss_chan_15cdefc01087a6e/shipping-a-zero-backend-industrial-hmi-as-a-double-click-html-file-vue-3-indexeddb-with-a-2h7a</guid>
      <description>&lt;p&gt;Most injection molding engineers live at the press controller, not in &lt;code&gt;curl&lt;/code&gt; or a 180-field enterprise MES. So when we turned our molding physics engine into an API, we also needed a front end that a process tech could open on a locked-down shop-floor PC in seconds.&lt;/p&gt;

&lt;p&gt;The result is &lt;strong&gt;&lt;a href="https://aicraft4injection.com/studio/?utm_source=devto" rel="noopener noreferrer"&gt;AICraft Studio&lt;/a&gt;&lt;/strong&gt;: an open-source (MIT), zero-backend industrial HMI built with Vue 3 + TypeScript + Tailwind CSS v4. This post walks through the architecture decisions and a real thin-wall PP flash case computed through it.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/DreamwayChan/aicraft-studio" rel="noopener noreferrer"&gt;github.com/DreamwayChan/aicraft-studio&lt;/a&gt;&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%2F2gll5rnjysbljj2g5lxx.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%2F2gll5rnjysbljj2g5lxx.png" alt="AICraft Studio dark HMI" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Design constraint #1: no backend we have to run for you
&lt;/h2&gt;

&lt;p&gt;Factories are (rightly) paranoid about where their process data goes. Mold geometry, cycle times and trial history are competitive information.&lt;/p&gt;

&lt;p&gt;So Studio is a &lt;strong&gt;pure static SPA&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Machines, molds, polymers and &lt;code&gt;T1 -&amp;gt; T2 -&amp;gt; T3&lt;/code&gt; trial history live in the browser's &lt;strong&gt;IndexedDB&lt;/strong&gt;, with 1-click JSON export/import for backup or handover.&lt;/li&gt;
&lt;li&gt;The API key lives in &lt;code&gt;localStorage&lt;/code&gt;, and the browser calls the calculation endpoint directly over HTTPS. There is no Studio server in the middle storing anything.&lt;/li&gt;
&lt;li&gt;Only ~15 algorithm-critical fields are needed per mold (wall thickness, shot weight, screw diameter, flow length, tonnage...), instead of the 180+ master-data fields our old enterprise system required.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Design constraint #2: it must run where IT says "no installs"
&lt;/h2&gt;

&lt;p&gt;We ship four ways to run the exact same app:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;How&lt;/th&gt;
&lt;th&gt;Who it's for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hosted&lt;/td&gt;
&lt;td&gt;open &lt;code&gt;/studio/&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;anyone, zero setup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Portable&lt;/td&gt;
&lt;td&gt;double-click &lt;code&gt;AICraft-Studio-Portable.html&lt;/code&gt; (built with &lt;code&gt;npm run build:portable&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;shop-floor PCs without Node or Docker&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Docker&lt;/td&gt;
&lt;td&gt;~22 MB nginx image&lt;/td&gt;
&lt;td&gt;plants that want it on their intranet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dev&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm install &amp;amp;&amp;amp; npm run dev&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;contributors&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The portable single-file build turned out to be the most requested option: process engineers email it around or put it on a USB stick.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design constraint #3: show the physics, not just numbers
&lt;/h2&gt;

&lt;p&gt;A setup sheet that says &lt;code&gt;MEL = 39.94&lt;/code&gt; is useless if the tech can't see &lt;em&gt;why&lt;/em&gt;. Studio renders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an &lt;strong&gt;SVG screw stroke and cushion map&lt;/strong&gt; (&lt;code&gt;MEL&lt;/code&gt;, &lt;code&gt;IL0..ILn&lt;/code&gt;, &lt;code&gt;VPTL&lt;/code&gt;, cushion, suck-back, swept volume),&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;barrel thermal strip&lt;/strong&gt; (&lt;code&gt;BT4 -&amp;gt; BT1 -&amp;gt; NT&lt;/code&gt;) with delta badges after tuning,&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;dual-domain profile chart&lt;/strong&gt; (stroke-domain injection speed/pressure, time-domain packing and cooling, previous-round overlay),&lt;/li&gt;
&lt;li&gt;the engine's &lt;code&gt;recommend_thinking&lt;/code&gt; trace and process-window headroom gauges.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Real case: thin-wall PP lid with moderate flash
&lt;/h2&gt;

&lt;p&gt;Input: PP, 0.9 mm wall, 22 g shot, 140 mm flow length, Ø36 mm screw, 130 T clamp.&lt;/p&gt;

&lt;h3&gt;
  
  
  T1 first-shot (computed)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Key&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MEL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;metering end position&lt;/td&gt;
&lt;td&gt;39.94 mm&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ML0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;metering position stage 0&lt;/td&gt;
&lt;td&gt;32.94 mm&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;VPTL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;V/P switchover position&lt;/td&gt;
&lt;td&gt;12.84 mm&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;IP0&lt;/code&gt; / &lt;code&gt;IP1&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;injection pressure stages&lt;/td&gt;
&lt;td&gt;140 / 103.7 MPa&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;IV0&lt;/code&gt; / &lt;code&gt;IV1&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;injection speed stages&lt;/td&gt;
&lt;td&gt;35.59 / 71.19 mm/s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;NT&lt;/code&gt; / &lt;code&gt;BT1&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;nozzle / zone 1 temp&lt;/td&gt;
&lt;td&gt;236 / 258 °C&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;CT&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;cooling time&lt;/td&gt;
&lt;td&gt;10 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;PP0&lt;/code&gt; / &lt;code&gt;PT0&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;holding&lt;/td&gt;
&lt;td&gt;0 / 0 (fill-only T1 by design)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Process window: clamp headroom &lt;strong&gt;+2%&lt;/strong&gt;, cooling headroom &lt;strong&gt;+0%&lt;/strong&gt;, injection speed headroom +40%, fill/freeze headroom +58%.&lt;/p&gt;

&lt;h3&gt;
  
  
  T2 after reporting &lt;code&gt;FLASH&lt;/code&gt; / &lt;code&gt;moderate&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The engine fires &lt;code&gt;Rule.dat #99&lt;/code&gt; (&lt;code&gt;IF FLASH_mid AND HOLDEXIST_low THEN MEL_reduce_mid&lt;/code&gt;) and then a dose-coupling guard:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;MEL&lt;/code&gt;: 39.94 -&amp;gt; &lt;strong&gt;36.61 mm&lt;/strong&gt; (-3.33)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ML0&lt;/code&gt;: 32.94 -&amp;gt; &lt;strong&gt;29.61 mm&lt;/strong&gt; (-3.33)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;IL0&lt;/code&gt;: 31.33 -&amp;gt; &lt;strong&gt;28.00 mm&lt;/strong&gt; (-3.33)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No pressure or speed change. With zero packing and a press at +2% clamp headroom, the flash comes from &lt;strong&gt;overfilling&lt;/strong&gt;, so the fix is a smaller dose, not more tonnage. That's the kind of reasoning a generic LLM skips.&lt;/p&gt;




&lt;h2&gt;
  
  
  The same call from code
&lt;/h2&gt;

&lt;p&gt;Studio has a live &lt;strong&gt;cURL / Python / JSON / MCP&lt;/strong&gt; export panel, so anything you click in the UI can be pasted into a script or agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X POST https://aicraft4injection.com/v1/first-shot \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $AICRAFT_API_KEY"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{
    "business_id": "PP-LID-130T",
    "target_shot_weight_g": 22,
    "polymer": { "polymer_abbreviation": "PP" },
    "mold": { "product_ave_thickness": 0.9, "product_max_length": 140 },
    "machine": {
      "clamping_force": 130,
      "injector": { "injector_screw_diameter_mm": 36 }
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X POST https://aicraft4injection.com/v1/optimize \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $AICRAFT_API_KEY"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{
    "business_id": "PP-LID-130T",
    "defect_info": [{ "defect": "FLASH", "level": "moderate" }]
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because &lt;code&gt;business_id&lt;/code&gt; is set, the second call loads the full stored T1 state, so you never have to re-send ~50 parameters.&lt;/p&gt;

&lt;p&gt;For agents, the same tools are exposed over Streamable HTTP MCP at &lt;code&gt;https://aicraft4injection.com/mcp&lt;/code&gt; (Bearer header), or via the open-source stdio server &lt;a href="https://github.com/DreamwayChan/aicraft-mcp-server" rel="noopener noreferrer"&gt;aicraft-mcp-server&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Hosted Studio (3 showcase molds, 30 free calls, no card): &lt;a href="https://aicraft4injection.com/studio/?utm_source=devto" rel="noopener noreferrer"&gt;aicraft4injection.com/studio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Source (MIT), issues and PRs welcome: &lt;a href="https://github.com/DreamwayChan/aicraft-studio" rel="noopener noreferrer"&gt;github.com/DreamwayChan/aicraft-studio&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've built local-first tools for factory environments, I'd love to hear how you handled storage, updates and "no install" policies in the comments.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>vue</category>
      <category>manufacturing</category>
      <category>ai</category>
    </item>
    <item>
      <title>Building a Two-Step Injection Molding Agent: Deterministic First-Shot Setup &amp; Sink-Mark Tuning via REST and MCP</title>
      <dc:creator>moss chan</dc:creator>
      <pubDate>Tue, 01 Dec 2026 01:35:18 +0000</pubDate>
      <link>https://dev.to/moss_chan_15cdefc01087a6e/building-a-two-step-injection-molding-agent-deterministic-first-shot-setup-sink-mark-tuning-via-21mf</link>
      <guid>https://dev.to/moss_chan_15cdefc01087a6e/building-a-two-step-injection-molding-agent-deterministic-first-shot-setup-sink-mark-tuning-via-21mf</guid>
      <description>&lt;p&gt;When developers build AI copilots for manufacturing plants (using Claude, Cursor, Dify, Coze, or OpenAI GPT Actions), the UI and workflow glue are the easy part. The hard part is &lt;strong&gt;physics&lt;/strong&gt;: if an LLM guesses screw stroke positions or packing pressures on a 160-ton injection molding press, you get short shots, flash, or damaged tooling.&lt;/p&gt;

&lt;p&gt;A cleaner architecture separates &lt;strong&gt;reasoning/UI&lt;/strong&gt; (the LLM) from &lt;strong&gt;deterministic shop-floor math&lt;/strong&gt; (a stateful physics API/MCP tool).&lt;/p&gt;

&lt;p&gt;In this tutorial, we'll walk through a production two-step closed-loop workflow using the &lt;a href="https://aicraft4injection.com/?utm_source=devto#trial-card" rel="noopener noreferrer"&gt;AICraft Injection Process API &amp;amp; MCP Server&lt;/a&gt; on a real cosmetic &lt;strong&gt;ABS electronics enclosure&lt;/strong&gt; (&lt;code&gt;2.2 mm&lt;/code&gt; wall, &lt;code&gt;56 g&lt;/code&gt; shot weight, &lt;code&gt;Ø40 mm&lt;/code&gt; screw, &lt;code&gt;160 T&lt;/code&gt; press).&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Two Steps (&lt;code&gt;first-shot&lt;/code&gt; → &lt;code&gt;optimize&lt;/code&gt;) Beat Stateless Prompts
&lt;/h2&gt;

&lt;p&gt;Real injection molding tryouts follow decoupled scientific molding:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;First-shot baseline (&lt;code&gt;/v1/first-shot&lt;/code&gt;)&lt;/strong&gt;: Compute exact volumetric screw positions (&lt;code&gt;MEL&lt;/code&gt;, &lt;code&gt;ML0&lt;/code&gt;, &lt;code&gt;VPTL&lt;/code&gt;, &lt;code&gt;IL0..IL2&lt;/code&gt;), barrel temperatures (&lt;code&gt;NT&lt;/code&gt;, &lt;code&gt;BT1..BT4&lt;/code&gt;), and multi-stage fill speeds/pressures — intentionally leaving holding/packing at &lt;code&gt;0&lt;/code&gt; so the technician verifies fill balance first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Defect-driven optimization (&lt;code&gt;/v1/optimize&lt;/code&gt;)&lt;/strong&gt;: Once parts come out of the mold (say, with moderate &lt;strong&gt;sink marks / shrinkage&lt;/strong&gt;), you feed the observed defect back into the engine. Instead of re-sending ~50 parameters every turn (where LLMs routinely drop keys like &lt;code&gt;ML0&lt;/code&gt; and break stroke math), you link both calls with a &lt;code&gt;business_id&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Step 1: Compute the Volumetric First-Shot Baseline
&lt;/h2&gt;

&lt;p&gt;Always pass &lt;code&gt;target_shot_weight_g&lt;/code&gt; (total shot weight including runner). Without shot mass, no physical engine can derive true screw displacement from &lt;code&gt;shot_mass / (density * pi * R^2)&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X POST https://aicraft4injection.com/v1/first-shot \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $AICRAFT_API_KEY"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{
    "business_id": "ABS-HOUSING-160T",
    "target_shot_weight_g": 56.0,
    "polymer": {
      "polymer_abbreviation": "ABS"
    },
    "mold": {
      "product_ave_thickness": 2.2,
      "product_max_length": 185.0
    },
    "machine": {
      "clamping_force": 160,
      "injector": {
        "injector_screw_diameter_mm": 40.0
      }
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Actual Engine Output (Real Physics, Zero Hallucination)
&lt;/h3&gt;

&lt;p&gt;For &lt;code&gt;56 g&lt;/code&gt; ABS on a &lt;code&gt;Ø40 mm&lt;/code&gt; barrel (&lt;code&gt;A = π × 20² = 1256.6 mm²&lt;/code&gt;):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;Calculated Value&lt;/th&gt;
&lt;th&gt;Engineering Basis&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MEL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Metering end position&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;62.72 mm&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;14.28&lt;/code&gt; cushion + &lt;code&gt;41.44&lt;/code&gt; fill stroke + &lt;code&gt;7.0&lt;/code&gt; suck-back&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ML0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Metering position (stage 0)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;55.72 mm&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;14.28 + 41.44 mm&lt;/code&gt; (93% initial first-shot fill)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;VPTL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;V/P switchover position&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;14.28 mm&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;max(25% × fill, 0.085 × max_stroke)&lt;/code&gt; clamped &lt;code&gt;[8, 20]&lt;/code&gt; mm&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;IL0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stage 0 stroke end&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;49.5 mm&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Slow gate-entry ramp (&lt;code&gt;0.50 × peak&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;NT&lt;/code&gt; / &lt;code&gt;BT1&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Nozzle / Zone 1 temp&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;242.0 °C / 256.0 °C&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Amorphous ABS melt gradient&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;IP0&lt;/code&gt; / &lt;code&gt;IP1&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Injection pressure stages 0 &amp;amp; 1&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;55.25 / 57.38 MPa&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Flow-length &amp;amp; wall-thickness pressure factors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;IV0&lt;/code&gt; / &lt;code&gt;IV1&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Injection velocity stages 0 &amp;amp; 1&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;12.95 / 25.9 mm/s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;2.20 s&lt;/code&gt; target fill window vs. &lt;code&gt;3.78 s&lt;/code&gt; freeze clock&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;CT&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cooling time&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;10.0 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Derived from &lt;code&gt;2.2 mm&lt;/code&gt; ABS thermal diffusivity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;PP0&lt;/code&gt; / &lt;code&gt;PT0&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Holding pressure / time&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.0 MPa / 0.0 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;T1 baseline prior to packing calibration&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Because we included &lt;code&gt;"business_id": "ABS-HOUSING-160T"&lt;/code&gt;, the gateway automatically persists all 47 parameters scoped to your API key.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Close the Loop on Moderate Sink Marks (&lt;code&gt;SHRINKAGE&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;Now the press operator reports moderate sink marks. Your agent only needs to send the same &lt;code&gt;business_id&lt;/code&gt; and the English defect enum:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X POST https://aicraft4injection.com/v1/optimize \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $AICRAFT_API_KEY"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{
    "business_id": "ABS-HOUSING-160T",
    "defect_info": [
      {
        "defect": "SHRINKAGE",
        "level": "moderate"
      }
    ]
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Actual Tuned Output &amp;amp; Explainable Reasoning
&lt;/h3&gt;

&lt;p&gt;The engine loads the archived 47-key state, fires fuzzy rule &lt;strong&gt;&lt;code&gt;Rule.dat #65&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;IF SHRINKAGE_mid AND PP0_low THEN PP0_add_mid&lt;/code&gt;), and applies material-specific packing guards for ABS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;PP0&lt;/code&gt;&lt;/strong&gt;: &lt;code&gt;0.0 → 27.54 MPa&lt;/code&gt; (&lt;strong&gt;+27.54 MPa&lt;/strong&gt;, &lt;code&gt;0.48 × 57.38 MPa&lt;/code&gt; peak injection pressure)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;PT0&lt;/code&gt;&lt;/strong&gt;: &lt;code&gt;0.0 → 1.54 s&lt;/code&gt; (&lt;strong&gt;+1.54 s&lt;/strong&gt;, &lt;code&gt;2.2 mm wall × 0.7&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 2 step-down&lt;/strong&gt;: &lt;code&gt;PP1 = 12.39 MPa&lt;/code&gt;, &lt;code&gt;PT1 = 1.1 s&lt;/code&gt; (avoids gate overpacking and residual stress)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Injection time (&lt;code&gt;IT&lt;/code&gt;)&lt;/strong&gt;: tightened from &lt;code&gt;5.2 s → 2.2 s&lt;/code&gt; so packing engages cleanly at V/P transfer without dead delay&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every adjustment is returned inside &lt;code&gt;recommend_thinking&lt;/code&gt;, so your agent can explain &lt;em&gt;why&lt;/em&gt; each number changed directly to the shop-floor technician.&lt;/p&gt;




&lt;h2&gt;
  
  
  Wiring It Directly into Claude / Cursor / Dify via Streamable HTTP MCP
&lt;/h2&gt;

&lt;p&gt;You don't even have to write wrapper code if your client supports remote MCP:&lt;br&gt;
&lt;/p&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="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"aicraft-injection"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://aicraft4injection.com/mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Bearer YOUR_API_KEY"&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;Or run the open-source stdio wrapper (&lt;code&gt;github.com/DreamwayChan/aicraft-mcp-server&lt;/code&gt;).&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It Free (No Credit Card)
&lt;/h2&gt;

&lt;p&gt;You can test this exact ABS scenario in the interactive browser sandbox or generate an instant &lt;strong&gt;30-call free trial API/MCP key&lt;/strong&gt; (no credit card required) here:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://aicraft4injection.com/?utm_source=devto#trial-card" rel="noopener noreferrer"&gt;https://aicraft4injection.com/?utm_source=devto#trial-card&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're building plant-floor AI tools or MCP servers for manufacturing, I'd love to hear how you're separating LLM orchestration from deterministic engineering math in the comments!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>python</category>
      <category>manufacturing</category>
    </item>
    <item>
      <title>Why Generic LLMs Hallucinate Factory Machine Settings (and How to Plug a Physics MCP Server into Claude &amp; Dify)</title>
      <dc:creator>moss chan</dc:creator>
      <pubDate>Mon, 30 Nov 2026 08:02:32 +0000</pubDate>
      <link>https://dev.to/moss_chan_15cdefc01087a6e/why-generic-llms-hallucinate-factory-machine-settings-and-how-to-plug-a-physics-mcp-server-into-4c9c</link>
      <guid>https://dev.to/moss_chan_15cdefc01087a6e/why-generic-llms-hallucinate-factory-machine-settings-and-how-to-plug-a-physics-mcp-server-into-4c9c</guid>
      <description>&lt;h2&gt;
  
  
  The Shop-Floor Hallucination Problem
&lt;/h2&gt;

&lt;p&gt;LLMs are great at parsing unstructured job sheets, PDFs, and operator notes. They are &lt;strong&gt;terrible&lt;/strong&gt; at physical machine kinematics.&lt;/p&gt;

&lt;p&gt;In plastic injection molding, two of the most critical numbers on the press controller are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;MEL&lt;/code&gt; (Metering End Stroke, mm)&lt;/strong&gt; — how far back the reciprocating screw doses molten polymer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;VPTL&lt;/code&gt; (V/P Switchover Position, mm)&lt;/strong&gt; — the exact screw position where high-speed cavity filling switches to pressure-controlled packing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ask a generic LLM for settings on a &lt;strong&gt;78 g PA66 bracket (2.5 mm wall, Ø45 mm screw)&lt;/strong&gt; and it will output plausible-sounding textbook midpoints like &lt;code&gt;MEL = 115 mm&lt;/code&gt; and &lt;code&gt;VPTL = 45 mm&lt;/code&gt;. On real steel, that ignores barrel cross-section ($\pi R^2$) and melt density ($\rho_{melt}$), risking short shots, parting-line flash, or screw cushion bottom-out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture: Let LLMs Parse Intent, Let Deterministic Physics Compute Strokes
&lt;/h2&gt;

&lt;p&gt;Instead of prompting an LLM to guess 50+ coupled machine parameters, expose a deterministic &lt;strong&gt;Volumetric Kinematics + Fuzzy Rule Engine&lt;/strong&gt; as an OpenAPI Action or &lt;strong&gt;Streamable HTTP MCP Server&lt;/strong&gt; (&lt;code&gt;https://aicraft4injection.com/mcp&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Connect in 30 Seconds via Remote MCP (Claude Desktop / Cursor / Windsurf)
&lt;/h3&gt;

&lt;p&gt;Grab an instant &lt;strong&gt;30-call free trial key&lt;/strong&gt; (no credit card) at &lt;a href="https://aicraft4injection.com/?utm_source=devto#trial-card" rel="noopener noreferrer"&gt;aicraft4injection.com&lt;/a&gt;, then add:&lt;br&gt;
&lt;/p&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="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"aicraft-injection"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://aicraft4injection.com/mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Bearer sk_your_trial_key"&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;h3&gt;
  
  
  2. First-Shot Baseline (&lt;code&gt;POST /v1/first-shot&lt;/code&gt;)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X POST https://aicraft4injection.com/v1/first-shot \
  -H &lt;span class="s2"&gt;"Authorization: Bearer sk_your_trial_key"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{
    "business_id": "BRACKET-PA66-01",
    "polymer": {"polymer_abbreviation": "PA66"},
    "mold": {"product_ave_thickness": 2.5, "product_max_length": 210},
    "target_shot_weight_g": 78,
    "machine": {"machine_clamp_force_ton": 220, "injector": {"injector_screw_diameter_mm": 45}}
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In under 300 ms, the engine computes &lt;strong&gt;50+ clamped machine parameters&lt;/strong&gt; (&lt;code&gt;MEL = 68.68 mm&lt;/code&gt;, &lt;code&gt;VPTL = 16.07 mm&lt;/code&gt;, 3-stage velocity profile &lt;code&gt;IV0..2&lt;/code&gt;, barrel thermal gradient &lt;code&gt;BT1..4&lt;/code&gt;, cooling time &lt;code&gt;CT = 10.14 s&lt;/code&gt;) and archives the baseline under your &lt;code&gt;business_id&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Closed-Loop Defect Tuning (&lt;code&gt;POST /v1/optimize&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;When the T1 trial run shows a moderate &lt;strong&gt;Short Shot (&lt;code&gt;SHORTSHOT&lt;/code&gt;)&lt;/strong&gt;, your agent doesn't have to resend all 50 parameters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X POST https://aicraft4injection.com/v1/optimize \
  -H &lt;span class="s2"&gt;"Authorization: Bearer sk_your_trial_key"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{
    "business_id": "BRACKET-PA66-01",
    "defect_info": [{"desc": "SHORTSHOT", "level": "moderate"}]
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fuzzy guard engine shifts &lt;code&gt;MEL&lt;/code&gt; &lt;code&gt;68.68 -&amp;gt; 71.18 mm (+2.5 mm)&lt;/code&gt; coupled across &lt;code&gt;ML0/IL0&lt;/code&gt;, steps peak fill velocity &lt;code&gt;IV1&lt;/code&gt; &lt;code&gt;25.08 -&amp;gt; 31.08 mm/s (+6.0 mm/s)&lt;/code&gt;, and returns human-readable &lt;code&gt;recommend_thinking&lt;/code&gt; traces your agent can explain directly to the technician.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Try it live:&lt;/strong&gt; Run 3 free browser calculations/day or claim a 30-call API key at &lt;a href="https://aicraft4injection.com/?utm_source=devto#trial-card" rel="noopener noreferrer"&gt;https://aicraft4injection.com/?utm_source=devto#trial-card&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>manufacturing</category>
      <category>python</category>
    </item>
  </channel>
</rss>
