Welcome to Our Community

Some features disabled for guests. Register Today.

OB Control Software Macros not always working

Discussion in 'Control Software' started by Mallardduck31, Mar 22, 2020.

  1. Mallardduck31

    Builder

    Joined:
    Sep 27, 2019
    Messages:
    40
    Likes Received:
    3
    I have made some simple macros for use with my touch plate to find the zero positions of XYZ. There are times that they work fine and others when the stop before carrying out the entire macro. The weird thing is that in some cases when I try and initiate the macro after it aborts the z axis goes the opposite direction its supposed too. I will abort the operation and try again and it goes the direction the macro intends.

    I did transition over to a new pc yesterday and carefully copied the macro from the other PC. I do remember having similar issues on the other PC but they went away and I do not have an assignable cause.

    I just ran the macro successful 3 times in a row and on the 4 try it failed before it made it to the second command line.

    Anyone seeing this type of intermittent issue?

    Thanks
     
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,027
    Likes Received:
    4,117
    Paste the macro: perhaps you are running some commands that depend on the completion of another command (adding a couple G4 yields can help with timing)
    Or forgetting to set state between moves (for example in our Z probe routine, we zero out Z before the probe, and after, so we are sure that any moves happen relative to where we think they are going to be from)
     
  3. Mallardduck31

    Builder

    Joined:
    Sep 27, 2019
    Messages:
    40
    Likes Received:
    3
    Here is the macro.
    G38.2 Z-25 F100
    G91 G0 Z3
    G91 G0 X-50
    G91 G0 Z-8.2
    G38.2 X30 F100
    G91 G0 X-3
    G91 G0 Z8.2
    G91 G0 Y-50
    G91 G0 X50
    G91 G0 Z-8.2
    G38.2 Y30 F100
    G91 G0 Y-3
    G91 G0 Z8.2
    G10 P0 L20 X38.605 Y-11.395 Z25
    G21 G91 G0 Z40
    G90


    Like I said it works sometimes and not others. I noticed this morning the error message is quoting the second line (Machine locked out during jog G91 G0 Z3).
    After I clear it will not initiate the macro until I manually advance one of the axis in any direction and then initiate the macro. Sometimes the first move will be in the Zplus direction versus Zneg as requested.

    Chuck
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,027
    Likes Received:
    4,117

    So between the probe command, and the jog up to Z3, I'd put a "G4 P0.5" dwell just to sync up the order of commands a little better (Grbl is still calculating and returning the result of the probe - so give it a chance to catch up) (same after every G38.2)

    Rather screenshot any errors, and include Serial Log copy :)
    There are events leading up to an error, or subtle clues in how the error is presented too
     
  5. Mallardduck31

    Builder

    Joined:
    Sep 27, 2019
    Messages:
    40
    Likes Received:
    3
    Thanks Mark. I’ve made the changes requested and will monitor the changes. I will take a screenshot of the week next time
     

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