Read-only by design: connecting AI to a running plant without touching the PLC
The first question a plant manager asks about AI is not "how accurate is it". It is "can it stop my line". After ten years of commissioning robots, PLCs and vision systems in live plants, I think that is exactly the right question, and the answer should be a design decision, not a promise.
When I built Prevly, a predictive-maintenance system that warns before a machine breaks, I made one rule first: the software can read, and it can never write to a machine. Everything else in this article follows from that rule.
Why read-only is the starting point
An AI model that predicts a bearing failure is useful. An AI model that can change a setpoint is a new safety risk that has to be validated like any other change to a control system. In a regulated plant (I modernised a packaging machine in an FDA / ISO 13485 medical-device plant) every change to the control layer goes through validation. A read-only data path keeps the AI outside that loop: it informs people, and people decide.
Read-only also makes the conversation with the plant's OT and IT teams much shorter. "It reads tags over OPC UA and sends an alert" is a request they can approve. "It needs write access to the PLC" is a project.
The data path, layer by layer
| Layer | What I use | Why |
|---|---|---|
| Controller | existing PLC (Siemens, Rockwell and others), no program changes | the line keeps running exactly as validated |
| Protocol | OPC UA, read-only user, Sign & Encrypt | the server itself refuses writes, and traffic is authenticated |
| Older machines | a protocol gateway or retrofit sensors that bypass the PLC | no change to old controllers that have no OPC UA |
| Edge | a small computer on site that runs the model offline | data does not have to leave the plant |
| Network | outbound-only connections from the edge | nothing outside can open a session into the plant network |
The important part is that "read-only" is enforced in more than one place. The OPC UA user has no write rights. The edge software has no write code path. And the repository has a CI rule that fails the build if any code could write to a PLC tag. If one layer is misconfigured, the others still hold.
Zones and conduits, in plain words
IEC 62443 is the standard plant security teams use for industrial automation. Its core idea is simple: split the plant into zones with similar security needs (the machine network, the plant IT network, the cloud) and allow traffic between them only through defined conduits.
For AI on the shop floor that means:
- the PLCs stay in their own zone, untouched,
- the edge computer sits in a zone between machines and IT and is the only thing that talks to the controllers,
- the conduit from the edge to anything outside is outbound-only and encrypted,
- for plants that do not allow any connection out, there is an air-gapped option: the model runs on site and alerts stay inside.
I design to security level 1 of IEC 62443-3-3 as the floor. It is not a certificate, but it gives the plant's security team a vocabulary they already use to check the design.
What the AI actually sends
The output is an alert for maintenance, not an action on the machine: which asset, what is likely to fail, how confident the model is and what to check. The decision to stop a machine, order a part or plan a repair stays with people, inside the plant's existing maintenance process.
This is also why I keep the model honest about uncertainty. A warning that says "probably the motor bearing, check vibration on the drive end" is more useful to a maintenance technician than a confident number with no explanation.
A short checklist before you connect AI to machines
- Can the AI write to any controller? If yes, why, and who validated it?
- Is read-only enforced by the OPC UA server, by the software and by a test in the build?
- Which zone does the edge computer sit in, and which conduits does it use?
- Is all traffic outbound-only and encrypted? Is there an offline option?
- Who receives the alert, and what do they do with it?
If you are planning something similar for your plant, I am happy to compare notes. My background is in exactly this overlap: the PLC and the AI, and the plant network in between.