What you've shown doesn't show any need to have a while loop running at 1 MHz. Set your DAQ assistant to continuous samples, and collect a large number, or all that is available. Analyze and and it to the file.
Some tips.
Merge signals is expandable by dragging the border down, so you can merge all the signals in one step rather than needing multiple merge signals.
You have the risk of rapidly growing arrays that will fill up your memory by using the concatenating tunnels.
You'd be better off using a producer/consumer architecture to acquire the data in one loop, then pass it to another loop for analysis and writing to a file.