LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a 3 state control whose output is color?

I have an application where I am using a boolean control to show green for on time, and red for not on time. The operator selects one of the two states. The true/false value is stored in a database as 0 or 1. I have a need to add yellow as a third state meaning "on hold". This means changing the bit value in the database to a tiny integer which I should be able to do without data loss. Is there a control that would operate perhaps like a menu ring, where all I am displaying is the selected color? This should behave like a tri-state boolean. I am just not sure if this is possible.

 

Thank you!

0 Kudos
Message 1 of 3
(4,082 Views)

If you really want three values for the control then look at the Picture Ring. It let's you define a set of picture that the user can choose from (like images of a boolean control with three different colors).

 

If you still want only true or flase but want to change the color then look a the "colors" property foa boolean.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 3
(4,081 Views)

You can use the "mixed checkbox" from the system palette. It has three states: False/True/mixed.

 

You can also use a colorbox as indicator, it can even be made to look like an LED.

 

It seems you want the operator to only select true/False while the third state is generated programmatically.

So you could use mouse-up events to toggle between true/false colors. Disable the control so the color selector does not show.

 

You cound even make an Xcontrol to simplify coding and define the desired behavior.

 

Yes another possibility is a picture ring containing 3 pictures of the LED in the desired colors.

Message 3 of 3
(4,061 Views)