GladeVCP Axis Selection Buttons
- GeorgeW21
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
14 Jan 2019 03:29 #124137
by GeorgeW21
GladeVCP Axis Selection Buttons was created by GeorgeW21
Hi All,
I'm trying to get an axis slector buttons setup setup for my mpg and gmocappy using GladeVCP.
I have managed to create the panel and get three buttons setup and linked to hal pins to select the axis.
I'm now trying to get it set up so that the buttons are mutually exclusive. i.e. when you select the X axis button it will make sure the Y and Z pins are set to false
Id like to set up some logic something along the lines of:
If button_press_select_x:
Set axis.0.jog-enable True
Set axis.0.jog-enable False
Set axis.0.jog-enable False
If button_press_select_y:
Set axis.0.jog-enable False
Set axis.0.jog-enable True
Set axis.0.jog-enable False
If button_press_select_z:
Set axis.0.jog-enable False
Set axis.0.jog-enable False
Set axis.0.jog-enable True
I understand that I could possibly impliment this either with a Hal compoonet or with a python script but I don't understand where to start with doing this.
It would be great if I could get some pointers on how to do this.
Thanks
George
I'm trying to get an axis slector buttons setup setup for my mpg and gmocappy using GladeVCP.
I have managed to create the panel and get three buttons setup and linked to hal pins to select the axis.
I'm now trying to get it set up so that the buttons are mutually exclusive. i.e. when you select the X axis button it will make sure the Y and Z pins are set to false
Id like to set up some logic something along the lines of:
If button_press_select_x:
Set axis.0.jog-enable True
Set axis.0.jog-enable False
Set axis.0.jog-enable False
If button_press_select_y:
Set axis.0.jog-enable False
Set axis.0.jog-enable True
Set axis.0.jog-enable False
If button_press_select_z:
Set axis.0.jog-enable False
Set axis.0.jog-enable False
Set axis.0.jog-enable True
I understand that I could possibly impliment this either with a Hal compoonet or with a python script but I don't understand where to start with doing this.
It would be great if I could get some pointers on how to do this.
Thanks
George
Please Log in or Create an account to join the conversation.
- newbynobi
- Offline
- Platinum Member
Less
More
- Posts: 2075
- Thank you received: 406
14 Jan 2019 22:20 #124192
by newbynobi
Replied by newbynobi on topic GladeVCP Axis Selection Buttons
Why dont you use radiobutton?
You can make them look like normal buttons, just setting show indicator = False in glade propertys.
Norbert
You can make them look like normal buttons, just setting show indicator = False in glade propertys.
Norbert
The following user(s) said Thank You: Grotius, GeorgeW21
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
Less
More
- Posts: 2239
- Thank you received: 1956
15 Jan 2019 00:55 - 15 Jan 2019 00:56 #124208
by Grotius
Replied by Grotius on topic GladeVCP Axis Selection Buttons
Norbert,
I think George has to look in linuxcnc halmeter when his hal buttons are fertig.
George,
Look at the exact button names. Sometimes
they have extensions like -f (speedwidgets). This extensions must be used. But for radiobutton it's easy.
Then he can connect the button's according the name showed in halmeter, in his halfile or postgui.hal file.
That is the most easy way to begin, so far i know.
Python scripting is way more difficult to begin with.
I think George has to look in linuxcnc halmeter when his hal buttons are fertig.
George,
Look at the exact button names. Sometimes
they have extensions like -f (speedwidgets). This extensions must be used. But for radiobutton it's easy.
Then he can connect the button's according the name showed in halmeter, in his halfile or postgui.hal file.
That is the most easy way to begin, so far i know.
Python scripting is way more difficult to begin with.
Last edit: 15 Jan 2019 00:56 by Grotius.
The following user(s) said Thank You: GeorgeW21
Please Log in or Create an account to join the conversation.
- GeorgeW21
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
15 Jan 2019 03:44 #124221
by GeorgeW21
Replied by GeorgeW21 on topic GladeVCP Axis Selection Buttons
Thanks both,
Radio buttons worked great.
For others who may find this thread I did the following:
In radio button properties->general->active set 'Draw Indicator' to 'No'
Assign two of the radio buttons to the first radio buttons group via properties->general->group
Thanks
George
Radio buttons worked great.
For others who may find this thread I did the following:
In radio button properties->general->active set 'Draw Indicator' to 'No'
Assign two of the radio buttons to the first radio buttons group via properties->general->group
Thanks
George
Please Log in or Create an account to join the conversation.
Moderators: HansU
Time to create page: 0.054 seconds