Using a USB joystick to jog in QtDragon

More
19 Aug 2021 17:09 #218159 by frayja2002
Hi there

I have started playing around with LinuxCNC and would like to be able to jog the axis with a usb joystick.
After doing some reading & playing around I am able to set this up on the axis & gmoaccapy interface but cannot find any way to do it with the qtdragon interface.
There seems to be no appropriate hal pin.

I am using the stock 2.8.2 release.

Thanks
 

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

More
19 Aug 2021 17:19 #218162 by cmorley
What pins do you need?

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

More
19 Aug 2021 22:00 #218181 by frayja2002
I don't know.

When I set it up in axis I added something like this in the hal file & it all worked.

loadusr -W hal_input -KRAL DragonRise
net Jog-X-Plus <= halui.joint.0.plus <= input.0.abs-x-is-pos

But this doesn't work if I'm using QtDragon.

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

More
20 Aug 2021 00:56 #218189 by cmorley
I think QtDragon skips joint mode - so you would need to use:
halui.axis.x.plus

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

More
20 Aug 2021 01:22 #218192 by frayja2002
Yes I have tried that & everything starts up normally but the axis does not move or respond to the joystick.

When I look at halui.axis.x.plus in halshow the pin is responding but the axis is not moving.

Thanks

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

More
20 Aug 2021 02:47 #218197 by cmorley
Did you set a jog speed in halui?

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

More
20 Aug 2021 04:25 #218200 by frayja2002
I'm not sure how to do that.

I thought it would just jog at the speed selected in the gui.

Could you please elaborate on the best way to set this up.

Thanks

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

More
20 Aug 2021 04:40 #218203 by cmorley
Yes that would be intuitive... but actually linuxcnc doesn't hold an internal setting for jog speed or increment - each commanding program uses it's own.

So QtDragon has a rate (which would be useful to have a HAL pin that reflects the current selected rate)

and halui has it's own that you can set with HAL pins (ie.):
setp halui.axis.jog-speed 10
setp halui.joint.jog-speed 10

SI would try setting a rate to see if it works and it should at that point.

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

More
20 Aug 2021 05:46 #218205 by frayja2002
I cannot find either of those in halshow so i tried putting them into the postgui (one at a time).

Again everything starts up OK but no motion.

I have tried typing various speeds into halshow & it says ok but it still doesn't move.
There is a pin called halui.axis.x.jog-enable that was false, but when I try to set it to true it tells me that the pin is not found ?!?

Am I missing something?

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

More
20 Aug 2021 19:25 #218267 by cmorley
for halui jogging you need two pins set (lets talk about after homing jogging only)
also must be in manual mode.

you can set these in halshow for testing.

set the jog speed to something non zero
setp halui.axis.jog-speed 10

set the direction to non zero
setp halui.axis.x.minus 1

set it to 0 to stop
setp halui.axis.x.minus 0

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

Moderators: cmorley
Time to create page: 0.243 seconds
Powered by Kunena Forum