Results 1 to 13 of 13
  1. #1
    apestate is offline Stainless
    Join Date
    Mar 2003
    Location
    San Francisco, CA
    Posts
    1,018

    Default Help writing G-code pocket program for mill

    Hi guys

    This is going to be pretty basic. I just want to see how someone would write a code to pocket a circle with cutter comp active.

    I thought it would be simple but then I realized that I'd want overlap at the center of the circle, and got confused :X

    Anybody wanna help, let's say 2" circle 1/8" deep with 1/2" cutter, and 50% overlap?

  2. #2
    SeymourDumore is online now Diamond
    Join Date
    Aug 2005
    Location
    CT
    Posts
    6,246

    Default

    If you're talking strictly fingerCAM, then I'd do tool-center in the middle of the circle and only comp the "wall" pass.
    That is by the way most CAM programs do it also.
    In this case, assume X/Y0 being the circle center:

    T1 M06
    G00 G43 H01 D01
    G00 X0 Y0 Z1.
    S2000 M03
    M08
    G01 Z.05 F200.
    G01 Z-.125 F5.
    G01 X.25
    G03 I-.25 J0
    G01 X.7
    G03 I-7. J0
    G01 G41 X1.
    G03 I-1. J0
    G01 G40 X0 Y0 Z1. F200.

    Or, you can ramp into the arc and down to the bottom rather than plunge:

    T1 M06
    G00 G43 H01 D01
    G00 X.25 Y0 Z1.
    S2000 M03
    M08
    G01 Z.05 F200.
    G03 Z-.05 I-.25 J0 F5.
    G03 Z-.125 I-.25 J0
    from here same as before

  3. #3
    MLeonard is offline Aluminum
    Join Date
    Mar 2007
    Location
    Bellingham, WA
    Posts
    151

    Default

    There are lots of ways to do it, depending on how much effort you want to put in to it, what make and model control you have, and what your cutter is capable of.

    You are right that attempting to start at the center with cutter compensation active without giving the control a large enough radius to avoid overlap will be troublesome. However, if you mill/drill away at least a cutter diameter in the center during your plunge, then your first circle can have a programmed radius twice the cutter radius, and still only have a 50% width of cut.

    The approach you take to cutter compensation lead-in will depend on your make and model of control. Some controls can start comp with a zero-length move; some require any non-zero length (say >= 0.001"); and some require a move at least as long as the cutter radius or diameter.

    Supposing that you need a long lead-in; that the final pocket diameter is more than twice the tool diameter; that you can plunge straight down with your tool (e.g. 2-flute end mill in easy-cutting material); that you want to approximate a spiral out; and that you want to climb mill the whole thing:

    Rapid to pocket center, Z clearance
    Feed Z at plunge rate to cutting depth
    Activate comp left (G41)
    Feed to one cutter diameter X+ of pocket center
    CCW arc (G3) 360 degrees (this may take multiple lines, depending on your control)
    CCW arc approx. 90 degrees, to X center, Y center+diameter+1*stepover
    CCW arc 270 degrees, to X center+diameter+1*stepover, Y center
    CCW arc approx. 90 degrees, to X center, Y center+diameter+2*stepover
    ... Repeat 90/270 until within finish allowance, then spiral out to finish dimension
    CCW arc 360 degrees, ending at 12:00 position (X center, Y+pocket radius)
    CCW arc 180 degrees, ending perhaps halfway to 6:00 position (X center, Y-pr/2)
    Cancel cutter comp (G40)
    Line back to pocket center
    Rapid Z back to clearance

    For the spiral step-out moves (approx. 90 degrees, from 3:00 to 12:00) use the radius that you are stepping out to as the radius of the arc.

    E.g.:

    ...
    G0 X0 Y0 Z.1
    G1 F6 Z-.125
    G41 D1
    G1 F12 X.5
    G3 I-.5
    G3 X0 Y.75 R.75
    G3 X.75 Y0 R-.75
    G3 X0 Y.99 R.99
    G3 X.99 Y0 R-.99
    G3 X0 Y1 R1
    G3 J-1
    G3 X0 Y-.5 J-.75
    G40
    G1 X0 Y0
    G0 Z.1
    ...
    Last edited by MLeonard; 09-23-2008 at 09:25 PM. Reason: Added G code

  4. #4
    Kallam is offline Cast Iron
    Join Date
    Feb 2006
    Location
    South Carolina
    Posts
    265

    Default

    This is basic its for a fanuc control.

    %
    O1234( 2 inch circle .125 deep )
    T01M6 (.5 END MILL)
    GO G90 G54 X0 Y0 S3500 M3
    G43 H1 Z.1
    G1Z-.125 F5
    Y.25 F20
    G3J-.25
    G1Y.5
    G3J-.5
    G1Y.745
    G3J-.745
    G1Y.5
    G41 D1 Y1 (CUTTER COMP. ON )
    G3J-1
    G1 G40 Y.5 (CUTTER COMP. OFF)
    G0Z6
    M30
    %

    Interesting everybody does it alittle different but the results are the same.

  5. #5
    apestate is offline Stainless
    Join Date
    Mar 2003
    Location
    San Francisco, CA
    Posts
    1,018

    Default

    Wow thank you guys for putting the work into helping me, I've read everything closely.

    The G-code I want to write is for a Milltronics machine with Centurion 7 control. I'll figure out the specifics through the manual and maybe a chirp here or there.

    Thank you for the extensive G-code experience, though. This will be a major help in getting started.

    Does any machine builder make a G-code canned cycle for roughing pockets, frames, etc. on a mill? I'm used to Hurco, which has a control I would give awards to. Slap a Fischer-Price logo on the corner of the control box and it wouldn't seem out of place! That's not a disparaging comment either, given my recent struggles with Fanuc and G-code. :>

  6. #6
    ARB's Avatar
    ARB
    ARB is online now Titanium
    Join Date
    Dec 2002
    Location
    Granville,NY,USA
    Posts
    3,648

    Default

    The G150 deal on the Haas works pretty good.
    The A2100 had a bunch of canned cycles for pockets and frames.
    I think the Dynapath does too.

    I am not sure about the manwell guide on the Fanucs.

  7. #7
    SeymourDumore is online now Diamond
    Join Date
    Aug 2005
    Location
    CT
    Posts
    6,246

    Default

    Circle pocket for that 2" diameter on a Haas with full cutter comp looks like this:

    G13 I.5 K1. Q.25 F5.

    Is the Hurco any simpler?

  8. #8
    apestate is offline Stainless
    Join Date
    Mar 2003
    Location
    San Francisco, CA
    Posts
    1,018

    Default

    With Hurco, you'd add a new block in conversational. Pick Milling, then Mill Circle.

    Then you go into the block and change it to inside circle, select what tool, change from climb/conventional to pocket, finishing tool if you want, and put in the coordinates X0 Y0, Z start, Z bottom, peck depth, Auto, cycle start.

  9. #9
    SeymourDumore is online now Diamond
    Join Date
    Aug 2005
    Location
    CT
    Posts
    6,246

    Default

    Hmm... LIke I've said
    On Haas G12 is conventional, G13 is climb.
    One block and one block only to define start radius, finish radius, radius increment, Z-depth and # of steps to get to Z depth. WIth full comp unless D0 is specified in which case no comp is applied.

    The credit however should go to Yasnac as it is their command which is implemented by Haas.
    No need to mess with stinkin' conventional either, just plunk it into your G-code whenever there is a circle pocket.

  10. #10
    MattW is offline Hot Rolled
    Join Date
    Sep 2004
    Location
    Fairfield, PA, USA
    Posts
    822

    Default Melbourne!

    So, is the Mighty Mushroom still open? I lived there a long time ago. Joyce's pizza kept me alive.

  11. #11
    apestate is offline Stainless
    Join Date
    Mar 2003
    Location
    San Francisco, CA
    Posts
    1,018

    Default

    Quote Originally Posted by SeymourDumore View Post
    Hmm... LIke I've said
    On Haas G12 is conventional, G13 is climb.
    One block and one block only to define start radius, finish radius, radius increment, Z-depth and # of steps to get to Z depth. WIth full comp unless D0 is specified in which case no comp is applied.
    Yeah I was thinkin about your post Seymour, that is a pretty slick code. I think that beats Hurco for simplicity in this case.

    However, on Hurco -everything- is conversational. It isn't like some machines where the conversational is like an add on. On Hurco the conversational is the interface.

    If you wrote that program block to pocket mill on a Hurco, you'd basically slam right through the important stuff, scan over your options, and move on. The nice thing is that although the Haas/Yasnac G-code you posted is short, remember that you've got to program to change tools, start the spindle, move to start position, and move back out of the cutting zone when you're done. With Hurco, that's all accomplished with the mill circle block.

    :>

    Matt, not sure if I've eaten at either of those places. I'll check it out though, I've only been in Florida for a year. I've been living over in Palm Bay but will move to probably West Melbourne or Eau Gallie soon.


  12. #12
    Mfassler is offline Aluminum
    Join Date
    Oct 2006
    Location
    Sacramento,ca
    Posts
    158

    Default

    Yean man love Yasnacs,we have 6 vmc's with Yasnac controls. I like using g13 whenever I can.

    I've never seen a Hurco control,but I have run plenty on mazak mazatrols. G13 is the same as choosing a circle mill,the conversational controls just do all the other inputing for you.

  13. #13
    machine1medic's Avatar
    machine1medic is offline Titanium
    Join Date
    Jul 2006
    Location
    Clover Hill district, WI
    Posts
    2,307

    Lightbulb

    Quote Originally Posted by Mfassler View Post
    I like using g13 whenever I can.

    G13 is the same as choosing a circle mill,the conversational controls just do all the other inputing for you.
    I grew up on Mitzy's ..... G 13's and G 12's are like a pair of 6-shooters for a cowboy.

    On worn or heavilly compensated mills, you can get a perfect, interpolated circle......by using one of each , and a dead-pass of each.

    eliminates the opposite kiddy-corner, high and low results.

    when G-coding by finger-cam. Be care-full which line you turn comp off.
    or your last move will cut to tool-center.
    For some reason guys who came from say Master-Cam first.....
    and have to write-yer-own.....miss the G1 G40 sometimes.

    m1m

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •