LHB04 jog wheel - movement delayed

More
03 Dec 2022 17:02 - 05 Dec 2022 19:27 #258440 by grl
Hi @all!

trying to add a LHB04 handwheel (the one with the USB cable) to my linuxcnc/triple beast cnc.
Using linux cnc 2.8.4 out of a default linuxcnc iso file.

To enable the wheel I added HALFILE=LIB:xhc-hb04.tcl to my ini, included a layout file for the buttons and added a XHC_HB04_CONFIG section to my ini as it's described in /usr/share/doc/linuxcnc

Buttons work as expected, machine moves when turning the wheel.

Unfortunately - especially when I set the step to 100 or 1000 - the axis accelerates really slow and stops moving long after I stopped moving the wheel.

All the information I could find is outdated and does not work with the xhc-hb04.tcl

So I'm stuck here.
What I want to achieve is, that the machine moves when I turn the jog wheel more or less as it does when I press the according buttons on my screen (using probe basic).The on screen buttons and the speed selection works perfectly for my need - but I couldn't get the wheel to behave in a similar way...

I tried playing around with the MPG_ACCELS parameter in my ini - that didn't give any usable results.

Anyone able to point me in the right direction?

ini and hal file of my mill is attached...

thanks
Lukas
Attachments:
Last edit: 05 Dec 2022 19:27 by grl.

Please Log in or Create an account to join the conversation.

More
05 Dec 2022 00:21 #258542 by andypugh
Have you read the comments in the XHC file?

github.com/LinuxCNC/linuxcnc/blob/master.../hallib/xhc-hb04.tcl

You could try jogmode=vnormal and that will probably make the axis stop when the jogwheel stops.

Please Log in or Create an account to join the conversation.

More
05 Dec 2022 11:58 - 05 Dec 2022 11:59 #258578 by grl
Yes - I read every bit of documentation I found...

jogmode=vnormal did not change anything.

if I set the step to 100 or 1000 and turn the wheel the selected axis will start moving, accelerating slowly - moving - and then slowing down again.
At step 1000 if I turn the wheel one click the whole movement will last several seconds.

If I press the according button on the probe basic screen there is no visible acceleration phase and the movement stops in fractions of a second. So I assume that the basic configuration of the axes is correct...

really clueless right now...

Lukas
Last edit: 05 Dec 2022 11:59 by grl.

Please Log in or Create an account to join the conversation.

More
05 Dec 2022 12:08 #258580 by andypugh
#MPG_ACCELS = 25500 25500 25500 25500
MPG_ACCELS = 1 1 1 1

Try making these numbers much higher, 150 150 150 150 would match the joint limits.

Please Log in or Create an account to join the conversation.

More
05 Dec 2022 15:22 #258604 by grl
Did that already - no effect.
That's where I ran out of ideas as I thought this parameter is for controlling the accelleration.

Tried first the values suggested in the readmes setting them slightly below the joint limits (130 130 130 130 if I remember right), then really low (1 1 1 1 1) - I could not see any difference in the movement. (I didn't measure it, so it could be a slight difference - but far away from what it should be imho).

Thanks
Lukas

Please Log in or Create an account to join the conversation.

More
05 Dec 2022 15:51 #258607 by andypugh
I think those probably are the required setting, from the issue description, and the current values do appear to be small.

I don't know when the values are written, or how, but the TCL script will only be run when the config is loaded. Did you close-down LinuxCNC, unplug the pendant, re-plug the pendant and re-start LinuxCNC when you made the change?

Please Log in or Create an account to join the conversation.

More
05 Dec 2022 15:53 #258608 by grl
Closed linuxcnc but did not unplug the pendant - will try that next when back home.

Thanks
Lukas

Please Log in or Create an account to join the conversation.

More
05 Dec 2022 19:23 #258622 by grl
Ahhhhhh - dug into the source code of xhc-hb04.tcl and found the problem:

Out of a personal habit and because the config wizard does it also I used uppercase letters for all the keywords in the ini.

But xhc-hb04.tcl is case sensitive for all its keywords and expects them in lowercase.

So no matter what I used for mpg_accels - it was not used at all because I wrote MPG_ACCELS instead of mpg_accels.

After correcting that everything works as expected....

@andypugh: a thousand thanks for helping!

regards
Lukas

PS: perhaps that should be part of the readme or documentation that - contrary to the way the wizard works - every keyword has to be lowercase. Where's the best place for a feature request to add that little information? As an issue on github perhaps?

Please Log in or Create an account to join the conversation.

More
06 Dec 2022 01:31 #258652 by andypugh
Yes, raise it as an issue. Or, even better, as a pull-request if you can?
(ie. make the changes yourself and then we can merger them)

Please Log in or Create an account to join the conversation.

More
07 Dec 2022 13:16 #258804 by grl
Raised an issue on github which was closed half an hour later with a much more elegant solution by removing the case sensitivity.
Unfortunately I'm not that firm with tcl that I could have suggested a similar elegant solution....

Thanks for the help!

Lukas
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum