Using a USB joystick to jog in QtDragon

More
20 Aug 2021 23:30 - 20 Aug 2021 23:34 #218281 by frayja2002
I managed to get it working. Thanks for all your help.

For the sake of completeness here is what I did in the end.
As I had been messing around with a lot of different things I did a fresh install.

Halui was not in the config file by default so add ...
HALUI = halui
To the [HAL] section of the ini file

Add this to the custom_postgui.hal file
loadusr -W hal_input -KRAL DragonRise

setp halui.axis.jog-speed 300

net Jog-X-Plus <= halui.axis.x.plus <= input.0.abs-x-is-pos
net Jog-X-Neg <= halui.axis.x.minus <= input.0.abs-x-is-neg
net Jog-Y-Plus <= halui.axis.y.plus <= input.0.abs-y-is-pos
net Jog-Y-Neg <= halui.axis.y.minus <= input.0.abs-y-is-neg
net Jog-Z-Plus <= halui.axis.z.plus <= input.0.btn-base6
net Jog-Z-Neg <= halui.axis.z.minus <= input.0.btn-base5

The jogging only woks after you have homed like you said (even though the jog buttons in the gui work at any time)

The next most obvious question is how can I vary the jog speed. Is there any way to link it to the gui settings?

Again thanks for you assistance.
Last edit: 20 Aug 2021 23:34 by frayja2002.

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

More
21 Aug 2021 00:59 #218283 by cmorley
if you set up the halui pins for joints, then you should be able to jog before homing.

There is currently no builtin way to get qtdragon's jograte, but I'll add it for next release.

If you are adventurous I could tell you how to customize the screen to add it now.

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

More
21 Aug 2021 01:24 #218285 by frayja2002
I'll try anything once but I must warn you I had a quick look at the python wikipedia page & I couldn't find any part of it that made any sense.

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

More
21 Aug 2021 01:43 #218287 by cmorley
Its pretty easy actually.
Add these files to your config folder.

Then there should be a HAL pin named qtdragon.jog-rate

If there is a problem just remove the two files from your config folder.
Attachments:

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

More
21 Aug 2021 01:45 #218288 by cmorley
the file names should be qtdragon.ui and qtdragon_handler.py when saved in your config folder.

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

More
21 Aug 2021 03:02 #218292 by frayja2002
Do I have to reference these files in the ini or rename them to match the machine name.

They do not seem to have any affect & cannot see the new hal pin.
How can I be sure they are being used?

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

More
21 Aug 2021 03:11 #218294 by cmorley
run linuxcnc from a terminal and look for lines similar to this:
Note the 'using DEFAULT', if it found the new files it will saying 'using LOCAL'

[QTvcp.QTVCP.QT_PSTAT][INFO]  Using DEFAULT handler file path: /home/chris/emc/share/qtvcp/screens/qtdragon/qtdragon_handler.py (qt_pstat.py:97)

[QTvcp.QTVCP.QT_PSTAT][INFO]  Using DEFAULT ui file from /home/chris/emc/share/qtvcp/screens/qtdragon/qtdragon.ui (qt_pstat.py:118)

 

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

More
21 Aug 2021 03:11 #218295 by cmorley
Also please post those lines here

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

More
21 Aug 2021 03:22 #218296 by frayja2002
I don't think it is using the new files.
I am posting the the line seen from the terminal.
Attachments:

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

More
21 Aug 2021 03:29 #218297 by cmorley
No it's not. What did you save the files as, and where?

should be in:
/home/alex/linuxcnc/configs/Router_01/

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

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