enable / disable button object on pyVCP?
- pingtomi
- Offline
- Junior Member
Less
More
- Posts: 24
- Thank you received: 0
11 Jan 2023 22:56 #261638
by pingtomi
enable / disable button object on pyVCP? was created by pingtomi
Hi
Google is not my friend in this case :/
Is it possible to disable custom button in pyVCP? I'd like to add button to release the hydraulic tool holder (it works) but 'd like to disable it when the spindle is on. Can I do this somehow? (I know I can do it on the HAL side by using simple logic to not activate the particular gpio output if spindle-enable signal is active but I'd prefer to disable the button on the gui as well).
Thank you for your advice.
Google is not my friend in this case :/
Is it possible to disable custom button in pyVCP? I'd like to add button to release the hydraulic tool holder (it works) but 'd like to disable it when the spindle is on. Can I do this somehow? (I know I can do it on the HAL side by using simple logic to not activate the particular gpio output if spindle-enable signal is active but I'd prefer to disable the button on the gui as well).
Thank you for your advice.
Please Log in or Create an account to join the conversation.
- MaHa
- Offline
- Platinum Member
Less
More
- Posts: 394
- Thank you received: 156
12 Jan 2023 16:54 #261713
by MaHa
Replied by MaHa on topic enable / disable button object on pyVCP?
In the .xml file for the button, to activate disable pin, insert to button
In postgui.hal
change MYBUTTON to button's halpin
While spindle is on (M3 and S > 0), button is greyed out.
<disable_pin>True</disable_pin>
In postgui.hal
net btn_en spindle.0.on pyvcp.MYBUTTON.disable
change MYBUTTON to button's halpin
While spindle is on (M3 and S > 0), button is greyed out.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5009
- Thank you received: 1443
13 Jan 2023 13:38 #261795
by Todd Zuercher
Replied by Todd Zuercher on topic enable / disable button object on pyVCP?
In addition to disabling your button, you might also want to more explicitly disable the output signal to the tool release in hal using some hal logic.
Please Log in or Create an account to join the conversation.
- pingtomi
- Offline
- Junior Member
Less
More
- Posts: 24
- Thank you received: 0
13 Jan 2023 19:28 #261822
by pingtomi
Replied by pingtomi on topic enable / disable button object on pyVCP?
Thank you, this works!
Please Log in or Create an account to join the conversation.
Time to create page: 0.050 seconds