EtherCAT Slave Interface
Model-based development using MATLAB®/Simulink®
Hardware and Software Concept
The dSPACE EtherCAT slave interface consists of the DS5202 FPGA Base Board with a piggyback module, which carries up to two Beckhoff EtherCAT modules FB1111-0140. The bracket features two RJ45 plug sockets for connection to the EtherCAT network. The EtherCAT blockset mainly consists of a base library and a template model generator. A model containing all the necessary blocks is generated from a configuration M structure that has to be created by the user.
Interaction and Communication
The EtherCAT Slave solution supports the following methods for interaction and communication, and also provides the necessary Simulink blocks:
- State machine
- Interrupts
- CAN application protocol over EtherCAT (CoE)
- Cyclic communication (RX, TX)
The state machine block processes the master's request to transition to a new state. It checks the validity of the requested transition and performs the associated actions.
The interrupt block passes EtherCAT interrupts to the function model so that actions can be activated synchronously. Interrupts can be selected and masked without the template model having to be regenerated.
The solution also supports acyclic communication with CAN application protocol over EtherCAT. The object directory can be read from within the master, and individual entries can also be written. CANopen transfers can be executed in a background task. The mailbox provides 512 bytes for each direction and supports segmented transfers. A callback mechanism can be used to serve master accesses to the object directory with user C code.
Six sync managers are available for cyclic communication. This means that different cycle times can be implemented to optimize the bus load. The configuration of the process data communication is static during run time.