LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Revealing Objects in Front Panel

Solved!
Go to solution

Hey, I was in the middle of coding my program in labview when I realized that I know nothing about the front panel. I am simply trying to show two graphs when I am recording a new sound file, and then have those disappear and show two different ones. I have it working with property nodes, but I had them within a loop and that was horribly inefficient.  So I moved the entire screen over to them and back and left them always visible, but that seems like a clumsy way to do it. What ways do you recommend condensing data in the front panel? I was trying to look up methods earlier, but everything seems to focus on programming instead of pretty front panels.

 

 

 

 

 

PS. Attaching file, I left out all of the methods I referred to above. Note, this is my first real labview program and I am probably rather inefficiently handling things at this point, so you might get your jimmies in a rustle.

0 Kudos
Message 1 of 6
(2,178 Views)

Tab control? Use the system one, it's much prettier 🙂 If you want to reuse the same graphs, you will have to clear them out. Try using a local variable to clear them, or writing a cluster of empty arrays to the graph indicator. These are ways of doing it that will allow you to avoid property nodes.

Message 2 of 6
(2,176 Views)
Solution
Accepted by topic author NateTheGreat

Several techniques are available. Which you choose depends on many factors.

 

1. Visible property nodes.  This works well but can confuse users as things appear and disappear, sometimes without obvious reason. Also if the two indicators are similar, confusion about what is being displayed may occur.  If you use property nodes, only write to them when something actually changes.  In the VI you posted the Real Time Data and Real Time Power Spectrum property nodes are set True on every iteration of the loop which may occur about 4 times per second.  Move them outside and wire the error out wires to the loop to assure that they execute before the loop starts.

 

2. Tab Control. By putting the graphs on different pages of a tab control the user or the program can determine which are visible. No property nodes required. The Page Labels can provide documentation to the user about what is being displayed.

 

3. Subpanels. The displays would be put in subVIs and displayed in a subpanel as needed.

 

Lynn

Message 3 of 6
(2,173 Views)

@johnsold wrote:

Several techniques are available. Which you choose depends on many factors.

 

1. Visible property nodes.  This works well but can confuse users as things appear and disappear, sometimes without obvious reason. Also if the two indicators are similar, confusion about what is being displayed may occur.  If you use property nodes, only write to them when something actually changes.  In the VI you posted the Real Time Data and Real Time Power Spectrum property nodes are set True on every iteration of the loop which may occur about 4 times per second.  Move them outside and wire the error out wires to the loop to assure that they execute before the loop starts.

 

2. Tab Control. By putting the graphs on different pages of a tab control the user or the program can determine which are visible. No property nodes required. The Page Labels can provide documentation to the user about what is being displayed.

 

3. Subpanels. The displays would be put in subVIs and displayed in a subpanel as needed.

 

Lynn


Oops, I forget to remove those property nodes. I orignally had all of them in that loop and while the loop was running two of them were on and the rest were off. But that is what I was refering to as being really inefficient. It took like 2 seconds for each loop. How did you know that the previous iteration looped at "about 4 times per second"?

 

 

I will check out tab control, thanks guys.

0 Kudos
Message 4 of 6
(2,166 Views)

On each iteration your loop reads 5000 samples at a samplng rate of 22050 samples/second.  Therefore each read takes slightly more than 5000/22050 = .23 s. The Spectral Measurements probably takes hundreds of microseconds or a few milliseconds.  The Sound File Write probably takes tens of milliseconds with an occasionally longer time if the file becomes segmented. I did not run it or time it.  Just a few calculations and some estimates based on experience.

 

Tab control would probably be my choice, but factors of which I am not aware could change that.

 

Lynn

0 Kudos
Message 5 of 6
(2,161 Views)

Ahh, that makes tons of sense. I got tab control working. Thanks.

0 Kudos
Message 6 of 6
(2,153 Views)