[Etherlab-users] Read/Write SDO during cyclic task

Gavin Lambert gavin.lambert at tomra.com
Fri May 17 02:27:37 CEST 2024


There’s basically two different ways to interact with SDOs once the cyclic task is running:


 1.  You can continue to use ecrt_master_sdo_download/upload, but only from a non-cyclic thread.
 2.  You can use ecrt_slave_config_create_sdo_request to create one or more cyclic request objects (in advance before starting cyclic operation), then the ecrt_sdo_request_* functions to interact with them (set up, kick it off, check status, collect results) from the cyclic thread.  These are non-blocking and polled, so you need to check them every cycle while a request is in progress.

Gavin Lambert

Software Engineer



[cid:TOMRA_CMYK_final_size_times_two_cd761a01-1d1f-446e-9316-8012271820b6.png]
 [cid:TF-FB-icon_b77c57e4-4990-4f9d-b3a2-8e6ab45df7f2.jpg] <https://www.facebook.com/TOMRA.Food/>  [cid:TF-LinkedIn-icon_d54c4829-dcb9-450c-9187-34b26e85ebaa.jpg] <https://www.linkedin.com/company/tomra-food/>  [cid:icons-social-media-twitter_small_2_4bae5ad2-4add-4314-a352-5b317f784956.jpg] <https://twitter.com/TOMRAFood>  [cid:TF-Youtube-icon_8b2c830c-70d9-48da-a4db-db9191d346ba.jpg] <https://www.youtube.com/playlist?list=PLDD3B1A7BAE919EC6>  [cid:TOMRAinstagram_45b30c55-490a-4f32-8fd3-998c152e3494.jpg] <https://www.instagram.com/tomrafood/>
 Compac Technologies Ltd | 4 Henderson Place | PO Box 13 516 | Onehunga 1061 | New Zealand

 Phone: +64 96 34 00 88 | https://www.compacsort.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: Etherlab-users <etherlab-users-bounces at etherlab.org> On Behalf Of Clement Gaspard
Sent: Friday, May 17, 2024 3:56 AM
To: etherlab-users <etherlab-users at etherlab.org>
Subject: [Etherlab-users] Read/Write SDO during cyclic task


Good afternoon everyone,

I am controlling ZeroErr eRob Actuators using the IgH EtherCAT Master from the stable-1.5 branch.

I have defined Tx and Rx PDO registers to read/write informations during the cyclic task.

However, is it possible to use SDO download and upload while the cyclic task is running?

If not, what is the best way to consult SDO information in the shortest possible time?

(I have tried to use ecrt_master_sdo_upload and ecrt_master_sdo_download during the cyclic task without much success. However, it works if I use these functions before calling ecrt_master_activate.)

For example, I would like to know the temperature of the drive regularly (only accessible via SDO and not PDO mappable as described in the actuator documentation).

Thank you very much in advance.

Best regards,

---------------------------------
Clément GASPARD
[cid:image001.jpg at 01DAA84D.47AF7440]

Equipe Rhoban - Dpt Méthodes et Modèles Formels | LaBRI - Université de Bordeaux

[cid:image002.png at 01DAA84D.47AF7440]clement.gaspard at u-bordeaux.fr <mailto:clement.gaspard at u-bordeaux.fr>

[cid:image003.png at 01DAA84D.47AF7440]

Département Mécatronique | ENS Rennes

[cid:image002.png at 01DAA84D.47AF7440]clement.gaspard at ens-rennes.fr <mailto:clement.gaspard at ens-rennes.fr>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20240517/662d6471/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 40713 bytes
Desc: image001.jpg
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20240517/662d6471/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1752 bytes
Desc: image002.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20240517/662d6471/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 26012 bytes
Desc: image003.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20240517/662d6471/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TOMRA_CMYK_final_size_times_two_cd761a01-1d1f-446e-9316-8012271820b6.png
Type: image/png
Size: 6455 bytes
Desc: TOMRA_CMYK_final_size_times_two_cd761a01-1d1f-446e-9316-8012271820b6.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20240517/662d6471/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TF-FB-icon_b77c57e4-4990-4f9d-b3a2-8e6ab45df7f2.jpg
Type: image/jpeg
Size: 10123 bytes
Desc: TF-FB-icon_b77c57e4-4990-4f9d-b3a2-8e6ab45df7f2.jpg
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20240517/662d6471/attachment-0007.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TF-LinkedIn-icon_d54c4829-dcb9-450c-9187-34b26e85ebaa.jpg
Type: image/jpeg
Size: 10214 bytes
Desc: TF-LinkedIn-icon_d54c4829-dcb9-450c-9187-34b26e85ebaa.jpg
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20240517/662d6471/attachment-0008.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icons-social-media-twitter_small_2_4bae5ad2-4add-4314-a352-5b317f784956.jpg
Type: image/jpeg
Size: 2256 bytes
Desc: icons-social-media-twitter_small_2_4bae5ad2-4add-4314-a352-5b317f784956.jpg
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20240517/662d6471/attachment-0009.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TF-Youtube-icon_8b2c830c-70d9-48da-a4db-db9191d346ba.jpg
Type: image/jpeg
Size: 10218 bytes
Desc: TF-Youtube-icon_8b2c830c-70d9-48da-a4db-db9191d346ba.jpg
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20240517/662d6471/attachment-0010.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TOMRAinstagram_45b30c55-490a-4f32-8fd3-998c152e3494.jpg
Type: image/jpeg
Size: 10303 bytes
Desc: TOMRAinstagram_45b30c55-490a-4f32-8fd3-998c152e3494.jpg
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20240517/662d6471/attachment-0011.jpg>


More information about the Etherlab-users mailing list