LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a front panel display that lights up with different colours depending on its input signal?

I am doing a project where I have this array which has different voltage outputs for each grid. How do I create a front panel object that lights up with different colours depending on the voltage input or is there already such a pre-built function?

 

In addition, I wish to display these in an array on screen. Is there any pre-built function for this?

0 Kudos
Message 1 of 5
(2,675 Views)

Look at the 2D Picture control from the Graph palette.  You can put these into an array.

 

Lynn

0 Kudos
Message 2 of 5
(2,670 Views)

For starters you could create a simple converter that scales a 0 to 10 volt range to a 0x000000 to 0xFFFFFF range on the RGB scale. Once you have that you can feed the value into a foreground or background color property node for the control or indicator of interest.

 

 

Hope that helps.   🙂

0 Kudos
Message 3 of 5
(2,669 Views)

I didn't even check to see if this would work, but I think it should index the array of colors feeding the boolean property node depending on what your input is and what your ranges are set at.

LED Colors.png

0 Kudos
Message 4 of 5
(2,663 Views)

 


@Repulse wrote:

I am doing a project where I have this array which has different voltage outputs for each grid. How do I create a front panel object that lights up with different colours depending on the voltage input or is there already such a pre-built function?


 

The simplest way would be an intensity graph. It gives you a 2D grid where each grid point is colored according to the value of a 2D array. The Z axis color ramp determines the color.

 

My second choice would be an array of colorboxes. (They could even be made to look like LEDs (see image, if course you can leave them square too), All you need is a scaling function thap maps voltages into a color ramp lookup table with an 8bit index)

 

 

(Using booleans and color property nodes is relatively clumsy. Booleans are meant for two states because the value is boolean. Since array elements can only differ in value, and not in properties, it will not even work. Color boxes have a color data type which is much more appropriate for this case)

0 Kudos
Message 5 of 5
(2,654 Views)