I have a router with two spindles as the easiest way to implement a simple tool changer. It runs Mach3 with negative tool lengths.
Mach3 starts with the tool # set to 0 which has length 0 which is always wrong. If I forget to set Tool 1 before I set my work zero position then as soon as the G Code sets Tool 1, my work zero is now below the bed of the machine with undesirable consequences!
As a way round this, I thought I would set the tool # to be 1 in RefAllHome using SetCurrentTool(1). This works as Tool 1 details are shown on the Program Run screen, but Mach3 does not seem to pick up the tool length at this point so I still have the same problem. If I do a manual G43T1, (pick up the tool length for this tool from the tool table) all is happy, so how do I do the equivalent of G43H1 from within RefAllHome? Neither Code "G43H1" nor Code("G43H1") do anything at all.
Is there a better way to solve my problem please? If not, how do I get Mach3 to recognise the length of Tool1 from the tool table having selected it it RefAllHome?
Many thanks, Nick