06-06-2017 02:14 AM
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.
06-06-2017 03:06 AM
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.
06-06-2017 03:10 AM
the attached vi should get you started
06-06-2017 03:12 AM
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.
06-06-2017 03:17 AM - edited 06-06-2017 03:19 AM
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
06-06-2017 03:26 AM
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.
06-06-2017 05:13 AM
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
06-06-2017 05:22 AM
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)
06-06-2017 05:22 AM - edited 06-06-2017 05:43 AM
06-06-2017 05:27 AM
cbutcher's backsaved 2015