Create a Tri-State LED Indicator in LabVIEW
Under some conditions, the traditional boolean LED indicator is not enough to indicate the test result. For example, before the test finish, the status of current UUT(Unit Under Test) is unknown, which value should be displayed, the green TRUE with the meaning of success or red FALSE with the meaning of fail? Both are unacceptable, it’s better to use black color to indicate an unknown status.
But the default LED indicator in LabVIEW has only two state: FALSE and TRUE, it’s not possible to use it to display three status. So, some programming is needed to create this tri-state LED.
Here is what I have done to make this happen:
The front panel, one enum control and one LED indicator:

The property of the enum control:
There are three values: UNKNOWN, FAIL and SUCCESS.
Below is the diagram:
I use the property node to change the color of the LED. When an UNKNOWN value received, the LED will be black, FAIL then red and SUCCESS then green.
This vi can be downloaded here.
Wish it will help you.
No related posts.

