From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Boolean Control

Hello,

 

I am taking over a labview project from someone. They have a lovely indicator that also functions as a control. (See picture). The way it works is that you can click it to close a switch, and then it will change it's color to green once the switch is closed. Then if you click it again it will open the switch and its color will change to red.

 

It seems that he had found a way to combine the indicator with two controls that he then hid, and now I have to replicate this for another switch, but I have no idea how to do this. Can anyone suggest what you think he may have done? I cannot reach him and need an idea as to how to do this. There are no property nodes or invoke nodes, and simply copying and pasting does not work. For the record it is a U32 numeric indicator.

 

Thank you

0 Kudos
Message 1 of 4
(969 Views)

No one will be able to help you with just a picture to go by.  Send the VI.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 4
(939 Views)

Are the "Open" and "Close" labelled booleans the hidden ones usually? Are they booleans? Do you have an Event Structure with a mouse down event somewhere?

I'd suspect your indicator is a "Color Ramp" indicator (use Quick Drop, or search the Classic Numeric palette) and the event structure is triggering some behaviour.

 

Color Ramps can have a specific 'ramp' set for different colours with different values, and so you can set them to e.g. have two possible values, with colours red and green, and no interpolation (although enabling/disabling interpolation may not be important here).

 

An example is attached showing a possible implementation (LabVIEW 2019, although I could also backsave it). This might solve your problem (maybe?). If not, maybe you can give more information on your goal.

Note that although my example shows setting the Scale with a Property Node, once you have it configured with the colours you want, you could delete these (hence perhaps no Property Nodes in your code).


GCentral
0 Kudos
Message 3 of 4
(911 Views)

Hey cbutcher,

 

Yes they are booleans with latch when released behaviour, there is also an event structure which triggers upon value change of said booleans, which is why i was confused as to how clicking the indicator changed the value of the boolean from true to false. Also if you could backsave it that would be great, I'm still running labview 2018.

 

Thank you!

0 Kudos
Message 4 of 4
(889 Views)