Here I'm attaching two pictures, on of block diagram and other of front pannel
I am getting values from my fpga vi @ 25us per sample. And I'm reading them in RT vi and wanted to store it to a file.
So here it is, i tried this code for writting into a .csv and a .txt file.
Both the case the file is empty even after execution. And i learnt that the writting to file is a time consuming process which will obviously give me time outs in FPGA writting. So how shall i do it to make it a efficient way for writting my data into a file.
with the Write To Spreadsheet File.vi each iteration of the while loop you open -> write -> close your file with the data.
I have no experience with FPGA in Labview, but maybe you could use something like this
or use Producer-Consumer, queue data and write it in consumer loop...
Duri is correct in that you should not be using the Write To Spreadsheet File. Open/create the file once before your loop and close it once after the loop. You will want to use the Array To Spreadsheet String and Write Text File inside of your loop in order to do the actual writing of the file.
If that doesn't work, then you may want to change how your are getting the data from your DMA FIFO a little. Use the Elements Remaining output of the DMA Read to store that value in a shift register. The # elements to read should be set to the value in the shift register. Initialize the shift register to 0. This way you are clearing out that DMA and you are not limiting the number of samples you can read. You will also not be hammering your CPU while waiting for X samples to be entered in the DMA.
I'm sorry.. I thought the last post didnt float, so reposted the content, and thank you GerdW, you idea helped.. I tried that and it is serving good