PLC Writer¶
Class: PLCWriterBlockV1
Source: inference.enterprise.workflows.enterprise_blocks.sinks.plc.v1.PLCWriterBlockV1
The PLC Writer block writes a single tag value to a PLC. To write several tags, add one PLC Writer block per tag (each is its own request to the PLC).
This block can reach the PLC three ways, selected by Connection mode in the advanced section:
- Roboflow PLC Relay (default): sends tags to the on-device PLC Relay service over HTTP. The relay owns the protocol (Allen-Bradley, Modbus, or Siemens S7), the device IP, and the tag schema, so the same Workflow runs unchanged across devices. Tags are sent in a single batch request per frame over a persistent keep-alive connection (high FPS).
- Direct (EtherNet/IP): connects straight to the PLC with
pylogix. Tags are addressed by name (e.g.Program:MainProgram.Tag1). - Direct (Modbus TCP): connects straight to the PLC with
pymodbus. Tags are addressed asarea:address(holding:100,coil:0,input:5,discrete:2); a bare number defaults to a holding register.
Address is the relay host in relay mode, or the PLC's IP address in either direct mode. The advanced section exposes the relevant extras per mode (relay port, processor slot, Modbus port / unit id).
On any failure the error is logged and that tag's entry in the output is set to
"ReadFailure" / "WriteFailure"; error_status is True if any tag failed.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/plc_writer@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
tag |
str |
The single PLC tag to write. Relay and Direct (EtherNet/IP) modes use a tag name (e.g. camera_fault); Direct (Modbus TCP) mode uses area:address (holding:100, coil:0; a bare number is a holding register, and only holding registers and coils are writable, not the read-only input / discrete areas). To write several tags, add one PLC Writer block per tag.. |
✅ |
value |
Union[bool, float, int, str] |
The value to write to the tag. May be a fixed value or a reference to a workflow input or a previous step's output. Must be a boolean, integer, or float, except Direct (EtherNet/IP) mode, which also accepts strings (for Logix STRING tags).. | ✅ |
ip_address |
str |
Address of the PLC Relay (relay mode) or of the PLC itself (direct modes). A bare host/IP is accepted; in relay mode a full URL may also be given.. | ✅ |
connection_mode |
str |
How to reach the PLC: through the on-device PLC Relay, or directly over EtherNet/IP or Modbus TCP.. | ❌ |
relay_port |
int |
Port of the PLC Relay service (relay mode).. | ✅ |
request_timeout |
int |
Read timeout in seconds for each request to the PLC Relay service (relay mode). This must cover the relay's synchronous PLC batch transaction, which can run for seconds against a slow or disconnected PLC (especially Modbus / S7); if it is exceeded the request is abandoned and every tag in the batch is reported as a failure. Raise it for slow or flaky PLCs. (Connecting to the relay itself uses a separate short timeout, so a down relay still fails fast.). | ✅ |
processor_slot |
int |
EtherNet/IP processor slot of the PLC (direct EtherNet/IP mode).. | ✅ |
modbus_port |
int |
Modbus TCP port of the PLC (direct Modbus mode).. | ✅ |
modbus_unit_id |
int |
Modbus unit / slave id of the PLC (direct Modbus mode).. | ✅ |
disable_sink |
bool |
If True, skip the write to the PLC and return an empty result.. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to PLC Writer in version v1.
- inputs:
Image Stack,Anthropic Claude,Per-Class Confidence Filter,Color Visualization,Single-Label Classification Model,Perspective Correction,Corner Visualization,Roboflow Custom Metadata,Halo Visualization,Dynamic Zone,Keypoint Detection Model,Qwen-VL,JSON Parser,Email Notification,Object Detection Model,Background Color Visualization,Email Notification,Text Display,Image Preprocessing,Template Matching,Relative Static Crop,Florence-2 Model,VLM As Detector,OCR Model,OpenAI,Blur Visualization,Depth Estimation,Instance Segmentation Model,Stability AI Outpainting,Anthropic Claude,PLC EthernetIP,Buffer,Webhook Sink,Byte Tracker,Contrast Equalization,Mask Edge Snap,Moondream2,Line Counter,VLM As Detector,Google Gemini,Triangle Visualization,Overlap Filter,Time in Zone,Inner Workflow,First Non Empty Or Default,Detections Stabilizer,Keypoint Detection Model,VLM As Classifier,Roboflow Asset Library Attributes,Polygon Zone Visualization,Google Gemma API,Contrast Enhancement,Image Threshold,Line Counter Visualization,Distance Measurement,Camera Calibration,Detection Offset,ByteTrack Tracker,Expression,S3 Sink,Microsoft SQL Server Sink,Twilio SMS Notification,Detections Combine,Morphological Transformation,Camera Focus,Delta Filter,Size Measurement,Stability AI Inpainting,PTZ Tracking (ONVIF),Classification Label Visualization,Stitch OCR Detections,Event Writer,Byte Tracker,Switch Case,Dominant Color,Rate Limiter,Mask Visualization,Reference Path Visualization,Identify Outliers,Image Slicer,Byte Tracker,OPC UA Writer Sink,Dot Visualization,Cache Set,Identify Changes,Dynamic Crop,Path Deviation,Llama 3.2 Vision,BoT-SORT Tracker,Gaze Detection,Segment Anything 2 Model,OpenAI-Compatible LLM,Single-Label Classification Model,Overlap Analysis,QR Code Detection,Qwen3.5,Object Detection Model,Qwen 3.6 API,Detections Consensus,Multi-Label Classification Model,OpenAI,SAM 3,PLC Reader,Image Convert Grayscale,Instance Segmentation Model,Roboflow Dataset Upload,SAM 3,Detections Classes Replacement,Roboflow Dataset Upload,Instance Segmentation Model,PLC Writer,Qwen 3.5 API,OC-SORT Tracker,Seg Preview,VLM As Classifier,Line Counter,MoonshotAI Kimi,Stability AI Image Generation,Path Deviation,Trace Visualization,Qwen2.5-VL,Icon Visualization,SIFT Comparison,Morphological Transformation,SmolVLM2,LMM For Classification,Clip Comparison,Environment Secrets Store,Detections Merge,Halo Visualization,Data Aggregator,Google Gemma,Ellipse Visualization,Twilio SMS/MMS Notification,Polygon Visualization,Crop Visualization,Absolute Static Crop,Model Monitoring Inference Aggregator,OpenRouter,OpenAI,PLC ModbusTCP,Motion Detection,Heatmap Visualization,Detections Filter,Perception Encoder Embedding Model,Dimension Collapse,Barcode Detection,YOLO-World Model,Google Gemini,Clip Comparison,Google Gemini,Background Subtraction,Keypoint Visualization,CSV Formatter,Stitch Images,Florence-2 Model,Current Time,Detections List Roll-Up,OpenAI,Qwen3-VL,Slack Notification,CLIP Embedding Model,SIFT,Local File Sink,Multi-Label Classification Model,Cosine Similarity,Image Contours,Pixel Color Count,GLM-OCR,Image Slicer,Time in Zone,Semantic Segmentation Model,Stitch OCR Detections,Semantic Segmentation Model,Multi-Label Classification Model,QR Code Generator,Detection Event Log,Detections Transformation,Mask Area Measurement,Google Vision OCR,Image Blur,Property Definition,Roboflow Vision Events,Bounding Rectangle,SAM2 Video Tracker,Grid Visualization,Qwen3.5-VL,Llama 3.2 Vision,Velocity,Label Visualization,SIFT Comparison,Detections Stitch,Circle Visualization,SAM3 Video Tracker,Camera Focus,MoonshotAI Kimi,CogVLM,SAM 3 Interactive,Bounding Box Visualization,LMM,Continue If,Roboflow Visual Search,EasyOCR,Cache Get,Instance Segmentation Model,Pixelate Visualization,Keypoint Detection Model,SORT Tracker,Track Class Lock,Anthropic Claude,Object Detection Model,Time in Zone,MQTT Writer,Polygon Visualization,SAM 3,Model Comparison Visualization,Single-Label Classification Model - outputs:
Line Counter,MoonshotAI Kimi,Stability AI Image Generation,Trace Visualization,Path Deviation,Image Stack,Anthropic Claude,Icon Visualization,SIFT Comparison,Morphological Transformation,Color Visualization,LMM For Classification,Single-Label Classification Model,Perspective Correction,Corner Visualization,Roboflow Custom Metadata,Halo Visualization,Dynamic Zone,Qwen-VL,Keypoint Detection Model,Email Notification,Halo Visualization,Object Detection Model,Google Gemma,Background Color Visualization,Email Notification,Ellipse Visualization,Twilio SMS/MMS Notification,Text Display,Polygon Visualization,Crop Visualization,Image Preprocessing,Template Matching,Model Monitoring Inference Aggregator,OpenRouter,OpenAI,Florence-2 Model,OpenAI,Heatmap Visualization,Motion Detection,Perception Encoder Embedding Model,Blur Visualization,Depth Estimation,Instance Segmentation Model,Stability AI Outpainting,Anthropic Claude,YOLO-World Model,Google Gemini,Clip Comparison,Google Gemini,Keypoint Visualization,Webhook Sink,Florence-2 Model,Current Time,Contrast Equalization,OpenAI,Moondream2,Line Counter,Google Gemini,Triangle Visualization,Slack Notification,Time in Zone,CLIP Embedding Model,Multi-Label Classification Model,Local File Sink,Keypoint Detection Model,Pixel Color Count,GLM-OCR,Roboflow Asset Library Attributes,Polygon Zone Visualization,Google Gemma API,Time in Zone,Stitch OCR Detections,Line Counter Visualization,Semantic Segmentation Model,Distance Measurement,Image Threshold,Multi-Label Classification Model,QR Code Generator,Camera Calibration,S3 Sink,Microsoft SQL Server Sink,Twilio SMS Notification,Google Vision OCR,Image Blur,Morphological Transformation,Roboflow Vision Events,Size Measurement,PTZ Tracking (ONVIF),Stability AI Inpainting,Classification Label Visualization,Stitch OCR Detections,Event Writer,Qwen3.5-VL,Llama 3.2 Vision,Mask Visualization,Reference Path Visualization,Label Visualization,OPC UA Writer Sink,Dot Visualization,Cache Set,Dynamic Crop,Detections Stitch,Circle Visualization,Llama 3.2 Vision,Path Deviation,SAM3 Video Tracker,BoT-SORT Tracker,Gaze Detection,Segment Anything 2 Model,OpenAI-Compatible LLM,MoonshotAI Kimi,Single-Label Classification Model,CogVLM,Object Detection Model,SAM 3 Interactive,Qwen 3.6 API,Detections Consensus,Bounding Box Visualization,Multi-Label Classification Model,LMM,OpenAI,SAM 3,Instance Segmentation Model,Roboflow Visual Search,Roboflow Dataset Upload,SAM 3,Cache Get,Instance Segmentation Model,Detections Classes Replacement,Pixelate Visualization,Keypoint Detection Model,Instance Segmentation Model,Roboflow Dataset Upload,PLC Writer,Qwen 3.5 API,Anthropic Claude,Object Detection Model,Time in Zone,MQTT Writer,Polygon Visualization,SAM 3,Model Comparison Visualization,Single-Label Classification Model,Seg Preview
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
PLC Writer in version v1 has.
Bindings
-
input
tag(string): The single PLC tag to write. Relay and Direct (EtherNet/IP) modes use a tag name (e.g.camera_fault); Direct (Modbus TCP) mode usesarea:address(holding:100,coil:0; a bare number is a holding register, and onlyholdingregisters andcoils are writable, not the read-onlyinput/discreteareas). To write several tags, add one PLC Writer block per tag..value(*): The value to write to the tag. May be a fixed value or a reference to a workflow input or a previous step's output. Must be a boolean, integer, or float, except Direct (EtherNet/IP) mode, which also accepts strings (for Logix STRING tags)..depends_on(*): Optional reference to a step this write should run after, for when the write order matters but the tag/value are not themselves derived from that step. Dependencies are otherwise inferred from selector-valuedtag/value, so this is not needed for input- or step-driven writes..ip_address(string): Address of the PLC Relay (relay mode) or of the PLC itself (direct modes). A bare host/IP is accepted; in relay mode a full URL may also be given..relay_port(integer): Port of the PLC Relay service (relay mode)..request_timeout(integer): Read timeout in seconds for each request to the PLC Relay service (relay mode). This must cover the relay's synchronous PLC batch transaction, which can run for seconds against a slow or disconnected PLC (especially Modbus / S7); if it is exceeded the request is abandoned and every tag in the batch is reported as a failure. Raise it for slow or flaky PLCs. (Connecting to the relay itself uses a separate short timeout, so a down relay still fails fast.).processor_slot(integer): EtherNet/IP processor slot of the PLC (direct EtherNet/IP mode)..modbus_port(integer): Modbus TCP port of the PLC (direct Modbus mode)..modbus_unit_id(integer): Modbus unit / slave id of the PLC (direct Modbus mode)..disable_sink(boolean): If True, skip the write to the PLC and return an empty result..
-
output
Example JSON definition of step PLC Writer in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/plc_writer@v1",
"tag": "camera_fault",
"value": true,
"depends_on": "$steps.some_previous_step",
"ip_address": "127.0.0.1",
"connection_mode": "relay",
"relay_port": 8007,
"request_timeout": 10,
"processor_slot": 0,
"modbus_port": 502,
"modbus_unit_id": 1,
"disable_sink": false
}