Skip to content

PLC EthernetIP

Class: PLCBlockV1

Source: inference.enterprise.workflows.enterprise_blocks.sinks.PLCethernetIP.v1.PLCBlockV1

This PLC Communication block integrates a Roboflow Workflow with a PLC using Ethernet/IP communication. It can: - Read tags from a PLC if mode='read'. - Write tags to a PLC if mode='write'. - Perform both read and write in a single run if mode='read_and_write'.

Parameters depending on mode: - If mode='read' or mode='read_and_write', tags_to_read must be provided. - If mode='write' or mode='read_and_write', tags_to_write must be provided.

If a read or write operation fails, an error message is printed to the terminal, and the corresponding entry in the output dictionary is set to a generic "ReadFailure" or "WriteFailure" message.

Type identifier

Use the following identifier in step "type" field: roboflow_core/sinks@v1to add the block as as step in your workflow.

Properties

Name Type Description Refs
name str Enter a unique identifier for this step..
plc_ip str IP address of the target PLC..
mode str Mode of operation: 'read', 'write', or 'read_and_write'..
tags_to_read List[str] List of PLC tag names to read. Applicable if mode='read' or mode='read_and_write'..
tags_to_write Dict[str, Union[float, int, str]] Dictionary of tags and the values to write. Applicable if mode='write' or mode='read_and_write'..

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 EthernetIP in version v1.

Input and Output Bindings

The available connections depend on its binding kinds. Check what binding kinds PLC EthernetIP in version v1 has.

Bindings
  • input

    • plc_ip (string): IP address of the target PLC..
    • tags_to_read (list_of_values): List of PLC tag names to read. Applicable if mode='read' or mode='read_and_write'..
    • tags_to_write (dictionary): Dictionary of tags and the values to write. Applicable if mode='write' or mode='read_and_write'..
    • depends_on (*): Reference to the step output this block depends on..
  • output

Example JSON definition of step PLC EthernetIP in version v1
{
    "name": "<your_step_name_here>",
    "type": "roboflow_core/sinks@v1",
    "plc_ip": "192.168.1.10",
    "mode": "read",
    "tags_to_read": [
        "camera_msg",
        "sku_number"
    ],
    "tags_to_write": {
        "camera_fault": true,
        "defect_count": 5
    },
    "depends_on": "$steps.some_previous_step"
}