ReferenceDriverEthercatRead Task

EtherCAT Read Task

Learn how to acquire data from EtherCAT devices with Synnax.

For the task lifecycle, see Task Basics.

Before creating a read task, configure your EtherCAT devices and identify the TxPDOs (input PDOs) to read from each one.

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

Parameter Type Required Default Description
sample_rate number No 10 Samples per second (Hz)
stream_rate number No 5 Rate data is streamed to Synnax (Hz), must be ≤ sample_rate
channels array Yes - List of input channel configurations

Channel Configuration Modes

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.

Parameter Type Required Default Description
type string Yes - Must be "automatic"
device string Yes - Device key
pdo string Yes - PDO name from device discovery (e.g., status_word)
channel number Yes - 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.

Parameter Type Required Default Description
type string Yes - Must be "manual"
device string Yes - Device key
index number Yes - CoE object index (e.g., 0x6041)
sub_index number Yes - CoE object subindex (typically 0)
bit_length number No 16 Data width in bits (8, 16, 32, 64)
data_type string No uint16 Synnax data type (uint8, int16, float32, etc.)
channel number Yes - 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 on the same network interface.
  • Hardware timing -> EtherCAT timing is deterministic. The sample rate sets the EtherCAT cycle time.
  • Stream rate -> For sample rates under 50 Hz, set the stream rate equal to the sample rate. Above that, keep the stream rate under 50 Hz.

How-To