Welcome to Our Community

Some features disabled for guests. Register Today.

Shawn's Workbee 1510

Discussion in 'CNC Mills/Routers' started by sharmstr, Jul 2, 2018.

  1. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
    Not sure if you have run into this, but Control freaks out in continuous mode with soft limits enabled. I'm forced to use incremental which is okay, but really limits the shuttle. Once Control can handle continuous jog and soft limits, the Shuttle will be great. I first used one on my Tormach. Tormach uses hal files instead of the Shuttles key mapping software. The center dial allows you to move incrementally like an mpg. The outer dial has 7 positions left and right and returns to center. Its continuous jogging that allows you to control acceleration depending on how far you turn it. The upper buttons allows you to pick which axis you are moving.

    I built my own control panel for the Tormach. I added a bunch of buttons, a keypad and rotary switches to control things like coolant, spindle rpm, max velocity, etc. I have a touchscreen but found it easier to make adjustment with knobs vs a GUI slider. Here's a mock up I never completed. I should really get back to that. LOL

    controller.jpg
     
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    It has support for working with soft limits (looks at current machine position, calculates difference between that and Grbl's Max Travel value, sends jog move that is 1mm short of that to prevent triggering soft limit. What does it freak it about :)
     
  3. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    Never had cause to use CONTROL with bCNC being as comprehensive as it is, though I've dug into the code occasionally. I remember a couple of people complaining about continuous jog and soft limits, but I thought a fix got issued fairly quickly. If it's possible to write a JS macro that takes over jogging duties for analog usage, I'd just do that.

    Yeah, PathPilot's just skinned, pre-configured LinuxCNC, so it's using the same HAL files under the hood that I'm writing/editing on my control.

    Aha! That sounds promising then, because that was the behavior in question. Apparently Mach 3 was good at it, and other things aren't very cooperative.

    Oh, that's cool. You should definitely finish it off! I don't know what IO the PathPilot PC has on it, but it should be pretty easy to integrate.

    For a $J=G91 jog, should that calculation even be required? Any requests that go past the jog limits will be refused by the planner anyway. Whatever slider/analog parser is picking the distance/feedrate should just be able to
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Yes, you want to send the max distance (one command) - sending it too long, error. Sending too short - doesnt reach end of travel. Keydown even starts the jog, keyup sends a Cancel jog command
     
  5. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    Ahh, that makes sense. Doesn't help for variable speed jogging, but it's a pretty elegant way of doing normal keyboard jogging. Shouldn't be an issue with an MPG and incremental jogging either, but the KeyUp event won't support variable proportional jogging, which would have to constantly cancel and reissue based on the dial/stick position. Maybe some kind of OnChange event?
     
  6. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    You can do a loop that keeps reading the feedrate and sends jog commands, just long enough to cover the loop time. A similar method is described in the Grbl wiki, jogging page. But in testing we opted for the simpler method - does what we need it to do
     
  7. terjeio

    terjeio Well-Known
    Builder

    Joined:
    Oct 18, 2020
    Messages:
    60
    Likes Received:
    61
    FYI jog cancel fails intermittenly with grbl - I have a made forked version with a fix for the Mega version - the same way I do in grblHAL. Failure happens when there is a jog command in the block input or serial input buffer when it is received, the jog cancel command does not clear those as it should.
     
  8. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    Ahh, that makes sense. Good catch.
     
  9. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
    I'll send you a video later today. Its reproduceable. But it sounds likes a grbl issue instead of control. Sorry for that.
     
    Peter Van Der Walt likes this.
  10. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
  11. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
    Yep. I got it working, just not as fancy looking Login • Instagram
     
  12. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Please please work with Sonny and get into Gnea/grbl (; official builds are more trustworthy unfortunately
     
    #72 Peter Van Der Walt, Oct 30, 2020
    Last edited: Oct 30, 2020
  13. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    The described motion on the github page literally sounds like what Terje just posted this morning:

    CONTROL is sending an 0x85 on KeyUp, but there's still something in one of grbl's pre-buffers that didn't get flushed. Maybe sending two 0x85s back to back would fix it?

    But if you're only pressing the key and holding, it sounds like in this case, maybe there's a mis-match between a status report coordinate and a distance-to-go calculation order of operations?

    I'd have sworn blind I was following you. Weird.

    Nice, though! I like my little two-button-plus-e-stop "panel" for my laser, it's so nice to have dedicated buttons for things.
     
  14. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    (; well its fixed in the fork above and in HAL right (; so you could try seeing if it is reproducable on there (see if its CONTROL or Grbl then)
    Haven't looked at the bug in so long but i think my gut feeling was more toward Chromium - missing the keyup event if a new keydown came to quick after or something like that
     
    #74 Peter Van Der Walt, Oct 30, 2020
    Last edited: Oct 30, 2020
  15. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Comparing current machine position (ctrl+shift+i > Console > 'laststatus' > Enter, expand machine, position. wPos - Offset = mPos) against the command sent (serial log) and the Grbl settings for Max Travel would be good to see why we are sending a longer command then.

    Here's the maths (still works on my benchtop MiniMill here, just tested)

    X- OpenBuilds/OpenBuilds-CONTROL
    X+ OpenBuilds/OpenBuilds-CONTROL
    Y- OpenBuilds/OpenBuilds-CONTROL
    Y+ OpenBuilds/OpenBuilds-CONTROL
    Z- OpenBuilds/OpenBuilds-CONTROL
    Z+ OpenBuilds/OpenBuilds-CONTROL
     
    sharmstr likes this.
  16. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
    Okay.

    "and then the Jog Cancel on keyup". Does holding the modifier keys break this? In other words, do I need to also let go of the shift or control keys in order for the jog cancel to be sent?
     
  17. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    We'll have to test that :)
     
  18. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
  19. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
    So, I think we can safely ignore the correlation with soft limits; it happens regardless. AND it has nothing to do with modifier keys. In both tests below, I used the Y+ button in the UI. I homed the machine before each test so the machine was at Y-.

    This first test shows that the command was undefined, so I ran it again which gave me some actual numbers.

    First test:

    20201030_071412.jpg

    20201030_071326.jpg



    Second test:

    20201030_071653.jpg


    20201030_071744.jpg
     
  20. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
  21. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Ahh i think I know what it is (though may not be an easy fix) - since Grbl status reports rely on Polling, we poll something like once every 200ms. A move before an updated position feedback message, may suffer an incorrect calculation as its working off slightly older feedback data. Will see what we can do :)

    This is definately seperate from the jog cancel bug though
     
  22. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    Yeah, this is what I meant by

    ...But didn't phrase it the best. I don't know how you could possibly fix that given that there's a fairly fixed max polling rate for grbl, unless you also track the time since the last status report and calculate how much distance you've likely gone in that time, and subtract that from the previous distance to go.

    But when you think about it, shouldn't this issue always result in CONTROL thinking that there's MORE distance available than there actually is? If you start at say, X3, get a status report at X5, let off the button and immediately repress at X6, CONTROL should think it's at X5, when actually it's at X6. It appears that there's extra distance available to go than you really have.

    And to further confuse matters, I'm pretty sure there's at LEAST two polling cycles' worth of pause at the second pause location in the video.
     
  23. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    I am typing off phone, so havent checked the video or checked any of my instantaneous instinctive theories for validity yet. Thats what Mondays are for (;

    And even though you mentioned it. It may only have sunk in now sorry :) though that post mostly dealt with the 0x85 jog cancels, didnt see it related to Sharmstrs error
     
    #83 Peter Van Der Walt, Oct 31, 2020
    Last edited: Oct 31, 2020
  24. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
  25. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    sharmstr likes this.
  26. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,015
    Likes Received:
    1,680
    I was having this same issue with my lathe so I disabled the homing switches and soft limits thinking I screwed something up since I have not added limit/homing switches to my other CNC. At first I thought it was due to the rotary axis since I had to "fake" the Y axis switch by manually hitting a switch. But, it looks like I am not the only one.
     
  27. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Which particular one do you also have Giarc? The old known bug Keyboard Jog Bug · Issue #73 · OpenBuilds/OpenBuilds-CONTROL or the 'new' incorrect distance calculation with soft limits?
     
  28. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,015
    Likes Received:
    1,680
    Incorrect distance calibration. Also I don't suppose there is a way to disable just Y homing is there?
     
  29. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    See gnea/grbl (except substitute Y for Z)
     
  30. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,015
    Likes Received:
    1,680
    Thank you!
     
    sharmstr 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