Hi,
I am including a Vi where you can detect the peak of the waveforms & sequentially store peak values into the array & plot into waveform graph. Here when you press "Stop", a sub vi opens. When you stop sub vi by pressing "Stop" button placed on the front panel of sub vi, both the vi are stopped.
Hope this helps. Incase of any problems, your feedbacks are welcome.
Best Regards,
Nirmal Sharma
India