Jerky Jogging (QTPlasmaC)
24 Dec 2020 11:04 #193090
by phillc54
Replied by phillc54 on topic Jerky Jogging (QTPlasmaC)
I do see glitches on halscope when any page is active on a sim.
Please Log in or Create an account to join the conversation.
- snowgoer540
- Topic Author
- Offline
- Moderator
Less
More
- Posts: 2388
- Thank you received: 779
24 Dec 2020 11:26 #193092
by snowgoer540
Ah, that's really good to know. Maybe they just don't happen fast enough for my ears to discern in other tabs?
I can grab some plots from the live machine today at some point.
Santa Tracker on google tells me that he wont arrive for 17 more hours, so I have some time to hal scope some stuff. Although he is in New Zealand now, so you'd better get to bed soon!
Replied by snowgoer540 on topic Jerky Jogging (QTPlasmaC)
I do see glitches on halscope when any page is active on a sim.
Ah, that's really good to know. Maybe they just don't happen fast enough for my ears to discern in other tabs?
I can grab some plots from the live machine today at some point.
Santa Tracker on google tells me that he wont arrive for 17 more hours, so I have some time to hal scope some stuff. Although he is in New Zealand now, so you'd better get to bed soon!
Please Log in or Create an account to join the conversation.
24 Dec 2020 11:29 #193093
by phillc54
Replied by phillc54 on topic Jerky Jogging (QTPlasmaC)
I am emptying my Jameson bottle at the moment, hoping he is going to fill it for me.Santa Tracker on google tells me that he wont arrive for 17 more hours, so I have some time to hal scope some stuff. Although he is in New Zealand now, so you'd better get to bed soon!
Please Log in or Create an account to join the conversation.
- snowgoer540
- Topic Author
- Offline
- Moderator
Less
More
- Posts: 2388
- Thank you received: 779
24 Dec 2020 11:37 #193094
by snowgoer540
I've heard the elves can replicate any spirit with ease... So I think the odds of this coming true are high. I'm patiently waiting to see what kind(s?) of bourbon he delivers me!
Replied by snowgoer540 on topic Jerky Jogging (QTPlasmaC)
I am emptying my Jameson bottle at the moment, hoping he is going to fill it for me.Santa Tracker on google tells me that he wont arrive for 17 more hours, so I have some time to hal scope some stuff. Although he is in New Zealand now, so you'd better get to bed soon!
I've heard the elves can replicate any spirit with ease... So I think the odds of this coming true are high. I'm patiently waiting to see what kind(s?) of bourbon he delivers me!
Please Log in or Create an account to join the conversation.
25 Dec 2020 04:05 - 25 Dec 2020 22:28 #193166
by phillc54
Replied by phillc54 on topic Jerky Jogging (QTPlasmaC)
Merry Christmas all. Unfortunately my wife is ill and we are stuck at home so I may as well do something constructive.
I tried the grabKeyboard idea but it had no effect (assuming I did it how it is supposed to be done). AutoRepeat still doesn't work correctly.
The following hack does seem to work successfully by delaying the key release.
The odd thing is that even though the hal plots showed a loss of signal for 30mSec~40mSec it only takes a delay of 1mSec to prevent the erratic jogging. At 0.99mSec it was erratic but at 1mSec it was stable. It could probably get away with 10mSec for a large safety margin as it is only in userland and the extra few mSec jog time shouldn't matter too much. The following code that I tested here is set for 1mSec and has not shown any erratic behaviour.
I left in a grabKeybord/releaseKeyboard as sometimes when the jog reached the maximum allowed, depending on which widget had keyboard focus it would do odd stuff like switch the view from Z to P or increase/decrease the feed override...
EDIT: Code change for simultaneous jogging a multiple axes
The end of init_widgets has this added:
The end of processed_key_event__ is changed to look like:
The end of kb_jog is changed to look like:
I tried the grabKeyboard idea but it had no effect (assuming I did it how it is supposed to be done). AutoRepeat still doesn't work correctly.
The following hack does seem to work successfully by delaying the key release.
The odd thing is that even though the hal plots showed a loss of signal for 30mSec~40mSec it only takes a delay of 1mSec to prevent the erratic jogging. At 0.99mSec it was erratic but at 1mSec it was stable. It could probably get away with 10mSec for a large safety margin as it is only in userland and the extra few mSec jog time shouldn't matter too much. The following code that I tested here is set for 1mSec and has not shown any erratic behaviour.
I left in a grabKeybord/releaseKeyboard as sometimes when the jog reached the maximum allowed, depending on which widget had keyboard focus it would do odd stuff like switch the view from Z to P or increase/decrease the feed override...
EDIT: Code change for simultaneous jogging a multiple axes
The end of init_widgets has this added:
Warning: Spoiler!
.
.
.
self.keyTimer=QTimer()
self.keyTimer.setSingleShot(True)
self.keyTimer.timeout.connect(self.key_timer_timeout)
self.jogAxis = []
The end of processed_key_event__ is changed to look like:
Warning: Spoiler!
.
.
.
if event.isAutoRepeat():
return True
elif event.type() == QEvent.KeyPress:
if self.keyTimer.isActive():
self.keyTimer.stop()
return
elif event.type() == QEvent.KeyRelease:
self.keyTimer.start(1)
return
return KEYBIND.manage_function_calls(self,event,is_pressed,key,shift,cntrl)
def key_timer_timeout(self):
for axis in self.jogAxis:
self.kb_jog(0, axis, 0)
self.jogAxis = []
The end of kb_jog is changed to look like:
Warning: Spoiler!
.
.
.
if state:
if fast:
rate = rate * 2
ACTION.JOG(joint, direction, rate, distance)
self.jogAxis.append(joint)
self.w.grabKeyboard()
else:
ACTION.JOG(joint, 0, 0, 0)
self.w.releaseKeyboard()
Last edit: 25 Dec 2020 22:28 by phillc54. Reason: Code change for simultaneous jogging a multiple axes
The following user(s) said Thank You: snowgoer540
Please Log in or Create an account to join the conversation.
- snowgoer540
- Topic Author
- Offline
- Moderator
Less
More
- Posts: 2388
- Thank you received: 779
26 Dec 2020 23:46 #193253
by snowgoer540
Replied by snowgoer540 on topic Jerky Jogging (QTPlasmaC)
Just wanted to post a follow up that I have tried Phill's fix on a live machine, and it's working fine now! No more erratic-jerky jogging.
Best 2020 Software Related Christmas Present Ever!
Thanks all!
Best 2020 Software Related Christmas Present Ever!
Thanks all!
The following user(s) said Thank You: phillc54
Please Log in or Create an account to join the conversation.
26 Dec 2020 23:51 #193254
by cmorley
Replied by cmorley on topic Jerky Jogging (QTPlasmaC)
Excellent work around!
Must be a deep Qt problem.
I wonder if I could add it higher up in the code so user's don't have to deal with it.
I thought we might have to abandon keyboard jogging...
Must be a deep Qt problem.
I wonder if I could add it higher up in the code so user's don't have to deal with it.
I thought we might have to abandon keyboard jogging...
The following user(s) said Thank You: phillc54
Please Log in or Create an account to join the conversation.
- snowgoer540
- Topic Author
- Offline
- Moderator
Less
More
- Posts: 2388
- Thank you received: 779
27 Dec 2020 00:00 #193255
by snowgoer540
Only if you can replace it with mental telepathy, and the table just does what I want it to do... without lifting a finger
Can't use Elon's embedded microchip method either, that's cheating.
Replied by snowgoer540 on topic Jerky Jogging (QTPlasmaC)
I thought we might have to abandon keyboard jogging...
Only if you can replace it with mental telepathy, and the table just does what I want it to do... without lifting a finger
Can't use Elon's embedded microchip method either, that's cheating.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19196
- Thank you received: 6434
27 Dec 2020 10:51 #193281
by tommylight
Replied by tommylight on topic Jerky Jogging (QTPlasmaC)
Two nights ago i installed Mint 19.3 on an SSD and Master version of LinuxCNC to have a go at QTPlasmaC and some other stuff, last night installed and configured everything to be able to test on one of the machines today.... Gues what ?
No electricity since last night at 11PM !
Am i lucky or what?
No electricity since last night at 11PM !
Am i lucky or what?
Please Log in or Create an account to join the conversation.
27 Dec 2020 10:59 #193283
by phillc54
You are, but the wrong kind of luck.
Replied by phillc54 on topic Jerky Jogging (QTPlasmaC)
Two nights ago i installed Mint 19.3 on an SSD and Master version of LinuxCNC to have a go at QTPlasmaC and some other stuff, last night installed and configured everything to be able to test on one of the machines today.... Gues what ?
No electricity since last night at 11PM !
Am i lucky or what?
You are, but the wrong kind of luck.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.092 seconds