Important EtherCAT configuration option

More
1 year 4 weeks ago #335693 by Hakan
Info about an option in Linuxcnc-ethercat, lcec.

It is a new option but actually a rediscovered function.
It's an important function when using distributed clock synchronization,
as most do with servo and stepper motor drives.

The syncToRefClock option
Code:
<masters>   <master idx="0" appTimePeriod="1000000" refClockSyncCycles="5" syncToRefClock="true">

This will synchronize LinuxCNC's servo thread to EtherCAT's distributed clock,
the entire timing chain from LinuxCNC to the drives is then in sync.

When using distributed clock synchronization (a drive uses assignActivate="300")
you probably always want to use this option.
If you experience gravel noises, friction noises, etc., or acceleration and
torque spikes that recur every few minutes, this is the option to use.

There are some hal parameters associated with this option, check the documentation
github.com/linuxcnc-ethercat/linuxcnc-et...istributed-clocks.md

The option is just now introduced in the linuxcnc-ethercat code.
Over time this option will be generally available as distributions pick up the latest software version
of linuxcnc-ethercat. But you don't have to wait for it, the "rediscovery" means it is already in lcec,
you enable synchronization by setting a negative value to refClockSyncCycles.

A big thanks to Scott Laird for accepting the pull request and assisting with this.

Please Log in to join the conversation.

More
1 year 4 weeks ago #335706 by andypugh
Does this require changes in LinuxCNC or was the facility already there?

Please Log in to join the conversation.

More
1 year 4 weeks ago #335710 by Hakan
No change needed to linuxcnc rt functions.
There is already the functionality needed to modify the call to nanosleep.
There is now closed issue at github where I look at that github.com/LinuxCNC/linuxcnc/issues/3564

What is new is that the option is made an explicit option syncToRefClock.
The old way to invoking the functionality, which works already now, is to
set a negative refSyncClockCycles value. The "-" triggers the function to be on.
This continues to work in linuxcnc spirit, and is now made clear with
both documentation of the function and an explicit option.
 

Please Log in to join the conversation.

More
1 year 4 weeks ago #335727 by heaven
For a long time, I've been pondering this issue. I can't find any practical difference between free run and DC mode. Even though I've set up my motor to run in both modes, they seem identical or even worse in DC mode. It feels like I've never actually activated DC mode on LinuxCNC. This could really be a big discovery for me. Thank you very much!

Please Log in to join the conversation.

More
1 year 4 weeks ago #335744 by endian
It is pll stuff. It is the main and the most importnt feature of eyhercat. And yes it works like that..I have configured many stuff with -1 in refclock ..dc assign is not 300 every time ... If u have jerking need to increase it twice or triple..

How it will works .. will scotts config stay in negative or do we need rewrite existing stuff to new shape...,?

Please Log in to join the conversation.

More
1 year 4 weeks ago #335761 by Hakan
Hopefully now more people will learn to use the feature.
The original code is good and refreshingly free from documentation.
The git log says the feature was added 2018 and some iterations were made.

Anyway it is now documented somewhat and the hal pll parameters and pins are described.

Regarding backwards compatibility. I didn't dare to break that and I guess it is up to Scott
what he will do in the future. The coding guideline says to keep backwards compatibility.

Please Log in to join the conversation.

More
1 year 3 weeks ago #335976 by heaven
Today i tried active DC mode on and linuxcnc keep spamming this error:

Failed to get reference clock time: Input/output error
Failed to get reference clock time: Input/output error
Failed to get reference clock time: Input/output error
Failed to get reference clock time: Input/output error
Failed to get reference clock time: Input/output error
Failed to get reference clock time: Input/output error
Failed to get reference clock time: Input/output error

What causes this error? I'm using Linuxcnc 2.9.4 install from iso file.Here is my xml file and driver document:
drive.google.com/file/d/1ZTNpSNYDF0IL-IE...Bn4/view?usp=sharing
 

Attachment not found


 

Please Log in to join the conversation.

More
1 year 3 weeks ago #335981 by Hakan
Got that too yesterday. Traced it to a bad kernel think it was 6.14-38 or so. Upgrade the kernel is my advice.
 

Please Log in to join the conversation.

More
1 year 3 weeks ago #336079 by heaven
i 'm using 6.1.0-37-rt-amd64, which one should i update?

Please Log in to join the conversation.

More
1 year 3 weeks ago #336082 by Hakan
I didn't have that kernel version, so maybe that isn't the reason.
You got to have a well working system with no or at least very few "datagram UNMATCHED" in the syslog.
Check that first.

Please Log in to join the conversation.

Time to create page: 0.117 seconds
Powered by Kunena Forum