Button state on AppStudio

On my button, I created some states because I just want it to be enabled when the motors are on AND the system is in manual mode. But, when I deploy it to my virtual controller, it enables when the motors are on OR it’s in manual mode. I’ve already tried a lot of orders, but none worked. Does AppStudio have a specific order to set states? Is this normal behavior?
If someone could help me, I’d be very grateful.

Hello,

I think your state configuration is not set correctly.

If you want to bind the button state to multiple conditions, all condition rules should be defined within one single state, rather than creating multiple states for the same button, in your case it shall like:

And you want set the button be disabled when robot is on auto mode:

Only two mutually exclusive conditions are needed to determine the state of the button.

Let me add one more thing here: If multiple states are created and more than one condition is valid at the same time, the last effective condition will take precedence.

For example:

  • Condition 1: ACOC = 0 → Button = Red
  • Condition 2: ACOK = 0 → Button = Green

In this case, when ACOK = 0, the button will finally be displayed as Green, because the last valid condition overrides the previous one.

1 Like

Hello!

Thank you for your answer. As I’m still using v1.2.1 (because whenever I try to open my project in v1.3, it gets stuck on an infinite loading screen), I don’t have the option to use multiple conditions in a single state, as you can see in the image below:

But I really appreciate your help. If someday I manage to open my project in the newer version, I will definitely try this!

(By the way, have you ever seen this infinite loading issue when migrating from v1.2.1 to v1.3? Any tips on how to fix it?)

aha, We have previously received a few cases of this issue, but most of them were related to appstudio v1.2 → v1.2.1.

You can directly report such issues to the support team’s email: global-appstudiosupport@abb.com. They will resolve the problem as soon as possible. :smiley: