Hi Jim
I have been working on this same issue and have brought it up before in the ethercat hal driver thread but to no avail. IMHO I believe that the issue lies in homing.c file specifically where the homing routine does moving checks (this is only an issue with incremental encoders).
After several attempts at homing I ended up settling on the following
-use Roschi's method of setting the search velocity = 0 latch velocity = 9.9 in the .ini file
-modify the homing.c file (and the header file) to shortcut through the homing sequence so that it is perpetually waiting. The servo amps are in control, all you can do is e-stop during homing.
- mode switch via a custom homing button that calls a couple of custom m-codes to switch modes in conjunction with some ladder logic, then initiate the homing routine, then switches back to CSP mode via m-codes and ladder logic. The caveat to this method is that you cannot connect the position feedback to linuxcnc without getting a following error at some point in the routine. Usually when it switches from search to latch velocity. Instead I use the amplifiers following error output to indicate when you are outside of the following window. Technically this is open loop and may seem counter intuitive but think about it, Delta has spent a lot of time money and time to develop the motion profiles and the encoder has over 1 million PPR. Why not rely on the amplifiers 1 ms cycle time and not be limited by the computers latency to calculate the following error. Note: if you run in velocity mode you need to reduce the encoder resolution down to 2500 PPR from 1 million.
That all being said in my mind, a better solution would be to have a variable in the .ini file that can be found by homing.c Then homing.c has a routine that sets the commanded position = feedback position and loops until the servo is done it's internal homing routine. Similar to Dominik's HAL component. Only by setting the search velocity equal to latch velocity in was I able to get this approach to work without a spitting out a following error. On a big machine like mine this is not practical. For whatever reason though, I could never fully get this to work with two different speeds. Hence, my comprised solution...
Disclaimer: Modifying the homing.c file may ruin your crops, spoil your milk and seriously wreck your machine...seriously.
Not sure if any of this helps but I think both solutions are trying to solve the same problem.
Kind regards,
Dan