Welcome to Our Community

Some features disabled for guests. Register Today.

Help: Macro to adjust Z0?

Discussion in 'General Talk' started by brrian, Jan 17, 2024.

  1. brrian

    brrian Well-Known
    Builder

    Joined:
    Dec 6, 2019
    Messages:
    122
    Likes Received:
    52
    I cut sheet acrylic & zero to the spoilboard. Occasionally I won't get a cut fully through the material & I need to adjust Z0 slightly. To do so, I add what I think I need (usually a few thousandths) to the Z DRO in CONTROL.

    So if for example Z is sitting at 1.620", and I thought I needed to cut .005" deeper, I enter 1.625" in the Z DRO and Ctrl-Enter.

    I'd like to have a macro written for this. Either a simple one that changes whatever the current Z value is by .005", or a fancy javascript macro that prompts me to enter a value to adjust Z by.

    I'm looking for somebody who can create this macro for me (there was a time that I might have been able to do it myself, but not now). If any additional info or clarification is necessary, I'll provide it.

    Thank you...
     
  2. Misterg

    Misterg Veteran
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 27, 2022
    Messages:
    350
    Likes Received:
    273
    This should mimic what you're doing by hand (Create a macro, name it & copy this into the GCode window):

    G20
    G90
    G0 Z1.620
    G10 L20 P0 Z1.625


    Explanation:
    G20 - make sure we are in inches
    G90 - make sure we are in absolute mode
    G0 Z1.620 - rapid move to Z 1.620 absolute, assumed to be a 'safe' Z height - please change to suit.
    G10 L20 P0 Z1.625 - change the offset of the current coordinate system such that the Z position is now 1.625" (change to be whatever you want the 'new' height to be).

    N.B. I haven't tested it!
     
    brrian likes this.
  3. brrian

    brrian Well-Known
    Builder

    Joined:
    Dec 6, 2019
    Messages:
    122
    Likes Received:
    52
    Tested, working, thank you!
     
    Misterg 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