EtherCAT Sync SSC/SoE Upload
Read data synchronously from subordinate device represented by service data object
Since R2020b
Libraries:
Simulink Real-Time /
EtherCAT
Description
The EtherCAT Sync SSC/SoE Upload block provides synchronous SERCOS interface (SErial Real time COmmunication Specification) over EtherCAT® (SoE) upload. The block selects an IDN in the specified subordinate device and sends an upload (read) request. The block then waits until it receives a response to the request or until the timeout period expires.
The response to an operation takes several ticks of the main task sample time. Assign the synchronous blocks a sample time slower than the main task sample time.
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
Output
Data — Data received from subordinate
device
numeric
Returns data received from the EtherCAT subordinate device. The data signal has the type specified in Data Type and a vector dimension given by Dimension.
Error — Report an EtherCAT network error
0
| integer
If no error occurs, this port transmits
0
. Otherwise, it transmits a
nonzero value. For list of error codes, see EtherCAT Error Codes.
Parameters
IDN — Identification Number
character vector
Identify parameters.
The documentation for your EtherCAT device specifies the IDN
values. You can select the IDN as a character vector that
represents a 16-bit integer (according to IEC 61800 -7 -204), such as
S-0-0150
or P-0-0150
with:
First field (bit 15):
S
for Standard data,P
for product-specific dataSecond field (bit 14 - 12):
0..7
for parameter setThird field (bit 11 - 0):
0..4095
for data-block number
Programmatic Use
Block Parameter:
idn |
Drive Number — Index number of the drive
integer
Specify the decimal index of the drive.
SoE blocks apply to only motor controllers. A single subordinate device can support one or more drive or motor channels. The drive number is the zero-based index of the drive or motor channel on this subordinate device at which this block is aimed. In SoE terminology, the drive is the logic that sends control signals to the motor. Typically, this logic is a small processor inside the subordinate device.
Programmatic Use
Block Parameter:
drive |
Data Type — Data type of the IDN
double
(default) | single
| int8
| uint8
| int16
| uint16
| int32
| uint32
| boolean
To identify the data type for the IDN, refer to the subordinate device documentation for the description of the IDN and the data type it uses. From the list, select the data type of the IDN.
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 data for this IDN
1
(default)
Specify the row dimension of data for this IDN.
To identify the dimension of data (vector size) for the IDN, refer to the subordinate device documentation for the description of the IDN and the number of data type values (the dimension) it uses. Enter the vector length as found in the SoE 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 the IDN
character vector
From the list, select the name of the device that contains the IDN.
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. The EtherCAT Sync SSC/SoE Download
block and the EtherCAT Sync SSC/SoE Uploadblock require at least three steps
of the main EtherCAT processing task. Select a sample time that is three times that of the
main task sample time or the model can overload and stop.
Programmatic Use
Block Parameter:
sample_time |
Timeout — Time to wait for response from subordinate device
numeric
Enter the maximum number of milliseconds to wait for a response from the EtherCAT subordinate device.
Programmatic Use
Block Parameter:
timeout |
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2020b
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)