October 20, 2026

How Controls Engineers Can Use LLMs Without Compromising Safety

How Controls Engineers Can Use LLMs Without Compromising Safety

Large language models are showing up in controls engineering whether teams plan for them or not. Engineers are pasting code into chat windows, asking for Structured Text snippets and using assistants built into vendor tools. The question is no longer whether to use them, but how to do it without putting people, equipment or production at risk.

The short answer: treat an LLM as a fast, fallible junior colleague, never as an authority. The rest of this article turns that idea into concrete habits.

Start With a Hard Boundary: Safety Is Out of Scope

Machine safety is a different discipline from general control logic. Safety functions belong on certified safety controllers or safety relays, programmed with certified methods and validated procedures. An LLM has no knowledge of your risk assessment, your required performance level or your machine’s hazards, and it can’t be held to a standard.

Make this rule explicit in your team’s guidelines: AI-generated code never implements, modifies or bypasses a safety function. Standard sequencing, diagnostics and HMI logic can benefit from AI assistance. Emergency stops, guard interlocks and safe motion functions cannot.

Treat Every Output as Untrusted Code

LLMs write fluent, confident code, and that is exactly the problem. A wrong answer reads just like a right one. Models may invent function blocks, misuse data types or misunderstand scan-cycle behavior such as edge detection, timers and latching.

Review AI output the way you would code from an unknown contractor: line by line, against a written specification. Check that every referenced instruction exists on your platform. Trace the logic through power-up, fault and restart conditions, not just the happy path.

Protect Your Data

Prompts can leak more than you expect. Proprietary logic, network diagrams, IP addresses, recipe parameters and customer details may all end up in a prompt. Before using any tool, find out whether your organization has approved it, where prompts are stored and whether they are used for training.

A practical habit is to sanitize: replace real tag names, addresses and product details with generic placeholders, and describe the behavior rather than pasting the project. Where policy requires it, use an approved or locally hosted tool, and involve your IT and OT security teams early.

A Layered Approach

No single check is enough. Safe use of LLMs comes from stacking independent safeguards, so a mistake that slips past one is caught by the next. The diagram shows the layers an AI-assisted change should pass, with certified safety hardware standing apart from all of them.

AI change layers · 5 checks + separate safety layer

AI change layers · 5 checks + separate safety layer

Each layer is independent, and none of them replaces the certified safety layer on the right.

Verify Before It Touches a Machine

Simulation is the cheapest place to find a mistake. Run AI-assisted logic in a simulator or digital twin and test more than normal operation: sensor failures, out-of-range values, communication loss, power cycles and operator mistakes. Write the test cases from the specification, not from the generated code, so the code can’t grade its own homework.

When the code moves to real hardware, commission in stages, with the machine in a safe state and people clear of hazards. Treat first runs as tests, not production.

Keep Traceability and Accountability

Use version control and record where AI contributed, such as in the commit message or change log. Require a second engineer to review and sign off on AI-assisted changes, just as you would for any significant modification. When something goes wrong, you need to reconstruct what changed, who approved it and why.

Accountability does not transfer to the tool. The engineer who deploys the code owns its behavior, which is why the review step can never be a formality.

Protect Skills as Well as Systems

Overreliance is a safety issue too. Engineers who accept generated code without understanding it lose the troubleshooting instincts they need during a fault. Encourage the team to ask the model to explain its code, to write their own first draft for critical sections, and to practice debugging without assistance.

A Starter Checklist

•       Safety functions are excluded from AI use.

•       Only approved tools are used, with sanitized prompts.

•       A written specification exists before prompting.

•       Output is reviewed line by line.

•       Tests come from the specification and run in simulation.

•       Changes are versioned and approved by a second engineer.

•       Commissioning is staged, starting from a safe state.

The Bottom Line

LLMs can make controls engineers faster at the routine and better informed about the unfamiliar. They don’t make a machine safe. Safety comes from clear boundaries, layered verification and people who stay accountable. Build those first, and AI becomes a useful assistant instead of a hidden risk.

No comments: