General Discussions
Opacity Expression

Hi,

I was trying to add opacity expression in momentary switches, when selector switch changing the position according to that Momentary switches will fade.

Anybody pls help me to write a expression...64e44278c4864

Hi, I was trying to add opacity expression in momentary switches, when selector switch changing the position according to that Momentary switches will fade. Anybody pls help me to write a expression...![64e44278c4864](serve/attachment&path=64e44278c4864)

The expression below will make the opacity 0 if the referenced tag has a value of 1. Otherwise the opacity will be 1.

[SelectorSwitchTag] == 1 ? 0 : 1
The expression below will make the opacity 0 if the referenced tag has a value of 1. Otherwise the opacity will be 1. ```` [SelectorSwitchTag] == 1 ? 0 : 1 ````

Trihedral Engineering Ltd.

Loads of ways to do this, and some depend on what you are trying to achive or using to control it.

You could just link the relevent tag by selecting it from the tag browser in the opacity dropdown (if its a digital). Or you could write an expression if its not digital. So that when the desired position is selected you then change the visibility of the switch, something like:

Cond(PickValid([Tag1],2) == 2 , 1 , 0)

“[Tag1]” and "2" being the tag and value that you wish to use to make the switch visible. This will output a 1(100% visible) or a 0 (0% visible)… also if the tag value is not valid then it makes it visible.

Note that this will not "fade"... it will just go visible or not... does that help?

Loads of ways to do this, and some depend on what you are trying to achive or using to control it. You could just link the relevent tag by selecting it from the tag browser in the opacity dropdown (if its a digital). Or you could write an expression if its not digital. So that when the desired position is selected you then change the visibility of the switch, something like: Cond(PickValid([Tag1],2) == 2 , 1 , 0) “[Tag1]” and "2" being the tag and value that you wish to use to make the switch visible. This will output a 1(100% visible) or a 0 (0% visible)… also if the tag value is not valid then it makes it visible. Note that this will not "fade"... it will just go visible or not... does that help?
81
2
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft