EtherCAT master in Simulink Desktop Real-Time

조회 수: 26 (최근 30일)
Maximilian Partenfelder
Maximilian Partenfelder 2017년 12월 15일
편집: Stefanie Schwarz 2023년 5월 12일
Hello,
is it possible to use a model containing the SimulinkRealTime.etherCat blocksets in the Simulink Desktop Real-Time environment? I would like to avoid using an embedded real-time target and use my computer for the task. AFAIK EtherCAT master doesn't need any special hardware requirements and can be run with any ethernet network adapter. Is it possible to use the Real-Time desktop environment to access the computers ethernet card and use it with the EtherCAT master stack to communicate with slaves?
Thank you in advance.
Best regards Max Partenfelder
  댓글 수: 3
Artyom
Artyom 2019년 8월 21일
Would be interested to know too.
Max van Meer
Max van Meer 2019년 8월 25일
I'm definitely interested as well.

댓글을 달려면 로그인하십시오.

답변 (2개)

Ivo Houtzager
Ivo Houtzager 2020년 7월 7일
See example on the File Exchange Simple EtherCAT Master for Simulink Windows Desktop which uses the SOEM library and WinPcap driver. It works only in normal or accelerator mode with Simulink Desktop Real-Time block. External mode will not work, because the clang compiler is too basic to compile the SOEM library. Also distributed clock feature will not work as the Simulink Desktop Real-Time execution block has no feature to synchronize its clock with the clock of the EtherCAT slave. Alternatively, an example with self made real-time execution block is provided which sample time can be synchronized based on the slave distributed clock.

Stefanie Schwarz
Stefanie Schwarz 2021년 10월 12일
편집: Stefanie Schwarz 2023년 5월 12일
The short answer is no. Simulink Real-Time (SLRT) and Simulink Desktop Real-Time (SLDRT) are fundamentally different products and you cannot use driver blocks from one product with the other product.
SLDRT does not support EtherCAT. Ivo's comment looks like a possible workaround but this EtherCAT Master will not run in the actual real-time kernel. See the following post to understand what different the simulation modes mean in the SLDRT context:

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by