<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi <span lang="EN-NZ">Graeme,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">I tested the patch and it seems to be working.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">Thanks a lot for your help!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">Nir.</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From:</b> Graeme Foot <Graeme.Foot@touchcut.com> <br>
<b>Sent:</b> Thursday, May 6, 2021 4:39 AM<br>
<b>To:</b> Geller, Nir <nir.geller@servotronix.com>; Gavin Lambert <gavin.lambert@tomra.com>; Richard Hacker <ha@igh.de>; etherlab-users@etherlab.org<br>
<b>Subject:</b> RE: [Etherlab-users] Running a large number of slaves<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-NZ">Hi Nir,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">I had a bit more of a look. The "if (fmmu->logical_domain_offset >= candidate_start)" condition ratchets up the candidate_start until the FMMU is not overlapped with any previous FMMUs.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">However, the test as to whether the FMMU no longer fits in the current datagram should occur for all FMMUs.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">I have attached a patch that moves the size check outside of the above condition. In doing so I have also changed datagram_first_fmmu to be set to valid_fmmu.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">I have also added a number of checks to ensure the combined size of overlapped FMMUs, that need to be handled as a block, do not exceed the maximum datagram size.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">Please note that I haven’t checked to see if it compiles.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ">Graeme.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From:</b> Graeme Foot <br>
<b>Sent:</b> Thursday, 6 May 2021 10:49<br>
<b>To:</b> 'Geller, Nir' <<a href="mailto:nir.geller@servotronix.com">nir.geller@servotronix.com</a>>; Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com">gavin.lambert@tomra.com</a>>; Richard Hacker <<a href="mailto:ha@igh.de">ha@igh.de</a>>;
<a href="mailto:etherlab-users@etherlab.org">etherlab-users@etherlab.org</a><br>
<b>Subject:</b> RE: [Etherlab-users] Running a large number of slaves<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Hi Nir,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I don't use overlapping PDO’s and don't know the constraints on them, but looking at the code, if you remove the "if (fmmu->logical_domain_offset >= candidate_start)" condition there will be a couple of problems.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">1) When creating the first datagram the "emplace_datagram()" call will receive an incorrect data size. The data size is calculated by "valid_start - datagram_offset". "valid_start" for the current FMMU assumes that
it is at the end of the previous FMMU, but due to the overlap it is still at the start of the previous FMMU. On the other hand it looks like the datagrams working counter will include counts for the first FMMU, and be missed for the second datagram. The
domain working counter should however be correct.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">2) It looks like a slave with more than 2 overlapping FMMU's can stack their tx and rx data separately. If a datagram fills up after the first 2 FMMU's the data will be split between two datagrams which probably won't
work at all. e.g. if 3 won’t fit, 1 & part of 2 will end up in the first datagram, the rest of 2, 3 & 4 will end up in the second datagram:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ" style="font-family:"Courier New"">rx: ---1---- ---3---<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ" style="font-family:"Courier New"">tx: ------2----- ---4----<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">(I have come across slaves with more than 2 FMMU’s, but don’t know if they can also be overlapped.)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">So, I don’t think this is the correct fix.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">There is a “TODO overlapping PDOs" section in slave_config.c that look’s like it is a thought on how to deal with the problem, but it looks like it is trying to align pairs of rx/tx data rather than allowing the example
in #2 above.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I suspect the answer will be for “ec_domain_finish()” to refer back to the slave and if it has overlapping pdo’s make sure all pdo’s from the slave make it into the same datagram. I’m out of time to look further at
the moment.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Regards,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Graeme.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="mso-fareast-language:EN-NZ">-----Original Message-----<br>
From: Etherlab-users <<a href="mailto:etherlab-users-bounces@etherlab.org">etherlab-users-bounces@etherlab.org</a>> On Behalf Of Geller, Nir<br>
Sent: Wednesday, 5 May 2021 21:20<br>
To: Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com">gavin.lambert@tomra.com</a>>; Richard Hacker <<a href="mailto:ha@igh.de">ha@igh.de</a>>;
<a href="mailto:etherlab-users@etherlab.org">etherlab-users@etherlab.org</a><br>
Subject: Re: [Etherlab-users] Running a large number of slaves</span><span lang="EN-NZ"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I think I got caught in a very specific situation that isn't handled properly by the code.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I will try to describe it more accurately.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The last slave in the topology supports overlapping PDOs, therefore Rx and Tx FMMUs logical_domain_offset have the same value.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Suppose until the last slave the accumulated domain size is 1400, the last slave's Rx PDO size is 30, and the Tx PDO size is 150.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The last slave's Rx FMMU is handled first by the loop.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The condition<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">if (fmmu->logical_domain_offset + fmmu->data_size - datagram_offset > (EC_MAX_DATA_SIZE)) is not met, and candidate_start is set to the value of the Rx FMMU logical_domain_offset.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The Tx FMMU is handled second by the loop, but this time the condition if (fmmu->logical_domain_offset >= candidate_start) is not met.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Being the last slave in the topology, the loop ends, and only 1 LRW datagram in size > 1500 is created after the condition if (domain->data_size > datagram_offset)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Removing completely the condition<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">if (fmmu->logical_domain_offset >= candidate_start)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">fixes the error, but I'm not sure if it safe.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">What do you think?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Thanks,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Nir.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">-----Original Message-----<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">From: Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com"><span style="color:windowtext;text-decoration:none">gavin.lambert@tomra.com</span></a>><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Sent: Wednesday, May 5, 2021 1:25 AM<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">To: Geller, Nir <<a href="mailto:nir.geller@servotronix.com"><span style="color:windowtext;text-decoration:none">nir.geller@servotronix.com</span></a>>; Richard Hacker <<a href="mailto:ha@igh.de"><span style="color:windowtext;text-decoration:none">ha@igh.de</span></a>>;
<a href="mailto:etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Subject: RE: [Etherlab-users] Running a large number of slaves<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I've never used overlapped PDOs myself, but something doesn't sound right in your description below.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">As I understand it, overlapping only supports overlapping the input and output FMMUs on the same slave; you can never overlap data from different slaves (otherwise they would corrupt the data). As such, while the
logical_domain_offset of the input and output of one slave might be the same, afterwards it should be incremented by the max of both and the next slave should always have a strictly higher value. (That appears to agree with the log message output.)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Gavin Lambert<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Senior Software Developer<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New Zealand<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Switchboard: +49 2630 96520 | <a href="https://www.tomra.com">
<span style="color:windowtext;text-decoration:none">https://www.tomra.com</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The information contained in this communication and any attachment is confidential and may be legally privileged. It should only be read by the person(s) to whom it is addressed. If you have received this communication
in error, please notify the sender and delete the communication.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">From: Geller, Nir <<a href="mailto:nir.geller@servotronix.com"><span style="color:windowtext;text-decoration:none">nir.geller@servotronix.com</span></a>><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Sent: Wednesday, 5 May 2021 2:27 am<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">To: Geller, Nir <<a href="mailto:nir.geller@servotronix.com"><span style="color:windowtext;text-decoration:none">nir.geller@servotronix.com</span></a>>; Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com"><span style="color:windowtext;text-decoration:none">gavin.lambert@tomra.com</span></a>>;
Richard Hacker <<a href="mailto:ha@igh.de"><span style="color:windowtext;text-decoration:none">ha@igh.de</span></a>>;
<a href="mailto:etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Subject: RE: [Etherlab-users] Running a large number of slaves<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Hi,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I've made some progress and now I can get all the slaves to OP and exchange data with the master.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Fragmentation is working properly and can be seen clearly in a wireshark capture.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I have 7 slaves that support overlapping PDOs with PDO domains of 68 and 241 bytes, and an 8th slave that doesn't support overlapping PDOs with PDO domains of 35 and 33 bytes.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">In dmesg, coming out of domain.c, ec_domain_add_fmmu_config():<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.299113] Domain 0: fmmu f08d0924 Added 68 bytes at 0.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.306251] Domain 0: fmmu f08d0944 Added 241 bytes at 0.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.317895] Domain 0: fmmu f08d1124 Added 68 bytes at 241.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.325476] Domain 0: fmmu f08d1144 Added 241 bytes at 241.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.337518] Domain 0: fmmu f08d1924 Added 68 bytes at 482.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.345279] Domain 0: fmmu f08d1944 Added 241 bytes at 482.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.357735] Domain 0: fmmu f08d2124 Added 68 bytes at 723.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.365580] Domain 0: fmmu f08d2144 Added 241 bytes at 723.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.378337] Domain 0: fmmu f08d2924 Added 68 bytes at 964.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.386187] Domain 0: fmmu f08d2944 Added 241 bytes at 964.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.403592] Domain 0: fmmu f08d3124 Added 68 bytes at 1205.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.411901] Domain 0: fmmu f08d3144 Added 241 bytes at 1205.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.425531] Domain 0: fmmu f08d3924 Added 68 bytes at 1446.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.433643] Domain 0: fmmu f08d3944 Added 241 bytes at 1446.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.447590] Domain 0: fmmu f08d0124 Added 35 bytes at 1687.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 78.454539] Domain 0: fmmu f08d0144 Added 33 bytes at 1722.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">So in the case of overlapping PDOs, both Rx and Tx FMMUs have logical_domain_offset of equal values. If a slave does not support overlapping PDOs, the FMMUs logical_domain_offset have different values.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Then in domain.c, ec_domain_finish(), in the loop list_for_each_entry(fmmu, &domain->fmmu_configs, list) The condition if (fmmu->logical_domain_offset >= candidate_start) is met when a slave's first FMMU is evaluated,
then candidate_start is added with fmmu->data_size.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The condition is never met with the second slave's FMMU, that bares the same value logical_domain_offset like the prior FMMU.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Completely removing the condition<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">if (fmmu->logical_domain_offset >= candidate_start)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">fixed the problem for me, though I'm not sure whether this code change is the best way to solve the problem.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Please share if you have any thoughts.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Thanks a lot for your support,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Nir.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">From: Etherlab-users <<a href="mailto:etherlab-users-bounces@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:etherlab-users-bounces@etherlab.org</span></a>> On Behalf Of Geller, Nir<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Sent: Sunday, April 25, 2021 4:00 PM<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">To: Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com"><span style="color:windowtext;text-decoration:none">mailto:gavin.lambert@tomra.com</span></a>>; Richard Hacker <<a href="mailto:ha@igh.de"><span style="color:windowtext;text-decoration:none">mailto:ha@igh.de</span></a>>;
<a href="mailto:etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Subject: Re: [Etherlab-users] Running a large number of slaves<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Hi Gavin,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Thanks for your reply.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The final system I am developing will run about 80 slaves, each with a PDO domain size of ~130 bytes.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I do not have such a number of slaves at my disposal, so I'm trying to somehow simulate a PDO domain that exceeds 1486 bytes in order to test the ecat master.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I created 2 slaves, each with a PDO domain of about 920 bytes.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I also asked myself how the data will be split between the ethernet frames.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">(Both slaves support overlapping PDOs).<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I expected that 2 LRW datagrams will be created, each carrying the PDO data intended for a specific slave and sent in a separate ethernet frame. Why should this be a problem?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The situation is that only 1 LRW datagram is created, in the size of 1830 bytes.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">This, of course, is not going to work.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">In datagram.c, ec_domain_finish(), <o:p>
</o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The if statement<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">if (fmmu->logical_domain_offset + fmmu->data_size - datagram_offset > EC_MAX_DATA_SIZE) { is never executed, but<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">/* Allocate last datagram pair, if data are left (this is also the case if<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"> * the process data fit into a single datagram) */ if (domain->data_size > datagram_offset) {<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Is executed only once.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Could you direct me more precisely where in the code a fix should be implemented?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Thanks,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Nir.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">From: Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com"><span style="color:windowtext;text-decoration:none">mailto:gavin.lambert@tomra.com</span></a>><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Sent: Friday, April 23, 2021 1:13 AM<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">To: Geller, Nir <<a href="mailto:nir.geller@servotronix.com"><span style="color:windowtext;text-decoration:none">mailto:nir.geller@servotronix.com</span></a>>; Richard Hacker <<a href="mailto:ha@igh.de"><span style="color:windowtext;text-decoration:none">mailto:ha@igh.de</span></a>>;
<a href="mailto:etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Subject: RE: [Etherlab-users] Running a large number of slaves<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The EtherCAT bus in general is not designed for that kind of thing. When you have a large PDO domain, it is supposed to be because you have a large number of smaller slaves, not a small number of large slaves.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I'm not sure exactly where the cutoff should be, but most likely any single slave wanting to exchange more than 300 bytes or so should probably be using SDO rather than PDO. (SDO mailboxes can be configured up to
1484 bytes, although that depends on slave implementation too and most only support a much smaller size.) Do you really need that amount of data each and every cycle?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The packet-splitting does work - I have systems where each cycle sends three PDO packets - but the largest amount of PDO data in any one slave in my network is about 200 bytes. Most slaves are a lot less.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Gavin Lambert<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Senior Software Developer<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New Zealand<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Switchboard: +64 96 34 00 88 | <a href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tomra.com%2F&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cef0038c509794b37b1c408d90f08b796%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637557352403228212%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=p6IUHnsiTnJZuQSABgihqJ%2BwLrbez8y8HuUCiHyja%2B0%3D&reserved=0">
<span style="color:windowtext;text-decoration:none">https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tomra.com%2F&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cef0038c509794b37b1c408d90f08b796%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637557352403228212%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=p6IUHnsiTnJZuQSABgihqJ%2BwLrbez8y8HuUCiHyja%2B0%3D&reserved=0</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The information contained in this communication and any attachment is confidential and may be legally privileged. It should only be read by the person(s) to whom it is addressed. If you have received this communication
in error, please notify the sender and delete the communication. <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">From: Geller, Nir <<a href="mailto:nir.geller@servotronix.com"><span style="color:windowtext;text-decoration:none">mailto:nir.geller@servotronix.com</span></a>><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Sent: Friday, 23 April 2021 1:39 am<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">To: Geller, Nir <<a href="mailto:nir.geller@servotronix.com"><span style="color:windowtext;text-decoration:none">mailto:nir.geller@servotronix.com</span></a>>; Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com"><span style="color:windowtext;text-decoration:none">mailto:gavin.lambert@tomra.com</span></a>>;
Richard Hacker <<a href="mailto:ha@igh.de"><span style="color:windowtext;text-decoration:none">mailto:ha@igh.de</span></a>>;
<a href="mailto:etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Subject: RE: [Etherlab-users] Running a large number of slaves<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Hi,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">In my setup I have 2 ecat slaves with a large PDO data worth of 917 bytes.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">A LRW datagram is allocated with a payload size of 1830 bytes:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 56.206673] EtherCAT DEBUG 0: Adding datagram pair with expected WC 6.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 56.206690] EtherCAT 0: Domain0: Logical address 0x00000000, 1830 byte, expected working counter 6.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">[ 56.215738] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 1830 byte, type LRW at f1c6600c.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">My suspicion is that in master.c, ec_master_send_datagrams(), the following piece of code<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"> // does the current datagram fit in the frame?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"> datagram_size = EC_DATAGRAM_HEADER_SIZE + datagram->data_size<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"> + EC_DATAGRAM_FOOTER_SIZE;<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"> if (cur_data - frame_data + datagram_size > ETH_DATA_LEN) {<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"> more_datagrams_waiting = 1;<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"> break;<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"> }<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Gets stuck in an infinite loop because it can't handle a datagram larger than 1500 bytes.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Is my assumption correct?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Do you happen to have a code fix for this situation?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Thanks,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Nir.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">From: Etherlab-users <<a href="mailto:etherlab-users-bounces@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:etherlab-users-bounces@etherlab.org</span></a>> On Behalf Of Geller, Nir<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Sent: Wednesday, April 21, 2021 11:10 AM<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">To: Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com"><span style="color:windowtext;text-decoration:none">mailto:gavin.lambert@tomra.com</span></a>>; Richard Hacker <<a href="mailto:ha@igh.de"><span style="color:windowtext;text-decoration:none">mailto:ha@igh.de</span></a>>;
<a href="mailto:etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Subject: Re: [Etherlab-users] Running a large number of slaves<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Hello again,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I tried running the ethercat master with a large PDO domain, but with no success.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Following<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><a href="https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fu%2Fuecasm%2Fetherlab-patches%2Fci%2Fdefault%2Ftree%2F%23readme&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cef0038c509794b37b1c408d90f08b796%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637557352403238205%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=k%2FpkYyFUxG3XschRFUI0ywGaThKmXoWtTR35zJ0MfUk%3D&reserved=0"><span style="color:windowtext;text-decoration:none">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fu%2Fuecasm%2Fetherlab-patches%2Fci%2Fdefault%2Ftree%2F%23readme&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cef0038c509794b37b1c408d90f08b796%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637557352403238205%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=k%2FpkYyFUxG3XschRFUI0ywGaThKmXoWtTR35zJ0MfUk%3D&reserved=0</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I built the ethercat master with Gavin's patch set.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">I'm running on a x86 Intel Atom dual core with linux kernel 3.18.48. Ethernet adapter is igb.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">To achieve a very large PDO volume I created 2 ecat slaves, each with PDO data worth of 917 bytes.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">When connecting only 1 slave, and running examples/user/ec_user_example I can raise the slave to OP and exchange data between the master and slave over PDO.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">When connecting 2 slaves the start up process of the ethercat master gets stuck after<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">EtherCAT DEBUG 0-main-0: Checking system time offset.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">And according to a wireshark capture the communication completely stops even though the application is still running cyclically.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Can you please help me setup a functional system?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Thanks,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Nir.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">________________________________________<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">From: Etherlab-users <<a href="mailto:etherlab-users-bounces@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:etherlab-users-bounces@etherlab.org</span></a>> on behalf of Geller, Nir <<a href="mailto:nir.geller@servotronix.com"><span style="color:windowtext;text-decoration:none">mailto:nir.geller@servotronix.com</span></a>><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Sent: Wednesday, March 31, 2021 1:48 PM<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">To: Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com"><span style="color:windowtext;text-decoration:none">mailto:gavin.lambert@tomra.com</span></a>>; Richard Hacker <<a href="mailto:ha@igh.de"><span style="color:windowtext;text-decoration:none">mailto:ha@igh.de</span></a>>;
<a href="mailto:etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:etherlab-users@etherlab.org</span></a> <<a href="mailto:etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:etherlab-users@etherlab.org</span></a>><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Subject: Re: [Etherlab-users] Running a large number of slaves
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Hi Gavin,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">This sounds promising.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">With regard to cyclic real time performance, does fragmentation work properly and efficiently with slaves that support DC?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Thanks,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Nir.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">-----Original Message-----<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">From: Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com"><span style="color:windowtext;text-decoration:none">mailto:gavin.lambert@tomra.com</span></a>><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Sent: Tuesday, March 30, 2021 9:40 AM<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">To: Geller, Nir <<a href="mailto:nir.geller@servotronix.com"><span style="color:windowtext;text-decoration:none">mailto:nir.geller@servotronix.com</span></a>>; Richard Hacker <<a href="mailto:ha@igh.de"><span style="color:windowtext;text-decoration:none">mailto:ha@igh.de</span></a>>;
<a href="mailto:etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Subject: RE: [Etherlab-users] Running a large number of slaves<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Yes, it splits to multiple packets automatically. Just be careful to not use more data than your cycle rate will allow.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Note that initialization and configuration of a large number of slaves is very slow by default, as it occurs in series.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The unofficial patchset changes this to occur in parallel (for groups at a time rather than the whole network, to avoid creating too many packets at once).<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Gavin Lambert<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Senior Software Developer<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New Zealand<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Switchboard: +49 2630 96520 | <a href="https://www.tomra.com">
<span style="color:windowtext;text-decoration:none">https://www.tomra.com</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">The information contained in this communication and any attachment is confidential and may be legally privileged. It should only be read by the person(s) to whom it is addressed. If you have received this communication
in error, please notify the sender and delete the communication.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">-----Original Message-----<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">From: Geller, Nir<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Sent: Tuesday, 30 March 2021 1:23 am<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">To: Richard Hacker <<a href="mailto:ha@igh.de"><span style="color:windowtext;text-decoration:none">mailto:ha@igh.de</span></a>>;
<a href="mailto:etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Subject: Re: [Etherlab-users] Running a large number of slaves<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Hi,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Thanks for your reply.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">You mean that in the case of a large amount of PDO data ( > 1500), a single invoke of ecrt_master_send(master) will result several frames sent out 1 after another?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Nir.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">-----Original Message-----<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">From: Etherlab-users <<a href="mailto:etherlab-users-bounces@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:etherlab-users-bounces@etherlab.org</span></a>> On Behalf Of Richard Hacker<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Sent: Monday, March 29, 2021 3:09 PM<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">To: <a href="mailto:etherlab-users@etherlab.org">
<span style="color:windowtext;text-decoration:none">mailto:etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Subject: Re: [Etherlab-users] Running a large number of slaves<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">EtherCAT and the master are not limited to the ethernet packet size.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">EtherCAT frames are automatically divided into smaller ethernet packets as required. As long as you're not exceeding physical limits, (like sending ~1,5kb at a rate of 1kHz), you should be fine.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Physically EtherCAT can address ~64k slaves on a network.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">On 2021-03-29 13:22, Geller, Nir wrote:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">> Hi There,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">> I'm trying to setup one ethercat master with a very large number of
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">> ethercat slaves.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">> The first obstacle I'm thinking about is a very large amount of data
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">> sent over PDO each cycle, that will definitely exceed 1500 bytes.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">> In order to address this issue I want to understand if it is possible
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">> to send more than one frame each cycle?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">> Another method could be using jumbo frames. Does the ethercat master
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">> support that?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">> Does anybody have practical experience with such a setup?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">> Thanks,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">> Nir.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Mit freundlichem Gruß<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Richard Hacker<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">--<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">------------------------------------------------------------------------<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Richard Hacker M.Sc.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><a href="mailto:richard.hacker@igh.de"><span style="color:windowtext;text-decoration:none">mailto:richard.hacker@igh.de</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Tel.: +49 201 / 36014-16<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Ingenieurgemeinschaft IgH<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Gesellschaft für Ingenieurleistungen mbH Nordsternstraße 66<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">D-45329 Essen<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Amtsgericht Essen HRB 11500<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">USt-Id.-Nr.: DE 174 626 722<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Geschäftsführung:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">- Dr.-Ing. Siegfried Rotthäuser<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">- Dr. Sven Beermann, Prokurist<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Tel.: +49 201 / 360-14-0<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><a href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.igh.de%2F&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cef0038c509794b37b1c408d90f08b796%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637557352403248203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=HprynbaLPszRU3rACdqT0tIs2ciTzXHvz8nDfuXX8KI%3D&reserved=0"><span style="color:windowtext;text-decoration:none">https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.igh.de%2F&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cef0038c509794b37b1c408d90f08b796%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637557352403248203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=HprynbaLPszRU3rACdqT0tIs2ciTzXHvz8nDfuXX8KI%3D&reserved=0</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">------------------------------------------------------------------------<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">--<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Etherlab-users mailing list<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><a href="mailto:Etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:Etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><a href="https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cef0038c509794b37b1c408d90f08b796%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637557352403248203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=y0wmPBDSmZDTSpCHOHZflDDl11yFx%2BfG8lf5pl5DuSA%3D&reserved=0"><span style="color:windowtext;text-decoration:none">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cef0038c509794b37b1c408d90f08b796%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637557352403248203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=y0wmPBDSmZDTSpCHOHZflDDl11yFx%2BfG8lf5pl5DuSA%3D&reserved=0</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">--<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Etherlab-users mailing list<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><a href="mailto:Etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:Etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><a href="https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cef0038c509794b37b1c408d90f08b796%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637557352403258190%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wdeq3mELf01pLN%2Fk%2Fy3dwq56qi49n1aDd7lKvfU%2BQi4%3D&reserved=0"><span style="color:windowtext;text-decoration:none">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cef0038c509794b37b1c408d90f08b796%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637557352403258190%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wdeq3mELf01pLN%2Fk%2Fy3dwq56qi49n1aDd7lKvfU%2BQi4%3D&reserved=0</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">--<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Etherlab-users mailing list<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><a href="mailto:Etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">mailto:Etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><a href="https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cef0038c509794b37b1c408d90f08b796%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637557352403258190%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wdeq3mELf01pLN%2Fk%2Fy3dwq56qi49n1aDd7lKvfU%2BQi4%3D&reserved=0"><span style="color:windowtext;text-decoration:none">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cef0038c509794b37b1c408d90f08b796%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637557352403258190%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wdeq3mELf01pLN%2Fk%2Fy3dwq56qi49n1aDd7lKvfU%2BQi4%3D&reserved=0</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">--<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ">Etherlab-users mailing list<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><a href="mailto:Etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">Etherlab-users@etherlab.org</span></a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-NZ"><a href="https://lists.etherlab.org/mailman/listinfo/etherlab-users"><span style="color:windowtext;text-decoration:none">https://lists.etherlab.org/mailman/listinfo/etherlab-users</span></a><o:p></o:p></span></p>
</div>
</body>
</html>