Disable pushbutton
- MaHa
- Offline
- Platinum Member
-
Less
More
- Posts: 500
- Thank you received: 210
28 Dec 2025 19:01 #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?
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
- Offline
- Platinum Member
-
Less
More
- Posts: 500
- Thank you received: 210
28 Dec 2025 23:17 #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.
- JT
-
- Away
- Administrator
-
Less
More
- Posts: 1059
- Thank you received: 546
28 Dec 2025 23:22 #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
JT
Please Log in or Create an account to join the conversation.
- JT
-
- Away
- Administrator
-
Less
More
- Posts: 1059
- Thank you received: 546
29 Dec 2025 13:59 #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.
To have a button with the object name of state_on be off when the power is off
And to answer your question to have a button disabled when a program is running add the object name to the following dictionaries
JT
parent.state_estop_pb.setEnabled(False)
parent.state_estop['state_estop_pb'] = False
parent.state_estop_reset['state_estop_pb'] = TrueTo have a button with the object name of state_on be off when the power is off
parent.state_on_pb.setEnabled(False)
parent.state_estop_reset['state_on_pb'] = False
parent.state_on['state_on_pb'] = TrueAnd to answer your question to have a button disabled when a program is running add the object name to the following dictionaries
parent.state_on['disabled_running_pb'] = True
parent.program_running['disabled_running_pb'] = FalseJT
The following user(s) said Thank You: MaHa
Please Log in or Create an account to join the conversation.
- MaHa
- Offline
- Platinum Member
-
Less
More
- Posts: 500
- Thank you received: 210
29 Dec 2025 18:24 #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.
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.224 seconds