ReferenceDriverEthercatRead Task

EtherCAT Read Task

Learn how to acquire data from EtherCAT devices with Synnax.

For task lifecycle management, see the Task Basics page.

Prerequisites

Before creating a read task, ensure you have:

  1. Configured EtherCAT devices discovered on your network.
  2. Identified the TxPDOs (input PDOs) you want to read from each 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
namestringYes-Human-readable task name
sample_ratenumberYes-Samples per second (Hz)
stream_ratenumberNosample_rateRate data is streamed to Synnax (Hz), must be ≤ sample_rate
data_savingbooleanNofalseEnable permanent storage in Synnax
auto_startbooleanNofalseAutomatically start task after configuration
channelsarrayYes-List of input channel configurations

Channel Configuration Modes

EtherCAT read tasks support two channel configuration modes: Automatic and Manual. Automatic mode is recommended for most users.

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

Automatic Channel

Reads data from a TxPDO using the PDO name for automatic configuration.

ParameterTypeRequiredDefaultDescription
typestringYes-Must be "automatic"
devicestringYes-Device key
pdostringYes-PDO name from device discovery (e.g., status_word)
channelnumberYes-Synnax 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 Channel

Reads data from a TxPDO using explicit CoE addressing.

ParameterTypeRequiredDefaultDescription
typestringYes-Must be "manual"
devicestringYes-Device key
indexnumberYes-CoE object index (e.g., 0x6041)
subIndexnumberYes-CoE object subindex (typically 0)
bitLengthnumberYes-Data width in bits (8, 16, 32, 64)
dataTypestringYes-Synnax data type (uint8, int16, float32, etc.)
channelnumberYes-Synnax 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

CoE (CAN over EtherCAT) addressing uses a 16-bit index and 8-bit subindex. Common servo drive objects include status word (0x6041), position actual (0x6064), and velocity actual (0x606C).

Important Rules

  • Network constraint -> All channels must use devices from the same network interface.
  • Sample rates -> All channels in a task sample at the same rate. Create separate tasks for different rates.
  • One running task per channel -> A channel can only receive live data from one task at a time.
  • Hardware timing -> EtherCAT provides deterministic timing. The sample rate determines the EtherCAT cycle time.
  • Stream rate optimization -> For high sample rates (> 1 kHz), set stream rate lower than sample rate to reduce network overhead. For low sample rates (< 50 Hz), set stream rate equal to sample rate.

How-To

Console

Python

TypeScript