Hi,
Reading through the Mach3 Version 3.x Macro Programmers Reference Manual
I found 'CoupleSlave' and conjured up this possible REFALLHOME sequence.
The sequence should allow you to have all Limit and Home switches on the same input.
DoButton( 24 ) ' Home Z [DoOEMButton(1024)]
DoButton( 23 ) ' Home Y [DoOEMButton(1023)]
DoButton( 22 ) ' Home X with slave
CoupleSlave(0) ' Disconnect A From X
DoButton( 22 ) ' Home X [DoOEMButton(1022)]
DoButton( 25 ) ' Home A [DoOEMButton(1025)]
CoupleSlave(0) ' Connect A To X
DoOEMButton(133) ' Set X=0
DoOEMButton(134) ' Set Y=0
DoOEMButton(135) ' Set Z=0
One thing you may want to consider. Limit switches are more reliable when wired in series and normally closed. Some users have complained about false triggers on open switches, and problem went away when using Normally closed.
Anytime,
Bill