Disable pushbutton

  • MaHa
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 months 5 days ago #340628 by MaHa
Disable pushbutton was created by MaHa
I am looking at disable a pushbutton during program runtime. No idea how to do. It is connected to python module, and should not
be enabled during runtime. Is there a setting, it gets greyed out, eg. like mdi-button?

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

  • MaHa
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 months 4 days ago #340634 by MaHa
Replied by MaHa on topic Disable pushbutton
With function mdi and command M66E0L0 the button is disabled while running a program and that doesn't affect its initial functionality. But still hoping there is another way to do that.

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

More
10 months 4 days ago #340635 by JT
Replied by JT on topic Disable pushbutton
Let me verify how to do that, it should be simple but I want to test first.

JT

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

More
10 months 4 days ago #340656 by JT
Replied by JT on topic Disable pushbutton
To have a button with an object name of state_stop_pb be disabled when the estop is on and enabled when the estop is off.
Code:
parent.state_estop_pb.setEnabled(False) parent.state_estop['state_estop_pb'] = False parent.state_estop_reset['state_estop_pb'] = True

To have a button with the object name of state_on be off when the power is off
Code:
parent.state_on_pb.setEnabled(False) parent.state_estop_reset['state_on_pb'] = False parent.state_on['state_on_pb'] = True

And to answer your question to have a button disabled when a program is running add the object name to the following dictionaries
Code:
parent.state_on['disabled_running_pb'] = True parent.program_running['disabled_running_pb'] = False

JT
The following user(s) said Thank You: MaHa

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

  • MaHa
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 months 4 days ago #340668 by MaHa
Replied by MaHa on topic Disable pushbutton
That was easy to do, and it works exactly as desired. It is important for me to lock out this kind of potential risks.
Thank you for providing this information.
The following user(s) said Thank You: JT

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

Moderators: JT
Time to create page: 0.289 seconds
Powered by Kunena Forum