Ethercat retrofit question

More
20 Mar 2022 09:21 #237782 by db1981
Replied by db1981 on topic Ethercat retrofit question
this pll errors are often related to jitter on the main_thread or by the network card.

Are you using the generic etherlab driver for the network card, in the past i had mostly troubles with rt8169 chip.

One way to solve this, could be to clock the lcnc task to the ethercat devices.
This could be done by setting refClockSyncCycles to "-1" but for this you would have to use the lcnc master version, or you would have to install an patch to an RIP 2.8 Version.

Search in the forum for "add-task-pll-functions", i have described this a few times.
The following user(s) said Thank You: Niko

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

More
27 Mar 2022 09:09 #238443 by Niko
Replied by Niko on topic Ethercat retrofit question
So this PLL patch is installed in the lcec_ec_master in you repo right ?
Also found the "add-task-pll-functions" in sittner's linuxcnc-ethercat repo .
Is that patch used for the kernel or the driver ?

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

More
27 Mar 2022 09:45 #238446 by db1981
Replied by db1981 on topic Ethercat retrofit question
Hi,

no, the lcec_ec_master in my repo is only an deb file with the ethercat master + special functions eoe, sii overwrite etc...

the patch in sittner linuxcnc-ethercat repo is the right one.

this patch has to be applied to linuxcnc/src and then linuxcnc has to be compiled again.
This patchs makes changes to the rtapi part of linuxcnc.

If you use 2.9 (master) then the patch is already in linuxcnc...

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

More
27 Mar 2022 10:42 #238449 by Niko
Replied by Niko on topic Ethercat retrofit question
OK . I taught the kernel needed recompiling .
So it's just a case of building 2.9 from git .

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

More
03 Apr 2022 16:03 - 03 Apr 2022 16:03 #239187 by Niko
Replied by Niko on topic Ethercat retrofit question
So I upgraded to 2.9 but the pll errors persist .
I also checked the ethernet controller and it's an intel i211 .
Is there a more appropriate driver for this ? Currently I'm running the generic one .
Also can I test jitter while the CNC is running and how can it be minimised ?
Last edit: 03 Apr 2022 16:03 by Niko.

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

More
03 Apr 2022 16:06 #239188 by db1981
Replied by db1981 on topic Ethercat retrofit question
did you change refClockSyncCycles in the ethercat-conf.xml to "-1" ?

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

More
03 Apr 2022 18:30 #239198 by rodw
Replied by rodw on topic Ethercat retrofit question

So I upgraded to 2.9 but the pll errors persist .
I also checked the ethernet controller and it's an intel i211 .
 

I wonder if the Intel NIC might benefit from the irq_coalescence settings that are suggested for Mesa configs?
linuxcnc.org/docs/devel/html/man/man9/hm...FACE%20CONFIGURATION

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

More
03 Apr 2022 18:55 - 03 Apr 2022 18:58 #239201 by Niko
Replied by Niko on topic Ethercat retrofit question
Yes, I changed that .
Should I change anything else in the slave setup lines ?

Edit :
I'll do that as well, Rod .
Last edit: 03 Apr 2022 18:58 by Niko.

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

More
03 Apr 2022 19:59 #239209 by db1981
Replied by db1981 on topic Ethercat retrofit question
to get shure that there exist no hardware / Nic errors.
Check with the command "ethercat master" for lost frames.
There should be no changes in the values while linuxcnc is running and your pll problem occurs.

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

More
17 Apr 2022 08:55 - 17 Apr 2022 09:37 #240447 by Niko
Replied by Niko on topic Ethercat retrofit question
OK, so the problem it obvious now . It takes slave 0 clock for reference . Should be slave 1.
Here's the output :
Master0
  Phase: Operation
  Active: yes
  Slaves: 7
  Ethernet devices:
    Main: 00:13:95:1c:cc:68 (attached)
      Link: UP
      Tx frames:   2310920
      Tx bytes:    780785312
      Rx frames:   2310919
      Rx bytes:    780784976
      Tx errors:   0
      Tx frame rate [1/s]:   1000   1000    999
      Tx rate [KByte/s]:    329.7  329.7  329.2
      Rx frame rate [1/s]:   1000   1000    999
      Rx rate [KByte/s]:    329.7  329.7  329.2
    Common:
      Tx frames:   2332606
      Tx bytes:    784265664
      Rx frames:   2332584
      Rx bytes:    784259604
      Lost frames: 22
      Tx frame rate [1/s]:   1000   1000    999
      Tx rate [KByte/s]:    329.7  329.7  329.2
      Rx frame rate [1/s]:   1000   1000    999
      Rx rate [KByte/s]:    329.7  329.7  329.2
      Loss rate [1/s]:          0      0      0
      Frame loss [%]:         0.0    0.0    0.0
  Distributed clocks:
    Reference clock:   Slave 0
    DC reference time: 703502574227961000
    Application time:  703502906860973789
                       2022-04-17 09:28:26.860973789


Which is odd as the first slave doesn't have a dcConf line .
Lost frames stays at 22 .
<masters>
	<master idx="0" appTimePeriod="1000000" refClockSyncCycles="-1">
		<slave idx="0" type="generic" vid="50414e43" pid="00087611" configPdos="false">
			<syncManager idx="2" dir="out">

			</syncManager>
			<syncManager idx="3" dir="in">

			</syncManager>
		</slave>
		<slave idx="1" type="generic" vid="000002E1" pid="00000000" configPdos="true">
			<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="660"/>
			<syncManager idx="2" dir="out">

			</syncManager>
			<syncManager idx="3" dir="in">

			</syncManager>
			</slave>
		<slave idx="2" type="generic" vid="000002E1" pid="00000000" configPdos="false">
		<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="1359"/>
			<syncManager idx="2" dir="out">

			</syncManager>
			<syncManager idx="3" dir="in">

			</syncManager>
		</slave>
		<slave idx="3" type="generic" vid="000002E1" pid="00000000" configPdos="false">
			<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="2079"/>
			<syncManager idx="2" dir="out">

			</syncManager>
			<syncManager idx="3" dir="in">

			</syncManager>
		</slave>
		<slave idx="4" type="generic" vid="000002E1" pid="00000000" configPdos="false">
		<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="2779"/>
			<syncManager idx="2" dir="out">

			</syncManager>
			<syncManager idx="3" dir="in">

			</syncManager>
		</slave>
		<slave idx="5" type="generic" vid="000002E1" pid="00000000" configPdos="false">
		<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="3499"/>
			<syncManager idx="2" dir="out">

			</syncManager>
			<syncManager idx="3" dir="in">

			</syncManager>
		</slave>
		<slave idx="6" type="generic" vid="000005be" pid="00000001" configPdos="true">
		<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="4139"/>
			<syncManager idx="2" dir="out">

			</syncManager>
			<syncManager idx="3" dir="in">

			</syncManager>
		</slave>
	</master>
</masters>
Those syncShift values are selected with this command :
ethercat graph DC | dot -Tsvg &gt; bus.svg
Is there anything wrong with this, and why is it selecting slave 0 for reference ?

Output of dmesg :

File Attachment:

File Name: dmesg.txt
File Size:11 KB
Attachments:
Last edit: 17 Apr 2022 09:37 by Niko.

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

Time to create page: 0.229 seconds
Powered by Kunena Forum