A circular buffer would definitely work for the high-speed, continuous measurements you will be performing. The biggest issue will be whether the PC will be able to keep up and write 5 MS/sec. to file. I would recommend a fast processor with a good amount of RAM so the computer will be able write the data to file at a fast rate.
The optimal way to write to file when acquiring data at high speeds will be to stream to disk. When streaming to disk you take the steps of
1. Opening File
2. Write to file continuously in loop
3. Close file
By performing the opening and closing of the file outside of the loop, you will be able to optimize the speed of writing to file. I hope this helps.
Todd D.
Applications Engineer
National Instruments