LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Led status

I have set of booleans which shows the status of test i want it initially to be in yellow colour but in runtime it should have red and green colour.

0 Kudos
Message 1 of 19
(3,678 Views)

You can programmatically change the colour of an LED (boolean indicator) using Property Nodes and the Colors[4] property.

 

The colours are (Foreground,Background) pairs for False, True, True->False and False->True states. Below is a snippet showing the property node, and a set of color picker constants (found on the Dialog & User Interface palette). The are two constants in a cluster constant, in an array.

 

boolColours.png


GCentral
0 Kudos
Message 2 of 19
(3,650 Views)

the attached vi should get you started


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 3 of 19
(3,648 Views)

When i open my application i want to see all the status of leds to be in yellow color.

 

when i run the test the led status should be changed base on pass or fail for pass i want it to be green and for fail i want it to be in red.

0 Kudos
Message 4 of 19
(3,645 Views)

did you have a look at the vi and try to make the button yellow?

 

you have multiple steps to solve:

- how to make a led/button/something a different color

- how to programmatically decide when to have what color

 

first part is shown in the vi,

second part is beginner labview skill


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 5 of 19
(3,640 Views)

Did you understand the VI Snippet I posted? Or the very similar VI that jwscs added? These both show the use of the Colors property to set the colours used by the boolean LED indicator. 

 

In case you didn't know, a VI Snippet can be dragged and dropped onto a blank VI Block Diagram (or indeed, a not blank block diagram) to paste it there.

 

As jwscs explained, you need to use this property via a property node as shown in my snippet to set the colours of the LED. You need to do this both before your test and after the test. After the test completes, you should additionally set the value of the LED indicator to true or false.


GCentral
0 Kudos
Message 6 of 19
(3,633 Views)

Hi,

can you please save to 2015.

 

I have attached vi please find this.

 

when i open my application now by default color of status buttons is green i want it to be yellow.

 

but when run the test it will validate the response and displays the led as green and red if the test is pass it displays green and when fail am displaying

 

Regards,

Ali

 

0 Kudos
Message 7 of 19
(3,611 Views)

if you rightclick on a (button-)control, you can set the on/off colors initially (to yellow),

but if you then want to change them while running the program,

you have to set via a property node as said before (right click on the control/indicator in the blockdiagram and Create->Property Node->Color).

property node's properties can be switched between read and write (right click on the (e.g.) color property)


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 8 of 19
(3,607 Views)

Jwscs's VI, backsaved. Will upload mine when have computer since remote drag drop from phone too hard!

 

Mine below. Thanks!


GCentral
Message 9 of 19
(3,606 Views)

cbutcher's backsaved 2015

 


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
Message 10 of 19
(3,603 Views)