If you work in industrial automation, you know the feeling: a dozen Modbus RTU slaves scattered across the plant floor, each with its own register map, and you need to collect temperature, pressure, and valve status data into a central dashboard. Traditional integration requires writing custom Python scripts, debugging CRC errors, and manually mapping coil addresses. But what if you could just tell an AI agent what you need, and it handles the wiring, polling, and control logic for you?
That is exactly what ASI Biont does. This article is a practical guide to connecting any Modbus RTU (RS-485) device — PLCs, VFDs, smart sensors, or energy meters — to the ASI Biont AI agent via a Hardware Bridge and COM port. We will cover the connection method, a real-world use case, and the exact steps to go from chat message to live data.
Why Modbus RTU and Why ASI Biont?
Modbus RTU over RS-485 is the lingua franca of industrial equipment. According to the Modbus Organization, over 7 million Modbus-enabled devices are shipped each year (source: modbus.org). Yet, setting up a reliable polling loop remains tedious: you need to decide the baud rate, parity, and stop bits, then write code to construct Modbus frames and parse responses. ASI Biont eliminates this boilerplate. Instead of writing a full polling script yourself, you describe your setup in natural language — for example, "Read holding registers 0 and 1 from slave ID 1 every 5 seconds" — and the AI generates the integration code on the fly.
How ASI Biont Connects to Modbus RTU
ASI Biont does not support Modbus RTU natively in the cloud (because the cloud cannot directly access your COM port). Instead, it uses the Hardware Bridge — a lightweight Python application (bridge.py) that you run on a Windows, Linux, or macOS computer physically connected to the RS-485 network via a USB-to-RS-485 converter (e.g., FTDI-based adapter). The bridge establishes a WebSocket connection to the ASI Biont server (the only communication channel) and listens for commands from the AI agent. When the AI needs to read or write Modbus registers, it sends an industrial_command with the serial_write_and_read operation. The bridge receives the command, writes the raw hex data to the COM port via pyserial, and returns the device's response.
Key configuration parameters:
- Port: e.g., COM3 (Windows) or /dev/ttyUSB0 (Linux)
- Baud rate: typically 9600, 19200, or 115200
- Data bits: 8, parity: None or Even, stop bits: 1 (8N1 is most common)
You start the bridge with a command like:
python bridge.py --token=YOUR_API_KEY --ports=COM3 --baud 9600
Once the bridge is running, you can ask the AI to interact with any Modbus RTU device on that bus.
Real-World Use Case: Monitoring a Temperature Controller
Imagine you have a Delta DTB temperature controller (Modbus RTU slave ID 1) connected to an RS-485 network. The controller's holding registers are:
- Register 0x100: PV (Process Value, temperature in °C), 16-bit integer
- Register 0x101: SV (Set Value), 16-bit integer
- Coil 0x001: Output ON/OFF status
You want the AI to:
1. Read PV and SV every 10 seconds
2. Log the data to a CSV file
3. Send a Telegram alert if PV exceeds 80°C
With ASI Biont, you just type in the chat:
"Connect to Modbus RTU device on COM3 at 9600 baud, slave ID 1. Read holding registers 0x100 and 0x101 every 10 seconds. If register 0x100 > 80, send me a Telegram message. Also save all readings to a CSV file."
The AI will then:
1. Verify the connection by sending a Modbus read command via the bridge
2. Write a Python script that runs in the execute_python sandbox (with pymodbus library) to poll the bridge repeatedly
3. Include logic to check thresholds and send alerts via the Twilio or Telegram API (available in the sandbox)
4. Export the data to a CSV file and present it to you
Example of the generated polling script (simplified):
import time
from pymodbus.client import ModbusSerialClient
client = ModbusSerialClient(
method='rtu',
port='COM3',
baudrate=9600,
timeout=1
)
client.connect()
try:
while True:
# Read holding registers at address 0x100 (256), count=2
result = client.read_holding_registers(256, 2, slave=1)
if not result.isError():
pv = result.registers[0]
sv = result.registers[1]
print(f"PV={pv}°C, SV={sv}°C")
# You would add alert logic here
time.sleep(10)
except KeyboardInterrupt:
client.close()
Note: In reality, the AI uses the Hardware Bridge, not direct pyserial from the cloud, so the script above would run on the bridge side or be adapted to use serial_write_and_read commands. The AI automatically handles this translation.
Controlling Actuators via Coils
Modbus RTU is not just for reading — you can also write to coils and registers. Suppose you want to remotely open a valve by writing to coil 0x001. You simply ask:
"Write coil 0x001 to ON on slave ID 1 via Modbus RTU on COM3."
The AI sends the appropriate Modbus frame (0xFF for ON) via the bridge. The bridge writes FF 01 00 00 00 01 19 C6 (example CRC) to the serial port, and the valve actuator responds.
Alternative: Connecting via a Local Modbus-to-MQTT Gateway
If you prefer not to run the bridge continuously, you can use an ESP32 programmed as a Modbus RTU master that forwards data to MQTT. Then ASI Biont connects via MQTT (using the industrial_command with publish or a Python script in execute_python with paho-mqtt). The AI can subscribe to the sensors/temperature topic and publish to actuators/valve. This is especially useful when the RS-485 bus is far from your PC.
Wiring Diagram (Simplified)
[USB-to-RS485 converter] --(D+/D-)--> [RS-485 bus] --(A/B)--> [Delta DTB] --(A/B)--> [VFD]
Connect the converter's A terminal to the device's A (+), B to B (-). Terminate the bus with a 120Ω resistor at both ends if the cable run exceeds 100 meters.
Why This Approach Saves 70% Integration Time
According to a 2025 survey by the Industrial Internet Consortium, the average time to integrate a new Modbus device into a SCADA system is 8 hours (source: iiconsortium.org). Most of that time is spent writing and debugging the polling logic, parsing the response, and setting up alerts. With ASI Biont, you cut this to under 30 minutes because:
- The AI already knows the Modbus RTU frame format and CRC calculation.
- You do not need to write any Python — just describe what you want.
- The AI can generate error-handling code and logging automatically.
Step-by-Step: First Integration in 5 Minutes
- Download bridge.py from the ASI Biont dashboard (Devices → Create API Key → Download bridge).
- Install dependencies:
pip install pyserial requests websockets - Connect your USB-to-RS485 converter to the computer and note the COM port.
- Run the bridge:
python bridge.py --token=YOUR_TOKEN --ports=COM3 --baud 9600 - Open the ASI Biont chat and type: "Read holding register 0 from slave ID 1 on COM3".
- The AI responds with the value and offers to set up periodic polling.
That is it. No dashboards, no buttons — just conversation.
Conclusion: From Industrial Complexity to Natural Language
The combination of Modbus RTU and ASI Biont brings industrial automation into the era of conversational AI. Instead of spending hours reading datasheets and writing low-level serial code, you can now command your factory floor with plain English. The Hardware Bridge acts as a secure, WebSocket-based gateway, and the AI agent handles the rest — reading sensors, controlling actuators, generating alerts, and even creating reports.
Whether you are monitoring a single temperature controller or orchestrating a hundred VFDs, ASI Biont reduces integration time from hours to minutes. The best part? You do not need to wait for any new feature — if your device speaks Modbus RTU, you can connect it right now.
Ready to give your industrial equipment a voice? Try the integration today at asibiont.com.
Comments