Welcome to Our Community

Some features disabled for guests. Register Today.

I need Help with a circle

Discussion in 'General Talk' started by Dark water manufacturing, Mar 1, 2025.

  1. Dark water manufacturing

    Builder

    Joined:
    Mar 1, 2025
    Messages:
    10
    Likes Received:
    1
    Extremely frustrating I can make a circle easily on a real CNC machine. Now I'm trying to do that with my little engraver router in grbl can someone please post a sample program of a 1-in circle?
    ONE OBVIOUS WAY WOULD BE THIS BUT IT GRAFS JUST FINE AND WON'T RUN
    G1 Y.5F5.
    G2X0.Y-1.R.5
    G2X0.Y1.R.5
    G1Y-.5
    THE NEXT OBVIOUS WAY WOULD BE THIS ALSO GRAFS FINE BUT WON'T RUN
    G1X1.Y0.F5.
    G3i1.-1
    i-1.
    G1X0.Y0.
    Obviously the i's would be capitals but I left in lowercase so you could see they were eyes and not L's
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,497
    Likes Received:
    4,421
    1) draw 1 inch circle
    2) run it through Grbl compatible CAM: docs:software:overview [OpenBuilds Documentation]

    If you want to hand-write Grbl compatible gcode, checkout the Grbl Wiki to learn about its supported gcodes etc
     
  3. Dark water manufacturing

    Builder

    Joined:
    Mar 1, 2025
    Messages:
    10
    Likes Received:
    1
    So are you saying the only way to make a circle in grbl is long spline form point to point programming x and y points that is 1958 technology there has to be a better way than that isn't there? If not then grbl is a step backwards at least 30 years and I would be better off tossing this controller board and going back too mach3 it leaps and bounds ahead of all that plus it reads cutters compasation so I can regrind tools and not have to reprogram everything. Please tell me this is not the only way to make a circle in grbl? And I would love to learn it's supported codes but I have yet to see any programs posted using them. The web sites I have read say it supports arcs yet no one posts an example program of a arc being used and every arc I program it wouldn't run and the grbl Prosser spits arcs out in point to point that's no good it's not an arc it's a spline and that kills tools and ball screws prematurely not to mention it is extremely hard on a machine overall. But if that's all the better it is than I guess that's all there is ? Thank You very much for your reply and your time and any other thoughts you may have on this.
     
    #3 Dark water manufacturing, Mar 2, 2025
    Last edited: Mar 2, 2025
  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,497
    Likes Received:
    4,421
    Grbl supports Arcs (G2/3) has for many years.

    See G-Codes if you need to hand code (IJK format, not R format)

    Lots of Grbl posts (our sketchucam and Fusion360 posts etc) does too
     
  5. Dark water manufacturing

    Builder

    Joined:
    Mar 1, 2025
    Messages:
    10
    Likes Received:
    1
    Thank you, I see the G-Codes link takes me to a linuxCNC page. Got me into thinking maybe it's the sender software I'm using. And has nothing to do with the grbl board where it's software. Last night I sent my G-Code file to a friend of mine who still has a machine running Mach 3 with a Mach 3 type parallel port controller board. He was able to take the program and run it just as I sent him and it cut a 1 inch circle no problem. It also runs on a CNC mill at my work just fine with no problems. I will read through the link you sent me maybe I am getting the format wrong for cnc3 commander to use or maybe I need to switch to some other sender software. Thank you for the information and the reassurance that Grbl will indeed make arcs using a G2 or G3. So far we have generated a program using gibbscam, mastercam, SolidWorks and none of them have worked last night I had someone trying to generate a program using freecad but it came out point to point in a spline format instead of G2 G3. And it was getting late I'm sure it would run the spline format because the machine recognizes straight cuts XYZ moves. The code point point is incredibly long and totally unnecessary for making round holes that don't need to be extremely perfect. If I wanted perfect holes I would bore them with a boring head or ream them. But at this point I can't even get some machine to run arc so I can't even round off a corner without programming it point to point. So I do appreciate your help and I will be doing some more reading on the Linux CMC page to see if there's any possible way that my format is just wrong for the sender software. Thanks Again!
     
  6. Dark water manufacturing

    Builder

    Joined:
    Mar 1, 2025
    Messages:
    10
    Likes Received:
    1

    By the way what grbl board do you run and recommend also what sender software are you using and do you recommend. My current machine is just a test bed trying to make decisions on what controller I'm going to run on the bigger machine that we are building so I am definitely open to ideas at this point. I'm starting to wish that when grbl first started coming out I would have jumped on board and learned it so that I could just write my own interface and make a control software they had everything a fanuc had and would be user friendly in the industrial world. But at this point that just seems like so much extra work that I just don't have time for anymore. But I know if someone made an interface that was like a fanuc control they wouldn't be able to keep up with the demand.
     
  7. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,544
    Likes Received:
    1,940
    don't use R format arcs, use IJ instead, and note that X,Y,I and J must be present on all lines.
    and, don't do arcs longer than 180 degrees. though full circles are supposed to work, they don't always work.
    I settled on 90 degree arcs in the SketchUcam generator and they always work...
    Code:
    G20 G17 G90   ; always include the modes you expect
    G1 X1 Y0 Z0 F5
    G3 X0 Y1 i-1 J0
    G3 X-1 Y0 I0 J-1
    G3 X0 Y-1 I1 J0
    G3 X1 Y0 I0 J1
    
    note that GRBL controllers do not require the . like some industrial controllers you are obviously used to, do.
    GRBL also doesnot care about the case of any characters.

    as to graphing fine but not running, the graphing software is not the controller, and graphing software is notoriously easy going and will attempt to draw any code and often assume defaults that are essentially wrong just to achieve a drawing, while the controller software is rigid and unforgiving and will error on the slightest infraction.

    in the end, while writing your own Gcode is fun and instructional, using CAD/CAM is much more fun and much much faster (-:

    Here is a 1 in radius circle I drew in Sketchup Make 2017, added a centerline, generated Gcode, took all of about 20 seconds....
    Yes, this is a 96 segment arc made of line segments which could have been 2 or 4 lines of G2/G3 code, but Sketchup does wierd things with arcs so the centerlines always use line segments, while outside and inside offset cuts will mostly use real arcs. In the end 'it just works' and is much easier than hand writing Gcode. For that matter OpenBuilds CAM is just as easy.
    Code:
    (Generated by SketchUcam V1.5a-241a161)
    (Bit diameter: 3mm)
    (Feed rate: 2345mm/min)
    (Plunge Feed rate: 1234mm/min)
    (Material Thickness: 1mm)
    (Material length: 559mm X width: 1067mm)
    (Overhead Gantry: false =    Climb Cut)
    (Plunge Depth first)
    (Optimization is ON)
    (Arc Feedrate scale is ON)
    (Origin offset ~ 76mm, ~ 79mm)
    (www.PhlatBoyz.com)
    G90 G21 G49 G17 F1234
    G53 G00  Z0.0
    G00 X0 Y0
    M3 S15000
    G00 Z3.0
     X-17.961 Y-17.961
    G00 Z0.5
    G01 Z-0.5 F1234
     X-16.747 Y-19.097 F2345
     X-15.463 Y-20.151
     X-14.111 Y-21.119
     X-12.7 Y-21.997
     X-11.234 Y-22.781
     X-9.72 Y-23.467
     X-8.165 Y-24.052
     X-6.574 Y-24.535
     X-4.955 Y-24.912
     X-3.315 Y-25.183
     X-1.661 Y-25.346
     X0.0 Y-25.4
     X1.661 Y-25.346
     X3.315 Y-25.183
     X4.955 Y-24.912
     X6.574 Y-24.535
     X8.165 Y-24.052
     X9.72 Y-23.467
     X11.234 Y-22.781
     X12.7 Y-21.997
     X14.111 Y-21.119
     X15.463 Y-20.151
     X16.747 Y-19.097
     X17.961 Y-17.961
     X19.097 Y-16.747
     X20.151 Y-15.463
     X21.119 Y-14.111
     X21.997 Y-12.7
     X22.781 Y-11.234
     X23.467 Y-9.72
     X24.052 Y-8.165
     X24.535 Y-6.574
     X24.912 Y-4.955
     X25.183 Y-3.315
     X25.346 Y-1.661
     X25.4 Y0.0
     X25.346 Y1.661
     X25.183 Y3.315
     X24.912 Y4.955
     X24.535 Y6.574
     X24.052 Y8.165
     X23.467 Y9.72
     X22.781 Y11.234
     X21.997 Y12.7
     X21.119 Y14.111
     X20.151 Y15.463
     X19.097 Y16.747
     X17.961 Y17.961
     X16.747 Y19.097
     X15.463 Y20.151
     X14.111 Y21.119
     X12.7 Y21.997
     X11.234 Y22.781
     X9.72 Y23.467
     X8.165 Y24.052
     X6.574 Y24.535
     X4.955 Y24.912
     X3.315 Y25.183
     X1.661 Y25.346
     X0.0 Y25.4
     X-1.661 Y25.346
     X-3.315 Y25.183
     X-4.955 Y24.912
     X-6.574 Y24.535
     X-8.165 Y24.052
     X-9.72 Y23.467
     X-11.234 Y22.781
     X-12.7 Y21.997
     X-14.111 Y21.119
     X-15.463 Y20.151
     X-16.747 Y19.097
     X-17.961 Y17.961
     X-19.097 Y16.747
     X-20.151 Y15.463
     X-21.119 Y14.111
     X-21.997 Y12.7
     X-22.781 Y11.234
     X-23.467 Y9.72
     X-24.052 Y8.165
     X-24.535 Y6.574
     X-24.912 Y4.955
     X-25.183 Y3.315
     X-25.346 Y1.661
     X-25.4 Y0.0
     X-25.346 Y-1.661
     X-25.183 Y-3.315
     X-24.912 Y-4.955
     X-24.535 Y-6.574
     X-24.052 Y-8.165
     X-23.467 Y-9.72
     X-22.781 Y-11.234
     X-21.997 Y-12.7
     X-21.119 Y-14.111
     X-20.151 Y-15.463
     X-19.097 Y-16.747
     X-17.961 Y-17.961
    G00 Z3.0
    G00 X0 Y0 (home)
    G53 G00  Z0.0
    M05
    M30
    
     
  8. Dark water manufacturing

    Builder

    Joined:
    Mar 1, 2025
    Messages:
    10
    Likes Received:
    1
    This is extremely helpful thank you
    I tried most of the day today to get it to work but yes I was programming 180° arcs I will try this thanks .
     
    David the swarfer likes this.
  9. Dark water manufacturing

    Builder

    Joined:
    Mar 1, 2025
    Messages:
    10
    Likes Received:
    1
    IMG_20250303_033820645.jpg IMG_20250303_033820645.jpg Thank You so much! That worked I just had to change your last G3 line the x needed to be X1 not X0 that was a simple fix once it stopped on the 3rd Arc and didn't complete the 4th I knew what the problem was the program on the right is what I just ran perfectly fine and the mill made it's first circle you don't know how much this means to me thank you so much. Now I can actually move on and maybe even get some treadmilling done I had never tried to cut a circle probably the first thing I should have tried but now after completing a simple circle I know I can repeat it and mill threads. I can't even begin to tell you the amount of frustration but I knew it had to be doable and I had to give up on this board yet. Thank you so much again this is a game changer. Now if only I could figure out a way to make cutters comp work LOL that would make adjusting a thread so much easier. But hey you can't have it all.
     
  10. Dark water manufacturing

    Builder

    Joined:
    Mar 1, 2025
    Messages:
    10
    Likes Received:
    1
    It's late and I forgot the g54 good thing it is a modal code and was still reading it LOL.
     
  11. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,544
    Likes Received:
    1,940
    180 arcs do work in GRBL but as they get smaller you need more and more precision in the end points and center offsets.
    SketchUcam does use 180 arcs in the boring spiral processes (see attached file) and that has always worked ok but GRBL does require the XY IJ words on every line for proper operation.
    Technically some can be left off BUT I have found that to be unreliable so I always force them to exist in the posts I maintain.
    (I maintain SketchUcam and the Fusion360 postprocessor for Blackbox/GRBL)

    Do note that arc center offsets are G91.1 mode, ie relative, in GRBL 1.1 but can be absolute under grblHAL so if you upgrade your controller you will need to be aware of the mode.
    The OB post for 4th axis on grblHAL forces a G91.1 in the header, because we never trust a controller to be in any mode other than what WE set it to.
     

    Attached Files:

  12. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,544
    Likes Received:
    1,940
    indeed, you cannot have cutter comp in GRBL, it might come to grblHAL in the future, it has been discussed but I cannot find anything that says it has been done.
    I have found that the way I use Fusion360 or Sketchup it is easy enough to regenerate the Gcode which I then transfer to my machine via my network so I have not felt a great need for it, but it would be cool (-:
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice