Welcome to Our Community

Some features disabled for guests. Register Today.

Starting point for gcode

Discussion in 'CNC Mills/Routers' started by Tbear1123, Jan 27, 2020.

  1. Tbear1123

    Tbear1123 New
    Builder

    Joined:
    Sep 20, 2019
    Messages:
    19
    Likes Received:
    3
    Hello friends,

    I’ve got a workbee 1010 running a black box control from OB.. everything is finally running smoothly except for one thing..

    let’s say I zero out my z axis right on the Stock material.. I then hit start.. boom, my router doesn’t lift up it actually plunges thinking it needs to go down.. I adjust the very first or second line of gcode, as I’ve found that is where the problem originated from.. so now instead of the stock Gcode of Z10, I’ve changed it to Z20.. finally works right? No! I run the same Gcode on another piece of stock and the Z20 now tries to lift up so much it trips the limit switches! So I adjust back to Z10 and it works.. any advice on how to fix this problem? Frustrating not knowing if it will plunge or lift on me.

    Thanks everyone!!
     
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,941
    Likes Received:
    4,295
    Please do post the troublesome gcode file :) otherwise we can offer a of guessing (;
    (suspecting theres some G53 Zx moves, which are relevant to home, not the setzero coordinates)
     
  3. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,441
    Likes Received:
    1,910
    first, basic machine setup:
    turn on or reset the blackbox with Z as high as it will go. that is Z machine home.
    after that you use the 'setzero' button to set the part 0,0,0 point.

    Have you changed G28?

    second, make sure you know where part zero is in your Fusion setup, should be top of the material unless you really know what you are doing.
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,941
    Likes Received:
    4,295
    :) there isnt a possibility of adding an option to the post for "only use WCS"? Multiple coordinates while best practise, awesome, and safe, does have the disadvantage of making new users crash (;
     
  5. Tbear1123

    Tbear1123 New
    Builder

    Joined:
    Sep 20, 2019
    Messages:
    19
    Likes Received:
    3
    Thanks for the replies guys.. figured it would help to post the file but was away from computer when I originally posted..

    attached is a file that i am using.. although it does happen with EVERY Gcode file i use. figure its got to be a settings problem.
     

    Attached Files:

    David the swarfer likes this.
  6. Tbear1123

    Tbear1123 New
    Builder

    Joined:
    Sep 20, 2019
    Messages:
    19
    Likes Received:
    3
    Line 26 where it says Z10 is what I always have to adjust...
     

    Attached Files:

  7. Tbear1123

    Tbear1123 New
    Builder

    Joined:
    Sep 20, 2019
    Messages:
    19
    Likes Received:
    3
    Youre right on with the G53 Zx moves.. how do I make them relevant to setzero instead of home?
     
  8. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    748
    A translation for those following along...

    G90 G94 [ABSOLUTE POSITIONING - UNITS PER MINUTE FEED]
    G17 [ARCS IN X-Y PLANE]
    G21 [METRIC]

    (Operation 1 of 1 : Engrave4)

    G90 [ABSOLUTE POSITIONING] - this one's repeated a lot, never a bad idea to be sure
    G53 G0 Z10 [GO TO Z +10MM IN MACHINE COORDINATES] - in theory, this is gonna be 10mm above your limit switch!
    G54 [WORK COORDINATE SYSTEM]
    S20000 M3 [SPINDLE ON, 20K]
    G4 P1.8 [WAIT 1.8S FOR SPINDLE TO COME UP TO SPEED]
    X33.978 Y82.222 [RAPID TO THESE WORKING COORDINATES] - rapid because we're still in G0 mode from a few lines up
    Z15 [RAPID TO Z +15MM IN WORKING COORDINATES] - this is probably 15mm above your work surface
    X33.978 Y82.222 [RAPID TO THESE WORKING COORDINATES]
    X33.978 Y82.222 Z5 [RAPID TO THESE WORKING COORDINATES]
    G1 X33.978 Y82.222 Z0 F762 [FEED DOWN 5MM IN Z AT 762MM/MIN]
    X34.179 Y82.208 Z-0.147 [CONTINUE FEEDING IN XYZ...]
     
    David the swarfer and Tbear1123 like this.
  9. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    748
    And fwiw, if it were me, I'd replace

    "G53 G0 Z10"

    with

    "G53 G0 Z0"

    or

    "G28 G91 Z0
    G90"

    Both of which achieve the same result in this case, though G53 simply means "move in machine coords" whereas G28 means "move to machine origin via this defined point" but by not specifying all axes, not all axes move. The result is the same as G53; "go straight up to where it's safe".

    Edit: just noticed that it was actually the first G0 in the file, so a G53 without G0 on the same line would (or should) throw an error.
     
    #9 Rob Taylor, Jan 27, 2020
    Last edited: Jan 28, 2020
  10. Tbear1123

    Tbear1123 New
    Builder

    Joined:
    Sep 20, 2019
    Messages:
    19
    Likes Received:
    3

    Great explanation!
    So if I’m having problems with that Z10 line, do you know how to fix it in fusion settings so I don’t have to go in after I post process and change it?
     
  11. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,441
    Likes Received:
    1,910
    you need to fake the home. every machine needs to fake the home for the basic assumptions that Gcode generators make to be useful and safe.
    please read this
    f360/ob control

    you are getting G53 G0 Z10 because you set 'end of job Z position' to 10 (the default is -10 so you must have changed it). set it to 0.
     
  12. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,441
    Likes Received:
    1,910
    As explained in f360/ob control there is already the option to turn it off for 'end of job' in X and Y but raising Z with G53 is the safest thing to do at the end of job.

    If the user just does that one thing of starting/resettting with Z high then even the Fusion stock GRBL post will work fine (it uses G28 for the same thing and G28 defaults to 0,0,0 MCS resulting in safe moves).

    Of course an option can be added but I really believe that new users should not be misguided in this way, they will just do it wrong forever and carry misunderstandings forward until the day they try to run a HAAS or Tormach and have to relearn after a very expensive crash. (witness the confusion from the multitude of custom 3D printer G and M codes)

    I would rather have a popup message that advises on the placement of Z home for safety. This would be on by default and have an option to turn it off. Knowledge is power (-:

    Maybe the OB videos on building and setting up machines should include this basic information on MCS and WCS? We are seeking to expand the penetration of CNC and this basic information should be readily available up front, especially since (it seems) no-one ever searches these forums and sees the multitude of previous answers to this question.
    Maybe a graphic howto printed sheet in the box with every kit to catch the people who don't watch the videos to the end?

    I have answered this several times in the last few weeks, I even installed Fusion on a work machine so that I could create those setup images quickly and now I am thinking of creating a resource for this to try and make it easy to find. Everything helps... what else can we do to get the newby started on the correct path?
     
  13. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    748
    This was my reaction too, fwiw.

    I think as long as they think the programming is "closed to them" in any way, you have problems. CNC isn't easy, it's not plug and play, and realistically it's not likely to be for a very long time. Skipping the important work of "knowing how to machine" and "how CNC programming works" is setting yourself up for failure. You wouldn't start driving a car without taking driving lessons.
     
    David the swarfer 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