Ethercat DC clock

More
2 years 9 months ago #290000 by Hakan
Replied by Hakan on topic Ethercat DC clock
It depends on the settings in ethercat-conf.xml how the synchronization between servo-thread and ethercat cyclic cycles takes place (or not).
The best way to ensure the servo-thread and ethercat cycles are out of phase is to use distributed clocks. Then the slaves execute very precisely in time but the servo-thread is not nearly as precise and out of phase (or if they just by luck happen to be in phase).
To synchronize ethercat slaves with the servo-thread the slaveuse the SM synchronization, that is the slave does its work when it receives a SM frame from the master. Which will be once per servo-thread if set up that way.
Try with refClockSyncCycles="-1" in the master line in ethercat-conf.xml.

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago #290077 by Coyote
Replied by Coyote on topic Ethercat DC clock

I might be wrong, but I don't think the ethercat bus needs to be synced with our servo-thread. It might update faster than this. Its just that very millisecond we can read or write to the bus. Remember we have an interconnecting driver so we don't control the master.
 
I do think: the trajectory has to be computed and then sent to EC slaves, With EC methods, traj. planner and EC master could run in separate parallel tasks, since the input states are 1 cycle old and computed output states are for 1 cycle ahead. 
But these threads shall execute at the exact same rate.

The jitter and phase shift are not so important, as the fact that clock discrepancy would accumulate over time and then we have a missing / overrun frame sometime. I have found a patch that Sacha did:

github.com/sittner/linuxcnc-ethercat/blo...-functions-2.8.patch

Basically it re-schedules the RT application with added time shift. The application in question is the EC master, which runs in servo thread. Not sure which RT threads are affected when adding this shift, or EC master runs completely indifferent.
 

Please Log in or Create an account to join the conversation.

Time to create page: 0.263 seconds
Powered by Kunena Forum