Hello Guest it is March 28, 2024, 05:04:22 PM

Author Topic: Cutter height advancement problem  (Read 3164 times)

0 Members and 1 Guest are viewing this topic.

Cutter height advancement problem
« on: May 04, 2017, 05:12:55 PM »
I'm at a loss to solve this need. I have to repeat a pattern progressively deeper for many passes.
I cannot see a solution because I'm using G02, G03 and G91 which seems to be keeping me from being able to advance my cutter in a stepwise fashion.
Maybe someone will see an easy solution they could explain.
Below is my attempt with subprograms. (simplified)
I have noted it with what I think should happen.
When this is run however, it makes all passes at the same depth.
And, yes, I'm quite new to this hobby.
Thanks for any help.


%
G57
F80
M98 P0007 L10                    (Contour cut looped X times)
M30

O0007
G91 Z-0.001                     (step down 0.001 per pass)
G00 X0.250409 Z1.500977
G90
G02 X0.345606 Z1.545902 I0.223100 J-0.349431
G02 X0.441300 Z1.561173 I0.096590 J-0.297807
G02 X0.483004 Z1.557447 I0.000688 J-0.227562
G02 X0.518809 Z1.546791 I-0.031222 J-0.170392
G02 X0.551489 Z1.528719 I-0.067127 J-0.159972
G02 X0.584016 Z1.500977 I-0.132151 J-0.187885
G02 X0.679831 Z1.545974 I0.221958 J-0.348116
G02 X0.776035 Z1.561173 I0.097114 J-0.302645
G02 X0.817642 Z1.557412 I0.000679 J-0.224555
G02 X0.852856 Z1.546784 I-0.030578 J-0.164957
G02 X0.884939 Z1.528760 I-0.066419 J-0.155802
G02 X0.917148 Z1.500977 I-0.135972 J-0.190188
G02 X1.011512 Z1.545818 I0.223459 J-0.348539
G02 X1.106670 Z1.561173 I0.096038 J-0.292648
G02 X1.184168 Z1.546001 I0.000612 J-0.202402
G02 X1.250329 Z1.501026 I-0.073801 J-0.179716
G02 X1.344999 Z1.545965 I0.220420 J-0.342157
G02 X1.440764 Z1.561270 I0.096660 J-0.297546
G02 X1.482468 Z1.557545 I0.000688 J-0.227565
G02 X1.518274 Z1.546888 I-0.031222 J-0.170392
G02 X1.550954 Z1.528817 I-0.067127 J-0.159971
G02 X1.583480 Z1.501075 I-0.132152 J-0.187886
G02 X1.679295 Z1.546072 I0.221957 J-0.348112
G02 X1.775500 Z1.561270 I0.097113 J-0.302645
G02 X1.817107 Z1.557510 I0.000679 J-0.224556
G02 X1.852320 Z1.546882 I-0.030578 J-0.164957
G02 X1.884404 Z1.528858 I-0.066419 J-0.155803
G02 X1.916612 Z1.501075 I-0.135970 J-0.190186
G02 X2.010976 Z1.545916 I0.223459 J-0.348539
G02 X2.106134 Z1.561270 I0.096037 J-0.292646
G02 X2.183594 Z1.546133 I0.000612 J-0.202624
G02 X2.250252 Z1.501135 I-0.074990 J-0.182954
G02 X2.345463 Z1.546114 I0.222937 J-0.348648
G02 X2.441145 Z1.561390 I0.096577 J-0.297633
G02 X2.482849 Z1.557664 I0.000688 J-0.227562
G02 X2.518654 Z1.547008 I-0.031222 J-0.170391
G02 X2.551334 Z1.528936 I-0.067127 J-0.159971
G02 X2.583861 Z1.501194 I-0.132152 J-0.187885
G02 X2.679676 Z1.546192 I0.221958 J-0.348114
G02 X2.775881 Z1.561390 I0.097114 J-0.302646
G02 X2.817487 Z1.557629 I0.000679 J-0.224555
G02 X2.852701 Z1.547001 I-0.030578 J-0.164957
G02 X2.884785 Z1.528978 I-0.066420 J-0.155802
G02 X2.916993 Z1.501194 I-0.135972 J-0.190188
G02 X3.011357 Z1.546035 I0.223459 J-0.348537
G02 X3.106515 Z1.561390 I0.096038 J-0.292648
G02 X3.184013 Z1.546219 I0.000612 J-0.202402
G02 X3.250174 Z1.501243 I-0.073800 J-0.179715
G02 X3.344844 Z1.546182 I0.220417 J-0.342150
G02 X3.440610 Z1.561488 I0.096660 J-0.297548
G02 X3.482313 Z1.557762 I0.000688 J-0.227564
G02 X3.518119 Z1.547106 I-0.031222 J-0.170392
G02 X3.550799 Z1.529034 I-0.067127 J-0.159971
G02 X3.583325 Z1.501292 I-0.132151 J-0.187884
G02 X3.679140 Z1.546290 I0.221959 J-0.348117
G02 X3.775345 Z1.561488 I0.097113 J-0.302645
G02 X3.816952 Z1.557727 I0.000679 J-0.224555
G02 X3.852165 Z1.547099 I-0.030578 J-0.164957
G02 X3.884249 Z1.529076 I-0.066419 J-0.155802
G02 X3.916457 Z1.501292 I-0.135969 J-0.190184
G02 X4.010822 Z1.546133 I0.223459 J-0.348537
G02 X4.105979 Z1.561488 I0.096037 J-0.292647
G02 X4.147790 Z1.557792 I0.000697 J-0.230492
G02 X4.184194 Z1.547090 I-0.031808 J-0.175464
G02 X4.217446 Z1.528924 I-0.067559 J-0.163183
G02 X4.250144 Z1.501167 I-0.127208 J-0.182989
G02 X4.345376 Z1.545980 I0.223769 J-0.351936
G02 X4.441085 Z1.561237 I0.096606 J-0.298189
G02 X4.482789 Z1.557511 I0.000688 J-0.227562
G02 X4.518594 Z1.546855 I-0.031222 J-0.170391
G02 X4.551274 Z1.528783 I-0.067127 J-0.159972
G02 X4.583801 Z1.501042 I-0.132153 J-0.187887
G02 X4.679616 Z1.546039 I0.221958 J-0.348116
G02 X4.775821 Z1.561237 I0.097114 J-0.302646
G02 X4.817428 Z1.557477 I0.000679 J-0.224555
G02 X4.852641 Z1.546848 I-0.030578 J-0.164957
G02 X4.884725 Z1.528825 I-0.066419 J-0.155802
G02 X4.916933 Z1.501042 I-0.135972 J-0.190188
G02 X5.011297 Z1.545883 I0.223458 J-0.348535

G90 X5.00 Z1.51
M98 P0008
M99

O0008
G91 G00 Z0.200000               (raise z above workpiece)
G90 G00 X0.250409 Z1.500977            (return to start)
G91 G00 Z-0.200000               (lower cutter back to cut height)
M99

%
Re: Cutter height advancement problem
« Reply #1 on: May 04, 2017, 06:48:37 PM »
Is there a way to count passes in a loop that then could be used to change the Z depth by adding that count to to the position?
Is this something that will require Lua scripting to get done?
« Last Edit: May 04, 2017, 07:04:51 PM by wefinish »

Offline Stuart

*
  •  311 311
    • View Profile
Re: Cutter height advancement problem
« Reply #2 on: May 05, 2017, 02:47:41 AM »
Why not just download fusion360 it's free for a startup/hobbyist

And draw up your part cam it and set it to do mutiple step downs utilities the part is done

Just my two cents
Re: Cutter height advancement problem
« Reply #3 on: May 05, 2017, 09:29:26 AM »
Fusion360 tackles this by working at each contour at a time. However this is not a rotating cutter and I need the tool path to travel from one end to the other before picking up and making a second pass.

Offline Stuart

*
  •  311 311
    • View Profile
Re: Cutter height advancement problem
« Reply #4 on: May 05, 2017, 10:45:40 AM »
so its not a rotating cutter

then make up a cutter in fusion that has 0 spindle speed that may do it


please provide as much info in your question I miss understood and thought it was a milling cutter you were using

sorry for the mistake

Re: Cutter height advancement problem
« Reply #5 on: May 05, 2017, 06:27:47 PM »
wefinish
you have a good start, you just need to learn to use pound variables to increment the steps down

here is an example of one I posted years ago of how to increment.
http://www.machsupport.com/forum/index.php/topic,16372.msg147299.html#msg147299

all my gcode other than some profiles and 3d contours are all variable based
as most routines are repetitions of whittling away material. (really sweet for lathe routines, turning  facing, threading)
cleaner shorter code and easier for me to write and edit for the next similar routine.
so the path "like you have" is a call with M98 from the main routine and the first thing it does is add the step increment down variable for the Z position variable
ever time it re-enters the loop it computes the new Z depth variable.
just remember to set the Z increment position variable to zero before calling the loop

good luck have fun

Re: Cutter height advancement problem
« Reply #6 on: May 05, 2017, 08:39:41 PM »
Thanks. That looks like the solution. I'll be working to understand this. I haven't heard of pound variables. it's a work-weekend but I'll have some time after that.
Re: Cutter height advancement problem
« Reply #7 on: May 08, 2017, 09:14:28 AM »
I've figured out a few things that don't work!
Although I've been able to use #vars to implement stepwise advancement it still seems that I can't affect the repeating section of curves.
I believe it is the nature of the G02 and G03 commands whereby the centers are fixed and the arcs are relative. Does that seem right?
I'll need to offset the centers as if using a tool length offset and yet somehow keep the arcs relative to each of its center.
Could a #var somehow be used to implement an adjustment in a tool length each pass?
I'm modestly able to write in C++ where vars are common. How/when do vars update in this gcode usage? Each time they are looped?

See below what semi-works.


%
#100=0.001          (need -1 decrement)
#101=-0.100        
#102=0.000(starting depth)

F80
G00 Z#101
M98 P0007 L10                 
M30

O0007
#101=[#101-#100]
G00 X0.34560
G00 Z#101
G90
G02 X0.345606 Z1.545902 I0.223100 J-0.349431
G02 X0.441300 Z1.561173 I0.096590 J-0.297807
G02 X0.483004 Z1.557447 I0.000688 J-0.227562
G02 X0.518809 Z1.546791 I-0.031222 J-0.170392
G02 X0.551489 Z1.528719 I-0.067127 J-0.159972
G02 X0.584016 Z1.500977 I-0.132151 J-0.187885
G02 X0.679831 Z1.545974 I0.221958 J-0.348116
G02 X0.776035 Z1.561173 I0.097114 J-0.302645
G02 X0.817642 Z1.557412 I0.000679 J-0.224555
G02 X0.852856 Z1.546784 I-0.030578 J-0.164957
G02 X0.884939 Z1.528760 I-0.066419 J-0.155802
G02 X0.917148 Z1.500977 I-0.135972 J-0.190188
G02 X1.011512 Z1.545818 I0.223459 J-0.348539
G02 X1.106670 Z1.561173 I0.096038 J-0.292648
G02 X1.184168 Z1.546001 I0.000612 J-0.202402
G02 X1.250329 Z1.501026 I-0.073801 J-0.179716
G02 X1.344999 Z1.545965 I0.220420 J-0.342157
G02 X1.440764 Z1.561270 I0.096660 J-0.297546
G02 X1.482468 Z1.557545 I0.000688 J-0.227565
G02 X1.518274 Z1.546888 I-0.031222 J-0.170392
G02 X1.550954 Z1.528817 I-0.067127 J-0.159971
G02 X1.583480 Z1.501075 I-0.132152 J-0.187886
G02 X1.679295 Z1.546072 I0.221957 J-0.348112
G02 X1.775500 Z1.561270 I0.097113 J-0.302645
G02 X1.817107 Z1.557510 I0.000679 J-0.224556
G02 X1.852320 Z1.546882 I-0.030578 J-0.164957
G02 X1.884404 Z1.528858 I-0.066419 J-0.155803
G02 X1.916612 Z1.501075 I-0.135970 J-0.190186
G02 X2.010976 Z1.545916 I0.223459 J-0.348539

G90 X2.010
M98 P0008
M99

O0008
G91 G00 Z0.200000               
G90 G00 X0.34560      
G91 G00 Z-0.200000
M99

%
Re: Cutter height advancement problem
« Reply #8 on: May 08, 2017, 10:10:50 AM »
you would have to increment all your Z's to move down the same amount, correct?
#103=0 (make sure this is done too in the main)
#103=[#103-#100] (add a step down just for the arcs)
example Z[1.545902+#103]
thou I have to admit I don't remember creating 3d arcs like your trying
but if it runs your one loop fine now, then I see no reason that adding the step down should not work.

your original code;
G91 Z-0.001                     (step down 0.001 per pass)
G00 X0.250409 Z1.500977 "This is an incremental move too, but to where ????? from where ?????"
G90 "set it back to absolute moves"

I thought your original start depth was Z1.500977 now its 0
but admit I did not look close and notice that was an incremental position from who knows where, as there was no reference position move before it.
So not sure wtf your up too really or where your starting at.
Scary code, as your original code started, going vertical then step back down.
Re-think your approach
always look one line at a time and say to yourself "from where I'm at, what setting & position do I need to get me to the place I want to be next"
Re: Cutter height advancement problem
« Reply #9 on: May 08, 2017, 10:58:38 AM »
Yes. Increment all Z's. I was hoping there was a way to do that as a chunk which I think would be a rather advanced maneuver and I'm still familiarizing myself with some pretty basic stuff.

As rookie with little experience just blasting away at this I'm not surprised someone with good understanding finds my attempts scary.
Another approach might be implementing tool offsets however I don't think I can call a new "tool" each pass to advance the cutter. Also it appears that I'm limited to 99 tools and this will require about 250 passes at 0.001 per pass.
Maybe a work offset? However they seem more like a use it once per part thing.

There are other many arc patterns to "drop into" this solution when I get it worked out. This is why I'd like to use the vars to somewhat automate the tool advance.
I fixed that incremental move that caused you to break out the  ??? faces. :-)
As far as looking at one line at a time... I'm improving. I just don't see the moves well when I look at the code yet.