08-14-2006 10:54 AM
Hi,
I am trying to record some data and time in a text file that I would be able to open the data file in Excel later. I have worked on the program and it works but I have some questions, and I would appreciate if somebody can help that I would be able to improve my code.
1) I wrote the data in a spreadsheet (test1 vi), however I read in the discussion forum that this not the best way to record the data since it slows down the program, and I am trying to run my code in a high sampling rate. So, I tried to write the data in a text file (test 2 vi), now the data is written 5 times for each time step (text file attach). Can somebody give me any suggestion what is wrong with the code that record the data more than one for each loop?
2) I am recording the time by using Tick count inside and outside the loop. Is there any better way to record the time?
Thanks a lot,
Azadeh
08-14-2006 10:57 AM
08-14-2006 12:32 PM
It looks like your problem are the Initialize Array elements where you are creating 1D arrays with 5 elements.
When the arrays are transposed they result in 5 rows of data.
Just connect the data straight to the Build Array and delete the Transpose Array.
08-14-2006 12:57 PM
08-15-2006 09:47 AM