Support Forums
Simple toggle pushbutton

I am trying to make a simple toggle button that will output digital 1 or 0, and indicate feedback state with color change and text change.
The output can be changed from other locations so this button needs to change states accordingly.
Seems very basic, but this is my first VTScada project and I can't seem to accomplish what I want.
Thanks for any help I can get.

I am trying to make a simple toggle button that will output digital 1 or 0, and indicate feedback state with color change and text change. The output can be changed from other locations so this button needs to change states accordingly. Seems very basic, but this is my first VTScada project and I can't seem to accomplish what I want. Thanks for any help I can get.

Typically in VTScada, this would be done using a Selector Switch Tag as it has properties and features specific to this style of operation but this can also be done using a pushbutton (Technically Two). Basically, while this could be done in one button, it's probably easiest to create two buttons, each writing a state and having the colors you are going for. Then create an expression in the opacity to have the opacity 0 or 1 depending on the value of the feedback.

I've shown an example opacity expression below. It's a ternary expression wrapped in a default value in case anything returns invalid.

PickValid([FeedbackTag] == 0 ? 1 : 0,1)
Typically in VTScada, this would be done using a Selector Switch Tag as it has properties and features specific to this style of operation but this can also be done using a pushbutton (Technically Two). Basically, while this could be done in one button, it's probably easiest to create two buttons, each writing a state and having the colors you are going for. Then create an expression in the opacity to have the opacity 0 or 1 depending on the value of the feedback. I've shown an example opacity expression below. It's a ternary expression wrapped in a default value in case anything returns invalid. ```` PickValid([FeedbackTag] == 0 ? 1 : 0,1) ````

Trihedral Engineering Ltd.

77
1
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