587,070 active members*
3,342 visitors online*
Register for free
Login
Results 1 to 17 of 17
  1. #1
    Join Date
    Jan 2006
    Posts
    15

    Z-Axis Arc G-Code?

    Hi guys,

    Im new here, so I hope this is the right place to post. Im looking for a G-Code similar to the G02/G03 codes but for the Z-Axis instead. Meaning, the Z axis will sweep in an arc upwards or downwards. Does a G-Code like this exist? Or will I have to program 100 vertexs for the XYZ value an hope for the best? Im using a Fanuc controller.

    -Mike AKA TIG

  2. #2
    Join Date
    Mar 2003
    Posts
    4826
    I've never tried it, because it would have to be hand coded, but I think you'll have to switch modal planes with a G18 for arcs in the XZ plane or G19 for arcs in the YZ plane. Then back to G17 for regular arcs in the XY plane.

    Of course, you will have to make sure the address of the arc centers corresponds with the axis named in the G02 or G03, which you would still be using to command the arcs.

    G18 G02/3 X Z I K
    G19 G02/3 Y Z J K

    If I'm wrong, I see Geof here typing away, too
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  3. #3
    Join Date
    Jan 2006
    Posts
    15
    I am new to CNC machining, so can you explain what exactly G18 and G17 do? Im basically trying create an arc parallel to the y axis that goes up.

    Thanks for the help.

  4. #4
    Join Date
    Mar 2003
    Posts
    4826
    G17, G18, G19 tells the controller which pair of axis will perform circular interpolation. Only two can do it at a time.
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  5. #5
    Join Date
    Jan 2006
    Posts
    15
    Im assuming the G19 Code will work, if it is the G02 code rotated vertically. Let me make a quick drawing to post up real quick to see if you could possibly help me learn how to code a G19.

  6. #6
    Join Date
    Jan 2006
    Posts
    15


    Heres pretty much what I want to do. The red is the tool path for the ball mill. Yes, it is a very crude drawing.

  7. #7
    Join Date
    Mar 2003
    Posts
    4826
    I would try this: I'd have to use incremental code to put some numbers to it, if every dot is an inch in your picture: when the tool gets to the start at the base of the arc. IF the tool were a 1" ball, and the radius was 3.5" on the profile, and we were writing an offset path:
    G91
    G19
    G03 Y3. Z3. J0 K3.
    G17 (insert this whenever you want to go back to standard XY plane, don't forget )
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  8. #8
    Join Date
    Jan 2006
    Posts
    15
    Thank you very much. How to the JK portions of the code correlate to the G19 code? Such as, in a G02/G03 code the IJ give positions of the XY Center of the arc with relative positioning. Please forgive my ignorance.

  9. #9
    Join Date
    Mar 2003
    Posts
    4826
    I corresponds to the X component of the arc's center
    J corresponds to the Y component of the arc's center
    K corresponds to the Z component of the arc's center

    The syntax has to be correct for whichever plane is currently modal in the control, or it will alarm.
    G17 goes with XY arc endpoint and IJ arc center location description
    G18 goes is XZ arc endpoint and IK arc center location description.
    G19 goes with YZ arc endpoint and JK arc center location description.

    No matter what plane you are working in, you still have to use a G02 or G03 to indicate direction of rotation in the new plane.
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  10. #10
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by HuFlungDung
    I've never tried it, because it would have to be hand coded, but I think you'll have to switch modal planes with a G18 for arcs in the XZ plane or G19 for arcs in the YZ plane. Then back to G17 for regular arcs in the XY plane.

    Of course, you will have to make sure the address of the arc centers corresponds with the axis named in the G02 or G03, which you would still be using to command the arcs.

    G18 G02/3 X Z I K
    G19 G02/3 Y Z J K

    If I'm wrong, I see Geof here typing away, too
    Actually no, I was out getting dinner

    I copied, modified and reattached the picture. I used R rather tha I, J, (actually it would be J, W, I think). Note I put the R to tool center, you have to do the calculation for tool nose radius because tool comp is not available in G18 and G19 (at least on my machines).

    I hope I got it right; a good meal and a bit of a drink blurs the grey cells.
    Attached Thumbnails Attached Thumbnails G19G03ryz.jpg  

  11. #11
    Join Date
    Jan 2006
    Posts
    15
    Thanks for all the help guys! Cheers. I believe I understand how to do this now. I will do some coding, but unfortunately I wont be able to verify it until I get back to school Monday.

    By chance, is there a relatively inexpensive program I can get to just verify my NC Codes for my home computer?

  12. #12
    Join Date
    Mar 2003
    Posts
    4826
    Geof gave you another alternative, if your control accepts R codes, it makes it quite a bit easier to hand code.

    As for a backplot, I dunno, I never tried it for fancy arcs in XZ and YZ, but you could likely go and grab a Bobcad demo off the net somewhere and try its backplot function. Maybe someone else has some alternatives to suggest.

    Come to think of it, there is something called NC plot talked about here on the 'zone.
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  13. #13
    Join Date
    Mar 2003
    Posts
    4826
    I downloaded the beta 17 of NC plot and wrote a little snippet of code in it, and got the results I expected. I think it should serve your purposes.
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  14. #14
    Join Date
    Jan 2006
    Posts
    15
    Where can I find this "NC Plot"? (Searching Google right now)

  15. #15
    Join Date
    Mar 2003
    Posts
    4826
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  16. #16
    Join Date
    Oct 2005
    Posts
    104
    ohh so nice topic ,

    so am good programmer with G-Code , am using BOBCAd but unforunatly it's just for 2D milling ,

    my problem now am trying to shape 3D Dome , i did some of it ,

    can anyone help me by telling how the ball endmill move on the surface to shape this Dome geometry .

    Thanks too much

  17. #17
    Join Date
    Mar 2003
    Posts
    4826
    In Bobcad, I think you will have to program to the center of radius of your ball mill, and then offset the tool downwards (in the machine's tool length offset table) by the amount of the tool radius. Make sure to keep your rapid plane high enough to allow for the tool movement, because it is actually 'long' by the ball radius amount.

    Another method would be to create an offset for only the sphere portion of your geometry, then move only that new geometry downwards by the radius of the ball. This might be the safer method, because then you don't have to lie to your controller about the tool length and worry about accidental gouging while making moves in rapid traverse. Still, the new offset geometry may then descend below some other geometry and would have to be carefully trimmed to prevent gouging.
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

Posting Permissions

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