[Etherlab-users] Using DC to syncronise to reference slave clock
Celil Can Anık
bilko.celil at outlook.com
Fri Feb 25 08:51:35 CET 2022
Hi,
How should we use DC to synchronize to the slave reference clock? I implemented it by looking at the rtai_rtdm example. But it's not working as desired.
I guess I'm missing something. I would expect to change my sleep times to synchronize to slave clock. I couldn't see something like that.
* How can I stop drifting my send time relative to slave clock?
* Also, how can I measure the time I'm sending relative to cycle start of the slave clock? Can I just modulo the value returned by ecrt_master_reference_clock_time() to the cycle time?
For a little background:
We are using EtherCAT master for several years. We are using PREEMPT_RT patch with ubuntu 16.04, kernel 4.9.178. We had downloaded Gavin Lambert's unofficial patch sets a few years ago.
Normally we are using master PC as the master clock. This option is mentioned as option a in various mails in the mail list.
With this method we successfully integrated many servo motor drives from several vendors. We are generally using 1ms and 2ms cycle times on different machines.
We have recently added Mitsubishi Jet EtherCAT series to our database. Although this drive is working fine under lab conditions, somehow it gave synchronization errors from time to time at the machine. There are 4 drives and several IOs from Beckhoff on the bus.
Mitsubishi engineers claim that, the problem occurs because we are not synchronized to the slave reference clock. And ask us to change our mechanism to synchronize the master PC to the reference slave. This method is also described as the option b in mail list.
So I copied the related blocks from rtai_rtdm example in the examples folder. I modified RTAI specific functions to user space functions. At our lab we are testing two Jet drives connected to our master PC. The drives are changing to OP mode and I can control the position and speed.
There is no error in dmesg messages. Also no error on the display of the drives. But I hear knocking sounds in every few minutes while rotating.
It seems my send time is drifting relative to slave clock. But I don't see how can I stop drifting.
Best regards,
Celil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20220225/e55cd981/attachment.htm>
More information about the Etherlab-users
mailing list