Effacer les filtres
Effacer les filtres

Synchronizing clocks with Simulink Realtime

13 vues (au cours des 30 derniers jours)
Daniel le 23 Juil 2014
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.

Réponses (2)

Gordon Weast
Gordon Weast le 24 Juil 2014
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 commentaire
Daniel le 24 Juil 2014
Déplacé(e) : Stefanie Schwarz le 5 Avr 2023
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!

Connectez-vous pour commenter.

Stefanie Schwarz
Stefanie Schwarz le 5 Avr 2023

Community Treasure Hunt

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

Start Hunting!

Translated by