EtherCAT driver for a 6 axis robot

More
19 May 2022 16:41 #243350 by ftree
Well it compiles now! Yey.

Some dots to connect now....

Please Log in or Create an account to join the conversation.

More
25 May 2022 21:04 - 25 May 2022 21:37 #243841 by ftree
github.com/djsftree/linuxcnc-ethercat/bl...r/src/lcec_meca500.c

Not quite sure how to handle
1). the setting of bits on the slave during init() - active / home
2). the reading and writing of REAL to and from the slave
Last edit: 25 May 2022 21:37 by ftree.

Please Log in or Create an account to join the conversation.

More
27 May 2022 18:48 - 27 May 2022 18:57 #244016 by ftree
Given up on the C version and reverting back to manual xml.

The Meca500 encoder is REAL format.

Using halType float does not return the correct value even if scaled.

However, if i set the ethercat pdo data as halType u32 ....

24 u32 OUT 0xC28A5415 lcec.0.encX.encoder.a1.raw
24 u32 OUT 0xC0B478C3 lcec.0.encY.encoder.a2.raw
24 u32 OUT 0x411BFEF1 lcec.0.encZ.encoder.a3.raw
24 u32 OUT 0xC2B59246 lcec.0.encA.encoder.a4.raw
24 u32 OUT 0xC2B11573 lcec.0.encB.encoder.a5.raw
24 u32 OUT 0xC1F06666 lcec.0.encC.encoder.a6.raw

If I use an online hex to float converter the values looks right

gregstoll.com/~gregstoll/floattohex/

Ie 0xC2B range is about -90 degrees, 0x42B about +90 - that aligns with the physical device.

Is there a conv for hex to float? Or a better way to read whatever REAL format Meca500 uses to float? [/code][/code]
Last edit: 27 May 2022 18:57 by ftree.

Please Log in or Create an account to join the conversation.

More
28 May 2022 19:21 #244072 by ftree
How do you decide what PDO INITs need bit position arguments?

If i uncomment L140 linux cnc fails to start. The PDO address and offset seem ok. I'm stumped!

github.com/djsftree/linuxcnc-ethercat/bl.../lcec_meca500.c#L140

Please Log in or Create an account to join the conversation.

More
29 May 2022 14:51 - 29 May 2022 14:53 #244129 by ftree
ok, after looking at dmesg it seems etherlabs doesn't like "gaps" with 0x000 x00
[ 6938.151342] EtherCAT ERROR 0-0: SDO upload 0x0000:00 aborted.
[ 6938.151357] EtherCAT ERROR 0-0: SDO abort message 0x06020000: "This object does not exist in the object directory".
[ 6938.151362] EtherCAT ERROR 0-0: Failed to read number of mapped PDO entries.
[ 6938.151365] EtherCAT ERROR 0-0: Failed to read mapped PDO entries for PDO 0x0000.
[ 6938.156310] EtherCAT ERROR 0-0: SDO upload 0x0000:00 aborted.
[ 6938.156325] EtherCAT ERROR 0-0: SDO abort message 0x06020000: "This object does not exist in the object directory".
[ 6938.156331] EtherCAT ERROR 0-0: Failed to read number of mapped PDO entries.
[ 6938.156334] EtherCAT ERROR 0-0: Failed to read mapped PDO entries for PDO 0x0000.
 
Last edit: 29 May 2022 14:53 by ftree.

Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum