Visual Intelligence Summit: Oct 22 in San Francisco Get your ticket (opens in a new tab)

Roboflow + Modbus TCP

Read and write coils and registers on any Modbus TCP device, so a detection can reject a part, signal a robot or count output.

Modbus TCP is the Ethernet version of Modbus, an open protocol supported by PLCs, robot controllers, drives and sensors from many vendors. Devices expose data as coils (single bits) and registers (16-bit words) at numbered addresses, usually on port 502.

The PLC Writer and PLC Reader Workflow blocks address these as holding:100 or coil:0. They connect to the device directly, or through PLC Relay, a service on your edge device that holds the address, unit ID and tag list so the same Workflow runs on every line. Writes go to coils and holding registers; input registers and discrete inputs are read-only.

How to connect Modbus TCP to Roboflow

6 steps
  1. Set up an edge device

    Register a device in Deployment Manager and connect it to the same network as the Modbus device, with port 502 reachable. The device runs your Workflows on site.

  2. Get the device's register map

    From the device's manual or PLC program, note the coils and registers you need, its unit ID and, for 32-bit values, whether it uses big or little word order.

  3. Add the PLC Relay

    On the device's Configuration tab, add the PLC Relay service, choose Modbus TCP and enter the device's IP address (with :port if it is not 502), its unit ID (0 to 255) and the word order.

  4. Define your tags

    Add each value by area and address: coil:0 for a BOOL, holding:100 for an INT, DINT or REAL. Discrete inputs and input registers are read-only. Simulation mode lets you test without hardware.

  5. Add PLC blocks to the Workflow

    Add a PLC Reader to bring values in and one PLC Writer for each value you send out, pointed at the relay. To skip the relay, set Connection mode to Direct (Modbus TCP) and enter the device's IP address, port and unit ID.

  6. Deploy and monitor

    Deploy the Workflow to a stream on the device. The device page shows the relay's connection state and live values, and a PLC Disconnected alert tells you if the link drops.

What teams build with Modbus TCP

  • Reject a defective part

    Set a coil when the Workflow finds a defect, and let the PLC fire the reject mechanism at the right moment.

  • Signal a robot

    Write a part's class or position to holding registers that the robot program reads before it picks.

  • Count output per shift

    Write running counts of good and rejected parts to holding registers the PLC and HMI already display.

Works with

ProductHow Roboflow connects
Schneider Electric ModiconDirect or PLC Relay
ABB AC500Direct or PLC Relay
Mitsubishi MELSEC iQ-FDirect or PLC Relay
Beckhoff TwinCATDirect or PLC Relay, with TF6250
Universal RobotsDirect or PLC Relay

Questions

Any device that acts as a Modbus TCP server, including PLCs, robot controllers, drives and remote I/O. Roboflow connects as the client and reads or writes the addresses you configure.

No. The PLC blocks can connect straight to the device in Direct (Modbus TCP) mode. PLC Relay keeps the address and tag list on the edge device, so the same Workflow runs on every line, and adds live monitoring and a disconnect alert.

The device stores 32-bit values in the other word order. Switch the relay's word order between big and little and read the value again.

No. The PLC blocks run on your own device on the plant network, close to the camera and the equipment, not on Roboflow's hosted API.

The PLC blocks and PLC Relay are part of the Enterprise plan. Talk to our team to add them to your workspace.

Why are companies choosing Roboflow?

The end-to-end platform for vision AI: create datasets, train models and deploy to production.

  • Flexible deployment modes

    Move from a scalable cloud API to edge hardware like NVIDIA Jetson without managing complex dependencies.

  • Integrated workflow builder

    Combine multiple AI models, custom business logic and third-party integrations into one production-ready pipeline in a low-code editor.

  • Model monitoring and alerts

    Dashboards track confidence, inference time and request volume for your deployed models, and email alerts tell your team when confidence suddenly drops.

View all
Get started

Build on the Platform

For developers, engineers, and technical founders who want to get hands on. Try the free tier; the docs are open.

Bring it into your operation

For heads of AI, operations leaders, and enterprise teams. Bring a known problem, or work with us to find the first one worth taking on.