From PLC to AI Agent: Integrating Modbus/TCP (PLC, RTU) with ASI Biont for No-Code Industrial Automation

Introduction

Industrial automation has long been the domain of ladder logic, SCADA dashboards, and manual scripting. But in 2026, the game is changing. According to a 2025 market report by Fortune Business Insights, the global industrial AI market is projected to reach $18.4 billion by 2027, with Modbus remaining the most widely adopted industrial protocol — over 60% of industrial controllers still use Modbus in some form. Yet, connecting a PLC or RTU to an AI agent has historically required custom middleware, MQTT brokers, or REST API wrappers.

Enter ASI Biont — an AI agent that connects directly to Modbus/TCP devices (PLCs, RTUs, motor drives, sensors) via the pymodbus library, using a simple chat interface. No dashboards, no YAML files, no waiting for developers. You describe your device, the AI writes the integration code and executes it in seconds. This article is a practical guide to connecting a Modbus/TCP PLC to ASI Biont, with real Python code, wiring diagrams, and real-world scenarios.

Why Integrate a Modbus/TCP PLC with an AI Agent?

Modbus/TCP is the backbone of factory floors, water treatment plants, and energy management systems. A typical PLC might monitor temperature, pressure, flow, and control valves or pumps. By connecting it to an AI agent like ASI Biont, you can:

  • Automate condition-based actions (e.g., shut down a pump if pressure exceeds threshold)
  • Collect and analyze historical data for predictive maintenance
  • Send alerts to Telegram, Slack, or email when anomalies occur
  • Replace manual SCADA scripting with natural language commands

According to a 2025 survey by Omdia, companies that adopt AI for industrial edge control report a 40% reduction in unplanned downtime. ASI Biont makes this accessible without a dedicated data science team.

How ASI Biont Connects to Modbus/TCP

ASI Biont uses the industrial_command tool with the Modbus/TCP protocol. The AI agent sends commands like read_registers, write_register, read_coils, and write_coil directly from the chat. Under the hood, it uses the pymodbus library (version 3.6.9) — a mature, well-tested Python library for Modbus communication.

Key parameters you provide in chat:
- PLC IP address (e.g., 192.168.1.100)
- Port (default 502)
- Register/coil addresses (e.g., holding register 40001)
- Data type (16-bit, 32-bit float, etc.)

The AI then generates and executes the integration code in its sandbox environment (Railway cloud). No local installation needed.

Important: The sandbox has a 30-second timeout, so avoid infinite loops. For continuous monitoring, ASI Biont can schedule periodic tasks using its built-in cron-like scheduler (configured via chat).

Real-World Scenario: Temperature Monitoring & Pump Shutdown

Let's walk through a concrete use case: a water pump station with a PLC (e.g., Siemens S7-1200) that reads a temperature sensor (PT100) at holding register 40001 (scaled to °C) and controls a pump via coil 0.

Step 1: Describe the setup in chat

"Connect to my PLC at 192.168.1.100, port 502. Read holding register 40001 every 10 seconds. If temperature exceeds 85°C, write coil 0 to ON (1) to shut down the pump. Log all readings to a CSV file and send me a Telegram alert on threshold breach."

Step 2: AI writes and executes the code

Below is a simplified version of what the AI generates (actual execution uses industrial_command for Modbus, but for clarity we show the equivalent Python using pymodbus):

from pymodbus.client import ModbusTcpClient
import time
import csv
from datetime import datetime

# Connect to PLC
client = ModbusTcpClient('192.168.1.100', port=502)
client.connect()

# Read register 40001 (0-indexed: 0)
result = client.read_holding_registers(0, 1, unit=1)
temperature = result.registers[0]  # Assume direct °C
print(f"Temperature: {temperature}°C")

if temperature > 85:
    # Write coil 0 to ON (1) — pump shutdown
    client.write_coil(0, True, unit=1)
    print("ALERT: Temperature exceeded 85°C. Pump shut down.")
else:
    # Log to CSV
    with open('temperature_log.csv', 'a', newline='') as f:
        writer = csv.writer(f)
        writer.writerow([datetime.now(), temperature])

client.close()

Step 3: AI sends alerts via Telegram

Using the telegram_bot tool, the AI sends a message:

"⚠️ Pump Station A: Temperature reached 87°C at 14:32:15. Pump shutdown triggered. Log written."

Step 4: Monitor and adjust via chat

You can continue the conversation:

"Show me the last 10 temperature readings from the CSV."
"Reset coil 0 to OFF when temperature drops below 70°C."

The AI reads the CSV, parses data, and executes new Modbus commands — all in plain English.

Other Real-World Scenarios

Predictive Maintenance on a Compressor

A Modbus RTU (via RS-485 to Ethernet converter) monitors vibration and runtime hours. ASI Biont reads registers every hour, stores data in a local SQLite database (via execute_python), and runs a linear regression model to predict bearing failure. When predicted remaining life drops below 500 hours, it sends an email to maintenance.

# Simplified regression (scikit-learn)
from sklearn.linear_model import LinearRegression
import numpy as np

# Assume historical data: hours vs vibration
hours = np.array([100, 200, 300, 400]).reshape(-1, 1)
vibration = np.array([0.5, 0.7, 1.2, 2.0])
model = LinearRegression().fit(hours, vibration)
predicted_hours = (3.0 - model.intercept_) / model.coef_[0]
print(f"Predicted failure at {predicted_hours:.0f} hours")

Batch Data Collection for SCADA Replacement

A food processing plant uses 5 PLCs (each with 200 registers) to track temperatures, pressures, and flow rates. Instead of a SCADA system, the AI agent polls all 5 PLCs every 5 minutes, compresses data into Parquet files (using fastparquet), and uploads to AWS S3 (via boto3) for later analysis.

import pandas as pd
import boto3

# Collect from each PLC (simplified)
data = []
for plc_ip in ['192.168.1.101', '192.168.1.102']:
    client = ModbusTcpClient(plc_ip)
    client.connect()
    regs = client.read_holding_registers(0, 100, unit=1).registers
    data.append({'ip': plc_ip, 'timestamp': datetime.now(), 'values': regs})
    client.close()

df = pd.DataFrame(data)
df.to_parquet('plant_data.parquet')

# Upload to S3
s3 = boto3.client('s3')
s3.upload_file('plant_data.parquet', 'my-bucket', 'data/plant_data.parquet')

Why This Changes Everything

Traditional Modbus integration requires:
- Writing Python/Node.js code from scratch
- Setting up a local server or Docker container
- Debugging network issues manually

With ASI Biont, you just describe your task. The AI agent understands Modbus protocol, writes production-ready code, executes it in the cloud, and logs results. If you need to change parameters — just ask.

According to a 2025 study by McKinsey, AI-assisted industrial integration reduces deployment time by 70% and cuts operational errors by 55%. ASI Biont puts this capability in the hands of every plant engineer, not just software developers.

Getting Started

  1. Go to asibiont.com and start a chat.
  2. Describe your Modbus/TCP device: IP, port, register addresses.
  3. Tell the AI what you want to monitor or control (e.g., "Read holding register 40001 every 10 seconds and alert me if > 80°C").
  4. The AI writes the code, executes it, and shows results.
  5. Iterate: ask for changes, add alerts, or connect other devices.

No-code? Yes, but with code transparency.

You can always ask the AI to show you the Python code it generated. This is ideal for learning, auditing, or tweaking.

Conclusion

Modbus/TCP PLCs are not going away — they are the workhorses of industry. But connecting them to AI agents should not require a dedicated software team. ASI Biont bridges the gap between legacy industrial equipment and modern AI, using natural language as the interface. Whether you are monitoring a single pump or a whole factory, the AI agent handles the Modbus communication, data logging, alerting, and even predictive analytics.

Try it yourself: Go to asibiont.com, start a chat, and say: "Connect to my Modbus PLC at 192.168.1.100, read register 40001, and log it every minute." You'll see the AI write and run the code in real time. Industrial automation has never been this fast.

← All posts

Comments