Remap unused buttons to do manual tool release and rotate carousel (have ATC)

More
2 years 8 months ago - 2 years 8 months ago #293581 by camb0
I just had a play with the files and removing the soft links with no joy.
The only file in the directory containing the name "handler" is the new one you supplied.

So just to check I've done things right:
-downloaded the file from the browser (could use curl if that's an issue)
-moved the orig file out of that directory to a temporary spot (mv qtdragon_hd_handler.py ~/.)
-moved the downloaded file to that directory with the same name as the orig: qtdragon_hd_handler.py

Looking at the tail of the file I download doesn't look complete but I've not done any python - just started readying the doco.
Code:
cam@linuxcnc-mill:/usr/share/qtvcp/screens/qtdragon_hd$ tail qtdragon_hd_handler.py             self.w['btn_{}'.format(i)].setObjectName(i)             self.w['btn_{}'.format(i)].setProperty('isManSensitive',True)             self.w['btn_{}'.format(i)].hal_init(HAL_NAME=i)             self.w['btn_{}'.format(i)].setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)             self.w['btn_{}'.format(i)].setMinimumSize(66, 50)             STATUS.connect('spindle-control-changed',  lambda w, num, state, speed, upto,obj= self.w['btn_{}'.format(i)]: obj.setEnabled(not state))             self.w.horizontalLayout_40.addWidget(self.w['btn_{}'.format(i)] )         self.w.btn_atc_release.setText('TOOL\nRELEASE')         self.w.btn_atc_cw.setText('ATC\nCW')         self.w.btn_atc_ccw.setText('ATC\nCCW')

[/code]
Code:
And this the directory content
Code:
[code][code]cam@linuxcnc-mill:/usr/share/qtvcp/screens/qtdragon_hd$ ls -al total 824 drwxr-xr-x  3 root root   4096 Feb 17 16:49 . drwxr-xr-x 17 root root   4096 Sep 21 17:52 .. -rw-r--r--  1 root root  12232 Feb  3 09:35 argentium.qss -rw-r--r--  1 root root   9694 Feb  3 09:35 brushed_metal_color.qss -rw-r--r--  1 root root  10086 Feb  3 09:35 dark_grey.qss -rw-r--r--  1 root root   9210 Feb  3 09:35 dark.qss drwxr-xr-x  3 root root   4096 Feb 10 19:50 images -rw-r--r--  1 root root   4304 Feb  3 09:35 metal.qss -rw-r--r--  1 root root   3625 Feb  3 09:35 qtdragon_hd_ABOUT -rw-r--r--  1 cam  cam    2109 Feb 16 20:54 qtdragon_hd_handler.py -rw-r--r--  1 root root   1758 Feb  3 09:35 qtdragon_hd.qrc -rw-r--r--  1 root root  10653 Feb  3 09:35 qtdragon_hd.qss -rw-r--r--  1 root root 743323 Feb  3 09:35 qtdragon_hd.ui -rw-r--r--  1 root root    398 Feb  3 09:35 version.txt  
[/code][/code]
Last edit: 2 years 8 months ago by camb0. Reason: typo

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

More
2 years 8 months ago #293583 by phillc54

please rename and add this file to YOUR CONFIG FOLDER/qtvcp/screens/qtdragon_hd/qtdragon_hd_handler.py

I think the file should have been copied into this directory:
Code:
~/linuxcnc/configs/<CONFIG_DIR>/qtvcp/screens/qtdragon_hd/
The following user(s) said Thank You: camb0

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

More
2 years 8 months ago #293593 by camb0
Boom that was it!!
Buttons are on the screen, will have a go at hooking them tomorrow.

Thx all

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

More
2 years 8 months ago #293637 by cmorley
Ahh Phill saw it right away!
Let us know how it goes.
The following user(s) said Thank You: camb0

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

More
2 years 8 months ago #293661 by camb0
Works amazing thx all for your help.
For those following along you need to add pins to your post gui file qtdragon_hd_postgui.hal
Code:
net carousel-fwd-btn carousel.0.jog-fwd qtdragon.atc_cw net carousel-rev-btn carousel.0.jog-rev qtdragon.atc_ccw net tool-release qtdragon.atc_release

where:
-carousel is the linuxcnc component
-tool-release is an 'or' setup on the pin that triggers air solenoid to release the tool
The following user(s) said Thank You: cmorley, tommylight

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

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