Synchronizing clocks with Simulink Realtime

조회 수: 11 (최근 30일)
Daniel
Daniel 2014년 7월 23일
답변: Stefanie Schwarz 2023년 4월 5일
Greetings,
I wish to synchronize the clock of my Simulink Realtime machine to two Windows machines.
I was considering using etherCAT. Can the etherCAT master blocks synchronize clocks with etherCAT slaves? I heard from someone that he wasn't sure if etherCAT for Simulink supported distributed clocks and wanted to check.
If not, are there other ways to synchronize the clock of a Simulink Realtime machine with Windows machines, over ethercat (preferred) or otherwise? I looked into NTP and PTP (IEEE 1588), but it doesn't look like there is Simulink Realtime support.
Daniel

답변 (2개)

Gordon Weast
Gordon Weast 2014년 7월 24일
This is an area that we're actively working on. Right now, there is no way to dynamically adjust the sample time interval of a running target machine. That's needed for any synchronization scheme where the target is a timing slave. We are working on a PTP implementation, but we're still not sure what release it will be in. This is what you need, but we don't have it yet.
With EtherCAT, we currently need to use the target's sample time be the timing master for devices on the EtherCAT network when we use distributed clocks. This isn't a way to synchronize with a Windows machine.
One way to get a target synchronized is to use an external interrupt to the target machine to run the model. Use a digital output from one of the Windows machines as the source of the signal you use. However, Windows has a lot more timing jitter than the target does when it runs from the timer. The long term average execution times are good from Windows, but not the individual times.
  댓글 수: 1
Daniel
Daniel 2014년 7월 24일
이동: Stefanie Schwarz 2023년 4월 5일
Greetings,
Thank you greatly for your help.
Responding to your second paragraph, if I had etherCAT slave software running on two Windows machines connected to my Simulink Realtime box set as an etherCAT master, would it be possible to synchronize the clocks that way?
I've also considered buying an etherCAT slave card from speedgoat and connecting my Simulink Realtime box to an etherCAT master on Windows and another etherCAT slave on WIndows. Is this plausible?
Finally, is there any current timetable for when the PTP implementation may be ready (ie next year, next five years, side project with no deadline)?
Thanks again for your help!
Daniel

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


Stefanie Schwarz
Stefanie Schwarz 2023년 4월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by