Nerdlinger
Stainless
- Joined
- Aug 10, 2013
- Location
- Chicago, IL
Hi Everyone! I recently ran into something that I thought I would share at the outside chance that someone who reads this might retain it and help them should they run into the same issue:
I was setting up a new process where I had to mill a slot .675" deep. It was polar interpolation on a lathe, something I had very little experience with, so I knew I was going to have to experiment with various cutting parameters including DOC. I wrote a subroutine for the individual mill path in X and "C" (Y) and instead of editing a bunch of individual Z depths every time I wanted to alter the DOC I wrote a macro that would increase the depth of cut by some amount that could readily be altered and keep calling up that sub routine until we were at full depth. From there it would jump to the finish pass (I left .002" on the walls for finishing.)
To make sure the roughing passes ended up at .675" I made sure the DOC I plugged in was an even multiple of .675". For instance, if I put in .100" for DOC I would either end up a .600", leaving .075" on the floor for finishing (too much for me), or at .700", blasting .025" past the nominal depth. I could have made a safer macro but that is not the point of this post. The program looked something like this:
;
#501=0(ZEROING THE COUNTER);
;
#502=XXX(DEPTH OF CUT);
;
N100;
;
#501=[#501-#502];
;
Z[#501];
M98P200;
;
IF[#501GT-.675]GOTO100;
;
FINISH PASS;
M30;
;
N200;
ROUGH PASS;
M99;
So if we put .025 in for "XXX" it will step its way down 27 even passes to .675" then do the finish pass, and it did that just fine. But then I changed the DOC to .03375 (for 20 even passes) it went one roughing pass too far! I double checked the math, ran another part, saw (and took a picture of) the POS screen that displayed the Z position as precisely "-.675", which should have prevented the program from "GOTO100" and instead should have just gone to the finish pass.
I do not know EXACTLY what happened but I assume there is a binary rounding thing going on that rounded the .03375" down to .0337" so after 20 passes it would have been at Z-.674" and thusly qualify for another roughing pass, .0337" deeper. at about Z-.707". (I am sure the POS screen said "-.675" and not "-.674"....I took a picture!)
The part stick out was just enough that the extra pass didn't hit the collet but nevertheless I thought I would share the experience in case anyone else is left wondering "what went wrong" if it ever happens to them...
OH YEAH, in the meantime I just changed the condition to "IF[#501GT.670]GOTO100" I know that's super lazy but I just had to get the job done and knew any extra material left on the floors from a rounding error would be no more than .001/.002" so I was fine with that.
I was setting up a new process where I had to mill a slot .675" deep. It was polar interpolation on a lathe, something I had very little experience with, so I knew I was going to have to experiment with various cutting parameters including DOC. I wrote a subroutine for the individual mill path in X and "C" (Y) and instead of editing a bunch of individual Z depths every time I wanted to alter the DOC I wrote a macro that would increase the depth of cut by some amount that could readily be altered and keep calling up that sub routine until we were at full depth. From there it would jump to the finish pass (I left .002" on the walls for finishing.)
To make sure the roughing passes ended up at .675" I made sure the DOC I plugged in was an even multiple of .675". For instance, if I put in .100" for DOC I would either end up a .600", leaving .075" on the floor for finishing (too much for me), or at .700", blasting .025" past the nominal depth. I could have made a safer macro but that is not the point of this post. The program looked something like this:
;
#501=0(ZEROING THE COUNTER);
;
#502=XXX(DEPTH OF CUT);
;
N100;
;
#501=[#501-#502];
;
Z[#501];
M98P200;
;
IF[#501GT-.675]GOTO100;
;
FINISH PASS;
M30;
;
N200;
ROUGH PASS;
M99;
So if we put .025 in for "XXX" it will step its way down 27 even passes to .675" then do the finish pass, and it did that just fine. But then I changed the DOC to .03375 (for 20 even passes) it went one roughing pass too far! I double checked the math, ran another part, saw (and took a picture of) the POS screen that displayed the Z position as precisely "-.675", which should have prevented the program from "GOTO100" and instead should have just gone to the finish pass.
I do not know EXACTLY what happened but I assume there is a binary rounding thing going on that rounded the .03375" down to .0337" so after 20 passes it would have been at Z-.674" and thusly qualify for another roughing pass, .0337" deeper. at about Z-.707". (I am sure the POS screen said "-.675" and not "-.674"....I took a picture!)
The part stick out was just enough that the extra pass didn't hit the collet but nevertheless I thought I would share the experience in case anyone else is left wondering "what went wrong" if it ever happens to them...
OH YEAH, in the meantime I just changed the condition to "IF[#501GT.670]GOTO100" I know that's super lazy but I just had to get the job done and knew any extra material left on the floors from a rounding error would be no more than .001/.002" so I was fine with that.