07-06-2009 05:48 PM
I want to be able to make one of two plots visible OR make both plots visible at the same time depending on front panel controls. With the attached vi I can make either plot visible. How do I make both visible at the same time? Ultimately, I would like to expand this featue to more than two plots with any number visible at once. For example, I might want to make 3 out of 4 plots visible or all 4 at once.
Thanks in advance.
Solved! Go to Solution.
07-06-2009 08:10 PM
Swap the order of the elements in your property nodes. The property nodes execute from the top down, so you want to set the active plot first, then set its visibility. As you have it now, the visibility of the plot is based on whatever was the last button you had pressed rather than the current one.
01-17-2010 10:06 AM
Can you save it under 8.5 version? I will like to see it too. Thanks!
01-17-2010 11:02 AM
Ravens already gave you the solutions. Here are a few more comments:
You can leave the stop button latch action if you place the terminal in the upper loop. THe stop event does not need a terminal. This eliminates two local variables.
VI Joe wrote:Ultimately, I would like to expand this featue to more than two plots with any number visible at once.
It always helps to make the code scaleable, so it is independent of the number of traces you ultimately have. In your program design, you need to clone the visibility events, one case for each trace with near duplicate code, and significant code changes are needed whenever you add or remove plots. 😮
If you make an array of booleans, all you need is one case and a small FOR loop and the code remains identical, no matter how many plots you add or remove in the future. 🙂
Atttached is a quick draft showing some of the ideas. (LabVIEW 8.0) See if it makes sense. 🙂