[Etherlab-users] Running a large number of slaves

Gavin Lambert gavin.lambert at tomra.com
Fri Apr 23 00:12:52 CEST 2021


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.

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?

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.


Gavin Lambert
Senior Software Developer

[cid:logo_compac_5dcf97ef-52f5-498c-8b9b-728410ddffaf.png]
[cid:compacicon_82e8a8c7-154a-4a32-9720-a5badb6258e0.png]<http://www.compacsort.com> [cid:facebook_fa85b924-53b9-45cc-8162-0564f64ec3a3.png] <https://www.facebook.com/Compacsort>  [cid:linkedin_4ec016ad-84fa-443c-85a3-b9615a4ccef8.png] <https://www.linkedin.com/company/compac-sorting-equipment/>  [cid:youtube_32142163-fc27-4aed-b14d-e8a377f98a6d.png] <https://vimeo.com/compacsort>  [cid:twitter_d89338d8-98c8-4b65-9a9e-7b1333160b0d.png] <https://twitter.com/compacsort>  [cid:insta2_1cd85de9-b3a2-4971-9904-52b2481a7c82.png] <https://www.instagram.com/compacsort/>

COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New Zealand
Switchboard: +64 96 34 00 88 | tomra.com<http://www.tomra.com>

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.

From: Geller, Nir <nir.geller at servotronix.com>
Sent: Friday, 23 April 2021 1:39 am
To: Geller, Nir <nir.geller at servotronix.com>; Gavin Lambert <gavin.lambert at tomra.com>; Richard Hacker <ha at igh.de>; etherlab-users at etherlab.org
Subject: RE: [Etherlab-users] Running a large number of slaves


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.

Hi,

In my setup I have 2 ecat slaves with a large PDO data worth of 917 bytes.
A LRW datagram is allocated with a payload size of 1830 bytes:

[   56.206673] EtherCAT DEBUG 0: Adding datagram pair with expected WC 6.
[   56.206690] EtherCAT 0: Domain0: Logical address 0x00000000, 1830 byte, expected working counter 6.
[   56.215738] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 1830 byte, type LRW at f1c6600c.


My suspicion is that in master.c, ec_master_send_datagrams(), the following piece of code

             // does the current datagram fit in the frame?
             datagram_size = EC_DATAGRAM_HEADER_SIZE + datagram->data_size
                 + EC_DATAGRAM_FOOTER_SIZE;
             if (cur_data - frame_data + datagram_size > ETH_DATA_LEN) {
                 more_datagrams_waiting = 1;
                 break;
             }

Gets stuck in an infinite loop because it can't handle a datagram larger than 1500 bytes.

Is my assumption correct?

Do you happen to have a code fix for this situation?

Thanks,

Nir.


From: Etherlab-users <etherlab-users-bounces at etherlab.org<mailto:etherlab-users-bounces at etherlab.org>> On Behalf Of Geller, Nir
Sent: Wednesday, April 21, 2021 11:10 AM
To: Gavin Lambert <gavin.lambert at tomra.com<mailto:gavin.lambert at tomra.com>>; Richard Hacker <ha at igh.de<mailto:ha at igh.de>>; etherlab-users at etherlab.org<mailto:etherlab-users at etherlab.org>
Subject: Re: [Etherlab-users] Running a large number of slaves


Hello again,

I tried running the ethercat master with a large PDO domain, but with no success.

Following
https://sourceforge.net/u/uecasm/etherlab-patches/ci/default/tree/#readme<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%7C69c3c87304b241e33b3108d905940454%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637546955571855490%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zPIH9KoPnpog%2BVGlqXG2mJ58VWV72Z%2FjzcmO3Uv2dvY%3D&reserved=0>
I built the ethercat master with Gavin's patch set.

I'm running on a x86 Intel Atom dual core with linux kernel 3.18.48. Ethernet adapter is igb.

To achieve a very large PDO volume I created 2 ecat slaves, each with PDO data worth of 917 bytes.

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.

When connecting 2 slaves the start up process of the ethercat master gets stuck after

EtherCAT DEBUG 0-main-0: Checking system time offset.

And according to a wireshark capture the communication completely stops even though the application is still running cyclically.

Can you please help me setup a functional system?

Thanks,

Nir.
________________________________
From: Etherlab-users <etherlab-users-bounces at etherlab.org<mailto:etherlab-users-bounces at etherlab.org>> on behalf of Geller, Nir <nir.geller at servotronix.com<mailto:nir.geller at servotronix.com>>
Sent: Wednesday, March 31, 2021 1:48 PM
To: Gavin Lambert <gavin.lambert at tomra.com<mailto:gavin.lambert at tomra.com>>; Richard Hacker <ha at igh.de<mailto:ha at igh.de>>; etherlab-users at etherlab.org<mailto:etherlab-users at etherlab.org> <etherlab-users at etherlab.org<mailto:etherlab-users at etherlab.org>>
Subject: Re: [Etherlab-users] Running a large number of slaves

Hi Gavin,

This sounds promising.

With regard to cyclic real time performance, does fragmentation work properly and efficiently with slaves that support DC?

Thanks,

Nir.

-----Original Message-----
From: Gavin Lambert <gavin.lambert at tomra.com<mailto:gavin.lambert at tomra.com>>
Sent: Tuesday, March 30, 2021 9:40 AM
To: Geller, Nir <nir.geller at servotronix.com<mailto:nir.geller at servotronix.com>>; Richard Hacker <ha at igh.de<mailto:ha at igh.de>>; etherlab-users at etherlab.org<mailto:etherlab-users at etherlab.org>
Subject: RE: [Etherlab-users] Running a large number of slaves

Yes, it splits to multiple packets automatically.  Just be careful to not use more data than your cycle rate will allow.

Note that initialization and configuration of a large number of slaves is very slow by default, as it occurs in series.
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).


Gavin Lambert
Senior Software Developer




COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New Zealand
Switchboard: +49 2630 96520 | https://www.tomra.com

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.
-----Original Message-----
From: Geller, Nir
Sent: Tuesday, 30 March 2021 1:23 am
To: Richard Hacker <ha at igh.de<mailto:ha at igh.de>>; etherlab-users at etherlab.org<mailto:etherlab-users at etherlab.org>
Subject: Re: [Etherlab-users] Running a large number of slaves

Hi,

Thanks for your reply.

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?

Nir.

-----Original Message-----
From: Etherlab-users <etherlab-users-bounces at etherlab.org<mailto:etherlab-users-bounces at etherlab.org>> On Behalf Of Richard Hacker
Sent: Monday, March 29, 2021 3:09 PM
To: etherlab-users at etherlab.org<mailto:etherlab-users at etherlab.org>
Subject: Re: [Etherlab-users] Running a large number of slaves

EtherCAT and the master are not limited to the ethernet packet size.
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.

Physically EtherCAT can address ~64k slaves on a network.

On 2021-03-29 13:22, Geller, Nir wrote:
> Hi There,
>
> I'm trying to setup one ethercat master with a very large number of
> ethercat slaves.
>
> The first obstacle I'm thinking about is a very large amount of data
> sent over PDO each cycle, that will definitely exceed 1500 bytes.
>
> In order to address this issue I want to understand if it is possible
> to send more than one frame each cycle?
>
> Another method could be using jumbo frames. Does the ethercat master
> support that?
>
> Does anybody have practical experience with such a setup?
>
> Thanks,
>
> Nir.
>
>

Mit freundlichem Gruß

Richard Hacker

--
------------------------------------------------------------------------

Richard Hacker M.Sc.
richard.hacker at igh.de<mailto:richard.hacker at igh.de>
Tel.: +49 201 / 36014-16

Ingenieurgemeinschaft IgH
Gesellschaft für Ingenieurleistungen mbH Nordsternstraße 66
D-45329 Essen

Amtsgericht Essen HRB 11500
USt-Id.-Nr.: DE 174 626 722
Geschäftsführung:
- Dr.-Ing. Siegfried Rotthäuser
- Dr. Sven Beermann, Prokurist
Tel.: +49 201 / 360-14-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<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.igh.de%2F&data=04%7C01%7Cgavin.lambert%40tomra.com%7C69c3c87304b241e33b3108d905940454%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637546955571865485%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ltmqrGczVlrou1pIU6Q4UfN6AYu2NwHICa8ITVAYfD4%3D&reserved=0>

------------------------------------------------------------------------
--
Etherlab-users mailing list
Etherlab-users at etherlab.org<mailto:Etherlab-users at etherlab.org>
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%7C69c3c87304b241e33b3108d905940454%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637546955571865485%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Edf8nOWJ5HxszfmXb7tMeTuV8OD22HdfnrxbXU6NYXY%3D&reserved=0>
--
Etherlab-users mailing list
Etherlab-users at etherlab.org<mailto:Etherlab-users at etherlab.org>
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%7C69c3c87304b241e33b3108d905940454%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637546955571875478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=t2MdXK%2Bt9ZE%2BdfasY%2BQOAvU%2BDWKmhV28GQHfcWp2s1E%3D&reserved=0>
--
Etherlab-users mailing list
Etherlab-users at etherlab.org<mailto:Etherlab-users at etherlab.org>
https://lists.etherlab.org/mailman/listinfo/etherlab-users<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=04%7C01%7Cgavin.lambert%40tomra.com%7C69c3c87304b241e33b3108d905940454%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637546955571885475%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1gQ490Kv5sBIC6CR9BEStp547SCo84tkDgJCzVMfBLA%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20210422/a0fffc22/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_compac_5dcf97ef-52f5-498c-8b9b-728410ddffaf.png
Type: image/png
Size: 11438 bytes
Desc: logo_compac_5dcf97ef-52f5-498c-8b9b-728410ddffaf.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20210422/a0fffc22/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compacicon_82e8a8c7-154a-4a32-9720-a5badb6258e0.png
Type: image/png
Size: 1629 bytes
Desc: compacicon_82e8a8c7-154a-4a32-9720-a5badb6258e0.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20210422/a0fffc22/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: facebook_fa85b924-53b9-45cc-8162-0564f64ec3a3.png
Type: image/png
Size: 1750 bytes
Desc: facebook_fa85b924-53b9-45cc-8162-0564f64ec3a3.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20210422/a0fffc22/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linkedin_4ec016ad-84fa-443c-85a3-b9615a4ccef8.png
Type: image/png
Size: 1855 bytes
Desc: linkedin_4ec016ad-84fa-443c-85a3-b9615a4ccef8.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20210422/a0fffc22/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: youtube_32142163-fc27-4aed-b14d-e8a377f98a6d.png
Type: image/png
Size: 1970 bytes
Desc: youtube_32142163-fc27-4aed-b14d-e8a377f98a6d.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20210422/a0fffc22/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: twitter_d89338d8-98c8-4b65-9a9e-7b1333160b0d.png
Type: image/png
Size: 20278 bytes
Desc: twitter_d89338d8-98c8-4b65-9a9e-7b1333160b0d.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20210422/a0fffc22/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: insta2_1cd85de9-b3a2-4971-9904-52b2481a7c82.png
Type: image/png
Size: 1506 bytes
Desc: insta2_1cd85de9-b3a2-4971-9904-52b2481a7c82.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20210422/a0fffc22/attachment-0013.png>


More information about the Etherlab-users mailing list