Even If PLC Code Disappears, It Can Be Restored: AI Writes HVAC Blueprints—Decoding Three Papers on ‘Factory AI Transformation’ Starting at 50,000 Yen a Month

How Much Are You Paying for Factory Maintenance? Maintenance costs for small and medium-sized manufacturing businesses

By Kai

|

Related Articles

How Much Are You Paying for Factory Maintenance?

Maintenance costs for small and medium-sized manufacturing businesses consume 3-5% of their sales. For a factory with an annual revenue of 500 million yen, that amounts to 15 to 25 million yen per year. Breaking down these costs reveals that it primarily involves “people reading logs,” “people fixing PLC code,” and “people adjusting HVAC settings”—in other words, labor costs.

Three papers have emerged on this topic. All discuss the replacement of “intellectual tasks performed by humans with LLMs (Large Language Models),” but what’s interesting is that this is not just an abstract future discussion; there are already functioning prototypes and numbers available. To conclude, if these three technologies are commercialized, the structure of maintenance in small and medium-sized factories could change dramatically. With an API cost of 50,000 yen a month, there is potential for savings of several million yen in annual labor costs.

Let’s take a look at each one in order.

—

1. LLM Agents Automatically Read ‘Maintenance Records’ and Detect Anomalies

The first paper discusses the application of an LLM-based “CodeReAct Agent” to industrial maintenance.

In factory maintenance, there is a vast amount of historical work orders, alert logs, and sensor data. The problem is that there are only a limited number of people who can interpret this data. Hiring a data scientist costs between 800,000 and 1,200,000 yen a month, which is not realistic for small businesses.

What this agent does is simple. When instructed in natural language to “analyze the alert trends of the chiller for the past year,” the agent writes Python code, loads the data, analyzes it, and returns the results. It autonomously executes the entire flow of “data formatting → analysis → report creation” in a loop of Thought → Action → Observation.

The key point is not that it replaces data scientists, but that maintenance personnel on-site can directly query the AI. Small factories that previously had “data but no one to read it” can now discover anomaly patterns simply by making inquiries in natural language.

Currently, the accuracy is not perfect. In complex queries, it may produce irrelevant analyses. However, using a model like GPT-4 via API, the monthly API cost ranges from a few thousand to tens of thousands of yen. This is less than one-twentieth of the monthly salary of a data scientist. Even with 70% accuracy, if the cost is one-twentieth, the ROI is justified.

—

2. PLC Source Code Missing? It Can Be Recovered from I/O Traces

This is a pressing issue for small and medium-sized manufacturers.

The PLC that controls the production line in a factory often has cases where the source code of its program is “missing.” It might have been outsourced 20 years ago, the person responsible has retired, and there are no documents. Yet, the PLC is operational. It cannot be touched or broken, but it also cannot be modified.

This situation is referred to in the industry as a “black box PLC.” If one attempts to modify it, they must request help from the PLC vendor, which costs between 500,000 and 3,000,000 yen per case. Even then, there remains the risk of not knowing whether the original logic is correct.

The second paper addresses this issue using LLMs. The method is as follows: the I/O trace of the PLC’s input and output signals is fed into the LLM, and it is instructed to “write ladder logic (or Structured Text) that reproduces this input-output pattern.”

The results show that out of 47 PLC programs created by third parties, 43 cases (approximately 91%) successfully generated code that accurately reproduced the original I/O trace. This is a 91% success rate, verified by complete matching of inputs and outputs rather than just similar behavior.

Of course, the generated code does not necessarily have the same structure as the original code. However, if code can be automatically generated that returns the same output for the same input, that is sufficient for the field. The black box PLC becomes readable code, allowing for modifications and eliminating reliance on specific individuals.

Let’s calculate the cost. Considering the API cost of GPT-4o, the number of tokens required to restore one PLC program ranges from tens of thousands to over a hundred thousand tokens, costing several hundred to several thousand yen. A task that would cost 500,000 yen if outsourced could potentially be done for just a few thousand yen. That’s one-hundredth of the cost.

However, there are caveats. For safety-critical PLCs (such as safety circuits for presses), the automatically generated code cannot be used as-is. Human review is essential. Nonetheless, the difference in labor between “reverse engineering from scratch” and “reviewing AI-generated candidates” is significant.

—

3. Automatically Generate HVAC Equipment Blueprints as Digital Twins from Natural Language

The third paper discusses the digital twin of HVAC (Heating, Ventilation, and Air Conditioning).

HVAC in factories can account for 30-40% of energy costs. While optimization is desired, creating simulation models requires specialized engineers and can cost several million yen per system, which is out of reach for small businesses.

In this paper, simply by explaining to the LLM in natural language that “this building has two chillers, three AHUs (Air Handling Units), and ten VAV boxes, connected by this piping,” a specification for a simulation-capable digital twin is automatically generated.

The key is the “physical validity verification protocol.” There is a mechanism to automatically check whether the specifications generated by the LLM violate physical laws—for example, whether the flow of chilled water is reversed or whether the heat balance is correct. Since LLMs can produce outputs that are “plausible but physically incorrect,” this guardrail is crucial.

If commercialized, the costs of HVAC design and optimization could drop dramatically. The world where constructing a simulation model that previously cost 5 million yen can now be done for just tens of thousands of yen is becoming a reality.

—

Breaking Down the ‘50,000 Yen’ Cost

If small and medium-sized factories were to start “AI transformation for factories at 50,000 yen a month” by combining these three technologies, what would be needed?

Item Estimated Monthly Cost
LLM API Cost (GPT-4o Class) 10,000 – 30,000 yen
Cloud Server (Data Storage and Processing) 5,000 – 10,000 yen
Edge Device for I/O Data Collection Approximately 3,000 – 5,000 yen per month (initial cost of 50,000 – 100,000 yen amortized over 2 years)
Total Approximately 20,000 – 50,000 yen

The initial cost for edge devices and setup would be around 100,000 – 300,000 yen. Considering that the traditional “maintenance management system implementation” cost between 3 million and 10 million yen, this is a significant difference.

What about the payback period? Reducing the labor of maintenance personnel (20 hours a month × 3,000 yen/hour = 60,000 yen/month), eliminating outsourcing costs due to the resolution of the PLC black box (with one annual project costing 500,000 yen becoming zero), and reducing electricity costs through HVAC optimization (2,000 – 5,000 yen/month). When combined, a reduction effect of 100,000 – 150,000 yen per month is realistic. This means the investment of 50,000 yen can be recouped in 2-3 months.

—

So, What Should Be Done?

What emerges from reading these three papers is a structural change where the cost of things that “could only be done with experts” is becoming one-hundredth thanks to LLMs.

Maintenance logs can be analyzed without a data scientist. Source code can be restored without relying on specialized PLC vendors. Digital twins can be created without HVAC design experts.

This is not a story of “large companies adopting it first and small businesses following later.” In fact, it’s the opposite. Large companies already have data scientists, PLC management systems, and HVAC simulation models in place, making the benefits of replacing them with LLMs relatively smaller.

It is the small and medium-sized businesses that lack experts that stand to gain the most from this. What was previously impossible due to a lack of personnel can now be achieved for 50,000 yen a month. This is a reversal of the structure.

However, is it possible to implement this immediately? Not quite yet. All three are still in the research stage, and it will take some more time to package them as commercial tools. A timeframe of six months to a year seems reasonable.

What should be done now? Three things.

  1. Digitize maintenance logs. Convert paper work reports into data, even if it’s just in Excel. Without data to feed into the LLM, nothing can begin.
  2. Implement a system to record PLC I/O traces. A cheap data logger can be purchased for several tens of thousands of yen. If there is a black box PLC, now is the time to record the inputs and outputs.
  3. Write out the configuration of HVAC equipment in natural language. Describe how the devices are connected. Even without diagrams, writing it down in text will provide input for the LLM.

All of these actions have almost zero cost. However, whether or not this is done will determine whether, six months from now, a factory can “start immediately” or “has to begin with data preparation.”

The introduction of AI is too late if you wait for the tools to arrive. Data preparation can start today.

POPULAR ARTICLES

Related Articles

POPULAR ARTICLES

JP JA US EN