LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Copious Property Nodes

Hello,

 

I have 20 analog voltage inputs and I want their corresponding numeric indicators to change color according to their value. The only way I know how to do this would be to do 20 case structures with 20 property nodes (one for each numeric indicator). Can someone please suggest to me a better way to do this?

 

Thanks in advance,

 

Cassidee

0 Kudos
Message 1 of 10
(2,678 Views)

Use a table indicator with a single row or column, then color the cell backgrounds according to the values.

 

(Here is a 2D example, so your problem is even simpler.)

0 Kudos
Message 2 of 10
(2,664 Views)

Sorry, but that doesn't answer my question. My configuration for the analog inputs are not all located in a single nicely formatted little table. They are each positioned individually. Is there any way to do this using the numeric indicators and not a table indicator?

0 Kudos
Message 3 of 10
(2,649 Views)

Do your indicators have captions?

You can probably find a better way to differentiate one numeric indicator from the next, but I added captions to all of mine and, for the ones I wanted to modify, their caption was "CCC".

My numeric indicators did not have a color property I could influence so I used blinking instead...

Just an idea.

 

New Bitmap Image.png

0 Kudos
Message 4 of 10
(2,644 Views)

Thanks for your input, but unfortunately I need to change the background of the numeric indicator not the caption. 

0 Kudos
Message 5 of 10
(2,637 Views)

Use a color ramp, or a numeric indicator with a scale that has a color ramp.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 10
(2,632 Views)

Soooo... replace the blinking property node with a background node?

The caption is only to tell the difference between the numeric indicators you want to change and everything else you do not.

Like I said there is probably a better way to detect them but I have not thought of one yet.

0 Kudos
Message 7 of 10
(2,629 Views)

@cassidee21 wrote:

Sorry, but that doesn't answer my question. My configuration for the analog inputs are not all located in a single nicely formatted little table. They are each positioned individually. Is there any way to do this using the numeric indicators and not a table indicator?



Well, it answered based on the very limited information of your original question. Now that we have more information, we can refine the answer. 😄 I also did not understand the need for case structures.

 

Many times, combining related indicators into an array or table are a great way to simplify the front panel and associated code. If this is early in development and you have some design flexibility, you might want to rethink the layout. 😄

 

 

Another way would be to use an explicit array of references, then simply loop over them.

 

Here's a quick example with three indicators. Of course you would probably want to use a fancier color lookup table and a different mapping into it, depending on your needs.

 

0 Kudos
Message 8 of 10
(2,624 Views)

This problem has XControl written all over it.  Make one and then sprinkle them all over your FP as desired.

Message 9 of 10
(2,623 Views)

Hi Cassidee,

 

I sugest using Altenbach's method with an Action Engine. The Action Engine can be used wherever it's needed.

 

Attached is an example in LV2010 with code to test it included.

 

The action engine is called Numeric AE.vi and contains just two states:

 

init.png

numeric.png

Note that "Num Action" is type defed and the "Init" entry is the last one so we can easily index the correct reference.

 

 

steve

 

 

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 10 of 10
(2,575 Views)