<div dir="ltr"><div>Hi,</div><div>I am setting up a environment for development an test.</div><div>In order to make it easy to replicate at different sites it is running in a virtual machine inside Oracle VM VirtualBox Manager.</div>
<div>The EtherCAT slaves are connected to a dedicated bridged interface using the generic Ethernet driver.</div><div>As you understand this is not a high performance system.</div><div> </div><div>Before activating the master it takes below 1 sec for scanning the bus with 5 slaves.</div>
<div>When starting the userspace application and activating the master for cyclic operation the rescan take very long time. It seems that the rescan gets slower when cycle time are long. In my application I am using 10HZ cycle time.</div>
<div>In the attached logs the time for scanning is about 3 minutes.</div><div>During the rescan period the processor load increase significantly (* 20) but the packets on the bus stays constant at 10 packets pr. sec.</div>
<div> </div><div>Anyone having experience how to reduce time for scanning?</div><div> </div><div>I can reduce the cycle time downto 100HZ but the scan time is still long.</div><div>A downside is that I get more timeout / unmatched packets.</div>
<div> </div><div>Anyone having ideas what causing packet loss?</div><div> </div><div><div>The virtual machine is running </div><div>Linux 10.04 LTS </div><div>gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3 is used for compilation<br>
</div><div>I have attached three logs showing syslog output</div><div> </div><div>More details and examples can be added if needed.<br><br>Any comments welcome.<br><br>Best regards<br>Steffen Dalgard<br>SINTEF ICT<br>Norway<br>
</div></div><div> </div><div> </div><div>"SYSLOG messages when starting up Master"</div><div>Apr 30 09:29:09 ecmaster-vm kernel: [86526.177110] EtherCAT: Master driver 1.5.1 41dc9a4a0f76<br>Apr 30 09:29:09 ecmaster-vm kernel: [86526.178626] EtherCAT: 1 master waiting for devices.<br>
Apr 30 09:29:09 ecmaster-vm kernel: [86526.184362] ec_generic: EtherCAT master generic Ethernet device module 1.5.1 41dc9a4a0f76<br>Apr 30 09:29:09 ecmaster-vm kernel: [86526.184375] EtherCAT: Accepting 08:00:27:BF:57:AC as main device for master 0.<br>
Apr 30 09:29:09 ecmaster-vm kernel: [86526.184391] EtherCAT 0: Starting EtherCAT-IDLE thread.<br>Apr 30 09:29:09 ecmaster-vm kernel: [86526.184423] EtherCAT 0: Link state of ecm0 changed to UP.<br>Apr 30 09:29:09 ecmaster-vm kernel: [86526.188311] EtherCAT 0: 5 slave(s) responding on main device.<br>
Apr 30 09:29:09 ecmaster-vm kernel: [86526.188315] EtherCAT 0: Slave states on main device: PREOP.<br>Apr 30 09:29:09 ecmaster-vm kernel: [86526.193124] EtherCAT 0: Scanning bus.<br>Apr 30 09:29:10 ecmaster-vm kernel: [86526.774874] EtherCAT 0: Bus scanning completed in 580 ms.<br>
Apr 30 09:29:10 ecmaster-vm kernel: [86526.774879] EtherCAT 0: Using slave 0 as DC reference clock.</div><div>Apr 30 09:31:20 ecmaster-vm kernel: [86656.548051] EtherCAT WARNING 0: 1 datagram TIMED OUT!<br>Apr 30 09:35:17 ecmaster-vm kernel: [86894.412791] EtherCAT WARNING 0: 1 datagram TIMED OUT!<br>
Apr 30 09:35:17 ecmaster-vm kernel: [86894.412811] EtherCAT WARNING 0: 1 datagram UNMATCHED!<br>Apr 30 09:36:04 ecmaster-vm kernel: [86940.780824] EtherCAT WARNING 0: 2 datagrams TIMED OUT!<br>Apr 30 09:36:04 ecmaster-vm kernel: [86940.780842] EtherCAT WARNING 0: 2 datagrams UNMATCHED!<br>
</div><div> </div><div>"SYSLOG messages when starting application" </div><div>Apr 30 09:38:49 ecmaster-vm kernel: [87106.284019] EtherCAT: Requesting master 0...<br>Apr 30 09:38:49 ecmaster-vm kernel: [87106.284231] EtherCAT: Successfully requested master 0.<br>
Apr 30 09:38:49 ecmaster-vm kernel: [87106.284279] EtherCAT 0: Domain0: Logical address 0x00000000, 2 byte, expected working counter 3.<br>Apr 30 09:38:49 ecmaster-vm kernel: [87106.284284] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 2 byte, type LRW.<br>
Apr 30 09:38:49 ecmaster-vm kernel: [87106.284287] EtherCAT 0: Domain1: Logical address 0x00000002, 0 byte, expected working counter 0.<br>Apr 30 09:38:49 ecmaster-vm kernel: [87106.284668] EtherCAT 0: Master thread exited.<br>
Apr 30 09:38:49 ecmaster-vm kernel: [87106.284671] EtherCAT 0: Starting EtherCAT-OP thread.<br>Apr 30 09:38:49 ecmaster-vm kernel: [87106.285073] EtherCAT WARNING 0: 1 datagram UNMATCHED!<br>Apr 30 09:38:56 ecmaster-vm kernel: [87113.384968] EtherCAT 0: Domain 0: Working counter changed to 2/3 (2+0).<br>
Apr 30 09:38:59 ecmaster-vm kernel: [87116.386563] EtherCAT 0: Domain 0: Working counter changed to 3/3 (3+0).<br>Apr 30 09:39:00 ecmaster-vm kernel: [87117.288055] EtherCAT 0: Slave states on main device: PREOP, OP.<br></div>
<div> </div><div> </div><div>"SYSLOG messages when forcing bus rescan by extracting and inserting one of the slaves"</div><div>Apr 30 09:41:25 ecmaster-vm kernel: [87261.585150] EtherCAT 0: Domain 0: Working counter changed to 2/3 (2+0).<br>
Apr 30 09:41:25 ecmaster-vm kernel: [87261.585644] EtherCAT 0: 4 slave(s) responding on main device.<br>Apr 30 09:41:25 ecmaster-vm kernel: [87262.085167] EtherCAT 0: Scanning bus.<br>Apr 30 09:44:02 ecmaster-vm kernel: [87418.885938] EtherCAT 0: Bus scanning completed in 157196 ms.<br>
Apr 30 09:44:02 ecmaster-vm kernel: [87418.885953] EtherCAT 0: Using slave 0 as DC reference clock.<br>Apr 30 09:44:04 ecmaster-vm kernel: [87420.685695] EtherCAT 0: 5 slave(s) responding on main device.<br>Apr 30 09:44:04 ecmaster-vm kernel: [87420.685710] EtherCAT 0: Slave states on main device: INIT, PREOP, OP.<br>
Apr 30 09:44:04 ecmaster-vm kernel: [87421.185114] EtherCAT 0: Scanning bus.<br>Apr 30 09:47:25 ecmaster-vm kernel: [87621.985808] EtherCAT 0: Bus scanning completed in 201196 ms.<br>Apr 30 09:47:25 ecmaster-vm kernel: [87621.985825] EtherCAT 0: Using slave 0 as DC reference clock.<br>
Apr 30 09:47:30 ecmaster-vm kernel: [87627.184968] EtherCAT 0: Domain 0: Working counter changed to 3/3 (3+0).<br>Apr 30 09:47:31 ecmaster-vm kernel: [87628.088202] EtherCAT 0: Slave states on main device: PREOP, OP.<br></div>
<div><br> </div></div>