<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">Hello list, </p>
<p dir="auto">I have been fighting with an ethercat slave (measurement device from imc) over the past week. I got it somewhat (mostly?) working but I am seeing really a lot of the dreaded "datagrams UNMATCHED" in syslog.</p>
<p dir="auto">My setup is an APU2 (AMD Chipset but "Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)" - <a href="https://pcengines.ch/apu2.htm" style="color:#3983C4">https://pcengines.ch/apu2.htm</a>) with Ubuntu 12.04 and a "low latency" kernel 3.18 installed - to my delight (after doing ./bootstrap.sh) I found the option "--enable-igb" available with "./configure --help" (it was not available on the 3.2 and 3.13 (or some earlier experiments with a newer distro and Kernel 4.4)). I enabled it and after "make && make modules && make install && make modules_install" I can do "/etc/init.d/ethercat start" and the module loads with:</p>
<pre style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; margin-left:15px; margin-right:15px; max-width:90vw; overflow-x:auto; padding:5px" bgcolor="#F7F7F7"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0" bgcolor="#F7F7F7">ec_igb 0000:01:00.0 eth0: igb: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
</code></pre>
<p dir="auto">Next, I have adapted the main.c in "examples/dc_user"</p>
<ol>
<li value="1">customising the PDO section and inserting my output of "ethercat cstruct"</li>
<li value="2">changing the frequency to: "#define FREQUENCY 5000" (this is so I can get a DC cycle time of 200 microseconds (working fine in TwinCat 3)) </li>
<li value="3">reading (some of the) mapped PDOs in the cyclic task</li>
<li value="4">customizing "ecrt_slave_config_dc" (fixed DC cycle time, nothing else works with this slave): ecrt_slave_config_dc(sc, 0x0300, 200000, 0, 0, 0);</li>
</ol>
<p dir="auto">I can see from the logs that the DC setup succeeds and the slaves goes into OP (it is the only slave, a 1:1 direct connection).<br>
I can also confirm that the PDO exchange works so far because the data I am reading makes sense.</p>
<p dir="auto">Yet, my syslog essentially gets flooded with those two</p>
<pre style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; margin-left:15px; margin-right:15px; max-width:90vw; overflow-x:auto; padding:5px" bgcolor="#F7F7F7"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0" bgcolor="#F7F7F7">EtherCAT WARNING 0: 58 datagrams UNMATCHED!
EtherCAT WARNING: Datagram f66b3b8c (domain0-0-main) was SKIPPED 29 times.
</code></pre>
<p dir="auto">In addition - when leaving the "check_domain_state()" call enabled, I am seeing those (warnings?):</p>
<pre style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; margin-left:15px; margin-right:15px; max-width:90vw; overflow-x:auto; padding:5px" bgcolor="#F7F7F7"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0" bgcolor="#F7F7F7">Domain1: WC 0.
Domain1: State 0.
Domain1: WC 1.
Domain1: State 2.
Domain1: WC 0.
Domain1: State 0.
Domain1: WC 1.
</code></pre>
<p dir="auto">When I reduce the "FREQUENCY" back to 1000 the problems pretty much disappear; however, my problem is that I need to run the DC cycle at 200 microseconds (each channel uses PDOs with 10 real/float values - I need to read each channel 5000x per second in order to get all 50.000 measurement samples).</p>
<p dir="auto">I have also tried this setup on a newer Ubuntu with Kernel 4.4 and the generic driver - the results are essentially the same.</p>
<p dir="auto">I am really not sure how to proceed from here - should I give the Xenomai a try? Or buy another PCI/Intel network card (PRO/GT - what model works still with the e1000/e drivers?) - or am I in general out of luck because 200us DC cycles are completely unrealistic with the ec_master? </p>
<p dir="auto">Any help would be <em>greatly</em> appreciated!! Jürgen </p>
</div>
</div>
</body>
</html>