Ethercat HAL driver

More
6 years 7 months ago #159159 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hi @Sockheaven
I do not have the Kollmorgen AKD servo drive, but if this helps you a little with your project, you broken down the control word with the correct form, this would be the enablement pin I think
Code:
<complexEntry bitLen="3" halPin="enable-operation" halType="bit"/>
I may have something wrong but it may be the way to go.
Greeting
Chimeno
The following user(s) said Thank You: Sockheaven

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

More
6 years 7 months ago #159208 by Sockheaven
Replied by Sockheaven on topic Ethercat HAL driver
Hmm, I tried implementing your change, but get an error on startup now:
lcec_conf: ERROR: Invalid complexEntry bitLen 0

it doesn't seem to like a bitlength of 0 - is there a different attribute like bitNum?
I can see why bit length might be an error.

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

More
6 years 7 months ago #159212 by Sockheaven
Replied by Sockheaven on topic Ethercat HAL driver
Ok i changed the bitLen to 1 for each of the signals and the error went away - unfortunately while mapping that new bit to xenable, the HalPin changes, but not the drive state.

I did some researching, and it looks like the Kollmorgen AKD has a State Machine to enable the drive that consists of the first four bits of that control word.

To enable the axis I need to set that control word to 6, and then 15 to enable the amp and tell the drive to follow the set points over the bus.

Anyone have an idea how I would implement that logic?
if I could write teh control word to 6 when the estop was cleared and 15 when the machine was enabled that might work (then back to 6 when the machine disable) but I'm not sure how to implement that logic.

Best Regards,
Paul

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

More
6 years 7 months ago #159248 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hi @Paul

Hmm, I tried implementing your change, but get an error on startup now:
lcec_conf: ERROR: Invalid complexEntry bitLen 0
it doesn't seem to like a bitlength of 0 - is there a different attribute like bitNum?
I can see why bit length might be an error.

sorry I was wrong, memory fails me, I attach a new file with the breakdown of the word status,

To enable the axis I need to set that control word to 6, and then 15 to enable the amp and tell the drive to follow the set points over the bus.

I think you have to look at what status pins you need, for example word 6 is (0110) and 15 (0001 0101)

Greeting
Chimeno

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

More
6 years 7 months ago #159273 by Sockheaven
Replied by Sockheaven on topic Ethercat HAL driver
Thanks to everyone. I finally got this working. had to implement a few HAL components i havent used before, and theres still some clutter in my hal/ini from being converted from a step/dir implementation. But i was able to get the CAN state machine working over ethercat. I have attached my files in case anyone else has been struggling getting it working and wants an example using a Kollmorgen AKD servo drive.

File Attachment:

File Name: ecat_test_...05-2.hal
File Size:4.5 KB

File Attachment:

File Name: ecat_test_...3-05.ini
File Size:2.22 KB

File Attachment:

File Name: ethercat-c...05-2.xml
File Size:5.34 KB


Best Regards,
Paul
The following user(s) said Thank You: chimeno, rwistort, Nico2017, eduard

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

More
6 years 7 months ago #160931 by papagno-source
Replied by papagno-source on topic Ethercat HAL driver
Hi.
Exist a complete procedure for installation ethercat on actual master 2.9-pre0 on debian Wheezy ?
Thanks

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

Time to create page: 0.676 seconds
Powered by Kunena Forum