[Etherlab-users] Configuring EL7047 stepper driver
Gavin Lambert
gavin.lambert at tomra.com
Mon Aug 2 00:55:24 CEST 2021
Why are you calling ecrt_slave_config_pdos *OR* ecrt_slave_config_reg_pdo_entry? You need to do both things. (Although you can replace the latter with ecrt_domain_reg_pdo_entry_list to avoid a loop in your own code.)
Gavin Lambert
Senior Software Developer TOMRA Fresh Food
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: Fontana Nicola
Sent: Sunday, 1 August 2021 8:38 am
To: Graeme Foot <Graeme.Foot at touchcut.com>; etherlab-users at etherlab.org
Subject: Re: [Etherlab-users] Configuring EL7047 stepper driver
Il giorno lun, 26/07/2021 alle 07.00 +0200, Fontana Nicola ha scritto:
> ...
> I will do my homeworks and report back for future reference.
> ...
I can confirm that, by moving the PDO handling into the application, things started working as expected. Here is the updated snippet:
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2F-%2Fsnippets%2F2155802&data=04%7C01%7Cgavin.lambert%40tomra.com%7C020593bd03294f1d6ccf08d954631658%7C4308d118edd143008a37cfeba8ad5898%7C0%7C1%7C637633606834855034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=nLGnNTU%2F52J5y71UJ%2FPsKMsrAv8ASYVFE5HQos8cBxE%3D&reserved=0
The shell script is now used only for bootstrapping the EL7047. All 0x8nnn:nn entries in the object dictionary seem to be stored in some non-volatile memory (no idea this is customary or mandated by some standard), so that script should be called only on new devices.
The manual handling of PDOs on the C side is really tedious and error-prone, so I can understand Gavin's suggestion of trying to configure as much as possible before `ethercat cstruct`, but I'm confident some kind of abstraction is possible (see e.g. the `SlaveLayout` struct in `el7047.c` for details).
Thank you again for your help.
Ciao.
--
Nicola
--
Etherlab-users mailing list
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%7C020593bd03294f1d6ccf08d954631658%7C4308d118edd143008a37cfeba8ad5898%7C0%7C1%7C637633606834855034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=09hYJykWoNSbxHGWss%2Brmww8iycr42NTxi1XytKecVw%3D&reserved=0
More information about the Etherlab-users
mailing list