• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] EtherCAT Slave
#4
Well Jamie,

as with all Fieldbus and Real-Time Ethernet protocols everything follows very official specifications.

And indeed editing GSDML, ESI or whatever device description file is not that easy as it seems and is in my opinion nothing for non-specialists. You need to have background information about how the different systems operate and how they exchange their data and how these are defined.

For EtherCAT the EtherCAT Technology group provides all information if you are a member in the download section here: https://www.ethercat.org/default.htm
Interesting is also that next to the ESI file specification they provide also an ESI file checker tool which is very useful during development times.

But now back to your question and here is indeed EtherCAT knowledge is needed:

The example ESI file provided here is made for exactly 10 bytes input and 4 bytes output data. It matches the settings made in the "C" coded corresponding example. With EtherCat you don't speak about input and output data really, but about Process Data Objects, short PDOs. So in the end the master needs to know the excact number of PDOs (Tx = transmit, Rx = receive) and finally those have to be defined in the ESI file.

Now one can be naive and think just editing the lines in the ESI file where the maximum Defaultsize - in our case 10 and 4 - is enough. Ohhh no ... this is not enough. Relevant for a master configuration tool are the entries <RxPdo> and <TxPdo> instead. If you now count the entries in the file for each direction you will find 10 TxPdo objects and 4 RxPdo objects defined. Those have to extended to the amount of data you want to exchange.

EtherCAT took over the CANopen object dictionary scheme when it was specified. Everything is held in objects with Index and Subindex as addressing scheme.
The next thing you have to know about netPI's EtherCAT slave stack are the objects where it holds the input (Rx) and output (Tx) data. The manual in the repository gives you information about it ...

For Rx Pdo data it is Object Index 2000 with Subindexes 0, 1, 2, ... one object for each output byte
For Tx Pdo data it is Object Index 3000 with Subindexes 0, 1, 2, ... one object for each input byte


Back to the ESI file problem ... You have now to extend/modify the ESI with the amount of Rx Pdo and Tx Pdo you have in mind for your application. Please keep in mind to increase the subindex for each new entry ro map the IO data one by one.

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Messages In This Thread
[SOLVED] EtherCAT Slave - by snortman - April-16th-2018, 04:28 PM
RE: EtherCAT Slave - by JamieG - February-6th-2019, 02:26 AM
RE: EtherCAT Slave - by Armin@netPI - February-6th-2019, 10:27 AM
RE: EtherCAT Slave - by JamieG - February-7th-2019, 07:05 AM
RE: EtherCAT Slave - by Armin@netPI - February-7th-2019, 07:36 AM
Answer - by Armin@netPI - April-16th-2018, 08:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Configuring EtherCAT communication Hoeber 1 2,170 September-22nd-2021, 01:29 PM
Last Post: Armin@netPI
  running ethercat slave MGharat 6 5,691 December-10th-2019, 10:06 AM
Last Post: MGharat
  [SOLVED] Monitoring as EtherCAT Slave PRingelberg 8 6,663 October-16th-2018, 08:10 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)