OPC-UA (SCADA/DCS) Meets AI: How to Connect Your Industrial Data to ASI Biont

In a modern process plant, every PLC, DCS, and SCADA system speaks OPC-UA — the IEC 62541 standard that turns raw sensor data into a unified information model. But data alone doesn't run a plant; decisions do. That's where ASI Biont enters the picture: a conversational AI agent that connects directly to your OPC-UA server through a chat interface, reads tags, writes setpoints, and triggers actions — no custom dashboards, no waiting for an IT ticket.

I've spent years integrating industrial protocols, and the traditional way is painful: you need to write map files, configure OPC clients, build alarm dashboards, and then pray that the night shift actually looks at the screen. ASI Biont flips that model. You simply tell it in natural language, "read the reactor pressure every second and send me a Telegram alert if it exceeds 8 bar," and the AI writes the OPC-UA client code, executes it in a sandbox, and handles the monitoring loop. The result is a truly conversational SCADA layer.

Why OPC-UA and AI Are a Perfect Match

OPC-UA (Open Platform Communications Unified Architecture) is more than a protocol; it's a full information model with object-oriented nodes, methods, alarms, and historical data. Unlike Modbus or Profibus, OPC-UA works across firewalls, supports data encryption and certificates, and is now the default interface for modern DCS systems like ABB 800xA, Siemens PCS 7, and Emerson DeltaV. According to the OPC Foundation, over 10,000 vendors ship OPC-UA-enabled products today.

But OPC-UA servers expose dozens or hundreds of tags. A typical chemical plant may have 50,000 data points. No human can watch all of them, and rule-based systems only trigger on pre-configured thresholds. An AI agent can reason about the data, correlate anomalies, and take context-aware actions — like lowering a setpoint before an alarm even occurs, or sending an explanatory message to the shift lead.

How ASI Biont Connects to OPC-UA Servers

The beauty of ASI Biont is that you don't need a single line of pre-written integration code. The agent connects through its built-in OPC-UA support, powered by the opcua-asyncio library. For quick operations, it uses the industrial_command() function with protocol='opcua' — for example, industrial_command(protocol='opcua', command='read_tag', endpoint='opc.tcp://192.168.1.100:4840', node_id='ns=2;i=1234'). For more complex logic, the AI writes a custom Python script and runs it in a sandboxed execute_python environment.

This means you can connect to any OPC-UA server — whether it's a Softing gateway, a Kepware server, or a DCS historian — with just a chat message:

> Connect to my OPC-Ua server at 192.168.1.100, port 4840, and expose all tags under ns=2
> OK. Discovered 154 tags. Here's the first 10: ...

The AI handles the three main OPC-UA operations:

  • Read: get live values from node IDs or browse paths
  • Write: change setpoints or open/close valves
  • Subscribe: receive data change notifications on a timer or event basis

Real-World Scenario: Monitoring a Distillation Column

Let me walk you through a concrete use case from a chemical plant I consulted for. A distillation column has a temperature sensor on tray 12 (node ID ns=2;i=1005) and a reflux valve setpoint (node ID ns=2;i=2020). The operator wants to:

  1. Monitor the tray temperature every 10 seconds
  2. Automatically reduce the reflux setpoint if the temperature rises above 95°C
  3. Notify a Telegram group with a batch-specific message

With ASI Biont, the operator simply types:

> Monitor ns=2;i=1005 every 10s. If >95°C, set ns=2;i=2020 to 50% and message my Telegram group with the current temperature.

The AI generates a script using opcua-asyncio and schedules it in the sandbox. Here's the essence of what it produces:

import asyncio
from asyncua import Client

async def monitor_tray():
    client = Client("opc.tcp://192.168.1.100:4840")
    await client.connect()
    temp_node = client.get_node("ns=2;i=1005")
    valve_node = client.get_node("ns=2;i=2020")
    while True:
        temp = await temp_node.read_value()
        if temp > 95.0:
            await valve_node.write_value(50.0)
            await send_telegram_alert(f"Tray temp {temp:.1f}°C > 95°C, valve set to 50%")
        await asyncio.sleep(10)

asyncio.run(monitor_tray())

Note: ASI Biont uses requests.post to api.telegram.org for alerts (no custom send_telegram() function). The AI handles all the boilerplate — connecting, error handling, reconnection, and rate limiting.

Code Example: Reading and Writing Tags with opcua-asyncio

For those who prefer to understand the underlying library, here's a minimal OPC-UA client script that ASI Biont might generate for a one-off read/write:

import asyncio
from asyncua import Client

async def read_write_opcua():
    url = "opc.tcp://192.168.1.100:4840"
    client = Client(url)
    await client.connect()

    # Read a float temperature
    temp_node = client.get_node("ns=2;i=1005")
    temp = await temp_node.read_value()
    print(f"Current temperature: {temp} °C")

    # Write a new setpoint to the reflux valve
    valve_node = client.get_node("ns=2;i=2020")
    await valve_node.write_value(45.0)
    print("Valve setpoint updated to 45%")

    await client.disconnect()

asyncio.run(read_write_opcua())

The opcua-asyncio library handles connection delays, timeouts, and data type conversion. One pitfall I hit with early clients was that OPC-UA strings are not Python strings — they're ua.Variant. The AI knows to use Variant(45.0, ua.VariantType.Double), so you don't have to debug type errors.

Automation Recipes: From Telemetry to Action

Once the connection is established, the possibilities are enormous. Here are four practical automation recipes that work well with OPC-UA + ASI Biont:

Recipe OPC-UA Operation Typical Sensor/Device
Equipment health monitoring Subscribe to vibration and bearing temperature tags Vibration sensor on a pump
Batch report generation Read all process values at batch completion Reactor temperature/pressure tags
Predictive maintenance Read historical trends and compare with model output Compressor discharge temperature
Quality alarm notification Read lab analyzer values and send summary to email/Telegram Gas chromatograph

For example, a food processing plant uses ASI Biont to watch a sterilizer's temperature profile. The AI compares each read against the FDA's thermal death time curve and sends an alert only if the accumulated F-value falls below the target. This kind of logic would require a dedicated DCS function block; with ASI Biont, it's just a few lines of Python that the AI writes in seconds.

The Universal Safety Net: execute_python

What if your device doesn't speak OPC-UA? ASI Biont has a powerful fallback: execute_python. The AI writes a Python script using pyserial, paramiko, paho-mqtt, pymodbus, aiohttp, or any other library — and runs it in a sandbox. You're not limited to the built-in protocol list. Say you have an old Modbus RTU pressure transmitter connected to a USB-to-RS485 adapter. Just tell the AI:

> Read pressure from Modbus slave 1, register 30001, using COM3 at 9600 baud

The AI will generate a pymodbus script and run it. No need to wait for a future update — the agent adapts to whatever stack the device supports. That's the killer feature: the integration layer is written by an AI, not by a vendor roadmap.

Pitfalls to Avoid

Over the course of many industrial projects, I've learned a few traps worth sharing:

  • OPC-UA endpoint discovery — The server URL must include the protocol (opc.tcp://), not just an IP. If you omit it, the AI will waste time guessing.
  • Node ID formats — There are int IDs (ns=2;i=5), string IDs (ns=2;s=Temp), and GUID IDs. Always specify the namespace or the AI will browse the wrong namespace.
  • Firewall timeout — OPC-UA uses port 4840 by default, but complex DCS setups use dynamic ports. Make sure the sandbox's outbound rules allow it.
  • Data type mismatches — Writing a Python float to a tag expecting an Int16 can silently fail. The AI checks ua.VariantType before writing.
  • Authentication — Many OPC-UA servers require username/password or client certificates. When connecting to a DCS, ask the automation team for a service account with read/write permissions on the relevant paths.
  • Don't use while True in execute_python — the sandbox has a 30-second timeout. For long-running monitoring, the AI schedules periodic tasks or uses industrial_command() with a subscription.

In one deployment, we spent three hours troubleshooting why the AI couldn't write to a valve setpoint. It turned out the DCS had a separate execute method node that had to be called instead of a simple write_value. OPC-UA is object-oriented; the AI now interrogates the server's address space to find the right method, which is exactly what a good integration engineer would do.

Final Thoughts

The convergence of OPC-UA and an AI agent like ASI Biont is a game-changer for process automation. Instead of building brittle point-to-point integrations, you literally ask for what you need in English — and the AI creates the integration, runs it, and monitors it for you. Whether you're a controls engineer, a plant IT manager, or an IoT consultant, the ability to prototype a new interface in seconds instead of days is remarkable.

Here's what I recommend for anyone starting:

  1. Begin with a read-only scenario — connect to a test OPC-UA server (there are free ones like Prosys Simulator) and explore tags.
  2. Add a single write — like changing a setpoint, to prove bi-directional control.
  3. Gradually layer in automation — alerts, historical logging, predictive logic.

ASI Biont supports OPC-UA out of the box, and the setup is entirely chat-based. There are no buttons to click, no dashboards to configure. You just describe your industrial process and ask the AI to take over the boring part. Try it today at asibiont.com and see how quickly you can modernize your SCADA/DCS operations.

← All posts

Comments