Main Content

EtherCAT Async SDO Download

Transmit data asynchronously to slave device represented by service data object

  • Library:
  • Simulink Real-Time / EtherCAT

  • EtherCAT Async SDO Download block

Description

The EtherCAT Async SDO Download block selects a CANopen register by Index value in the specified EtherCAT® slave and sends a write request. The block then immediately continues processing its input data.

Ports

Input

expand all

Input data for writing to the EtherCAT slave device.

A value of 0 disables downloads. A value greater than or equal to 1 enables the block to download data.

Output

expand all

Status of asynchronous data transfer:

  • 0 — Mailbox transfer object idle, transfer not running

  • 1 — Mailbox transfer object running, transfer not complete

  • 2 — Transfer successfully executed

  • 3 — Error occurred during transfer request

If no error occurs, this port transmits 0. Otherwise, it transmits a nonzero value. For a list of error codes, see EtherCAT Error Codes.

Parameters

expand all

Specify the hexadecimal (for example, 0x7) or decimal index of the CANopen register.

If you specify an invalid index, the block returns a 3 through the Status output and a nonzero value through the Error output.

Programmatic Use

Block Parameter: index

When the Access Mode is Complete Access, the protocol for CoE access to variables provides:

  • Access to all subindexes attached to a single index in the CoE dictionary for a single terminal device.

  • Read or write all subindexes in the time it would take to read or write a single one of them.

  • Simultaneously update all subindexes when a tuning parameter set is being written

  • Capture a simultaneous read of all subindexes

  • Allow use of EtherCAT devices that require complete access for configuration

Programmatic Use

Block Parameter: complete

Specify the hexadecimal (for example, 0x7) or decimal subindex of the CANopen register.

If you specify an invalid subindex, the block returns a nonzerio value through the Error output.

Programmatic Use

Block Parameter: subIndex

From the list, select the data type of the CANopen register.

If you select a data type that does not match the type of the entry, the block returns a nonzero value through the Error output.

Programmatic Use

Block Parameter: sig_type

Specify the row and column dimension of the CANopen register.

Enter the vector length as found in the CoE description for the slave in its manual.

Programmatic Use

Block Parameter: sig_dim

To associate a block with an EtherCAT network, enter the Device index value from the EtherCAT Init block representing that network into the Device index for the block.

Programmatic Use

Block Parameter: device_id

From the list, select the name of the device that contains the CANopen register.

The block populates this drop-down list with the contents of the configuration file.

Programmatic Use

Block Parameter: selected_slave

Enter the base sample time or a multiple of the base sample time. -1 means that the sample time is inherited.

Programmatic Use

Block Parameter: sample_time

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2020b

expand all