Connecting EtherNet/IP Industrial Controllers to AI Agents: A Practical Guide with ASI Biont

Introduction

If you work in industrial automation, you’ve likely encountered EtherNet/IP – the workhorse protocol for Rockwell Automation (Allen‑Bradley) PLCs and many other devices. EtherNet/IP (Ethernet Industrial Protocol) is the backbone of countless factories, handling real‑time I/O control, data collection, and device configuration over standard Ethernet. But what if you could connect an AI agent directly to these controllers, letting it monitor trends, predict failures, or adjust setpoints based on natural language instructions? That’s exactly what the ASI Biont AI agent does – no complex middleware, no deep PLC programming knowledge required. In this guide, I’ll show you how to integrate EtherNet/IP devices with ASI Biont, using real commands and a concrete example.

The Challenge of Traditional Integration

Connecting an AI to an EtherNet/IP PLC normally means writing custom scripts (using pycomm3, libplctag, or similar), handling network quirks, and then building a dashboard or API. Every time you want a new automation rule, you need to code it. ASI Biont flips this model: you describe the task in plain English, and the AI writes the integration on the fly. It supports EtherNet/IP natively through its industrial_command tool, powered by the mature pycomm3 library.

How ASI Biont Connects to EtherNet/IP Devices

ASI Biont can communicate with any EtherNet/IP capable controller (such as ControlLogix, CompactLogix, MicroLogix, or even third‑party devices that implement the protocol). The connection method used is direct via pycomm3 – no separate bridge or local server needed. The AI sends commands through the industrial_command tool with the protocol set to 'ethernet_ip'. The supported commands are:

Command Purpose Example
read_tag Read the value of a controller tag read_tag(tag="Temperature")
write_tag Write a value to a controller tag write_tag(tag="Setpoint", value=75.5)
get_device_info Retrieve device identity and status get_device_info()

The AI can combine these into sequences – for example, read multiple tags, analyze the data, and conditionally write back a new setpoint – all within a single chat session.

Real‑World Use Case: Temperature Monitoring with Telegram Alerts

Let’s walk through a practical scenario. Imagine you have a CompactLogix PLC controlling a chemical reactor. The PLC has a tag Reactor_Temp (REAL) and a tag Heater_Command (BOOL). You want to monitor the temperature, and if it exceeds 80°C, the AI should:
1. Turn off the heater (write Heater_Command = 0).
2. Send you an alert via Telegram.

Step 1: Connect and Verify

In the ASI Biont chat, you type:

“Connect to my EtherNet/IP PLC at 192.168.1.100, read the tag Reactor_Temp.”

The AI replies with the current temperature and, behind the scenes, uses:

industrial_command(
    protocol='ethernet_ip',
    command='read_tag',
    device_ip='192.168.1.100',
    tag='Reactor_Temp'
)

Step 2: Set Up Rule-Based Control

You then describe the automation:

“Write a rule: if Reactor_Temp > 80, set Heater_Command to 0 and send me a Telegram notification.”

The AI creates a monitoring script (using execute_python) that runs every 10 seconds (via a simple loop with sleep – but note: in ASI Biont, long‑running loops run in the execute_python sandbox with a 30‑second timeout; for persistent monitoring, you’d use a scheduled task or a dedicated bridge script. The AI will recommend the best approach.)

Important Pitfall: pycomm3 requires the tag path to be fully qualified. For ControlLogix controllers, tags in a program scope look like Program:MainProgram.Reactor_Temp. The AI will automatically deduce the correct path based on the controller’s configuration file or auto‑discovery. If you encounter errors, double‑check the tag name and try get_device_info to verify the connection.

Step 3: Actually Writing the AI‑Generated Code

Here’s an example of the code the AI might generate and execute inside the sandbox (using requests for Telegram, but remember – the AI uses the real industrial_command for EtherNet/IP, not raw pycomm3 calls in the sandbox, because industrial_command is optimized for reliability):

import requests

# This function is called by the AI, which uses industrial_command internally
def check_temperature(plc_ip):
    # The AI reads the tag using industrial_command
    temp = industrial_command(
        protocol='ethernet_ip',
        command='read_tag',
        device_ip=plc_ip,
        tag='Reactor_Temp'
    )
    if temp > 80:
        # Write Heater_Command to 0
        industrial_command(
            protocol='ethernet_ip',
            command='write_tag',
            device_ip=plc_ip,
            tag='Heater_Command',
            value=0
        )
        # Send Telegram notification
        bot_token = 'YOUR_BOT_TOKEN'
        chat_id = 'YOUR_CHAT_ID'
        message = f"⚠️ Reactor temperature {temp}°C exceeded limit. Heater turned off."
        requests.post(f'https://api.telegram.org/bot{bot_token}/sendMessage',
                      json={'chat_id': chat_id, 'text': message})
        return message
    return f"Temperature {temp}°C – normal."

Note: The actual industrial_command is a tool the AI calls – the code above is a representation of the logic. The beauty is that you never have to write or debug this code; the AI builds and runs it for you.

Beyond EtherNet/IP: Connect Any Device with execute_python

While EtherNet/IP is fully supported via the specialized industrial_command tool, ASI Biont can connect to any device using the universal execute_python sandbox. If you have a device that speaks a non‑standard protocol (e.g., a custom serial protocol or an unusual HTTP API), you simply describe it in the chat:

“Connect to my vibration sensor at 192.168.1.50, which sends JSON on port 8080. Parse the vibration_level field and alert me if > 10 mm/s.”

The AI will write a Python script using aiohttp or requests, include error handling, and run it in the sandbox. No waiting for developers to add a plugin – you integrate anything, instantly.

Why This Matters for Industry 4.0

Traditional SCADA or MES systems require months of development to add AI‑driven logic. With ASI Biont, you can:

  • Deploy predictive maintenance: have the AI analyze trends from historical tag data (by reading tags periodically) and forecast failures.
  • React to events in real‑time: the AI can watch multiple EtherNet/IP devices across a plant and coordinate responses across them – for example, if a conveyor stops, signal the next PLC to slow down.
  • No‑code modifications: change setpoints, add new tags, or alter logic simply by typing a new instruction in the chat.

Best Practices and Pitfalls

  1. Network isolation: Ensure your PLC is on a network reachable from the ASI Biont cloud server. If it’s behind NAT, use a VPN or a local bridge (the ASI Biont Hardware Bridge also supports serial‑to‑cloud, but for EtherNet/IP you usually connect directly).
  2. Tag visibility: Use get_device_info to confirm the controller model. Rockwell PLCs often hide tags unless you have offline project file access; pycomm3 can still read tags if they are publicly accessible.
  3. Security: Never expose PLCs directly to the internet. Use firewall rules and consider using ASI Biont’s secure WebSocket bridge for production.
  4. Rate limiting: The industrial_command tool has built‑in pacing – avoid flooding the PLC with requests; the AI automatically respects typical scan times.

Conclusion

EtherNet/IP is the language of modern factories, and ASI Biont lets you speak that language through a chat interface. Whether you’re a controls engineer wanting to experiment with AI without writing glue code, or a plant manager needing rapid automations, this integration gives you a powerful, flexible tool. Start small – connect one PLC, read a tag, set a rule – and then scale to entire production lines.

Ready to integrate your EtherNet/IP controller with an AI agent? Head over to asibiont.com and create a free account. No installation, no coding – just describe what you want, and the AI does the rest.

← All posts

Comments