<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto">Hi all,
<div dir="auto"><br>
</div>
<div dir="auto">I wanted to thank you all for your valuable advice. Now I'm acheiving near 3.5 kHz loop rate without a single datagram loss. My configured system is (just for reference): Ubuntu 16.04 with kernel 4.8.15-rt10(preempt_rt patched) and support for
native driver. I would like to ask another question: In the dc_user example I don't understand why the latency is measured that way. Could someone make it more clear? This latency is the latency of our application (the time the scheduler does to put our process
to running, so that our application can process the newly arrived datagram)? What quantity is measured exactly with this latency? Bonus: Can we measure the time the datagram does to leave and come back to the master, with wireshark accurately?</div>
<div dir="auto"><br>
</div>
<div dir="auto">Thank you in advance, </div>
<div dir="auto">Mike Karam</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">Στις Πέμ, 8 Μαρ 2018, 5:37 μ.μ. ο χρήστης Mike Karam <<a href="mailto:mike95gr@hotmail.com" target="_blank" rel="noreferrer">mike95gr@hotmail.com</a>> έγραψε:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Martin,<br>
<br>
thanks for the advice. It seems to me that the hard real time RT-Preempt patch<br>
cannot be avoided if I want to achieve my goal. I will keep that in mind and probably<br>
come back to that.<br>
<br>
Thanks again,<br>
Mike<br>
<font color="#aaaaaa"><br>
<br>
________________________________________<br>
Από: Mike Karam <<a href="mailto:mike95gr@hotmail.com" target="_blank" rel="noreferrer">mike95gr@hotmail.com</a>><br>
Στάλθηκε: Πέμπτη, 8 Μαρτίου 2018 5:09 μμ<br>
Προς: Jürgen Walter • DATATRONiQ<br>
Κοιν.: <a href="mailto:etherlab-users@etherlab.org" target="_blank" rel="noreferrer">
etherlab-users@etherlab.org</a><br>
Θέμα: Απ: [etherlab-users] AL status message 0x0036: "DC Sync0 Cycle Time"<br>
</font>
<div class="m_8798283950253797393elided-text"><br>
Hi Jurgen,<br>
<br>
thanks for your reply. I forgot to mention that I'm running the lowlatency package of kernel 4.8.0-58. The thing is that,<br>
the team wants 16.04 Ubuntu because of the ROS Kinetic development, so I don't think I can use<br>
a 3.x kernel (although last time I checked there is also a 4.x PREEMPT_RT patch also). I didn't think that<br>
soft-real time vs hard-real time makes such a difference. I will try and come back on that.<br>
Another observation of mine is that using Wireshark, the time the datagrams left and the time the datagrams came couldn't<br>
get less than 240 μs. Shouldn't the DC use of the master, change this time difference to something very small (e.g 100,50,20 μs),<br>
till there is synchronization loss or packet loss?<br>
<br>
Thanks again,<br>
Mike<br>
<br>
________________________________________<br>
Από: Jürgen Walter • DATATRONiQ <<a href="mailto:jw@datatroniq.com" target="_blank" rel="noreferrer">jw@datatroniq.com</a>><br>
Στάλθηκε: Πέμπτη, 8 Μαρτίου 2018 4:21 μμ<br>
Προς: Mike Karam<br>
Κοιν.: <a href="mailto:etherlab-users@etherlab.org" target="_blank" rel="noreferrer">
etherlab-users@etherlab.org</a><br>
Θέμα: Re: [etherlab-users] AL status message 0x0036: "DC Sync0 Cycle Time"<br>
<br>
Hi Mike,<br>
<br>
I was in a similar boat like you just not too long ago. So, first thing,<br>
you need to get your Linux system "real-time" --> best to use PREMPT_RT<br>
in the vanilla Kernel.<br>
<br>
That said, for using DC and > 1kHz I never got the "generic" driver to<br>
work. How about you downgrade to a 3.x kernel, e.g. 3.18 and use one of<br>
the supported drivers w/ patches for RT operation. That is what I did -<br>
I also bought a network interface card with a supported chipset and<br>
installed that into a PCIe slot.<br>
<br>
Since then, I am pretty much a happy camper.<br>
<br>
I hope this helps. Jürgen<br>
<br>
On 8 Mar 2018, at 14:23, Mike Karam wrote:<br>
<br>
> Hi,<br>
><br>
> I'm trying to create an EtherCAT communication with an XMC4800, using<br>
> IgH EtherCAT. I'm using 16.04 Ubuntu with 4.8.0-58 kernel. I<br>
> downloaded the code from sourceforge and run the code (a bit modified,<br>
> see attachment) found in examples/dc_user. If I use a loop frequency<br>
> of 1 KHz all things go well (despite some datagrams UNMATCHED<br>
> warnings). But if I increase the loop rate to 5 or 10 KHz I'm seeing<br>
> the error in the subject. My goal is at least 10Khz succesful (withoul<br>
> losses) communication. Below is the output I'm getting in the kernel<br>
> log:<br>
><br>
><br>
> Mar 8 14:42:31 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13658.296909] EtherCAT: Requesting master 0...<br>
> Mar 8 14:42:31 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13658.296912] EtherCAT: Successfully requested master 0.<br>
> Mar 8 14:42:31 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13658.296961] EtherCAT 0: Domain0: Logical address 0x00000000, 18<br>
> byte, expected working counter 3.<br>
> Mar 8 14:42:31 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13658.296962] EtherCAT 0: Datagram domain0-0-main: Logical offset<br>
> 0x00000000, 18 byte, type LRW at ffff91a5b5c9d858.<br>
> Mar 8 14:42:31 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13658.296981] EtherCAT 0: Master thread exited.<br>
> Mar 8 14:42:31 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13658.296983] EtherCAT 0: Starting EtherCAT-OP thread.<br>
> Mar 8 14:42:31 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13658.297040] EtherCAT WARNING 0: 15 datagrams UNMATCHED!<br>
> Mar 8 14:42:32 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13659.296406] EtherCAT WARNING 0: 13437 datagrams UNMATCHED!<br>
> Mar 8 14:42:32 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13659.297430] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 6725 times.<br>
> Mar 8 14:42:33 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13660.296475] EtherCAT WARNING 0: 13455 datagrams UNMATCHED!<br>
> Mar 8 14:42:33 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13660.298486] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 6734 times.<br>
> Mar 8 14:42:34 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13661.296543] EtherCAT WARNING 0: 13442 datagrams UNMATCHED!<br>
> Mar 8 14:42:34 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13661.299562] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 6726 times.<br>
> Mar 8 14:42:35 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13662.296611] EtherCAT WARNING 0: 13388 datagrams UNMATCHED!<br>
> Mar 8 14:42:35 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13662.300630] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 6700 times.<br>
> Mar 8 14:42:36 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13663.296679] EtherCAT WARNING 0: 13414 datagrams UNMATCHED!<br>
> Mar 8 14:42:36 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13663.301699] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 6715 times.<br>
> Mar 8 14:42:36 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13663.310699] EtherCAT WARNING 0-0: Slave did not sync after 5000 ms.<br>
> Mar 8 14:42:36 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13663.312411] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave<br>
> refused state change (PREOP + ERROR).<br>
> Mar 8 14:42:36 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13663.312949] EtherCAT ERROR 0-0: AL status message 0x0036: "DC Sync0<br>
> Cycle Time".<br>
> Mar 8 14:42:36 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13663.313501] EtherCAT 0-0: Acknowledged state PREOP.<br>
> Mar 8 14:42:37 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13664.296893] EtherCAT WARNING 0: 14550 datagrams UNMATCHED!<br>
> Mar 8 14:42:37 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13664.302791] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 7285 times.<br>
> Mar 8 14:42:38 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13665.296872] EtherCAT WARNING 0: 14323 datagrams UNMATCHED!<br>
> Mar 8 14:42:38 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13665.303849] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 7165 times.<br>
> Mar 8 14:42:39 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13666.296910] EtherCAT WARNING 0: 14357 datagrams UNMATCHED!<br>
> Mar 8 14:42:39 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13666.304931] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 7184 times.<br>
> Mar 8 14:42:40 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13667.296989] EtherCAT WARNING 0: 14185 datagrams UNMATCHED!<br>
> Mar 8 14:42:40 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13667.305995] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 7104 times.<br>
> Mar 8 14:42:41 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13668.297188] EtherCAT WARNING 0: 14166 datagrams UNMATCHED!<br>
> Mar 8 14:42:41 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13668.307062] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 7085 times.<br>
> Mar 8 14:42:42 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13669.297098] EtherCAT WARNING 0: 14209 datagrams UNMATCHED!<br>
> Mar 8 14:42:42 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13669.308106] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 7112 times.<br>
> Mar 8 14:42:43 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13670.297189] EtherCAT WARNING 0: 13986 datagrams UNMATCHED!<br>
> Mar 8 14:42:43 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13670.309191] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 7005 times.<br>
> Mar 8 14:42:44 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13671.297272] EtherCAT WARNING 0: 14235 datagrams UNMATCHED!<br>
> Mar 8 14:42:44 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13671.310255] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 7122 times.<br>
> Mar 8 14:42:45 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13672.297425] EtherCAT WARNING 0: 14340 datagrams UNMATCHED!<br>
> Mar 8 14:42:45 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13672.311322] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 7185 times.<br>
> Mar 8 14:42:46 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13673.297404] EtherCAT WARNING 0: 14455 datagrams UNMATCHED!<br>
> Mar 8 14:42:46 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13673.312406] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 7227 times.<br>
> Mar 8 14:42:47 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13674.297464] EtherCAT WARNING 0: 14545 datagrams UNMATCHED!<br>
> Mar 8 14:42:47 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13674.313523] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 7281 times.<br>
> Mar 8 14:42:48 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13675.297525] EtherCAT WARNING 0: 14760 datagrams UNMATCHED!<br>
> Mar 8 14:42:48 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13675.314541] EtherCAT WARNING: Datagram ffff91a5b5c9d858<br>
> (domain0-0-main) was SKIPPED 7384 times.<br>
> Mar 8 14:42:49 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13676.202128] EtherCAT 0: Releasing master...<br>
> Mar 8 14:42:49 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13676.202166] EtherCAT 0: Master thread exited.<br>
> Mar 8 14:42:49 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13676.202179] EtherCAT 0: Starting EtherCAT-IDLE thread.<br>
> Mar 8 14:42:49 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13676.202260] EtherCAT 0: Released.<br>
> Mar 8 14:42:49 mikekaram-HP-EliteBook-Folio-9470m kernel:<br>
> [13676.202274] EtherCAT ERROR 0-0: Failed to receive AL state<br>
> datagram: Datagram initialized.<br>
><br>
><br>
> What am I doing wrong? Could you please offer me some advice, to<br>
> achieve my goal?<br>
><br>
> Regards,<br>
><br>
> Mike Karamousadakis<br>
> _______________________________________________<br>
> etherlab-users mailing list<br>
> <a href="mailto:etherlab-users@etherlab.org" target="_blank" rel="noreferrer">etherlab-users@etherlab.org</a><br>
> <a href="http://lists.etherlab.org/mailman/listinfo/etherlab-users" rel="noreferrer noreferrer" target="_blank">
http://lists.etherlab.org/mailman/listinfo/etherlab-users</a><br>
<br>
<br>
</div>
</blockquote>
</div>
</body>
</html>