LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What's the best way to display color-coded telemetry?

I have an array of up to 64 name-value pairs -- one for each sensor channel (thermocouple, pressure transducer, etc.).  I would simply use an array of clusters with the name and value, but I also want to be able to flag when a particular value goes out of limit.  I want to change the background color of the value to yellow or red depending on the value.  As I understand it, I cannot change the properties of individual items in an array.  😞  So I'm forced to explicitly lay out 64 string and numeric indicators (even if I'm not using them all)!  Yuck.

 

Surely I'm not the first LabView user who wants to color-code a telemetry array display!  Is there a better way to do this?  I've looked at the multicolumn list box but that seems to be aimed at allowing the user to select something from a list -- not strictly display things.  Besides, I don't see a way to change the colors of an individual cell for the listbox either.

 

Please help!

Keith.

 

 

0 Kudos
Message 1 of 12
(3,715 Views)
Add a colorbox to your cluster as a third element, make your value indicator transparent, and place them over the suitably sized color box. Now write the desired colors to the color box elements as needed.
Message 2 of 12
(3,714 Views)

OMG!  That's one of the ugliest hacks I've seen!  But it does work.  Of course, I can't change the font color to ensure high contrast when the background changes. 

 

Why doesn't LabView have a cleaner way to do this?  Or at least a numeric widget that has built-in red/yellow limit processing?  I feel like I'm going to hell for sure if I use this color box hack ... 😉

 

Thanks,

Keith.

 

0 Kudos
Message 3 of 12
(3,704 Views)

I agree it is ugly.

 

Since you want to exclusively use this as an indicator, you might want to display your data in a table indicator. Here you can set the color of individual cells at will.

 

Message 4 of 12
(3,699 Views)

Table sounds great, but I didn't mention that speed is also a concern.  When I use a table, my VI is way too slow compared to the collection of basic indicators.  Perhaps I'm not using the table efficiently?  Attached is a diagram of the update VI that sets the values and colors in the table.

Thanks,

Keith.

 

 

0 Kudos
Message 5 of 12
(3,680 Views)

You should probably "defer panel updates" during the execution of the loop. It should make a big difference in performance.

 

(Do a search for "defer panel updates" here in the forum for details).

Message 6 of 12
(3,667 Views)

FYI, I wanted to be sure I'm using the fastest display approach, so I made a test VI to measure the 4 different approaches (attached).  Here are the results on my machine (10000 iterations):

 

Basic Indicators: 3.1 ms

Cluster Array: 0.002 ms

Table: 7.5 ms

Listbox:  9.4 ms

 

Something about the cluster array makes it 3 orders of magnitude faster!  What am I missing here?

 

Keith.

 

0 Kudos
Message 7 of 12
(3,661 Views)

It is the only one that does not use property nodes.

Use the defer panel updates if you really have to use property nodes (as Christian said)

Message 8 of 12
(3,648 Views)
Also, there is no need to use a property node to read the "active cell" just to throw away all its data by overwriting both values a nanosecond later. (case table and listbox). Just use a diagram constant instead.
Message 9 of 12
(3,637 Views)

OK, I added defer panel updates and it did speed up the table and listbox significantly (down to around 3 ms) but still not as fast as the cluster array.  (BTW, replacing the active cell read with a constant had no effect.)  But here's what's weird: with the defer, the cluster array is incredibly slow -- around 7 ms!  Not sure what to make of this other than avoid property nodes at all costs -- even if it means using an ugly transparent indicator hack so I can change the BG color ...

 

0 Kudos
Message 10 of 12
(3,599 Views)