03-20-2007 11:21 AM
I have set the sample rate to 2000 Hz. I am writing the analog input to a file. Let's say that I take data for 5 seconds...I should have 5x2000 = 10,000 lines of data in my output file, but the output file only has about 63 lines of data. I want to be able to set the sample rate and get the number of lines of output data based on this sample rate and the time of acquisition.03-21-2007 02:06 AM
Well you have put the 'write to measurement file' outside the loop
Hence, only values read of the last iteration of the while loop, are getting saved to the file ( you are also not stroing each iteration's value to an array and writing it finally)
The best thing to do would be to take your 'write to measurement file' inside the while loop and keep appending the read values to the opened/created file