Thanks for the code. (Please don't maximize the front panel and diagram to the screen, that very annoying!).
You are not using a timed loop, just a plain loop with a wait.
Since you know the number of iterations before the loop even starts (assuming the controls don't change), a FOR loop is more appropriate. You can show the conditional terminal to stop early when an error occurs.
In any case, your equal comparison to determine loop termination is likely to fail with fractional numbers because of limitations of floating point math. You should do a "Larger or equal" instead.
Unless the user should be able to adjust the interval, end freq, sampling rate, etc during the run, their terminals don't belong in the loop.
There does not seem to be any synchronization between the sound generation and the DAQ stuff since they don't have any data dependency. In what order should they start?
The spectral measurement and file writing belong in a parallel loop. Use e.g. a queue to communicate.