[etherlab-users] etherlab dc sync check

Jun Yuan j.yuan at rtleaders.com
Fri Jan 3 10:10:51 CET 2014


I'm not saying that the clock of the master is inaccurate. I'm saying
that the master software does a bad job in the calculation of the time
offset for each slave. It should not use jiffies in the calculation,
It should not have any correction at all. The app_time when the fprd
datagram to 0x0910 is sent, let's call it app_time_sent, is exactly
the time which should be compared to the system time of the slave.

> Why not just send once a current muster time to the first slave, then propagate(copy)  it to other slaves, and run PLL in the master that adjust itself to the fist slave (clock master)?

I think we cannot do that, it's against the ethercat standard :)
It actually works similiar like you suggest, just in another way. It
is something like this:
Ref clock -> Master clock
1. The master asks the first slave which time it has.
2. The master compares the timestamp with its app time, and sends a
new time offset to the first slave.
3. The first slave adds the new time offset to its clock. Now he has
the same time as the master. Drift is the next thing to worry about.

Other slave clock -> Ref clock
1. The master asks the slave which is not a ref clock which time it has.
2. The master compares the timestamp with the time of the ref clock,
and sends a new time offset to the slave.
3. The slave adds the new time offset to its clock. Now he shall have
the same time as the ref clock.

I believe the current etherlabmaster doesn't do well in step 2. it
could be done better.



More information about the Etherlab-users mailing list