Welcome to Our Community

Some features disabled for guests. Register Today.

Goto X0 from DRO Dropdown not working for me

Discussion in 'OpenBuilds Bug Report' started by that-jim, Dec 30, 2022.

  1. that-jim

    that-jim Journeyman
    Builder

    Joined:
    Apr 19, 2020
    Messages:
    143
    Likes Received:
    149
    The goto X0 or goto Y0 functions from the DRO drop down are not working for me. I'm using control v1.0.342 and grblHal 1.1f on a BBX32.


    Here is a screen grab after I did the following.

    1st hit the goto X0 button no movement and console spit out
    [13:41:45] [ G0 X0 ] ok

    2nd typed in 0 in the DRO and hit enter the machine moved to 0 and spit out
    [13:42:16] [ $J=G90 G21 X0 F3000 ] ok
    [13:42:16] [ $G ] [GC:G0 G54 G17 G21 G91 G94 G49 G98 G50 M5 M9 T0 F45 S0.]
    [13:42:16] [ $G ] ok


    upload_2022-12-30_13-46-14.png


    if I type a G0 X0 into the console the machine moves as expected. Just curious where does the '$J=' part come from, is this what is missing?
     
  2. that-jim

    that-jim Journeyman
    Builder

    Joined:
    Apr 19, 2020
    Messages:
    143
    Likes Received:
    149
    Ok, I restarted everything and the goto is working now. Was the goto button somehow trying to do a G0 X0 with G91 active from a previous command?
     
  3. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,288
    Likes Received:
    1,837
    seems it was already at 0 (shown in your pciture), therefore no movement
     
  4. that-jim

    that-jim Journeyman
    Builder

    Joined:
    Apr 19, 2020
    Messages:
    143
    Likes Received:
    149
    Ok here is another screen grab after pressing the goto X0 from the DRO it clearly did not move right?

    upload_2022-12-31_6-19-44.png


    Now if you type in 0 in the DRO and press enter it goes to zero

    upload_2022-12-31_6-22-14.png



    If you enter G90 X30 Z30 in the console it will move to 30, but wont move back to 0 with the goto 0 button. Maybe the goto 0 button could send 'G90 G0 Z0' rather than 'G0 Z0'. That way if the last move was a G91 it dose not do an incremental move of 0.


    edit 'If you enter G90 X30 Z30' should have beenn 'G90 G0 X30'
     

    Attached Files:

    #4 that-jim, Dec 31, 2022
    Last edited: Dec 31, 2022
  5. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,288
    Likes Received:
    1,837
    the current state is G91 relative motion (you can see it in the $G status line).
    The jog command does tell it to use G90 absolute motion but it seems to be ignoring that.
    I could not reproduce this on my machine but will retry with a definite G91 mode tomorrow
     
  6. that-jim

    that-jim Journeyman
    Builder

    Joined:
    Apr 19, 2020
    Messages:
    143
    Likes Received:
    149
    The jog command that results from typing 0 in the DRO does send 'G90 G21 X0 F3000' and that moves the machine. You can see that the command sent from the goto dropdown sends 'G0 X0' right? Seems to me the goto X0 from the dropdown should do a 'G90 G21 X0 F3000' ( or change G21 to G20 for inches). Because you always want it to go to 0 not do a incremental move of 0. Just trying to be clear so I don't waste your time. I do appreciate the time and effort that you guys put into openbuilds control.
     
    #6 that-jim, Jan 1, 2023
    Last edited: Jan 1, 2023
  7. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,288
    Likes Received:
    1,837
    thanks! I understand better now.
    so, going back to your image.... with some notes

    notmoving.png

    at (1) is the command sent by clicking the 'goto 0' button, which did nothing
    at (2) is the 'enter a number and press enter' command which is a jog command and which DID do something.
    at (3) is the result of the $G command which returns the state of all modal commands in the controller. (CONTROL does a $G to track state changes, and it usefully tells us the result)

    Modal commands are sticky, if you use G0 X45 on a line and then on the next line only supply a Y56 it will still use G0 for the Y move , the mode sticks.
    So we see that the current motion mode is G91 which is incremental, therefore the G0 X0 will not move anything but a G90 G0 X0 would move if X was nonzero at the time.
    The G90 on the jog line only applies to the jog line, the modal is not changed.
    Typing G90 and pressing enter in the serial console (or running any gcode that includes a G90) will change the mode and a following $G will display that mode. and a subsequent G0 X0 will move to the
    current WCS 0 if X is not currently 0.

    There are modal groups, so various commands are grouped together so things that move dont tramp on other settings, etc.
    The full list is here G Code Overview
    GRBL, the software in your controller, does not support all the commands listed there and will give an error if they are given, but others are accepted but do nothing like G91.1 since it is always in G91.1 mode.
    But, importantly, the groups are being obeyed.

    So, why is your controller doing this? Because some Gcode you ran, or some command button yet to be identified, or one of your macros, issued a G91 without a corresponding G90.
    This is why Gcode files must always have a header that sets the modes expected, same with macros.
     
    Alex Chambers likes this.
  8. that-jim

    that-jim Journeyman
    Builder

    Joined:
    Apr 19, 2020
    Messages:
    143
    Likes Received:
    149
    Yes so maybe the 'Go X0 (Work Corrd)' button should send 'G90 G0 X0', that why it would always move to zero, right?
     
    David the swarfer likes this.
  9. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,047
    Likes Received:
    4,123
    Just a reminder, software bugs should be logged here Issues · OpenBuilds/OpenBuilds-CONTROL
     
  10. that-jim

    that-jim Journeyman
    Builder

    Joined:
    Apr 19, 2020
    Messages:
    143
    Likes Received:
    149
    Cool I will post it there. Thanks
     

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