Greetings folks,
First a little about my setup.
I'm Tom and I'm new to both Mach and the CNC world. I'm an amateur loudspeaker builder and recently purchased and built a CRP-2448 from cncrouterparts. The machine went together slowly and I now have it up and running. I assembled all my own electronics including a SmoothStepper G540, PMDX-108 BOB and SuperPID. I have my Y axis defined as the long 49" axis, X as the 25" horizontal axis and Z is of course up and down. This machine uses two motors on X, they are wired as X and A on the G540. I have 6 limit/home sensors mounted on the axes. Three on Y, two on X and one on Z. Z has a "high limit/home" switch that defines zero at 5" above the spoilboard on startup. The intent is, or course, to prevent any undesirable plunging if I forget to use the tool height plate. X has two simple limit switches wired together that also serve to define home and a third "A" switch used to square the "A" side of the gantry after Y is set. I'm using the Dobutton(23,24) and recomb(9) code to set my home position and it seems to work fine. My Z zero code is listed below:
iF IsSuchSignal (22) Then
code "G31 Z-3 F20"
While IsMoving()
Wend
call SetDRO( 2, 1.9688)
code "G0 Z2.5 F60"
While IsMoving()
Wend
end iF
Problem:
I recently found the 3D samples on the Vectric forum and decided to cut a few as a test. The sample requires 4 tool changes during the run. First and second tool change went without a hitch. Third tool change I did the exact same thing but this time the Z axis plunged the bit below zero all the way to the Z axis limit destroying my piece and nearly destroying my bit. It was a 60° straight bit or it wouldn't have survived. I assumed I did something wrong and was able to recover and finish cutting the piece.
Next piece was the Vectric Fleur. First tool fine, second tool fine, third tool not so fine. This time I chucked up my brand new Amana 1045 45° V bit, the expensive one with replaceable knives. Set the Z height but didn't notice what the actual value was in the DRO. It started and again plunged the bit through the piece and before I could stop it, shattered the bit and stalled the router.
I've doubled checked the Z height code and can't seem to find any problems. It sets the Z height to 1.9866 which is exactly what it should be. Actual zero is -.002 below the workpiece so it's setting Z correctly. The code is cutting at a Z height of -0.45 for the first half of the pocket run and it runs fine a second time. I can't understand why this keeps happening. I've broken three bits now, this last one is not an inexpensive bit. It may have actually damaged the tool holder making the entire bit a waste of steel. I suspect something in the Zero height code is not working correctly but I don't know the quirks of Mach.
By my calculation the Z zero position must have been set to a large negative value in relation to absolute machine coordinates. That's the only way a plunge to -0.45 could reference below the spoilboard. I didn't think to write down the Z coordinate for debugging but I'll watch the DRO when I use the height tool from now on and see what it's doing.
Is it possible the Z DRO is not being set or being set to something other than 1.9866 by the code above?
Is there a bug in Mach?
Would it help if I were to add code to check the actual DRO against the set value to verify it was set correctly?
Help?!