Roboflow + Siemens S7 PLCs
Read and write S7-300, S7-400, S7-1200 and S7-1500 data through PLC Relay, so a detection can reject a part, hold a station or count output.
How to connect Siemens S7 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 102 reachable. The device runs your Workflows on site.
Prepare the PLC in TIA Portal
On an S7-1200 or S7-1500, enable PUT/GET access and turn off optimized block access on each data block the relay will read or write.
Add the PLC Relay
On the device's Configuration tab, add the PLC Relay service, choose Siemens S7 and enter the PLC's IP address, rack (0 to 7) and slot (0 to 31).
Define your tags
Add each tag by its address, such as DB1.DBX0.0 for a BOOL, DB1.DBW0 for an INT, DB1.DBD0 for a DINT or REAL, or M0.0 for a merker bit, and mark the tags the Workflow may write. Simulation mode lets you test without hardware.
Add PLC blocks to the Workflow
Add a PLC Reader to bring values in and a PLC Writer to send results out, both in Roboflow PLC Relay connection mode and pointed at the relay.
Deploy and monitor
Deploy the Workflow to a stream on the device. The device page shows the relay's connection state and live tag values, and a PLC Disconnected alert tells you if the link drops.
What teams build with Siemens S7 PLCs
Reject a defective part
Write a reject bit 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 DINT values in a data block the PLC and HMI already use.
Works with
| Product | How Roboflow connects |
|---|---|
| S7-1200 and S7-1500 | PLC Relay, with PUT/GET on |
| S7-300 and S7-400 | PLC Relay |
| Siemens WinCC | Via the PLC tags |
Questions
No. PLC Relay, running on your edge device, speaks the S7 protocol to the controller itself.
On S7-1200 and S7-1500 controllers, enable PUT/GET access and turn off optimized block access on the data blocks the relay uses. Without these, the PLC refuses the connection.
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. PLC Relay and 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.

