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:
Perception Encoder Embedding Model,Qwen 3.6 API,Object Detection Model,Llama 3.2 Vision,PLC Writer,Distance Measurement,Roboflow Visual Search Classifier,Polygon Zone Visualization,BoT-SORT Tracker,Contrast Equalization,Google Gemini,Background Subtraction,Twilio SMS Notification,Detections Filter,Detections Merge,VLM As Detector,Florence-2 Model,Dynamic Crop,Halo Visualization,SAM 3 Interactive,Seg Preview,Ellipse Visualization,Byte Tracker,Florence-2 Model,Line Counter,Cache Set,OpenAI,Data Aggregator,Time in Zone,Google Gemma,Byte Tracker,Buffer,Semantic Segmentation Model,Email Notification,Crop Visualization,Detections Consensus,Polygon Visualization,Keypoint Detection Model,Line Counter,Detections Combine,Object Detection Model,VLM As Classifier,PLC ModbusTCP,Google Gemini,Multi-Label Classification Model,Qwen3.5,Delta Filter,Object Detection Model,Expression,Time in Zone,Instance Segmentation Model,PP-OCR,Blur Visualization,Clip Comparison,EasyOCR,PLC EthernetIP,Segment Anything 2 Model,CSV Formatter,Color Visualization,Dynamic Zone,Image Convert Grayscale,Motion Detection,Stitch OCR Detections,Rate Limiter,Qwen 3.5 API,Current Time,Trace Visualization,Cache Get,PLC Reader,QR Code Generator,Google Gemini,Detections Stitch,Image Stack,Instance Segmentation Model,MoonshotAI Kimi,Microsoft SQL Server Sink,Continue If,Webhook Sink,Cosine Similarity,Pixelate Visualization,Stitch Images,Polygon Visualization,Dimension Collapse,Morphological Transformation,SmolVLM2,Template Matching,Image Slicer,Environment Secrets Store,Barcode Detection,Roboflow Asset Library Attributes,Relative Static Crop,Mask Area Measurement,Model Monitoring Inference Aggregator,Clip Comparison,SIFT,Dominant Color,Moondream2,Property Definition,OpenRouter,Identify Changes,Qwen3.5-VL,Overlap Analysis,Email Notification,Triangle Visualization,Pixel Color Count,Roboflow Dataset Upload,SIFT Comparison,Keypoint Visualization,Keypoint Detection Model,Twilio SMS/MMS Notification,OPC UA Writer Sink,SIFT Comparison,Grid Visualization,SAM 3,JSON Parser,Absolute Static Crop,Velocity,Image Threshold,CogVLM,MQTT Writer,Detections List Roll-Up,OCR Model,GLM-OCR,Contrast Enhancement,Reference Path Visualization,Google Gemma API,Instance Segmentation Model,Mask Edge Snap,Detections Classes Replacement,PTZ Tracking (ONVIF),Image Blur,LMM,SAM 3,OpenAI,LMM For Classification,Time in Zone,Path Deviation,Instance Segmentation Model,Semantic Segmentation Model,Event Writer,Single-Label Classification Model,Keypoint Detection Model,Slack Notification,Heatmap Visualization,SORT Tracker,Circle Visualization,Perspective Correction,Camera Focus,Byte Tracker,ByteTrack Tracker,Multi-Label Classification Model,Stability AI Inpainting,OpenAI-Compatible LLM,SAM 3,Image Slicer,Roboflow Vision Events,Detections Transformation,Size Measurement,Local File Sink,Inner Workflow,SAM3 Video Tracker,Dot Visualization,QR Code Detection,Line Counter Visualization,Depth Estimation,Stitch OCR Detections,Anthropic Claude,Per-Class Confidence Filter,Qwen2.5-VL,Qwen3-VL,Single-Label Classification Model,Icon Visualization,Model Comparison Visualization,Camera Focus,Qwen-VL,Mask Visualization,Text Display,Gaze Detection,Stability AI Image Generation,Google Vision OCR,OpenAI,VLM As Detector,Identify Outliers,Detection Offset,Switch Case,Classification Label Visualization,S3 Sink,MoonshotAI Kimi,Overlap Filter,Anthropic Claude,Roboflow Dataset Upload,Detection Event Log,Bounding Box Visualization,VLM As Classifier,Image Contours,Stability AI Outpainting,Anthropic Claude,Roboflow Custom Metadata,Multi-Label Classification Model,SAM2 Video Tracker,Camera Calibration,Morphological Transformation,Detections Stabilizer,Path Deviation,Background Color Visualization,Corner Visualization,GeoTag Detection,Track Class Lock,Roboflow Visual Search,Llama 3.2 Vision,Bounding Rectangle,CLIP Embedding Model,Single-Label Classification Model,OpenAI,OC-SORT Tracker,Image Preprocessing,First Non Empty Or Default,YOLO-World Model,Halo Visualization,Label Visualization - outputs:
Keypoint Visualization,Twilio SMS/MMS Notification,OPC UA Writer Sink,Keypoint Detection Model,Perception Encoder Embedding Model,Qwen 3.6 API,Object Detection Model,SAM 3,Llama 3.2 Vision,PLC Writer,Distance Measurement,Roboflow Visual Search Classifier,Image Threshold,Polygon Zone Visualization,CogVLM,BoT-SORT Tracker,MQTT Writer,Contrast Equalization,Google Gemini,GLM-OCR,Reference Path Visualization,Twilio SMS Notification,Google Gemma API,Instance Segmentation Model,PTZ Tracking (ONVIF),Detections Classes Replacement,Florence-2 Model,Dynamic Crop,Halo Visualization,Image Blur,LMM,SAM 3 Interactive,Seg Preview,SAM 3,Ellipse Visualization,OpenAI,Florence-2 Model,Line Counter,LMM For Classification,Time in Zone,Cache Set,Semantic Segmentation Model,OpenAI,Path Deviation,Event Writer,Instance Segmentation Model,Time in Zone,Single-Label Classification Model,Google Gemma,Keypoint Detection Model,Slack Notification,Heatmap Visualization,Email Notification,Circle Visualization,Perspective Correction,Crop Visualization,Polygon Visualization,Detections Consensus,Keypoint Detection Model,Line Counter,Multi-Label Classification Model,Stability AI Inpainting,OpenAI-Compatible LLM,SAM 3,Object Detection Model,Google Gemini,Roboflow Vision Events,Multi-Label Classification Model,Size Measurement,Local File Sink,Object Detection Model,SAM3 Video Tracker,Dot Visualization,Line Counter Visualization,Time in Zone,Instance Segmentation Model,Depth Estimation,Stitch OCR Detections,Blur Visualization,Anthropic Claude,Segment Anything 2 Model,Color Visualization,Dynamic Zone,Motion Detection,Stitch OCR Detections,Single-Label Classification Model,Qwen 3.5 API,Trace Visualization,Icon Visualization,Current Time,Cache Get,Model Comparison Visualization,QR Code Generator,Google Gemini,Detections Stitch,Image Stack,Instance Segmentation Model,Qwen-VL,Mask Visualization,MoonshotAI Kimi,Microsoft SQL Server Sink,Text Display,Gaze Detection,Stability AI Image Generation,Google Vision OCR,Webhook Sink,OpenAI,Pixelate Visualization,S3 Sink,Classification Label Visualization,MoonshotAI Kimi,Polygon Visualization,Anthropic Claude,Roboflow Dataset Upload,Morphological Transformation,Bounding Box Visualization,Template Matching,Stability AI Outpainting,Anthropic Claude,Roboflow Custom Metadata,Multi-Label Classification Model,Roboflow Asset Library Attributes,Camera Calibration,Morphological Transformation,Path Deviation,Background Color Visualization,Model Monitoring Inference Aggregator,Clip Comparison,Corner Visualization,Moondream2,Roboflow Visual Search,OpenRouter,Qwen3.5-VL,Llama 3.2 Vision,Email Notification,CLIP Embedding Model,Single-Label Classification Model,Triangle Visualization,OpenAI,Pixel Color Count,Roboflow Dataset Upload,Image Preprocessing,SIFT Comparison,YOLO-World Model,Halo Visualization,Label Visualization
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
}