Back to the blog

Artificial IntelligenceOct 18, 2026

Local AI With PLC and SCADA Data: Architecture and Limits

How to get a language model running inside the plant to answer questions with PLC and SCADA data: the five-layer architecture, the hardware it needs, which models fit, why AI must not write to the PLC and how to start in a month.

Local AI With PLC and SCADA Data: Architecture and Limits

Locked file

politica-uso-ia-planta-en.xlsx (17 KB)

Leave your work email to download this spreadsheet and hear about the next one.

To use a local AI model with data from a PLC or a SCADA, you do not connect the model to the PLC. You put a layer in between: something that reads the PLC or the SCADA over its protocol (Modbus, OPC UA, MQTT), stores the time series and offers the model a handful of read-only tools, such as "give me tunnel 2's temperature over the last hour" or "list today's stops on line 1". The model runs on a GPU-equipped unit inside the plant, decides which tool to use and writes the answer. It never writes to the PLC.

This guide explains that architecture, the hardware and models it needs, what a local model does and does not solve, and how to start with a tightly scoped pilot.

Why a local model and not ChatGPT? #

There are three reasons, and none of them is that the local model is smarter: it is not.

  • The data does not leave the plant. Recipes, line speeds, consumption and stops are sensitive information. With a local model, the question and the data are processed inside the plant network. If there is also personal data, such as shifts or operator names, Chile's Personal Data Protection Law (Law 21.719) requires thinking about what leaves and on what legal basis; we explain it in Is it safe to use ChatGPT with my plant's data?.
  • It works without internet. A plant in a rural area or a mining site with a satellite link cannot depend on the cloud to query its own process.
  • The cost is fixed. The model runs on your own hardware; there is no charge per query.

The trade-off is real: the models that fit on a plant GPU reason worse than frontier models in the cloud. That is why you want an architecture where the local model does what it does well (understand the question, choose the tool, write the answer) and the numbers are calculated by the system, not by the model.

The five-layer architecture #

LayerWhat it doesWhat it is built with
1. ReadingReads the PLC or SCADA without modifying its programModbus TCP/RTU, OPC UA, MQTT, Sparkplug B, or the SCADA's database
2. HistoryStores each variable with date and timeA time-series database (TimescaleDB, InfluxDB) or the historian the plant already has
3. ContextSays what each signal is: "%MW120 is tunnel 2's temperature, in tenths of a degree"A data model or graph of the plant, plus the manuals and procedures indexed for search (RAG)
4. ToolsExposes read-only queries the model can requestAn MCP (Model Context Protocol) server or functions with a JSON schema
5. ModelUnderstands the question, calls the tools and writes the answerAn open model served with Ollama, llama.cpp or vLLM on a GPU-equipped unit

The most underestimated layer is the third. A PLC delivers registers, not meanings. If the model receives "register 40121 = 734", it does not know that it is 73.4 °C or that it belongs to tunnel 2. The work of mapping signals to names, units and equipment is what separates an experiment from something the shift supervisor can use. We develop this in how to connect a PLC and in what industrial telemetry is.

Why must the model not write to the PLC? #

A language model makes mistakes in ways that are not predictable: it mixes up units, invents a register that does not exist or misreads an ambiguous instruction. In a spreadsheet that is an error; on a drive or a valve it is an accident.

The rule we use is simple: AI proposes, a person approves, the control system executes. In practice:

  • The tools the model sees are read-only. There is no "write register" function.
  • The connection to the PLC comes from a unit on a separate network, with a user that only has read permission when the protocol allows it (OPC UA does; Modbus does not, so isolation is done at the network level).
  • If the model suggests a setpoint change, an operator makes the change from the HMI, as always.

The Purdue model still applies: the AI unit lives at the operations level, not the control level. We explain it in how to defend a Modbus PLC.

What hardware is needed? #

It depends on the size of the model, not on the number of PLCs. Any industrial PC can read hundreds of variables; what needs a GPU is the language model.

UnitWhich model fitsWhat it is enough for
Industrial PC without GPUModels of 1 to 4 billion parameters, slowTesting; answers take several seconds to tens of seconds
12 to 16 GB GPUModels of 7 to 14 billion parameters, quantized to 4 bitsShift queries with tools, searching manuals
24 GB GPU or two GPUsModels of 27 to 32 billion parametersLonger reasoning, reports, several people querying at once

A figure we measured ourselves: on our lab bench in September 2026, with a 16 GB GPU, the open Qwen3.5 model with 9 billion parameters at 4 bits answered 10 out of 10 closed perception and reading questions correctly at about 70 tokens per second, using close to 7 GB of video memory. A 27-billion-parameter model squeezed down to fit on the same GPU answered worse. Bigger is not better when it does not fit. It is a bench test with a small sample, not a promise of performance in a plant.

To choose the physical unit, the guide to the industrial PC for machine vision also applies to local AI: temperature, dust, power supply and mounting matter as much as the GPU.

Which questions does it answer well, and which not? #

Answers wellAnswers poorly, or should not answer
"How many stops did line 2 have this shift, and which was the longest?""Calculate this month's OEE" without a tool that calculates it: the model will add up wrong
"What does the drive manual say about fault F004?""Speed up the line": it must have no way to do it
"Compare compressor 1's consumption today against the weekly average""Why did the motor burn out?" without vibration or current data: it will make up a cause
"Summarize what happened on the night shift for the plant manager"Safety diagnoses that require a specialist

The practical rule: if the answer is a number, a tool calculates the number and the model only cites it. If the answer is text, the model cites which document or which series it came from.

How to start in a month #

  1. Week 1. Pick a line and ten questions. The ones the shift supervisor answers today by calling on the radio or opening three screens. Write them down the way they are said in the plant.
  2. Week 2. Read and name the signals those questions need. Usually between 20 and 60. Store them with date and time and with name, unit and equipment.
  3. Week 3. Write the read-only tools and set up the model. One tool per type of question, not one per signal.
  4. Week 4. Test with the ten questions and measure. How many it answered correctly, how many wrongly and how many it said "I don't have that data". An honest "I don't know" is worth more than a made-up answer.

Before giving the whole plant access, it is worth having in writing what can and cannot be asked. The plant AI use policy we offer for free starts from that question.

What does iGromi do? #

iGromi OS handles the first four layers inside the plant: it reads PLCs, sensors, cameras and SCADA with the protocols above, stores the history, keeps the context of what each signal is in the plant's Second Brain and exposes read-only tools over MCP, documented on the developers page. The model can be a local one on the Edge unit or a frontier model in the cloud; in that case the model receives the question with the passages needed to answer it, not the whole base. In no case does AI control a machine directly.

Frequently asked questions #

Can I connect Ollama directly to a PLC?

It is not a good idea. Ollama serves the model; it does not speak Modbus or OPC UA, and it does not know what each register means. Between the two there has to be a layer that reads the PLC, stores the history and offers read-only tools.

What is MCP and what is it for in a plant?

MCP (Model Context Protocol) is an open standard that lets a language model discover and call external tools. In a plant it allows queries such as "tunnel 2 temperature" to be exposed in a uniform way, regardless of which model is used.

Does a local model work if the plant has no internet?

Yes. That is one of its reasons for being. The model, the history and the tools run on the plant network.

Can AI adjust process parameters?

It can suggest them based on data. The change is approved and made by a person from the control system.

Which open model should you use?

One that fits entirely on the available GPU with 4-bit quantization and supports tool calling. Today, in 12 to 16 GB, models of 7 to 14 billion parameters are a reasonable starting point. Test with your own questions before deciding: public rankings do not measure what a shift supervisor asks.

Topics

  • local ai plc
  • local llm industrial
  • ai scada
  • ollama plc
  • mcp industrial
  • on premise llm manufacturing
  • edge llm
  • ai plc data
Víctor Ruz

About the author

Víctor RuzCEO

Automation and Robotics Engineer (Universidad Andrés Bello, 2012). More than twelve years in robotics and industrial automation. Founder and CEO of iGromi, where he connects machines, systems and plant people with secure industrial AI.

@igromi · Free app

Secure industrial AI, on your plant’s phones.

  1. 1Request early access, free
  2. 2Pick your trade: maintenance, production or safety
  3. 3The AI reads, proposes and cites; a person decides
Request early access

No credit card. Your data stays yours.