After a little bit of research I resolved the "Code M6" problem because I found the "code" commands that were needed. The good news is it seems to work great for zeroing X & Y! I am in the processing of testing the code where the M6 command is invoked prior to zeroing Z, by single stepping through the macro.
I must give credit to Cockrum (
http://cockrum.net/cnc.html ) for sharing his solution to zero Z with the Auto Tool Zero button, I simply extended off of his solution by confirming that the "G31" probe command will also move in the X and Y direction as well. I am using Output 13 to sense the reference plates. That is what the "If IsSuchSignal(22)" relates to.
At present I'm using a 1.125" x1.125" x3" piece of angle aluminum (check for perpendicularity on all angles and sides) for the XY touch plate. It is stood vertically (inside corner of the aluminum angle against the outside corner of the work) against the desired work piece corner to be defined as 0,0. A 16 gauge piece of silicon wire terminated with a spade lug on one end and a banana jack on the other end is connected to the aluminum angle by an 8-32 machine screw. I'm using a 2" x 3" x .059" piece of copper clad circuit board for the Z touch plate like Cockrum also with a 16 gauge silicon wire soldered to a corner of the circuit board on one end and terminated with a banana jack on the other. Both touch plates plug into to female bananas jacks connect to the Output 13 terminal of the I/O board, but only when I am doing the XYZ zeroing process.
I start with a .125" steel reference in the tool that came with my precision collets. X is set to half the diameter of the reference (.0625") , then Y, then a Tool change command is issued. I install my first cutting bit to be used with my CAMBAM G-Code, then continue with the execution of G17, M3, S0 and the zeroing of the Z axis at the work level.
Here is my code to zero X,Y (tool change pause) then Z, using the Auto Tool Zero button. It is simple and I know there are more elaborate ways to accomplish the same thing but it is what works best me and for what I currently need.
Try it at your own risk. Adjust the code according to your Mach3 setup.
I highly recommend first single stepping through the code, with the button macro editor open and with one hand on the eStop button.
Message( "Auto Zeroing X..." )
If IsSuchSignal (22) Then
code "G31 X-2 F20"
While IsMoving()
Wend
Call SetDRO( 0, .0625 )
code "G1 X.5"
End If
Message( "Auto Zeroing Y..." )
If IsSuchSignal (22) Then
code "G31 Y-1 F20"
While IsMoving()
Wend
Call SetDRO( 1, .0625 )
code "G1 Y.5"
End If
code "M6"
code "G17"
code "M3 S0"
Message( "Auto Zeroing Z..." )
If IsSuchSignal (22) Then
code "G31 Z-1 F20"
While IsMoving()
Wend
Call SetDRO( 2, .059 )
code "G1 Z1"
End If
Feedback appreciated. (And I gotta remember how to add comment lines to the code

)
Cheers