PAC Display is there a way to disable a button?

My project has two motors. I have two buttons, one per motor. Each button is linked to a digital I/O point set to toggle. So, basically, if one motor is turned on, I want the button for the second motor to be disabled. I was hoping for a if motor one is turned on, disable to motor two button so that you can’t turn that motor on at the same time.

I might not understand your use case, but I would just do similar logic in the strategy for the button output.
ie, link the button output to a variable and ignore the variable state change if your other logic is met.

Thanks for your input! I updated my post to be more specific in my setup.
My project has two motors. I have two buttons, one per motor. Each button is linked to a digital I/O point set to toggle. So, basically, if one motor is turned on, I want the button for the second motor to be disabled. I was hoping for a if motor one is turned on, disable the ability to click the motor two button so that you can’t turn that motor on at the same time.

You can set the visibility state of a button based on I/O states.

1 Like

You might also want to setup some lockout logic in the strategy to ensure only one motor at a time can run.

1 Like

Instead of turning on IO directly from Display, I would create a ON and OFF variable for each motor that is flagged true when the ON or OFF button is clicked, if the variable is true you then turn the motor on in your strategy. This way you can just check if the one variable is true before allowing the other button visibility. As suggested by Nick above, you can do a discrete visibility based on the variable state.

2 Likes

Thank you so much for the input! But, I already actually have this project made, and I do have logic that only one motor can run at a time. I use the visibility state to perform a “disable.” My button is actually a colored circle, so, I created a duplicate graphic that sits on top of the toggle circle that does nothing so that it simulates the button disabled, and is toggled visible or not depending on a flag if the other motor is on.
I made this project years ago. My question was more so hoping for a disable feature for the graphic click so that I don’t have to mess with duplicate graphics and have to painstakingly line them up or pull them just a teeny bit a part to access the one underneath if I need to change anything, and then re-align them. I have to do this duplicate graphic way because I need the graphic to still show (red off, green on) for user situational awareness. I also turn on the IO directly from the Display because I want as close to an instantaneous response in turning off the motors as possible for safety purposes because of what the motors control compressors. If I turn the motors on in the strategy based on a variable, I’m weary of lag in turning them off/on.

I was hoping the PAC Display software had maybe a new feature or if there was some attribute that I was overlooking.

Sorry for the essay and the lack of clarity.

Thank you for your input! I turn on the IO directly from the Display because I want as close to an instantaneous response in turning off the motors as possible for safety purposes because the motors control compressors. If I turn the motors on in the strategy based on a variable, I’m weary of lag in turning them off/on.

The Opto forums won’t let me display the same full response twice, so for more clarification, if you could look at the response to Nick’s post, you can get more clarity.

hmmm, I’m even more confused now :grinning_face_with_smiling_eyes:

You want to “disable” the graphic that turns the motor ON and OFF?
So, you drew an ellipse for motor ON and one for OFF?
When ON, OFF ellipse is visible and has a GREEN color?
When OFF, ON ellipse is visible and has a RED color?

Sorry for getting you even more confused. By disable I mean that when you click it it no longer sends a command to toggle on/off the I/O point, but I still want the ellipse visible so that it displays whether that point is on/off (green/red).

But it’s okay, I’ll just stick to what I have now. Thanks for your input!