enable / disable button object on pyVCP?

More
11 Jan 2023 22:56 #261638 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.
 

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

More
12 Jan 2023 16:54 #261713 by MaHa
In the .xml file for the button, to activate disable pin, insert to button
    <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.

More
13 Jan 2023 13:38 #261795 by Todd Zuercher
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.

More
13 Jan 2023 19:28 #261822 by pingtomi
Thank you, this works!

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

Time to create page: 0.132 seconds
Powered by Kunena Forum