ReferenceDriverEthercatWrite Task

EtherCAT Write Task

Learn how to send commands to EtherCAT devices with Synnax.

For the task lifecycle, see Task Basics.

Before creating a write task, configure your EtherCAT devices and identify the RxPDOs (output PDOs) to write to each one. State channels carry feedback read back from the device.

All channels in a task must use devices connected to the same network interface. Create separate tasks for devices on different EtherCAT networks.

Task Configuration Reference

ParameterTypeRequiredDefaultDescription
execution_ratenumberNo1000Rate (Hz) at which commands are sent to hardware
state_ratenumberNo25Rate (Hz) at which state channels are updated
channelsarrayYes-List of output channel configurations

Channel Configuration Modes

In automatic mode, you select a device and RxPDO name. The system automatically resolves the CoE index, subindex, and data type from the device’s ESI information.

Automatic Output Channel

Writes data to an RxPDO using the PDO name for automatic configuration.

ParameterTypeRequiredDefaultDescription
typestringYes-Must be "automatic"
devicestringYes-Device key
pdostringYes-PDO name from device discovery (e.g., control_word)
cmd_channelnumberYes-Synnax command channel key
state_channelnumberYes-Synnax state channel key

When to use automatic mode:

  • Device has complete ESI information
  • PDO names are visible in the Console device properties
  • Standard device configurations

Manual Mode

In manual mode, you specify the CoE index, subindex, and data type directly. Use this mode when the ESI file is incomplete or when working with non-standard PDO mappings.

Manual Output Channel

Writes data to an RxPDO using explicit CoE addressing.

ParameterTypeRequiredDefaultDescription
typestringYes-Must be "manual"
devicestringYes-Device key
indexnumberYes-CoE object index (e.g., 0x6040)
sub_indexnumberYes-CoE object subindex (typically 0)
bit_lengthnumberNo16Data width in bits (8, 16, 32, 64)
data_typestringNouint16Synnax data type (uint8, int16, float32, etc.)
cmd_channelnumberYes-Synnax command channel key
state_channelnumberYes-Synnax state channel key

When to use manual mode:

  • ESI file is incomplete or missing PDO definitions
  • Custom PDO mappings configured on the device
  • Non-standard devices
  • Accessing vendor-specific objects

Common servo drive RxPDO objects include control word (0x6040), target position (0x607A), and target velocity (0x60FF).

Important Rules

  • Network constraint -> All channels must use devices from the same network interface.
  • State rate -> Higher state rates provide faster feedback but increase network load. Typically 10-50 Hz is sufficient.
  • Execution rate -> Determines how frequently commands are sent to hardware. Higher rates provide more responsive control.

How-To