[Etherlab-users] 2 bits reading

Gavin Lambert gavin.lambert at tomra.com
Tue Oct 12 00:16:40 CEST 2021


Yes (assuming you meant incrementing the bit offset, not the byte address).  Or you can use EC_READ_U8 and then do the bit masking yourself.

For bit-aligned values, don't forget to provide a non-null pointer to receive the bit offset when registering the PDO.

Or since this is only a sync counter, if you're certain that you never miss any cycles you can fairly safely just ignore the second bit and simply use the LSB toggle as an indication that an update has occurred.

Gavin Lambert

Senior Software Developer TOMRA Fresh Food



[cid:TOMRAFresh_final_size_times_two_2_99d242b2-ba06-4c25-ab26-020cca7ee6dd.png]
 [cid:TF-FB-icon_b77c57e4-4990-4f9d-b3a2-8e6ab45df7f2.jpg] <https://www.facebook.com/TOMRAFreshFood>  [cid:TF-LinkedIn-icon_d54c4829-dcb9-450c-9187-34b26e85ebaa.jpg] <https://www.linkedin.com/company/tomra-fresh-food/>  [cid:TOMRA-Vimeo_4673038e-313a-491f-b3a4-0b39ace6df88.jpg] <https://vimeo.com/tomrafreshfood>  [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: BUSSIERES Vincent
Sent: Tuesday, 12 October 2021 10:20
To: etherlab-users at etherlab.org
Subject: [Etherlab-users] 2 bits reading

Dear etherlab users, I bought a Beckhoff incremental encoder interface EL5102, as you can see below, some datas are written on two bits.
How can I read these 2 bits ?
May I read them by calling twice EC_READ_BIT with address increment ?

Index                   Name                                 Meaning                                                                                                                                    Data type           Flags      Default
60n2:0F           Input cycle counter       2-bit counter for synchronization (incremented only if a new value is present)    BIT2                 RO       0x00 (0dec)
Best regards

Vincent BUSSIERES
Responsable Technique Logiciel

[cid:image001.png at 01D7BF5A.9E615620]
ZE Ma Campagne
36, Impasse Félix Nadar
16000 ANGOULEME
Tel: 33 (0)9.72.40.36.52
www.hemeria-group.com<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwebmail.nexeya.fr%2Fowa%2Fredir.aspx%3FC%3DGK_BqKCZef7LtPZnqnd_LGYr1NG9sz4Smy3iKIwO-pXqtJC7VgzXCA..%26URL%3Dhttp%253a%252f%252fwww.hemeria-group.com%252f&data=04%7C01%7Cgavin.lambert%40tomra.com%7C12547e247f5e46af71d408d98cfce6ab%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637695840522265846%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=UHk6XPlo%2FQGznYWqyW%2BXwAD7JHincesuHanPvT8CE64%3D&reserved=0>
P Afin de contribuer au respect de l'environnement, merci de n'imprimer ce courriel qu'en cas de nécessité.
Ce message et les fichiers pouvant être attachés sont confidentiels, réservés à l'usage unique des destinataires et n'engagent HEMERIA sous aucune forme que ce soit.
This email and any files transmitted with it are confidential, intented solely for the unique use of the recipients and don't commit HEMERIA.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.etherlab.org/pipermail/etherlab-users/attachments/20211011/df9029ab/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 5034 bytes
Desc: image001.png
URL: <https://lists.etherlab.org/pipermail/etherlab-users/attachments/20211011/df9029ab/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TOMRAFresh_final_size_times_two_2_99d242b2-ba06-4c25-ab26-020cca7ee6dd.png
Type: image/png
Size: 13399 bytes
Desc: TOMRAFresh_final_size_times_two_2_99d242b2-ba06-4c25-ab26-020cca7ee6dd.png
URL: <https://lists.etherlab.org/pipermail/etherlab-users/attachments/20211011/df9029ab/attachment-0003.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: <https://lists.etherlab.org/pipermail/etherlab-users/attachments/20211011/df9029ab/attachment-0004.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: <https://lists.etherlab.org/pipermail/etherlab-users/attachments/20211011/df9029ab/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TOMRA-Vimeo_4673038e-313a-491f-b3a4-0b39ace6df88.jpg
Type: image/jpeg
Size: 1540 bytes
Desc: TOMRA-Vimeo_4673038e-313a-491f-b3a4-0b39ace6df88.jpg
URL: <https://lists.etherlab.org/pipermail/etherlab-users/attachments/20211011/df9029ab/attachment-0006.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: <https://lists.etherlab.org/pipermail/etherlab-users/attachments/20211011/df9029ab/attachment-0007.jpg>


More information about the Etherlab-users mailing list