Roboflow + Mitsubishi MELSEC PLCs
Read and write MELSEC iQ-F devices over Modbus TCP, so a detection can reject a part, hold a station or count output on FX5 PLCs.
How to connect Mitsubishi MELSEC PLCs to Roboflow
6 stepsSet up an edge device
Register a device in Deployment Manager and connect it to the same network as the PLC, with port 502 reachable. The device runs your Workflows on site.
Turn on the PLC's Modbus TCP server
In GX Works3, open the parameters for the CPU's built-in Ethernet port and enable MODBUS/TCP communication so the PLC can answer as a Modbus TCP server.
Allocate devices to Modbus addresses
In the MODBUS device allocation settings, map the PLC devices the Workflow will use to Modbus coils and holding registers, then write the parameters to the PLC.
Add the PLC Relay and define tags
On the edge device's Configuration tab, add the PLC Relay service, choose Modbus TCP and enter the PLC's IP address, unit ID and word order. Add each tag by area and address, such as coil:0 or holding:100, matching your allocation.
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 PLC's IP address, port and unit ID.
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 Mitsubishi MELSEC PLCs
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.
Inspect only when a part is there
Read a part-present bit and run the inspection only when the PLC says a part is in front of the camera.
Count output per shift
Write running counts of good and rejected parts to holding registers the PLC and HMI already display.
Works with
| Product | How Roboflow connects |
|---|---|
| FX5U and FX5UC | Direct or PLC Relay |
| FX5UJ and FX5S | Direct or PLC Relay |
Questions
MELSEC iQ-F FX5U, FX5UC, FX5UJ and FX5S, over the CPU's built-in Ethernet port. For other MELSEC series, check that the PLC can act as a Modbus TCP server.
No. The PLC blocks talk to the PLC over Modbus TCP, which the iQ-F series supports on its built-in Ethernet port.
Yes. The PLC Reader block brings values such as a part-present bit or a recipe number into the Workflow, where they can gate or label each inspection.
No. The PLC blocks run on your own device on the plant network, close to the camera and the controller, 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.

