<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=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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:blue;
text-decoration:underline;}
span.EmailStyle20
{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 90.0pt 72.0pt 90.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="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In my setup I have 2 ecat slaves with a large PDO data worth of 917 bytes.<o:p></o:p></p>
<p class="MsoNormal">A LRW datagram is allocated with a payload size of 1830 bytes:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[ 56.206673] EtherCAT DEBUG 0: Adding datagram pair with expected WC 6.<o:p></o:p></p>
<p class="MsoNormal">[ 56.206690] EtherCAT 0: Domain0: Logical address 0x00000000, 1830 byte, expected working counter 6.<o:p></o:p></p>
<p class="MsoNormal">[ 56.215738] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 1830 byte, type LRW at f1c6600c.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My suspicion is that in master.c, ec_master_send_datagrams(), the following piece of code<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> // does the current datagram fit in the frame?<o:p></o:p></p>
<p class="MsoNormal"> datagram_size = EC_DATAGRAM_HEADER_SIZE + datagram->data_size<o:p></o:p></p>
<p class="MsoNormal"> + EC_DATAGRAM_FOOTER_SIZE;<o:p></o:p></p>
<p class="MsoNormal"> if (cur_data - frame_data + datagram_size > ETH_DATA_LEN) {<o:p></o:p></p>
<p class="MsoNormal"> more_datagrams_waiting = 1;<o:p></o:p></p>
<p class="MsoNormal"> break;<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Gets stuck in an infinite loop because it can’t handle a datagram larger than 1500 bytes.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is my assumption correct?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Do you happen to have a code fix for this situation?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Nir.<o:p></o:p></p>
<p class="MsoNormal"><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> Etherlab-users <etherlab-users-bounces@etherlab.org>
<b>On Behalf Of </b>Geller, Nir<br>
<b>Sent:</b> Wednesday, April 21, 2021 11:10 AM<br>
<b>To:</b> 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>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Hello again,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">I tried running the ethercat master with a large PDO domain, but with no success.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Following<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><a href="https://sourceforge.net/u/uecasm/etherlab-patches/ci/default/tree/#readme">https://sourceforge.net/u/uecasm/etherlab-patches/ci/default/tree/#readme</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">I built the ethercat master with Gavin's patch set.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">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>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">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>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">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>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">When connecting 2 slaves the start up process of the ethercat master gets stuck after<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">EtherCAT DEBUG 0-main-0: Checking system time offset.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">And according to a wireshark capture the communication completely stops even though the application is still running cyclically.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Can you please help me setup a functional system?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Thanks,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Nir.<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Etherlab-users <<a href="mailto:etherlab-users-bounces@etherlab.org">etherlab-users-bounces@etherlab.org</a>> on behalf of Geller, Nir <<a href="mailto:nir.geller@servotronix.com">nir.geller@servotronix.com</a>><br>
<b>Sent:</b> Wednesday, March 31, 2021 1:48 PM<br>
<b>To:</b> 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> <<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</span> <o:p>
</o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">Hi Gavin,<br>
<br>
This sounds promising.<br>
<br>
With regard to cyclic real time performance, does fragmentation work properly and efficiently with slaves that support DC?<br>
<br>
Thanks,<br>
<br>
Nir.<br>
<br>
-----Original Message-----<br>
From: Gavin Lambert <<a href="mailto:gavin.lambert@tomra.com">gavin.lambert@tomra.com</a>>
<br>
Sent: Tuesday, March 30, 2021 9:40 AM<br>
To: Geller, Nir <<a href="mailto:nir.geller@servotronix.com">nir.geller@servotronix.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<br>
<br>
Yes, it splits to multiple packets automatically. Just be careful to not use more data than your cycle rate will allow.<br>
<br>
Note that initialization and configuration of a large number of slaves is very slow by default, as it occurs in series.<br>
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).<br>
<br>
<br>
Gavin Lambert<br>
Senior Software Developer<br>
<br>
<br>
<br>
<br>
COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New Zealand<br>
Switchboard: +49 2630 96520 | <a href="https://www.tomra.com">https://www.tomra.com</a><br>
<br>
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.<br>
-----Original Message-----<br>
From: Geller, Nir<br>
Sent: Tuesday, 30 March 2021 1:23 am<br>
To: 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<br>
<br>
Hi,<br>
<br>
Thanks for your reply.<br>
<br>
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?<br>
<br>
Nir.<br>
<br>
-----Original Message-----<br>
From: Etherlab-users <<a href="mailto:etherlab-users-bounces@etherlab.org">etherlab-users-bounces@etherlab.org</a>> On Behalf Of Richard Hacker<br>
Sent: Monday, March 29, 2021 3:09 PM<br>
To: <a href="mailto:etherlab-users@etherlab.org">etherlab-users@etherlab.org</a><br>
Subject: Re: [Etherlab-users] Running a large number of slaves<br>
<br>
EtherCAT and the master are not limited to the ethernet packet size.<br>
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.<br>
<br>
Physically EtherCAT can address ~64k slaves on a network.<br>
<br>
On 2021-03-29 13:22, Geller, Nir wrote:<br>
> Hi There,<br>
><br>
> I'm trying to setup one ethercat master with a very large number of <br>
> ethercat slaves.<br>
><br>
> The first obstacle I'm thinking about is a very large amount of data <br>
> sent over PDO each cycle, that will definitely exceed 1500 bytes.<br>
><br>
> In order to address this issue I want to understand if it is possible <br>
> to send more than one frame each cycle?<br>
><br>
> Another method could be using jumbo frames. Does the ethercat master <br>
> support that?<br>
><br>
> Does anybody have practical experience with such a setup?<br>
><br>
> Thanks,<br>
><br>
> Nir.<br>
><br>
><br>
<br>
Mit freundlichem Gruß<br>
<br>
Richard Hacker<br>
<br>
--<br>
------------------------------------------------------------------------<br>
<br>
Richard Hacker M.Sc.<br>
<a href="mailto:richard.hacker@igh.de">richard.hacker@igh.de</a><br>
Tel.: +49 201 / 36014-16<br>
<br>
Ingenieurgemeinschaft IgH<br>
Gesellschaft für Ingenieurleistungen mbH Nordsternstraße 66<br>
D-45329 Essen<br>
<br>
Amtsgericht Essen HRB 11500<br>
USt-Id.-Nr.: DE 174 626 722<br>
Geschäftsführung:<br>
- Dr.-Ing. Siegfried Rotthäuser<br>
- Dr. Sven Beermann, Prokurist<br>
Tel.: +49 201 / 360-14-0<br>
<a href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.igh.de%2F&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cc94214e8fb1b48f0029e08d8f2ad5668%7C4308d118edd143008a37cfeba8ad5898%7C0%7C1%7C637526173602822005%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=YcXsqSHNccIDDwhMlXvDi8fk5qDl1QtsqUBW%2FPJWZ0Y%3D&reserved=0">https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.igh.de%2F&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cc94214e8fb1b48f0029e08d8f2ad5668%7C4308d118edd143008a37cfeba8ad5898%7C0%7C1%7C637526173602822005%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=YcXsqSHNccIDDwhMlXvDi8fk5qDl1QtsqUBW%2FPJWZ0Y%3D&reserved=0</a><br>
<br>
------------------------------------------------------------------------<br>
--<br>
Etherlab-users mailing list<br>
<a href="mailto:Etherlab-users@etherlab.org">Etherlab-users@etherlab.org</a><br>
<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%7Cc94214e8fb1b48f0029e08d8f2ad5668%7C4308d118edd143008a37cfeba8ad5898%7C0%7C1%7C637526173602822005%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=R5I8zS%2BgfoqIZDkHkRulUESJ7MZZWEG5Dua7uAqBxQs%3D&reserved=0">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cc94214e8fb1b48f0029e08d8f2ad5668%7C4308d118edd143008a37cfeba8ad5898%7C0%7C1%7C637526173602822005%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=R5I8zS%2BgfoqIZDkHkRulUESJ7MZZWEG5Dua7uAqBxQs%3D&reserved=0</a><br>
--<br>
Etherlab-users mailing list<br>
<a href="mailto:Etherlab-users@etherlab.org">Etherlab-users@etherlab.org</a><br>
<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%7Cc94214e8fb1b48f0029e08d8f2ad5668%7C4308d118edd143008a37cfeba8ad5898%7C0%7C1%7C637526173602822005%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=R5I8zS%2BgfoqIZDkHkRulUESJ7MZZWEG5Dua7uAqBxQs%3D&reserved=0">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=04%7C01%7Cgavin.lambert%40tomra.com%7Cc94214e8fb1b48f0029e08d8f2ad5668%7C4308d118edd143008a37cfeba8ad5898%7C0%7C1%7C637526173602822005%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=R5I8zS%2BgfoqIZDkHkRulUESJ7MZZWEG5Dua7uAqBxQs%3D&reserved=0</a><br>
-- <br>
Etherlab-users mailing list<br>
<a href="mailto:Etherlab-users@etherlab.org">Etherlab-users@etherlab.org</a><br>
<a href="https://lists.etherlab.org/mailman/listinfo/etherlab-users">https://lists.etherlab.org/mailman/listinfo/etherlab-users</a><o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>