EtherNet/IP Integration with ASI Biont: AI-Driven Automation for Rockwell PLCs

Introduction

Industrial automation relies on robust communication protocols like EtherNet/IP, the backbone of Rockwell Automation (Allen-Bradley) PLCs, drives, and sensors. EtherNet/IP (Ethernet Industrial Protocol) handles real-time I/O data and information exchange in factories, oil rigs, and warehouses. However, programming logic for condition monitoring, predictive maintenance, or cross-system orchestration often requires ladder logic expertise and manual scripting.

ASI Biont changes that. This AI agent connects directly to your EtherNet/IP devices via pycomm3, reads and writes tags, and makes intelligent decisions — all through a simple chat conversation. No dashboard panels, no 'add device' buttons. Just describe what you need, and the AI writes the integration code in seconds.

How ASI Biont Connects to EtherNet/IP

ASI Biont uses the industrial_command tool with the etherNetIP protocol. Under the hood, it leverages the open-source pycomm3 library, which implements the CIP (Common Industrial Protocol) over TCP/IP. The AI agent runs the code in a secure sandbox (execute_python) on the ASI Biont server (Railway). You provide the PLC's IP address, and the AI handles the rest.

Available commands for EtherNet/IP:
- read_tag(tag_name) — read a tag value (e.g., int_array[0], bool_var)
- write_tag(tag_name, value) — write a value to a tag
- get_device_info() — retrieve controller identity, vendor, serial number

All communication happens over TCP port 44818 (EtherNet/IP default). The sandbox has pycomm3 pre-installed — no extra setup needed.

Real-World Use Case: Automated Quality Gate with Allen-Bradley CompactLogix

Scenario: A packaging line uses a CompactLogix PLC to control conveyor speed and reject defective boxes. An IR sensor (tag IR_Sensor) detects box presence. When a box is defective, the PLC sets a boolean tag Reject_Flag. ASI Biont monitors this tag, logs reject events, and sends a Telegram alert to the line manager.

Step 1: User describes the task in ASI Biont chat

"Connect to my Allen-Bradley PLC at 192.168.1.100. Read tag IR_Sensor every 2 seconds. When Reject_Flag becomes True, send a Telegram message to my chat ID 123456789 using token bot_token_here. Also log the event to a CSV file and upload it to an S3 bucket."

Step 2: AI generates and runs the integration code

import asyncio
import csv
import io
from datetime import datetime
from pycomm3 import LogixDriver
import aiohttp
import boto3

PLC_IP = "192.168.1.100"
TELEGRAM_TOKEN = "bot_token_here"
CHAT_ID = "123456789"
BUCKET_NAME = "my-plc-logs"

async def send_telegram(message):
    async with aiohttp.ClientSession() as session:
        url = f"https://api.telegram.org/bot{TELEGRAM_TOKEN}/sendMessage"
        payload = {"chat_id": CHAT_ID, "text": message}
        await session.post(url, json=payload)

async def upload_to_s3(csv_content, filename):
    s3 = boto3.client('s3')
    s3.put_object(Bucket=BUCKET_NAME, Key=filename, Body=csv_content)

async def main():
    c = LogixDriver(PLC_IP)
    c.open()
    print(f"Connected to {c.get_device_info()['product_name']}")

    csv_buffer = io.StringIO()
    writer = csv.writer(csv_buffer)
    writer.writerow(["timestamp", "ir_sensor", "reject_flag"])

    try:
        while True:
            ir = c.read("IR_Sensor")[1]
            reject = c.read("Reject_Flag")[1]
            ts = datetime.now().isoformat()
            writer.writerow([ts, ir, reject])

            if reject:
                msg = f"ALERT: Reject at {ts}"
                await send_telegram(msg)
                print(msg)

            await asyncio.sleep(2)
    except KeyboardInterrupt:
        pass
    finally:
        csv_content = csv_buffer.getvalue()
        filename = f"plc_log_{datetime.now().strftime('%Y%m%d_%H%M%S')}.csv"
        await upload_to_s3(csv_content, filename)
        c.close()

asyncio.run(main())

Explanation:
- The AI uses LogixDriver (pycomm3) to connect to the PLC.
- It reads tags IR_Sensor (BOOL) and Reject_Flag (BOOL) every 2 seconds.
- When Reject_Flag is True, it sends a Telegram alert via HTTP API.
- All readings are buffered in a CSV, then uploaded to AWS S3 when the script stops.
- The script runs in the sandbox with a 30-second timeout — for persistent monitoring, you would schedule it via cron or use the industrial_command tool with a single read/write pattern.

Step 3: Result

The line manager receives instant alerts on Telegram. The CSV log is safely stored in S3 for compliance and analytics. No ladder logic modifications — the AI agent works entirely at the tag level.

Why This Approach Beats Traditional Methods

Aspect Traditional PLC Programming ASI Biont Integration
Setup time Hours (RSLogix, wiring, testing) Seconds (describe in chat)
Flexibility Requires firmware update or new rungs Change on the fly via chat
External services Complex middleware (OPC, SCADA) Direct Telegram, S3, Slack
Skills needed Ladder logic, network config Natural language only

Beyond PLCs: Connecting Any Device

ASI Biont isn't limited to EtherNet/IP. It connects to any device via execute_python — the AI writes custom Python code using libraries like pyserial (COM ports via Hardware Bridge), paho-mqtt (MQTT), pymodbus (Modbus/TCP), snap7 (Siemens S7), bac0 (BACnet), aiohttp (HTTP APIs), opcua-asyncio (OPC UA), and more. You simply describe the connection parameters (IP, port, baud rate, API key) in the chat, and the AI generates and runs the integration code. No waiting for developers to add support — connect anything right now.

Conclusion

EtherNet/IP integration with ASI Biont brings AI-powered supervision to your factory floor without complex programming. The AI agent reads tags, makes decisions (send alerts, write to databases, control actuators), and connects to cloud services — all through a natural language conversation.

Ready to automate your PLCs? Try it now at asibiont.com. Describe your device and let the AI build the integration in seconds.

← All posts

Comments