Page 1 of 2 12 LastLast
Results 1 to 12 of 20

Thread: total noob to g-code, pretty simple (i think) arc problem.

  1. #1
    Registered
    Join Date
    Sep 2007
    Location
    USA
    Posts
    6
    Downloads
    0
    Uploads
    0

    total noob to g-code, pretty simple (i think) arc problem.

    I just started learning G-Code, and one of my first assignments is to do a simple design to be carved into a block of wood. I chose to do the NFL logo/crest so I could use some arcs a little more complicated than a semi-circle or quarter circle.

    Unfortunately, those arcs are what's causing me all my trouble.

    Here's the first bit of code giving me a problem:

    Code:
    N0100 G01 X0.8 Y2.9
    N0110 G02 X0.5 Y1.75 I-0.595 J-0.44
    The arc should be from (0.8, 2.9) to (0.5,1.75) with the arc rising 0.3 over the line drawn between those points.

    The distance between the points is roughly 1.19, so by using (A^2+B^2)/2B, I got that the radius should be roughly .74.

    That I think should mean the center point of that arc comes out as -0.595, and -0.44 away from the origin point.

    Unfortunately, Benchman keeps giving me a bad arc error at that line. I tried using exact figures of Cx=-0.443125 from Ax, and Cy=-0.5942432162 from Ay, and it still gives me the bad arc error. What's bugging me is that if I tell it to continue with the program, it appears to draw the arc as I'd intended.

    I'm assuming the center point coordinates are wrong, but what are the right ones? And how do I find them?


  2. #2
    Registered
    Join Date
    Jun 2005
    Location
    us
    Posts
    214
    Downloads
    0
    Uploads
    0
    Ok a .74 raduis between points(0.8, 2.9) to (0.5,1.75)
    Center point of radius x.22329 y2.43632

    Try this
    G01 X0.8 Y2.9
    G02 X0.5 Y1.75 I-.27671 J.68632
    or
    G01 X0.8 Y2.9
    G02 X0.5 Y1.75 R.74
    Tim


  3. #3
    Registered
    Join Date
    Sep 2007
    Location
    USA
    Posts
    6
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by timlkallam View Post
    Ok a .74 raduis between points(0.8, 2.9) to (0.5,1.75)
    Center point of radius x.22329 y2.43632

    Try this
    G01 X0.8 Y2.9
    G02 X0.5 Y1.75 I-.27671 J.68632
    or
    G01 X0.8 Y2.9
    G02 X0.5 Y1.75 R.74
    The first one was WAY off, but just specifying the radius worked like a charm. I'm wondering why my professor didn't mention it in the first place...


  4. #4
    Registered
    Join Date
    May 2005
    Location
    canada
    Posts
    1,164
    Downloads
    0
    Uploads
    0
    Try this;

    G00 X .8 y2.9
    G02 X.5 Y1.75 I-.57671 J-.46368 F20

    The math for the arc center is tricky than it might appear *. Not much fudge-factor with I's and J's.

    * I cheated, cad is a wonderful thing.
    Anyone who says "It only goes together one way" has no imagination.


  • #5
    Registered
    Join Date
    Sep 2007
    Location
    USA
    Posts
    6
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by cyclestart View Post
    Try this;

    G00 X .8 y2.9
    G02 X.5 Y1.75 I-.57671 J-.46368 F20

    The math for the arc center is tricky than it might appear *. Not much fudge-factor with I's and J's.

    * I cheated, cad is a wonderful thing.
    Those I's and J's worked too. Thanks. What's the "F20" for?

    I'm hoping the system we use will recognize the R, as there are 3 other arcs I need to find center points for, and simply putting R.74 is way easier.


  • #6
    Registered
    Join Date
    May 2007
    Location
    US
    Posts
    779
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by RedSoxFox View Post
    The first one was WAY off, but just specifying the radius worked like a charm. I'm wondering why my professor didn't mention it in the first place...
    Hopefully he/she did not mention it because they are aware that always using the R method is a bad habit to get into.

    The problem with using R for G2,G3 is that the closer the arc gets to being a full 360° the less accurate will be the calculated center point of the arc. This is because you are limited to a resolution of 4 decimal places (on most machines anyway).
    And at a full 360° the center point can not be calculated from just the starting point, ending point (they are the same), and the radius.

    Say you wanted to make a 359° arc centered on X0.0, Y0.0 with a 1" radius, and a starting point of (X1.000000 Y0.000000). Then ending point would be (X0.9998477 Y0.0174524).
    Now round that off to 4 decimal places (X0.9998 Y0.0175), now draw a circle thru this rounded off point and the starting point and you will find that the center of this circle is at (X0.0000036, Y-0.0026774) or 0.002677" from where you wanted it. And for many jobs that is a scrap part even before adding in real world machine errors.

    You have the same problem for real short arcs but it usually does not matter much.


  • #7
    Registered
    Join Date
    Sep 2007
    Location
    USA
    Posts
    6
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Andre' B View Post
    Hopefully he/she did not mention it because they are aware that always using the R method is a bad habit to get into.

    The problem with using R for G2,G3 is that the closer the arc gets to being a full 360° the less accurate will be the calculated center point of the arc. This is because you are limited to a resolution of 4 decimal places (on most machines anyway).
    And at a full 360° the center point can not be calculated from just the starting point, ending point (they are the same), and the radius.

    Say you wanted to make a 359° arc centered on X0.0, Y0.0 with a 1" radius, and a starting point of (X1.000000 Y0.000000). Then ending point would be (X0.9998477 Y0.0174524).
    Now round that off to 4 decimal places (X0.9998 Y0.0175), now draw a circle thru this rounded off point and the starting point and you will find that the center of this circle is at (X0.0000036, Y-0.0026774) or 0.002677" from where you wanted it. And for many jobs that is a scrap part even before adding in real world machine errors.

    You have the same problem for real short arcs but it usually does not matter much.
    Ahh, good to know.

    So basically, it's OK to use in situations where being a hundredth off isn't a big deal, but in any kind of precision situation, the exact coordinates should be found?


  • #8
    Registered
    Join Date
    Sep 2007
    Location
    USA
    Posts
    6
    Downloads
    0
    Uploads
    0
    OK, apparently the machine we're using won't recognize/accept the R instructions.

    Given Benchman can figure out the center point with just the two X,Y coordinates and the radius length, I'm assuming there's got to be some kind of program out there that will do the same thing and actually give me those X,Y coordinates for the center point. Either that, or what's the formula and I can work on figuring it out as I go?


  • #9
    Registered
    Join Date
    Jun 2005
    Location
    us
    Posts
    214
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by timlkallam View Post
    Ok a .74 raduis between points(0.8, 2.9) to (0.5,1.75)
    Center point of radius x.22329 y2.43632

    Try this
    G01 X0.8 Y2.9
    G02 X0.5 Y1.75 I-.27671 J.68632
    or
    G01 X0.8 Y2.9
    G02 X0.5 Y1.75 R.74
    I used cad also and still got it wrong.I don't think i ever used an I or J for cutting a raduis. I only use it to cut full circles. Tell me if this is right .The I and J is an incamental
    distance from the start point of the arc? Not from the ending of the arc. After reading Andre's post I am going to start using I an Js on all my arcs.
    Tim


  • #10
    Registered
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    11,960
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by timlkallam View Post
    ....Tell me if this is right .The I and J is an incamental distance from the start point of the arc? Not from the ending of the arc....
    I have seen some people post and say that on some machines the I and J are the absolute location of the center. I program on Haas machines and they have it as the incremental distance.
    An open mind is a virtue...so long as all the common sense has not leaked out.


  • #11
    Registered
    Join Date
    Aug 2003
    Location
    NSW, Australia
    Posts
    3
    Downloads
    0
    Uploads
    0
    In my experience, the I & J are vectors from the start point of the arc to the centre of the arc. Its possible that some machines may be set up to use absolute co-ordinates, so this should be checked before one hits the "Go" button!
    Regards, Ian Kirby.
    Wollongong NSW Australia


  • #12
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,289
    Downloads
    0
    Uploads
    0
    I came up with this. Slightly different than the answer above.

    G1 X0.8000 Y2.9000
    G2 X0.5000 Y1.7500 I-0.5743 J-0.4643
    Attached Thumbnails Attached Thumbnails total noob to g-code, pretty simple (i think) arc problem.-arc.gif  
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Hello, I'm a total noob
      By unseen wombat in forum Commercial CNC Wood Routers
      Replies: 5
      Last Post: 01-06-2007, 04:42 PM
    2. Simple G-code commands...
      By WilliamD in forum G-Code Programing
      Replies: 5
      Last Post: 01-12-2006, 01:27 PM
    3. RFQ: small 2D milling needed, pretty simple
      By cowanrg in forum Employment Opportunity
      Replies: 12
      Last Post: 10-23-2005, 01:16 PM
    4. Over the top easy question from total noob.
      By GregoryA in forum General Metalwork Discussion
      Replies: 4
      Last Post: 10-01-2005, 10:41 AM
    5. Perhaps a bug in simple one line code??
      By thuffner3 in forum TurboCNC
      Replies: 3
      Last Post: 02-02-2004, 09:21 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.