MultiButtonState issue

Hey there, I am using Ignition 8.1 Perspective and having some issues with the MutliButtonState component. I have three different states for my button, On, status and Off. The status state is not a button, this is just to show the status. I however dont seem to understand the values of the different states.
What I want to do is when I press the On button a tag gets set high and when I press the Off button another tag gets set low. Very simple. Is it correct to use the Event configurationand then onActionPerfomed? See images below:


Why do you have 2 tags ? That looks a bit weird.
I mean, if the VentilasjonOn tag is false, then you don't really need another VentilasjonOff telling you the same info.
If, for some reason, you DO need a second tag, make it an expression tag, make it point at the first one and reverse the result.

Then your multi state button can just flip one tag, and no script is required.

edit:
It looks to me like you should be using just one tag and a checkbox or a toggle, with a label for the status text. You're overcomplicating things with a multi-state button and 2 tags

1 Like