EtherCAT Sync SSC/SoE Upload

Read data synchronously from slave device represented by service data object

  • Library:
  • 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 slave 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.

Ports

Output

expand all

Returns data received from the EtherCAT slave device. The data signal has the type specified in Data Type and vector dimension given by Dimension.

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

Parameters

expand all

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 data

  • Second field (bit 14 - 12): 0..7 for Parameter set

  • Third field (bit 11 - 0): 0..4095 for Data block number

Programmatic Use

Block Parameter: idn

Specify the decimal index of the drive.

SoE blocks only apply for motor controllers. A single slave can support one or more drive or motor channels. The drive number is the 0-based index of the drive or motor channel on this slave 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 slave.

Programmatic Use

Block Parameter: drive

To identify the data type for the IDN, check the slave 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

Specify the row dimension of data for this IDN.

To identify the dimension of data (vector size) for the IDN, check the slave documentation for the description of the IDN and the number of data type values (the dimension) it uses. Enter a value of 1. EtherCAT blocks support only scalars and vectors.

Programmatic Use

Block Parameter: sig_dim

To associate a block with an EtherCAT network, copy 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 slave that contains the IDN.

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

Programmatic Use

Block Parameter: slave_name

Enter the base sample time or a multiple of the base sample time. -1 means that 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 main task sample time, or the model can overload and stop.

Programmatic Use

Block Parameter: sample_time

Enter the number of milliseconds to wait for a response from the EtherCAT slave.

Programmatic Use

Block Parameter: timeout

Introduced in R2018b