[etherlab-users] DC sync and arrival times of datagrams

Jeroen Proveniers j.proveniers at gmail.com
Wed May 21 10:48:54 CEST 2014


Interestingly, the master thinks it sends 5000 datagrams per second, as the
"ethercat master" command shows.

I took timestamps using debug level 2, and the scheduling is correct,
sometimes the delta between datagrams is 203us, but the next delta is 197
then. Average is a nice 200us.

It turned out the ACPI_PM timer we use as a timebase is apparently way off,
about 5% (the slave only receives about 4700 datagrams per second). We
changed it to HPET (with which we have had issues in the past I heard) and
it's basically spot on now.

I have to see how we get the master to use actually use slave #0 as
reference clock (it is set as reference but somehow not used I think).

Cheers,
Jeroen


On Mon, May 19, 2014 at 12:25 PM, Jeroen Van den Keybus <
jeroen.vandenkeybus at gmail.com> wrote:

> It looks like the master process isn't scheduling itself properly. To
> check, have the master log the timestamps you're using to synchronize
> the slaves (whatever you use as argument of
> ecrt_master_application_time()). If all is well, you should be sending
> timestamps with, on average, EXACTLY the cycle time (what you
> programmed to generate SYNC0 in the slaves) as time difference.
>
> Beware of rounding errors when scheduling the master process, as well
> as different timebases.
>
>
> J.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20140521/c18a474d/attachment-0003.htm>


More information about the Etherlab-users mailing list