Virus,
I think that your code would be well served with a properly placed shift register. The shift register will pass data from one iteration of a loop to the next. This way, you can keep a running tally of things like the number of averages calculated, or the signals which you have acquired. In a case structure you would have your VIs for acquiring and analyzing the signal, the signals that these VIs produce would be appended to the signal coming in from the shift register. This would effectively add the current signal acquired to the signal that was acquired in the past. In the false case (when acquire data is not pressed), you could either just pass on the data without appending anything new, or you could append a constant of some kind to show that no signal was acquired for your graph. It just depends on what you want your data to be shown as.
Around this case structure, you would have a while loop where you would have your stop acquisition button wired. The data from the while loop's shift registers will not be passed out until execution of the while loop is complete, so one graph in the example shows nothing until the stop acquisition button has been pressed. The one inside the loop will show the data that is being acquired.
Finally, as a note, you should handle your errors through your program, not only is it good coding style, it helps to define the data flow patern so that you don't need sequence structures. Note also that I unbundle the error cluster and if there is an error, the program will be ended. I think that this is something that is often overlooked, but is important, because if there is an error with the acquisition or the analysis, you probably want your program to end, and at the very least, you would want to know of that error and clear it for the next iteration of the loop.
Take a look at the example VI I have attached, I think that you should be able to take the concepts there and apply them to your own code. These programming concepts are discussed in some of our learning LabVIEW material. You may want to consider going through one of our free online courses to pick up some of these concepts, or better yet, sign up for one of the classes where a certified LabVIEW instructor will cover all the programming concepts of LabVIEW. You can find all of these resources here:
Have a great day.
Brian Coalson
Software Engineer
National Instruments