I have created a macro to "ref all home" A quick and easy safety step I am adding since our machine has lost position in the Y and Z axis, causing catastrophic table damage (working with a 15" cutter head here)
I am using M12, and the macro rads as follows:
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )
DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)
The above is just a copy of the "ref all home" button script. We only use the Y and Z axis so the extra buttons are not necessary but dont seem to have an affect.
When I go to MDI and type in M12 the machine responds as if I have pushed "ref all home" exactly as I had intended.
When I add the M12 into a program and load into Mach3, the controller stops "generating toolpath" when it arrives at the M12 line and just waits for me to click cancel. If I run the program, the machine runs through the header to the M12, does the homing move, and starts at the top of the program. I think if I left it, it would just repeat this forever. Here is what my header looks like:
G21
G90
G53 Z 0
T1 M6
G0 G90 G54 Y -79
M12
G0 Y -79
S 3250 M3
G43 H1 Z 15
G1 F 250
Any ideas how I can make this work?