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@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@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.



-- 
Etherlab-users mailing list
Etherlab-users@etherlab.org
https://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to