EtherCAT Async SDO Download
Transmit data asynchronously to subordinate device represented by service data object
Since R2020b
Libraries:
Simulink Real-Time /
EtherCAT
Description
The EtherCAT Async SDO Download block selects a CANopen register by Index value in the specified EtherCAT® subordinate device and sends a write request. The block then immediately continues processing its input data.
Examples
EtherCAT Protocol with Beckhoff Analog IO Subordinate Devices EL3062 and EL4002
Communicate with EtherCAT devices using the Beckhoff® analog I/O terminals EL3062 and EL4002.
EtherCAT Protocol with Beckhoff Digital IO Subordinate Devices EL1004 and EL2004
Communicate with EtherCAT devices using the Beckhoff digital I/O terminals EL1004 and EL2004.
EtherCAT Protocol Sequenced Writing SoE Subordinate Device Configuration Variables
Use SoE blocks and a simple state machine to write configuration values to variables that can only be written before going to EtherCAT Op state.
EtherCAT Protocol Sequenced Writing CoE Subordinate Device Configuration Variables
Use CoE blocks and a simple state machine to write configuration values to variables that can only be written before going to EtherCAT Op state.
EtherCAT Protocol Detect Network Failure and Reset
Use the EtherCAT Notifications block to detect a failure in the connected network and to restart the network when the failure is corrected.
EtherCAT Protocol Motor Velocity Control with Accelnet Drive
Control the velocity of a motor by using EtherCAT communication.
EtherCAT Protocol Motor Position Control with Accelnet Drive
Control the position of a motor by using EtherCAT communication.
Generate ENI Files for EtherCAT Devices
Generate EtherCAT network information (ENI) files to use in Simulink® Real-Time™ with EtherCAT devices.
Ports
Input
Data — Data to write to subordinate
device
numeric
Input data for writing to the EtherCAT subordinate device.
Enable — Enables block to download data
int32
A value of 0
disables downloads. A value greater
than or equal to 1
enables the block to download
data.
Output
Status — Status of data transfer
0
| 1
| 2
| 3
Status of asynchronous data transfer:
0
— Mailbox transfer object idle, transfer not running1
— Mailbox transfer object running, transfer not complete2
— Transfer successfully executed3
— Error occurred during transfer request
Error — Report an EtherCAT network error
0
| integer
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
Index — Index of CANopen register
integer
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 |
Access Mode — Select access mode for CoE variables
Single Subindex
(default) | Complete Access
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 |
Subindex — Subindex of CANopen register
integer
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 |
Data Type — Data type of CANopen register
double
(default) | single
| int8
| uint8
| int16
| uint16
| int32
| uint32
| boolean
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 |
Dimension — Dimension of CANopen register
1
(default)
Specify the row and column dimension of the CANopen register.
Enter the vector length as found in the CoE description for the subordinate device in its manual.
Programmatic Use
Block Parameter:
sig_dim |
Network Device Index — EtherCAT network identifier
0
(default) | 0-11
To associate a block with an EtherCAT network, enter the Network Device Index value from the EtherCAT Init block representing that network into the Network Device Index for the block.
Programmatic Use
Block Parameter:
device_id |
SubDevice Name — Name of device that contains CANopen register
character vector
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:
subdevice_name |
Sample time — Sample time of block
-1
(default) | numeric
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 R2020bR2022a: Complete Access Mode
You can select the access mode for the EtherCAT Async SDO Upload block and EtherCAT Async SDO Download block.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)