06-12-2020 10:35 AM
Hello,
I need to write the measurement outputs to the disk with a high sample rate. The current implementation (please see the figure below) appends the data to a file at every iteration but due to the latency of the HDD, the sample rate is too low. I think I need to store the data in an array and the then write it to the disk every "n" iterations to speed up the sampling rate. I'd appreciate it if you could tell me how to implement it or if you have a better solution for the problem, I'd be glad to know.
Thanks in advance
Solved! Go to Solution.
06-12-2020 10:47 AM
You are also flat out using the wrong function for "high speed" logging as that VI constantly opens and closes the file (a VERY slow operation). Look in the File I/O palette. If you are logging to an ASCII file, what I recommend is to Open/Create the file before the loop. Then use Build Array to put all of your measurements into an array and Array To Spreadsheet String to convert into a delimited value string. You then use Write To Text File to write that string to the file. When the loop is done, close the file.