Hi,
The request:
A few weeks ago i recieved a ethercat servo drive from a forum sponsor. A Delta-asda-b3 drive and motor set.
The sponsor had a request for me. Figur out homing the drive using it with linuxcnc.
The difficulty:
Now the drive has internal home programs. And there comes the problem. How to deal with this using homemod.so?
Where homemod.so is the component responsible for linuxcnc home sequence.
The desired home sequence:
1. Home with search_vel to hard end stop of machine using a lower motor torque and stop on torque home limit value.
2. Move back from hard stop to find the first motor index z pulse, using the servo drive's internal home program.
The motivation to get it work:
1. Using the servo drives internal search for index z pulse program is the most accurate way to home a machine as it is not
depending on a servo cycle, where the servo cycle is not contributing to a ultra high precision.
In theory the index pulse may in between 2 servo cycles. This is what i mean with no ultra high precision.
My workflow:
1. To use the servo drive with ethercat i had to install lcec and cia402.
After installation and editing the ethercat .xml file, i was able to run the servo set.
2. The original cia402.so component was written in halcompile language.
The idea was to convert the halcompile component code into a c coded component.
This resulted in a base component, code can be found
here.
3. After coding a few day's i was gradually understanding how the servo's work and i could expand the codebase
to include torque control. And i was able to run servo drive internal homing programs.
This resulted in a new component :
libcia402
4. After up's and down's and trying different workflows i was able to edit the homemod.so component,
that is used by linuxcnc to do the home sequence.
The new component works exactly as the homemod.so, but it has additional features to enable external homing.
This resulted in a new component:
libhomecia402
Note: The motivation to keep the homemod.so original is that users can now combine external homing on servo's
with steppers and homing works as normal.
Conclusion:
The extern homing on index works as expected.
Variations:
As we use the .ini file to set home configuration. In .hal we can set servo drive home program and more values.
Therefore i did not test other external home variations so far. But we can think of multiple home sequence variations.
Installation on rip systems:
Readme. Section installation.