- Posts: 159
- Thank you received: 0
Using a USB joystick to jog in QtDragon
- frayja2002
- Topic Author
- Offline
- Premium Member
-
Less
More
5 years 2 months ago #218281
by frayja2002
Replied by frayja2002 on topic Using a USB joystick to jog in QtDragon
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.
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.
Please Log in to join the conversation.
5 years 2 months ago #218283
by cmorley
Replied by cmorley on topic Using a USB joystick to jog in QtDragon
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.
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 to join the conversation.
- frayja2002
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 159
- Thank you received: 0
5 years 2 months ago #218285
by frayja2002
Replied by frayja2002 on topic Using a USB joystick to jog in QtDragon
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 to join the conversation.
5 years 2 months ago #218287
by cmorley
Replied by cmorley on topic Using a USB joystick to jog in QtDragon
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.
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.
Please Log in to join the conversation.
5 years 2 months ago #218288
by cmorley
Replied by cmorley on topic Using a USB joystick to jog in QtDragon
the file names should be qtdragon.ui and qtdragon_handler.py when saved in your config folder.
Please Log in to join the conversation.
- frayja2002
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 159
- Thank you received: 0
5 years 2 months ago #218292
by frayja2002
Replied by frayja2002 on topic Using a USB joystick to jog in QtDragon
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?
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 to join the conversation.
5 years 2 months ago #218294
by cmorley
Replied by cmorley on topic Using a USB joystick to jog in QtDragon
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'
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 to join the conversation.
5 years 2 months ago #218295
by cmorley
Replied by cmorley on topic Using a USB joystick to jog in QtDragon
Also please post those lines here
Please Log in to join the conversation.
- frayja2002
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 159
- Thank you received: 0
5 years 2 months ago #218296
by frayja2002
Replied by frayja2002 on topic Using a USB joystick to jog in QtDragon
I don't think it is using the new files.
I am posting the the line seen from the terminal.
I am posting the the line seen from the terminal.
Please Log in to join the conversation.
5 years 2 months ago #218297
by cmorley
Replied by cmorley on topic Using a USB joystick to jog in QtDragon
No it's not. What did you save the files as, and where?
should be in:
/home/alex/linuxcnc/configs/Router_01/
should be in:
/home/alex/linuxcnc/configs/Router_01/
Please Log in to join the conversation.
Time to create page: 0.074 seconds
