Welcome to Our Community

Some features disabled for guests. Register Today.

Question about Grbl $22 - Homing cycle

Discussion in 'General Talk' started by jda70az, Oct 6, 2022.

  1. jda70az

    jda70az Well-Known
    Builder

    Joined:
    Nov 11, 2020
    Messages:
    121
    Likes Received:
    16
    Hi.

    When I initiate a Home move on the machine it moves the Z down towards the spoil board.
    I need it to go up!
    So is the correct setting


    $3=4 (dir port invert Mask: 00000100 )

    to invert the Z axis during a Home Move?
     
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,763
    Likes Received:
    4,266
    1) make the machine Jog correctly first ($3)
    2) $23 tells Grbl "where is the switch" (default is Axis Maxima. If any of your switches are on the MIN side, invert that axis)

    Use OpenBuilds CONTROL > Grbl Settings tab. It handles both these settings as simple switches so it makes more sense than having to figure out the bitmasks manually
     
    jda70az likes this.
  3. jda70az

    jda70az Well-Known
    Builder

    Joined:
    Nov 11, 2020
    Messages:
    121
    Likes Received:
    16
    Thank you
     
  4. jda70az

    jda70az Well-Known
    Builder

    Joined:
    Nov 11, 2020
    Messages:
    121
    Likes Received:
    16

    Also wanted to ask how to set properly Work Piece Zero along the Z axis. It is first plunging into clamps and stock before moving along the X and Y axis.
    I need it to go UP, not down. I got black box here in front of me hooked up to my computer.

    is it $3 Step direction Invert Z Normal?
     
  5. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,763
    Likes Received:
    4,266
    1) Make sure your machine JOGS correctly (Thats what $3 sets)
    X+ should move the X carriage to the right
    Y+ should move the gantry backwards
    z+ should lift the endmill up and away from the spoilboard

    If any of these are different: FIX $3 FIRST!

    Everything else assumes your machine is following Cartesian standards!

    2) Next setup Homing to work correctly. Many CAMs move in both WORK and MACHINE coordinates - so you have to have working Homing!
    Homing Dir Invert $23 - don't think of it "which way it moves" you already did that by setting $3 correctly. Grbl, by default expects the homing switches at each axis maximum position (so Top for Z, back for Y, right for X) - if any of your switches are not in the default positions, flip the switch for that axis to tell Grbl "Hey Grbl, I put my X switch at MIN, my Y switch at MIN and my Z switch at MAX" for example

    After homing the entire machine's working envelope is in NEGATIVE machine coordinates (Read through Frequently Asked Questions · gnea/grbl Wiki to understand)

    3) With the machine following Cartesian standards, and Homing working correctly, next important thing is to use COMPATIBLE GCODE!

    I assume you are using Fusion, and I also assume you aren't using our Post? You MUST use our Post Processor: docs:software:fusion360 [OpenBuilds Documentation]
    I am assuming that, because weird Z moves at the start of the job is always a good clue that the user forgot to Home, forgot to use the correct post and is using Fusion (as an advanced CAM it moves in both WORK and MACHINE coordinates)

    4) In the Post Options you have to have sane values (if Fusion, Start/End Job coordinates should be -10 (default) or lower (-1 to -10) (again the Negative space thing I asked you to read about above)

    5) Next, ZERO your WORK COORDINATES. Make it easy on yourself and get a PROBE: docs:xyzprobe:start [OpenBuilds Documentation] - takes all the guesswork out!
    Otherwise, Jog to the Origin you set in CAM, and click SetZero buttons

    6) Then run the Job
     
    jda70az and Alex Chambers like this.
  6. jda70az

    jda70az Well-Known
    Builder

    Joined:
    Nov 11, 2020
    Messages:
    121
    Likes Received:
    16
    Yes I use Fusion 360.
    I use Open Builds Post Grbl in Fusion 360 when creating the G Code. Works perfectly. Executes jobs perfectly. Not a problem.
    1. When Homing the machine it Moves X Y Z to the front left corner of the machine.
    It move the router UP along the Z axis FIRST then moves X and Y. Perfect. Not a problem.

    2.
    When I press the X + button on controller it moves the router to the RIGHT.
    When I press the Y + button on controller it moves the router to the Back of the machine.
    When I press the Z + button on controller it moves the router UP

    3. After finishing a Job it lifts the router UP along the Z axis away from the work piece and towards the front of the machine for a tool change. Perfect. Not a problem

    4. After pressing Zero XYZ button on Controller ( the one above Home Button) to move the bit to Work Piece Zero ( front left corner of my stock) it moves the router Down along the Z axis
    and then moves X and Y. I don't like it doing that. I would prefer... for it to move X and Y first then lower the router down to avoid occasionally crashing into clamps or the work piece.

    Or in other words it should do the exact same thing as HOME does.
     
  7. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,763
    Likes Received:
    4,266
    Don't use the Goto Zero button if you have fixtures in the way. Interface moves down to Z+5 first (rather, usually bit is down lower and it lifts it up to Z5) before moving XY.
     
    jda70az likes this.
  8. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,408
    Likes Received:
    1,899
    Yes, I quite agree, it should be doing a G53 Z *safetymove* before moving to the current WCS X0 Y0.
    You can create a little gcode file for yourself to do this for you:
    G90 G21 G17 ; set modes
    G53 G0 Z-5 ; raise Z to 5mm below home, safely clearing clamps
    G0 X0 Y0 ; go to current WCS 0,0
     
    jda70az likes this.
  9. jda70az

    jda70az Well-Known
    Builder

    Joined:
    Nov 11, 2020
    Messages:
    121
    Likes Received:
    16
    Ok thx.
     
  10. jda70az

    jda70az Well-Known
    Builder

    Joined:
    Nov 11, 2020
    Messages:
    121
    Likes Received:
    16


    Here is what the g code looks like out of fusion 360 for me.

    G90 G94 G17
    G20
    (Operation 1 of 1 : pocket)
    G54
    (This relies on homing, see Search Results for Query: G53 fusion | OpenBuilds )
    G53 G0 Z-0.3937


    So that would look like...

    G90 G21 G17 ; don't need G94 and replace G20 with G21
    G53 G0 Z-5 ; raise Z to 5mm below home, safely clearing clamps
    G0 X0 Y0 ; go to current WCS 0,0

    Why not using G54 to go to WCS 0,0,0 ?
     
  11. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,763
    Likes Received:
    4,266
    David was referring to creating a seperate mygozero.gco file on the USB drive to do a custom go to zero macro. Run it just like you would a job file
     
    jda70az likes this.
  12. jda70az

    jda70az Well-Known
    Builder

    Joined:
    Nov 11, 2020
    Messages:
    121
    Likes Received:
    16
    ah
    ok thanks
     
  13. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,761
    Likes Received:
    1,352
    The macro David is suggesting would go to X0 Y0 at a safe height, then you could go to Z0.
    If you want the macro to do that last move for you add an extra line :-
    G0 Z0

    Don't do G0 X0 Y0 Z0 all on one line as it will do all three moves at the same time - lowering Z as it moves to X0 Y0.
    Alex.
     
    jda70az 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