Welcome to Our Community

Some features disabled for guests. Register Today.

Continuous jog not working with swapped axes

Discussion in 'CNC Mills/Routers' started by BillO, Jun 3, 2023.

  1. BillO

    BillO New
    Builder

    Joined:
    Jun 2, 2023
    Messages:
    3
    Likes Received:
    0
    I am trying to swap the X and Y axes on a BobsCNC (to align the gantry with the X axis instead of the Y axis).

    After implementing the swap in grbl (1.1h), I'm testing with three different senders and see different results in Continuous Jog on each.
    1. OpenBuilds-CONTROL v1.0.369
    2. BobsCNC Basic SENDER, which was forked from OpenBuilds-CONTROL 166 commits ago.
    3. UGS build 20230126.
    Incremental Jog works as expected on all senders.
    • Continuous jog works perfectly in UGS.
    • Continuous jog fails on both versions of OpenBuilds (CONTROL and Bobs), but in different ways.
    My test procedure is this:
    After I incremental jog a little ways away from origin, Continuous Jog fails as soon as I mouse-down with:
    • (Jog Negative direction) Unable to jog towards -{X or Y}, will hit soft limit
    • (Jog Positive direction) Error 15: Jog travel exceeds machine travel
    Curiously, Continuous Jog fails on the Y axis in Bobs, and fails on the X axis in CONTROL

    I've made a small number of changes to grbl .h files to swap the axes:
    1. Swap the X,Y pin assignments (direction, limit, and step)
    2. #define DUAL_AXIS_SELECT Y_AXIS
    3. #define DEFAULT_HOMING_DIR_MASK 1
    4. #define DEFAULT_DIRECTION_INVERT_MASK 10 // two Y steppers, need positivity direction change
    I am trying to imagine how two different versions of CONTROL could fail in equal, but opposite ways.

    Any thoughts.

    Thanks,
    Bill
     
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,921
    Likes Received:
    4,291
    Soft Limits in CONTROL depends on default Grbl config of having the machine in negative quadrant standard.

    Try a less invasive approach first (just swop pins)
    In fact I would not recompile, just do the swop in wiring.
     
  3. BillO

    BillO New
    Builder

    Joined:
    Jun 2, 2023
    Messages:
    3
    Likes Received:
    0
    I'm not sure which pins you are suggesting.

    I currently have two X motors that I want to become Y motors, so I can't swap X with Y using the motor connectors (one X is connected to A).
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,921
    Likes Received:
    4,291
    From your first post.
     
  5. BillO

    BillO New
    Builder

    Joined:
    Jun 2, 2023
    Messages:
    3
    Likes Received:
    0
    I guess I don't know how to do that "in wiring" when I have two X motors (that want to become the Y axis) and the Grbl shield.

    I've found that if I turn off soft limits, everything works perfectly, both on the newest version of CONTROL and the slightly older Bobs version.

    For now, I'm going with soft limits off and hard limits on.
     
  6. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,921
    Likes Received:
    4,291
    Seperate suggestions. Pin swap, or wiring. With the Blackbox you'll wire X2 to the spare driver.

    Something else in your custom firmware config changed the default Grbl behavior, our soft limits calc works with the stock behavior, modifying stock machine origin can break how its supposed to work

     
  7. Misterg

    Misterg Veteran
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 27, 2022
    Messages:
    350
    Likes Received:
    273
    It sounds like you may have created a left handed coordinate system if you have only swapped X & Y. You also need to reverse the direction of one of the axes to maintain a right handed coordinate system.

    A left handed coordinate system will tie the soft limits in knots and give the sort of errors you were seeing (as well as causing other problems like mirror image / upside down parts).
     
    Peter Van Der Walt 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