synthetos / g2

g2core - The Next Generation
Other
622 stars 296 forks source link

Better jogging support #473

Open lllars opened 4 years ago

lllars commented 4 years ago

This is a feature request for jogging commands that are better than G1. I'm envisioning that programs like UGS could use these commands for smoother jogging implementations. I'm also envisioning that they could be used directly via hardware buttons and analog joysticks.

The backstory is that I have an analog joystick on the control panel of my machine and I'd like to be able to use it for "manual" machining, controlling the z-axis. I would need smooth motion and I would need it to vary the feed rate to correspond with joystick travel. It might also be nice to be able to use it without booting up the control pc.

I have tried out the various jog methods in UGS (including joystick). I'm finding they are all a bit jerky at the beginning of a move and when changing speeds. There are also latency issues. I am still fiddling around trying to improve things there, but I can't imagine it will ever work all that well.

I think g2 should really have better jogging support built-in. It seems like there should be "jog" and "jog stop" commands. "Jog" would accept a feed rate argument but not need a distance. Programs like UGS could then use those commands instead of approximating them with myriad minuscule G1's. g2's digital inputs could be set to run those commands, allowing for low latency hardware solutions. It would probably not be too much harder to set analog inputs to call them, allowing for native joystick support.

I can try to make some progress on this as I have time if that would help. I'd appreciate any feedback on how (if?) it should be implemented and also ideas of how to do it (like pointers to relevant parts of the code).