LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use "Select Signals" Express VI with consistant plot colors for each input?

The attached example VI demonstrates the use of "Select Signals" Express VI.  My problem is that the plot colors for a selected plot CHANGE depending on what plots are selected.  This is confusing and forces the user to keep checking the Plot Legend.

Is there a way to force plot 1 to always plot in red, plot 2 in green, and so on - REGARDLESS of how many, or what combination of plots are selected?

Thank you.


0 Kudos
Message 1 of 12
(4,287 Views)
Hi alyeska,
 
One thing you can try to use is a property node that sets a specific color to a specific plot. There is a great KnowledgeBase article that discusses how to implement this property node. You should be able to set each of the plots (with the different signals) to a specific color by using the Active Plot and the Plot Color properties. I hope this helps!
 
 
Carla
National Instruments
Applications Engineer
Message 2 of 12
(4,269 Views)
Hi Carla,

Actually I have already tried that and it doesn't work with the select VI, UNLESS all the plots are selected.  If only a few plots are selected the plot names get reassigned. So again the question is how do I use the Select VI and get  the plot names and color associations to stay linked???  Thanks.
0 Kudos
Message 3 of 12
(4,250 Views)

Hi alyeska,

I have been doing a bit more research and you may have to use the lower level VIs in order to get this to work. I think that with the Express VIs, there might be a limitation where you cannot have the specific plot color attached to a specific signal. If you right-click on the Select Signal VI, and select Open Front Panel, you can see the lower level code behind the express VI.

National Instruments
Applications Engineer
Message 4 of 12
(4,230 Views)
Hopefully someone can help with this?????????  I looked at the Express VI code some time ago, and have been unable to associate a plot color with a specific channel AND still do the selection process......
0 Kudos
Message 5 of 12
(4,211 Views)
Hi aleyska,

I've been playing with this a bit, and I think I've found a solution that might work for you.

If, rather than deselecting the signals (ie: removing them), you simply make them invisible (using the Plot->Visible property), the active plot enumertion will remain unchanged and the colors that you have set will remain constant.

Please see the attached VIs to see what i'm talking about.  They're kind of messy, but I think you'll see what I mean.
Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
Download All
Message 6 of 12
(4,178 Views)
Eric,

THAT WILL DO IT!!!

MANY THANKS!


0 Kudos
Message 7 of 12
(4,165 Views)
Welcome Smiley Wink
Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
0 Kudos
Message 8 of 12
(4,140 Views)
Eric,

Well I thought I was in good shape, but plotting with consistant colors for each input just doesn't seem to work in my application.  Your demo VI works fine but I can not duplicate it with my data file.  I have boiled it down to the essential issue I believe..... perhaps it is a bug, but in any event it is an issue I can not solve.

I have attached the basic code, my sample data file, and two screen shots that show the issue.  IF ALL the active plots are selected true, everything is just fine.  BUT if, as in this example screen shot, only plot 0 and 7 are selected, things fall apart, and plots 6 and 7 show and in different colors to boot.  Doing the same thing and using the select VI does not change the result.

Am I really missing something or is this in fact a bug of some sort.  (I also ran this with the new 8.5.1  with no difference!

Thanks.


0 Kudos
Message 9 of 12
(4,073 Views)
Well I apparently I can't post a TDMS data file????  It contains EIGHT channels of data, 0 through 7....  let me know if it is needed and how to post it...
0 Kudos
Message 10 of 12
(4,072 Views)