Support Forums
Dynamic button behaviour, depending by tag value

Dear All,
I'm very new to VT SCADA and after all the tutorial I watched, I couldn't find the answer (or maybe I missed it) to a problem I'm facing.
I want to configure a push button to start/stop a piece of equipment, and I was wondering if I could read the state of that equipment and send the opposite value through the button.
I saw that it is possible to write a static value in the "Value to Write" field, and I can't see any way to grab a tag value.
Is it possible to do so? If yes, can you explain to me how?
Thanks a lot in advance,
P

Dear All, I'm very new to VT SCADA and after all the tutorial I watched, I couldn't find the answer (or maybe I missed it) to a problem I'm facing. I want to configure a push button to start/stop a piece of equipment, and I was wondering if I could read the state of that equipment and send the opposite value through the button. I saw that it is possible to write a static value in the "Value to Write" field, and I can't see any way to grab a tag value. Is it possible to do so? If yes, can you explain to me how? Thanks a lot in advance, P

You could do this using some expressions, but it's probably best to use the Selector Switch tag type and the associated widget.

You could do this using some expressions, but it's probably best to use the Selector Switch tag type and the associated widget.

Trihedral Engineering Ltd.

Hey @ArghDave, thanks for answering!
If I would use an expression on a push button, where would I insert it?
Thanks!

P.s. I will explore the switch tag solution as well.. I'm just understanding how to use this marvelous tool smile

Hey @ArghDave, thanks for answering! If I would use an expression on a push button, where would I insert it? Thanks! P.s. I will explore the switch tag solution as well.. I'm just understanding how to use this marvelous tool :D

Suppose you want to do this with a push button. In that case, the easy way is to create two overlapping buttons and use either a tag value or a custom expression. You would put a ternary expression to create a conditional for the opacity based on a tag value.

IE: Ternary expression example where one button would have the following, and the other would have the opposite outcome:

[PathToMyTag] == 1
? 0
: 1
Suppose you want to do this with a push button. In that case, the easy way is to create two overlapping buttons and use either a tag value or a custom expression. You would put a ternary expression to create a conditional for the opacity based on a tag value. IE: Ternary expression example where one button would have the following, and the other would have the opposite outcome: ```` [PathToMyTag] == 1 ? 0 : 1 ````

Trihedral Engineering Ltd.

61
3
2
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