New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shuttle Express jog dial support #20
Comments
It should be pretty easy to convert my codebase over to something that works with cnc.js, as my code is a standalone program that is just reading the jog dial and then sending G-code over a websocket to command the machine. If your code has a websocket server that can accept commands, then it should be pretty trivial to port. |
This may take a while because I don't have the Shuttle Express Jog Dial. It will be great if someone can provide support for the porting. 😃 |
I can provide support. And, we could probably get some folks to chip in FG
|
Just did a quick search and found the jog dial sold by Amazon. Is this the one that's supported by ShuttleCP? |
yeah, that's it. i'd be happy to donate $20 toward you getting one. I should also mention that most of my work was to get it to read the jog That would be a more fool-proof way to integrate things... i just didn't do FG On Mon, Jan 4, 2016 at 9:09 AM, Cheton Wu notifications@github.com wrote:
|
I would also be happy to chip in some money to get you a unit! |
Thanks for your kindly help. The jog dial looks interesting and the price is affordable for me, so I'd like to buy one myself. I will keep you updated on progress once I received the package. |
Send me your PayPal address and I'll send over $20. We need more CNC apps FG
|
I created a donation button at the bottom of the README (https://github.com/cheton/cnc.js#donate). Thanks for your support on the hardware investment. |
Ok, I just sent a donation. Let me know if you didn't get it. FG
|
I just received your payment. Thank you for making a donation. |
I placed the order on Amazon on Jan 4. It will be delivered to Shipito's warehouse, and then forwarded to Taiwan. The expected arrival date might be in late January. Also thank @meikrantz for your donation. |
Cool. Definitely look into using it as keyboard shortcuts first as I think FG
|
So, before I started to integrate your shuttleCP, the first thing I can do is to provide a configuration UI to configure keyboard shortcuts that maps to certain buttons (e.g. jog motions) on cnc.js. This would be the most easiest way to control the UI by ShuttleExpress jog dial. |
yep, i think so... keys to switch the active axis, to switch the jog FG On Wed, Jan 6, 2016 at 10:15 PM, Cheton Wu notifications@github.com wrote:
|
Found an interesting CNC Simulator at http://cncsimulator.info/screenshots. Their predefined key mappings looks good, perhaps I can use similar settings in cnc.js. |
Very cool. So are there any utilities to configure the keys for Linux? FG
|
Added some keyboard shortcuts to v0.15.2: My Shuttle Express Settings just look like the following:
For the Shuttle Wheel support, it might need a mechanism to count the number of keystrokes per second to determine Shuttle Zone (-7 to +7) and G1 parameters like feedrate and distance. I will try to find a better way to add Shuttle Wheel support to the web interface. |
Awesome. For the wheel, you could just fake it. That's what I'm doing in that This is great! Can't wait to see a video of it working. FG
|
Okay, had a chance to test this out this evening. It works, but performance is not that great. Buttons select the appropriate axis, and highlight it in the GUI, which is nice. The problem is with buffering. You have to turn the jog wheel very slowly, or it skips quite a bit. That would be okay with fine movements, but without shuttle wheel support for large movements it's somewhat limiting. Good start though! Nice to actually have the ShuttleXpress make the machine move again! |
I haven't implemented the buffering mechanism, but only use a simple flag 'JOG_FORWARD': () => {
let { port, activeState } = this.props;
let canJog = (!!port && (activeState === ACTIVE_STATE_IDLE));
if (canJog) {
let distance = this.getJogDistance();
let jog = {
'x': () => this.jog({ X: distance }),
'y': () => this.jog({ Y: distance }),
'z': () => this.jog({ Z: distance })
}[this.state.selectedAxis];
jog && jog();
}
} Indeed, current implementation will lose steps if current state is not |
The latest update v0.15.4 should has resolved the jog wheel performance issue, and it also includes shuttle wheel support. https://github.com/cheton/cnc.js/wiki/User-Guide#shuttlexpress-settings ShuttleXpress SettingsButtons
Jog Wheel
Shuttle WheelAdjust the keystroke repeat rate to 10 times per second for all Shuttle Zones except the Shuttle Zone 0.
|
Hi @lordmundi, According to your Here is my code: |
this is fantastic!!! got any videos of it working? it's not real till we for the overshoot, the reason is because of the acceleration / deceleration That's all it was. If that doesn't make sense, let me know and I'll try to These great keystrokes and additions should make code like mine not FG On Mon, Feb 1, 2016 at 5:32 AM, Cheton Wu notifications@github.com wrote:
|
I just connected it to my homemade CNC machine, and it sounds so horribl just like what you mentioned. However, giving a small amount of overshoot factor (e.g. 1.06~1.2) did not help much for my test. I may need to figure out where I can improve to eliminate deceleration between subsequent commands. |
haha... yeah, i think it took me a bit to calculate just how far to command Feel free to steal any of my code that helps. FG On Mon, Feb 1, 2016 at 9:54 AM, Cheton Wu notifications@github.com wrote:
|
I guess a buffering delay solution plus an overshoot factor might work by accumulating each small steps and use a large flush interval, may be a 0.5s time interval or longer. I will make more tests to find a way that can significantly reduce frequent deceleration. |
I have an interesting finding. I eventually discovered that the sharp sound during acceleration and deceleration can be significantly reduced with a lower feed rate (mm/min) and a higher acceleration speed (mm/sec^2). My NEMA 23 (57mm) 3V stepper motor can run in full speed without missing steps with following max rate and acceleration settings:
After several tests, I found my optimal values by setting the maximum feed rate from 1500 to 800 (mm/min) and increasing the acceleration speed from 10 to 50 (mm/sec^2), and never heard the humming noise. For example:
Since the settings may show different results between different hardwares, I may provide a popup menu for configuring min/max feed rate value (e.g. 200~800) for Shuttle Wheel to meet different needs. |
The sample test code: ShuttleZone.jsx |
so does that mean you are adjusting your grbl config parameters? or are you adjusting the max feed rate being commanded in the GCODE? if you have an amount of overshoot that you can configure, then that would give the user one single "knob" to adjust to get the motion of their machine smooth without too much extra travel. |
May I know your Grbl system settings? The overshoot factor didn't help much with my CNC machine, |
I haven't had a chance to do more testing, but wanted to share my grbl settings. In order to get smooth movement on my machine, I greatly increased the max rate and acceleration. Looking forward to getting back to the shop to further test the shuttle! $110=10000.000 (x max rate, mm/min) |
The latest update v0.15.6 should have fixed the issue of humming noise when scrolling the Shuttle Wheel. You can configure feed rate range, repeat rate, and distance overshoot by clicking the button at the top of the Axes widget. I also made an update to the wiki: Reduce humming sound when accelerating and decelerating Let me know if you have any suggestions for further improvements. |
Finally had a chance to get in the shop and do some testing with 0.15.8 and ShuttleXpress. It works great! Haven't tried tweaking the overshoot and acceleration parameters, but movement is very smooth. |
It's great to hear that. 😄 |
Hello, everyone, I'm really sorry to bring up this old issue again. But I have some general questions about the Shuttle Express... I have CNCJS running on a Raspberry 3. Am I right in assuming that I simply plug the ShuttleExpress into the server USB port and don't have to open the browser window from the client PC? Do I need any drivers to control the Shuttle? Or does it only work under Windows in the browser with the ShuttleExpress software? Like this: I already tried to check it on Facebook but I don't think anyone understands me :) I hope someone has an answer. Regards Christoph |
According to my reading of the code, the Shuttle Express support is in the client-side - browser - code, not in the server code. The Shuttle Express feeds simulated keystrokes to the browser-based UI, which then interprets them and sends control commands to the server over the network connection. Plugging it into the computer that runs the CNCjs server - unless the browser is running on the same computer - would not be effective. I expect that the reason why you are getting little response on the Facebook page is because very few CNCjs users have a Shuttle Express. I certainly don't have one. |
@slimline33 |
Hello @MitchBradley and @karoria . Thank you so much for your answers. That's what I suspected. But I wonder why in CNCJS settings there is a possibility to set the feedrate and the repeat. What surprised me is that @lordmundi described (#20 (comment)) that he runs the SHUTTLE EXPRESS on the same machine as CNCJS. I think he means that he also controls the machine via the servers browser. Unfortunately I have my problems with the Windows keys under Windows 10 when working with the Shuttle Express via the client. For example he wants to open Microsoft OneDrive for me and so on. I would not like to disable the key shortcuts under Windows 10. Who knows if this will remain until the next update. |
just to clear up any confusion, I'm not running CNCJS, but I did write some code that read the shuttle express on linux and output commands to some other cnc utilities. I think you could adapt it if you want. That project is here: https://github.com/lordmundi/shuttleCP |
Hi @lordmundi I already know your code. But I did not understand the context of this issue. I assumed that @cheton had implemented parts from your code in CNCJS. I must have misunderstood that! |
One of the other features that I really liked in Chilipeppr was the ability to use a Shuttle Express USB jog dial for machine shuttle. @lordmundi wrote the code specifically to communicate via the Serial Port JSON Server, which is used by Chilipeppr. Take a look at the project here: https://github.com/lordmundi/shuttleCP
Not sure how easy it would be to change it to use web calls instead of JSON.
All this being said, I think there are plans for a jogging mode/interface in upcoming grbl releases.
The text was updated successfully, but these errors were encountered: