@Automatica27
I've been waiting for a while, hoping that someone with need and a bit of code savvy will turn up in this thread and be able to clean up the attached modified home.c file. The modified home.c file will allow you to home with either absolute or incremental encoders. By setting the the latch velocity = 0.0 and the search velocity = 6.6 or 9.9 (6.6 for absolute encoders) it envokes a special case (look back in the thread for Roschi's hints) where all linuxcnc can do is e-stop during the homing routine. Incremental encoders require a bit of ladder logic to switch into home mode, complete the homing routine, and switch back to CSP mode but, in your case you probably won't need more than a few rungs if any for absolute encoders.
If you look through the file for 6.6 and 9.9 you will see where I have made the changes. I am hoping that these changes could be implemented in such a way that they do not interfere with the regular homing routine of linuxcnc so that other non ethercat configurations can be used. Unfortunately, my coding level is not at a point where I am confident that these changes could be submitted but perhaps with some help we could push this along.
IMHO, one could argue that if the ethercat hal driver is to be fully utilized, a universal option for being able to use the internal homing routine of the servo amp would be of great value.
Kind Regards,
Dan
File Attachment:
File Name:
homing.c
File Size:38.01 KB