Hi Sirop,
My apologies for calling you Frank. Not sure how I got that idea...
In my opinion, Roschi would be the best person to explain how he managed to use custom M-codes and the file custom.clp
github.com/aschiffler/linuxcnc/tree/add-...t/configs/roschi_cnc
to utilize the internal homing routine of the servo amp ... without LinuxCNC issuing a joint following error. It may be that he used absolute encoders? and I missed that too.
github.com/aschiffler/linuxcnc/commit/d2...c13f1761b5396aed364f
The homing.c file that you pointed to (which was the one that I was looking for, thanks) uses a home sequence of -1, which since the merge of JA and master now as you know means a synchronized final movement of two or potentially more joints. As a caveat, Delta amps require the host controller to be able to preform this type of routine before you can switch them to gantry mode where they will synchronize.
When, I say i used Roschi's approach what I meant was, that his example used an amp that used the Cia402 standard and I was able to work out the equivalent pins/parameters for my amplifier which using the new "complex" variable instead of the "special 32".
Our ladder logic programs are not similar but, I believe that end result is the same. I will post the clp file later today.
Conceptually the routine is
1) check mode (home = 6) (csp =

2) if you need to switch modes, inhibit, the enable pin (pin3 0x6040), wait for break to turn on
3) set the coils that are connected to 0x6060 pins 1,2,3 to set the mode
4) look for feed back from 0x6061 that the mode = 6
5) turn off the inhibit, amp is enabled
6) start home routine ... this is where I get a joint following error from LCNC
7) when the home routine is finished, reverse the proccess so that you end up in csp mode
My thoughts are that the addition of a new variable for home sequence might be required, i.e. to call a special case where you can deactivate the joint calculations/feedback?, tell lcnc that you are homing, allow the servo to do it's thing, lcnc can only estop at this point. Completion of homing subroutine sets the axis as homed and linuxcnc is now ready for auto mode.
This is theoretical only and perhaps trying to utilize the internal routines may be more effort than it is worth?
Any thoughts?
Dan