Grbl-Panel
Grbl-Panel copied to clipboard
Create Jogging
suggestion Jog with Keybard
--> After keyup, the machine stops immediately !!
Approach / suggestion / idea
Private Sub GrblGui_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
Select Case e.KeyData
Case Keys.Left
Me.btnHold.PerformClick()
Case Keys.Right
Me.btnHold.PerformClick()
Case Keys.Up
Me.btnHold.PerformClick()
Case Keys.Down
Me.btnHold.PerformClick()
Case Keys.PageUp
Me.btnHold.PerformClick()
Case Keys.PageDown
Me.btnHold.PerformClick()
End Select
End Sub
Thanks for checking
Patrik Rindlisbacher
I will try this out in the next week. One question though, what do you want to happen with the queued commands after the Hold is sent? I would think a Reset should be issued to clear the buffer to avoid further movement if the Hold is released.
This is a great idea. I know it is very difficult to use the keys to jog because, I am assuming, the key down commands accumulate very fast in the buffer and the machine keeps on moving well after the key is released. This makes it very likely that the machine will crash into the end stops unintentionally. You have to be very careful using the keys to jog instead of the on-screen buttons.
MG
Hi Gerrit The code works great to drive with the buttons. So far, it has always stopped perfectly with no glitches and no reset. :-)
Summer is over. I'm back in the workshop, too. I will also try to improve on the code. :-)