Welcome to Our Community

Some features disabled for guests. Register Today.

gcode setup

Discussion in 'CNC Mills/Routers' started by Casey C. Neal, Mar 14, 2019.

  1. Casey C. Neal

    Builder

    Joined:
    Mar 25, 2018
    Messages:
    19
    Likes Received:
    7
    Machine is up and running
    Trying to wrap my head around gcode trying a simple box
    x,y,z axis going through the steps fine
    setting the feed rate is throwing me
    using grbl panel - no matter what I set the feed rate in grbl panel
    the file runs at the same speed

    Question is just dawning on me - Do I have to put the "F" comand in the gcode even when its set in grbl panel?
    See file - no matter what value I put for F machine runs at same speed

    Teaching myself, If you don't know...gotta ask
     

    Attached Files:

  2. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
    Yes you do. G0 uses rapid speed. You need G1
     
  3. Casey C. Neal

    Builder

    Joined:
    Mar 25, 2018
    Messages:
    19
    Likes Received:
    7
    Thank you very much
    Knew it was something simple
    I remember reading the G1 command somewhere
    It's like learning another language, gotta do things a few times for it to sink in
    Thanks again
     
    sharmstr likes this.
  4. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
    Totally. What may help is using something like openbuilds cam to make a simple square. Then read the gcode that's generated. You'll learn a lot, especially in terms of best practices.
     
    David the swarfer likes this.
  5. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,440
    Likes Received:
    1,910
    Here is a 'more correct' version of your code, with comments to explain

    G20 G90 G17 ; set the modes you want, everytime, you cannot trust the last file to leave it in the state you want.
    F5 ; set feedrate to 5 inches per minute
    M3 S1000 ; turn the spindle on, some controllers will not move with G1 unless the spindle is on.
    G0 X0 Y0 ; rapid to start of cut
    Z0.01 ; rapid down to near surface, note this is still G0 rapid move, it gets remembered!
    G1 Z-0.250 ; feed down to 0.25 inches deep. +Z is always UP away from the work, cuts are negative Z, top of work is 0
    G1 Y-.250 ; cut forward -0.25 inch
    G1 Y-.500 ; cut some more forward to -.5 inch
    G1 X1 ; cut to the right 1 inch
    G1 Y0 ; cut away to Y0, will move .5 inch
    G1 X0 ; cut left to X0, will move 1 inch
    G0 Z0.25 ; rapid retract Z to .25" above work
    M5 ; spindle off
    M30 ; end of program

    'more correct' because there is always at least one other way to do it (-:
    I suggest you load a piece of insulation foam for doing test cuts. It forgives our mistakes and lets you see what is going on without danger to yourself or the machine.

    note that direction of axis movement is always in terms of tool motion. for a moving gantry machine like an OX it is obvious, for a moving table machine like a C-Beam the table moves 'opposite' to give the correct tool movement.

    assuming you are using a GRBL controller and do not have home switches:
    always park the head at +x +y and +Z, then when you turn on this is 'home'. GRBL will remember your last work coordinates (set by the 'set zero' buttons in your GUI). This means that if you have an emergency stop or power failure during a job, you can manually position the head back at +X +Y +Z and reset/power cycle GRBL and you can then return to your work 0,0,0. My Ox returns within 0.1mm which is nearly always close enough. for really critical things you can re-find the work 0,0,0 if you need to, it will only be a few microsteps away..

    Most Gcode generators will assume that Z home is safely up and away from the work so this 'parking Z high' is quite important. Industry standards arise because of expensive crashes and even more expensive injuries.

    Here is the link to openbuilds cam OpenBuilds CAM Gcode Creator - Public Beta
     
    Award likes this.
  6. Casey C. Neal

    Builder

    Joined:
    Mar 25, 2018
    Messages:
    19
    Likes Received:
    7
    I will try openbuilds generator
    and the foam idea...for when it goes down and tears across the board
    and thanks for the advice on everything else
    Took a year for me to piece this together now it's time to make it do things
    trying different programs seeing what I can get to work for me
    Still just having a problem getting things turned into gcode
    pushing ahead
    thanks again
     
    sharmstr likes this.
  7. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,440
    Likes Received:
    1,910
    The easiest way by far is the Openbuilds CAM system.
    Followed by Sketchup Make 2016 + SketchUcam plugin.
    There is seldom need to write Gcode by hand, though it does pay to understand what you are reading when the system generated code does not do quite what you expected (-:
    SketchUcam Howto - YouTube
     
    sharmstr likes this.

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