"Line 3 is running at 72% capacity. Motor current on station 7 is above normal, and the vibration sensor shows a developing anomaly."
This is the kind of answer plant engineers want when they ask about a production line. In a PROFINET-based plant, that data already exists — Siemens S7-1200, S7-1500, ET200 I/O modules and drives exchange thousands of datapoints every millisecond. The real problem is access. To read a single DB value, you need TIA Portal, a trained automation engineer, and several minutes of navigating network trees.
Connecting PROFINET to an AI agent like ASI Biont changes this. You describe what you need in a chat window, the agent writes the integration script on the fly, reads the PLC, and returns an answer in seconds. This article shows exactly how ASI Biont connects to PROFINET devices, what libraries it uses, and gives a working example: a furnace controlled by a Siemens PLC with Telegram alerts.
Why connect PROFINET to an AI agent?
PROFINET is the leading industrial Ethernet standard (see PROFIBUS & PROFINET International, profibus.com). It is the default on most new production lines — automotive, food & beverage, logistics. But the same high-speed cyclic IO that makes PROFINET powerful also makes data access hard: you need engineering tools, network configuration and a deep understanding of the PLC memory layout.
An AI agent eliminates this bottleneck. Instead of "build me an OPC-UA bridge and a dashboard", you tell the agent: "Check the temperature trend on the oven, note if any cycle exceeds 85°C, and summarize the shift." The agent does it and answers in plain language.
How does ASI Biont connect to a PROFINET device?
PROFINET is not a single Python-friendly protocol. It is a layered standard (RPC, DCP, LLDP, cyclic IO). However, most controllers on PROFINET — including Siemens S7-1200 and S7-1500 — also support the Siemens S7 protocol over TCP/IP on the same Ethernet port. ASI Biont uses this route:
| Situation | Recommended method | Library |
|---|---|---|
| Siemens S7-1200/1500 PLC | Direct S7 over TCP | snap7 |
| Third-party PLC with OPC-UA | OPC-UA connection | opcua-asyncio |
| Device in an isolated OT network | SSH jump host / Raspberry Pi | paramiko |
| Legacy device with gateway | Modbus/TCP | pymodbus |
For Siemens PLCs, the agent generates Python code with snap7 — the de-facto standard library (github.com/gjcope/snap7, docs at snap7.sourceforge.net). Snap7 reads and writes DBs, markers and I/O directly in the S7 protocol.
Important: ASI Biont does not have a pre-built "PROFINET plugin". It uses its execute_python capability — the AI writes a Python script tailored to your specific device and IP, runs it in a sandbox and returns the result. You never wait for a developer to add support; you just describe the device in chat.
Example: monitoring a furnace via Telegram
Scenario: an S7-1200 controls a furnace. The current temperature is in DB10.DBD0 (Real), the setpoint is in DB10.DBD4 (Real). You want an alert when the temperature exceeds 80°C.
You type in the ASI Biont chat:
Connect to the S7-1200 PLC at 192.168.0.10, rack 0, slot 1. Read the furnace temperature from DB10.DBD0. If it is above 80°C, send a Telegram message to me. Do it once.
The agent generates and executes a script like this:
import snap7
from snap7.util import get_real
import requests
plc = snap7.client.Client()
plc.connect('192.168.0.10', rack=0, slot=1)
raw = plc.db_read(db_number=10, start=0, size=4)
temp = get_real(raw, 0)
print(f'Furnace temperature: {temp:.1f} °C')
if temp > 80:
requests.post(
'https://api.telegram.org/bot<TOKEN>/sendMessage',
json={'chat_id': '<CHAT_ID>', 'text': f'⚠ Furnace overload: {temp:.1f} °C'}
)
plc.disconnect()
Note there is no while True loop — the sandbox has a 30-second execution limit. For scheduled checks, the agent runs a one-shot script every N minutes (or aggregates data and runs periodically).
Now the control part. You type:
Increase the furnace setpoint in DB10.DBD4 to 75.0.
The agent asks for confirmation ("This writes live to the PLC, confirm?") and then executes:
import snap7
from snap7.util import set_real
plc = snap7.client.Client()
plc.connect('192.168.0.10', 0, 1)
raw = plc.db_read(10, 4, 4)
set_real(raw, 0, 75.0)
plc.db_write(10, 4, raw)
plc.disconnect()
print('Setpoint updated to 75.0 °C')
That is the whole story: a task that normally requires an engineer with TIA Portal, write access and a network walk to the control cabinet is now a sentence in a chat.
Pitfalls to avoid in real plants
- Enable S7 access. In TIA Portal, many PLCs come with "Permit access with PUT/GET communication" disabled. If snap7 times out, check this setting first.
- Use the right data types. S7 is big-endian. Reading a
REALas anINTyields nonsense. Usesnap7.util.get_real,get_int,get_dintwith correct start offsets. - Byte offsets, not tag names. The DB byte offset is what matters. A wrong offset can write into an unintended memory area. Provide exact addresses in the chat description.
- Network isolation. Many plants place PROFINET in a separate VLAN. If the machine running ASI Biont has no route to the PLC, ask the agent to connect through an SSH jump host or a Raspberry Pi inside the OT network (paramiko).
- Respect the 30-second sandbox. Do not try to run an infinite data collector. Schedule short executions.
The principle: no dashboards, just chat
ASI Biont connects to almost anything because the AI writes the code. The list of supported paths is long — COM ports via the Hardware Bridge (bridge.py, downloaded from the dashboard), MQTT, Modbus/TCP, OPC-UA, snap7, BACnet, EtherNet/IP, CAN, gRPC, CoAP — but for a truly custom device, it uses execute_python with whatever library the situation requires: pyserial, paramiko, paho-mqtt, pymodbus, aiohttp, opcua-asyncio. You specify the parameters (IP, port, baud rate, API key) in natural language, and the agent builds the script, tests it, and reports the result. No "add device" buttons.
Sources
- PROFIBUS & PROFINET International — https://www.profibus.com
- snap7 documentation — https://snap7.sourceforge.net/
- snap7 Python bindings — https://github.com/gjcope/snap7
- ASI Biont — https://asibiont.com
Try it
If your plant runs on PROFINET, you already have the data. The AI agent just needs access. Open the chat at asibiont.com, describe your PLC — model, IP, rack and slot, the tags you want to monitor — and the agent will write the integration in seconds. You will be talking to your production line before your coffee gets cold.
Comments