Sorted

These switches cannot be used for combined homing/limits - the flickering output immediately triggers a limit fault after homing as it sees the flicker as the next sense input. Probably just crap sensors.

My fix was to use them for homing only, then add soft limits to control the position limits on all axes - the mill will always be homed when in use so this seems a safe option.

However, as the sensors all use one input, it sees the flickering as the next axis sense and just zeros all the dro's - did i say these sensors are crap?

The fix - modify the home-all button script to something like this for all axes...

DoButton( 24 )
While IsMoving()
Wend
DoOEMButton(133)
While IsMoving()
Wend
Code "G53 G1 z-3 F500"
While IsMoving()
Wend

This runs the home, zero's the DRO, then steps back 3mm which is enough to get the target clear of the sensors, then it moves onto the next axis and so on. It works perfectly but does leave the tool at X3, Y3, Z-3 but then you can jog back if it matters as the soft limits will stop a crash. It does NOT work without the While IsMoving lines in there. Debounce does NOT make any difference and is now set to zero.

I guess I could add a move to zero on all axes after the homing finishes, just to park it all at zero.

A video of homing working nicely...
https://youtu.be/T2CeluqhRl4

Now i can start final wiring and finish the build, damn good fun playing with it though