Welcome to Our Community

Some features disabled for guests. Register Today.

How to cancel G92 without G28?

Discussion in 'Control Software' started by Lybrary, Sep 2, 2022.

Tags:
  1. Lybrary

    Lybrary New
    Builder

    Joined:
    Aug 23, 2022
    Messages:
    37
    Likes Received:
    7
    After running a job where the origin was set with G92 to some other location offset from the home position, how can I move the machine to a position relative to the home position without first doing a homing cycle?

    Essentially I would like to get the origin back to home without moving the machine to that position.

    The reason for this is the following: I have a CNC that I store upright in a vertical position. In order to do that the gantry and tool head needs to be at the very end of the bed, meaning far away from the home position. I want to avoid that the machine has to first home and then make a long journey to the end of the bed. I would like to move it from wherever it is directly to the parking position at the end of the bed.
     
  2. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,449
    Look at invert homing direction. Not exactly what you asked for but it will home to the opposite end of where you are homing now which by the sound of it is exactly what you want. If you're using grbl, look at $23 setting. Grbl v1.1 Configuration · gnea/grbl Wiki You'd have to have limit switches there obviously.
     
    Peter Van Der Walt likes this.
  3. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,489
    Likes Received:
    1,925
    reading this
    G Codes
    tells us that G92.1 will remove the G92 offsets, leaving you with just plain WCS positions, and of course, MCS, Machine Coordinate System as well (where home is, all WCS and G92 settings are offsets from MCS)

    reading this
    G Codes
    tells us how to move in machine coordinates.
    Thus, a macro like
    G21 G90
    G53 G0 Z-5
    G53 G0 X-123 Y-123
    will move to Z to absolute machine position -5mm from the top of Z (where home is), move up first for safety
    and then move X and Y to -123,-123.

    so your parking move only needs a macro that moves the machine in G53 machine coordinates to wherever you want it to park, no need to home first (so long as you homed at power on of course).
     
  4. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,489
    Likes Received:
    1,925
    oh, just noticed you mention G28 for homing.
    What controller are you using?
    Standard GRBL in the Blackbox does not use G28 for homing, G28 is in fact a 'preset position' which is often used for tool changers.
    G28 is used for homing by 3D printers, a departure from the standard use of G28.

    GRBL follows the Gcode that is used by LinuxCNC
    G Codes
     
  5. Lybrary

    Lybrary New
    Builder

    Joined:
    Aug 23, 2022
    Messages:
    37
    Likes Received:
    7
    David, thanks. G53 is exactly what I was looking for. I want to move the machine to a location in machine coordinates, not any working coordinates that a prior job may have set.

    I am using BlackBox plus Interface. What command does BlackBox use for homing?
     
  6. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,489
    Likes Received:
    1,925
    $H
    all the commands it supports are at Grbl v1.1 Commands · gnea/grbl Wiki
    but CONTROL takes care of the details most of the time, as would any GUI.
     
    Peter Van Der Walt likes this.
  7. Lybrary

    Lybrary New
    Builder

    Joined:
    Aug 23, 2022
    Messages:
    37
    Likes Received:
    7
    Thanks. I don't have a computer connected to my machine. I do everything with the Interface. So I am thinking to write various scripts that I execute through the job menu from the Interface. If I understand this correctly then I can mix gcode with the GRBL $-commands in the same file and execute this file through Interface just like running a job.
     
    Peter Van Der Walt likes this.
  8. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,193
    Likes Received:
    4,346
    Correct.
     
  9. Lybrary

    Lybrary New
    Builder

    Joined:
    Aug 23, 2022
    Messages:
    37
    Likes Received:
    7
    I tried this with G53 but I am getting a GRBL alert that the target exceeds machine limits. I have no idea why. Here is what I do:
    • turn machine on and home it
    • jog the machine to about the center of the bed
    • Then load a file with the following commands
      • G21
      • G90
      • G53 G0 X100
    • I run the file from the Interface. Machine does not move and issues the GRBL alert.
    I have 630 mm x-travel set in the GRBL profile. Soft and hard limits are turned on. What am I doing wrong?
     
  10. Lybrary

    Lybrary New
    Builder

    Joined:
    Aug 23, 2022
    Messages:
    37
    Likes Received:
    7
    Answering my own question: It appears the machine coordinate system starts at maximum x. Thus I have to use negative coordinates, something like:
    G53 G0 X-100
    And this positions the gantry at x=630-100=530, with 630 mm being my maximum x travel.
     
    David the swarfer likes this.
  11. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,193
    Likes Received:
    4,346
    Correct. See Frequently Asked Questions · gnea/grbl Wiki
     

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