Welcome to Our Community

Some features disabled for guests. Register Today.

Programming Assistance

Discussion in 'CNC Mills/Routers' started by Derek Bingham, Oct 10, 2019 at 8:59 AM.

  1. Derek Bingham

    Builder

    Joined:
    Jul 3, 2019
    Messages:
    9
    Likes Received:
    1
    Hi Everyone,

    I am trying to drill multiple holes at different co ordinates, some holes are 5mm( my cutter size) and then moving to another co ordinate and want to cut a 8mm hole using my 5mm cutter. I have tried so many ways of programming and keep getting ID36 error. I did a program similar to the way i do them for my EDM wire cutter. My program looks like so

    G90 G17
    G92 X0.0 Y0.0 Z0.0
    G00 Z2.0
    G00 X10.0
    G01 Z-2.0 F400 (first 5mm hole)
    G01 Z2.0
    G00 X30.0
    G01 Z-2.0
    G01 Y1.5 (compensation for cutter)
    G02 J-1.5 F400 (to make 8mm hole)
    G01 Y0.0
    G01 Z2.0
    G00 X0.0 Y0.0

    Basically program is to drill a 5mm hole 10mm on X axis and then drill a 8mm hole 30mm on the X axis.Can someone please help me with the correct way to write the programme lines from the "GOO X30.0".

    Thank you
     
    Peter Van Der Walt likes this.
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    1,919
    Likes Received:
    996
    What control system are you using? (Sounds like it doesnt like the GCODE, but cant say for sure till we know what gives the error.
     
  3. Derek Bingham

    Builder

    Joined:
    Jul 3, 2019
    Messages:
    9
    Likes Received:
    1
    Hi Peter. Not sure what you mean by control system, but i am using universal g code sender to an ardunio board.
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    1,919
    Likes Received:
    996
    Running Grbl them?

    So Grbl error codes are here:gnea/grbl

    Error 31 is "There are unused axis words in the block"
    So you have an extra axis word in one of the lines, without a target.

    If you want to know which line, run the job with OpenbuildsCONTROL it shows which line triggered the error
     
  5. Derek Bingham

    Builder

    Joined:
    Jul 3, 2019
    Messages:
    9
    Likes Received:
    1
    Yes sorry, running Grbl, all new to CNC stuff so still trying to figure it out ha ha.

    Okay great will try out and hopefully come up with the problem, i tried the program in another simulator programme and it worked fien but as soon as i try it on the machine it doesnt like it.
     
  6. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    1,919
    Likes Received:
    996
    Simulators are not always a good measure: Grbl understands a subsection of the LinuxCNC spec, but also with some limitations.
     
  7. Alex Chambers

    Alex Chambers Veteran
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    928
    Likes Received:
    480
    This line?

    G90 G17
    G92 X0.0 Y0.0 Z0.0
    G00 Z2.0
    G00 X10.0
    G01 Z-2.0 F400 (first 5mm hole)
    G01 Z2.0
    G00 X30.0
    G01 Z-2.0
    G01 Y1.5 (compensation for cutter)
    G02 J-1.5 F400 (to make 8mm hole)
    G01 Y0.0
    G01 Z2.0
    G00 X0.0 Y0.0

    EDIT
    You haven't fully or correctly defined that arc.
    Try using a cad/cam programme to draw this and then generate the G-code as @phil from seattle suggests.

    Alex.
     
    #7 Alex Chambers, Oct 10, 2019 at 10:14 AM
    Last edited: Oct 10, 2019 at 12:27 PM
  8. phil from seattle

    phil from seattle Well-Known
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    110
    Likes Received:
    36
    G-Code by hand? For something like this, it's not hard but it will get old, way fast. A decent CAM will not only help avoid typo errors like you are seeing but also allow you to avoid worrying about cutter size compensation and will do things like helical boring, finishing passes and such.
     
    Peter Van Der Walt likes this.
  9. Derek Bingham

    Builder

    Joined:
    Jul 3, 2019
    Messages:
    9
    Likes Received:
    1
    Hi Alex,

    Yes that is the line that I am getting the error on. I have also tried it like so:
    G02 X0.0 Y1.5 I1.5
    X1.5 Y0.0 I0.0 J-1.5
    X0.0 Y-1.5 I-1.5 J0.0
    X-1.5 Y0.0 I0.0 J1.5

    and I am still not coming right. I am at the stage where I am going to use a CAM program to write the G code, but just to do this circle the programme is about 15 lines long, could be the CAM program I am using though, but it is just frustrating me because I can understand how to make such a simple program and I cant figure out what the problem is.
     
  10. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2013
    Messages:
    1,299
    Likes Received:
    655
    Here is code generated from Sketchup with the SketchUcam plugin.
    This cuts an 8mm hole with a 5mm bit with a 7 degree ramp angle, 5mm deep. Run it and see what happens (feed rate is high so cut some insulation foam for this test).
    Writing Gcode by hand is interesting but a mugs game when you can generate good code like this in 30 seconds.
    Code:
    %
    (Generated by SketchUcam V1.5-58fdf15)
    (Bit diameter: 5.0mm)
    (Feed rate: 2000.0mm/min)
    (Plunge Feed rate: 1000.0mm/min)
    (Material Thickness: 5.0mm)
    (Material length: 790.0mm X width: 550.0mm)
    (Overhead Gantry: false =    Climb Cut)
    (RAMPING at 7.0 degrees)
    (Plunge Diam First)
    (Optimization is ON)
    (www.PhlatBoyz.com)
    G90 G21 G49 G17 F1000
    G53 G00 Z0
    G00 X0 Y0
    M3 S30000
    (Group: _diam_8.0mm)
    G00 Z5.000
     X0.000 Y0.000
    (plungeboredepth  DEPTH=5.000  DIAM=8.000)
    G00 Z0.500
    G00 X0.0 Y-1.5
    G01 Z0.020 F1000
    G03 X1.5 Y0.0 Z-0.2893 I0.0 J1.5
    G03 X0.0 Y1.5 Z-0.5786 I-1.5 J0.0
    G03 X-1.5 Y0.0 Z-0.8679 I0.0 J-1.5
    G03 X0.0 Y-1.5 Z-1.1572 I1.5 J0.0
    G03 X1.5 Y0.0 Z-1.4465 I0.0 J1.5
    G03 X0.0 Y1.5 Z-1.7358 I-1.5 J0.0
    G03 X-1.5 Y0.0 Z-2.0251 I0.0 J-1.5
    G03 X0.0 Y-1.5 Z-2.3144 I1.5 J0.0
    G03 X1.5 Y0.0 Z-2.6037 I0.0 J1.5
    G03 X0.0 Y1.5 Z-2.893 I-1.5 J0.0
    G03 X-1.5 Y0.0 Z-3.1823 I0.0 J-1.5
    G03 X0.0 Y-1.5 Z-3.4717 I1.5 J0.0
    G03 X1.5 Y0.0 Z-3.761 I0.0 J1.5
    G03 X0.0 Y1.5 Z-4.0503 I-1.5 J0.0
    G03 X-1.5 Y0.0 Z-4.3396 I0.0 J-1.5
    G03 X0.0 Y-1.5 Z-4.6289 I1.5 J0.0
    G03 X1.5 Y0.0 Z-4.7217 I0.0 J1.5
    G03 X0.0 Y1.5 Z-4.8144 I-1.5 J0.0
    G03 X-1.5 Y0.0 Z-4.9072 I0.0 J-1.5
    G03 X0.0 Y-1.5 Z-5.0 I1.5 J0.0
    G03 X1.5 Y0.0 I0.0 J1.5
    G03 X0.0 Y1.5 I-1.5 J0.0
    G03 X-1.5 Y0.0 I0.0 J-1.5
    G03 X0.0 Y-1.5 I1.5 J0.0
    G1 Y-1.125
    G00 Y0.000 Z0.500
    G00 Z5.000
    (plungebore end)
    (Group complete: _diam_8.0mm)
    M05
    M30
    %
    
     

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