I have switched fro Mach3 to UCCNC. The process has been relatively painless and I find UCCNC easier to use than MACH3.
But I am having trouble with the tool zero macro. My Mac3 macro worked fine,. But, in its original form, M31 did not seem to zero Z work coordinates, and it is much more complicated with its tool offsets and so on than I need for my simple 6040.
So after much research I came up with this macro:
exe.code(G31 Z-10 F100")
while(exec.IsMoving()){};
exec.Setvar(0,228); //Set Z DRO to zero
AS3.Validatefield(228);
But, this did not set the Z axis DRO, which seems to be field 228 , to zero It sets it to 1mm above zero.
I then deleted the last two lines so the probe stops on contact , and I then manually zero the Z DRO
.
While this works, it is a bit clumsy.
Can anyone suggest why the above macro sets Z to 1mm above the work surface, and what the macro should be to properly set the tool Z to zero?