LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there anyway to save analog data from FPGA VI to host computer?

Hi, Labview experts!

 

Is there anyway to save analog data from FPGA VI to host computer?

 

I knew how to transfer Analog data from FPGA to host computer by using DMA FIFO.

I'd like to know how to save data like a file format such as excel, etc which I can read or transform it to readable file.

 

(Samping rate of Analog data is almost 20kS/s.)

 

Thank you

0 Kudos
Message 1 of 7
(3,519 Views)

Of course you can write data to a file. Open the file outside the loop, then inside the loop read from the FIFO and write to the file, then close the file when the loop ends. The file could be a text file, delimited with tabs or commas, which you can easily open in Excel but is not efficient in speed and space, or you could use a binary format such as TDMS. There are examples of both that ship with LabVIEW. You can open TDMS files in Excel using the plugin that is supplied and installed with LabVIEW.

Message 2 of 7
(3,507 Views)

You should also have a look at the Producer/Consumer design pattern.  The idea is to put your file writing in another loop so as to not slow down your read/processing loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 7
(3,486 Views)

Is there a good example for this application?

I can't get a concept of this application.

Your explanation is really good and straightforward, but it's quite difficult to get the point the first sentence.. Open the file outside the loop and.... write to the file... I'm sorry about asking you agian.

I hope I can understand your explanation soon.

 

Thank you so much!

0 Kudos
Message 4 of 7
(3,467 Views)

See if this helps


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 7
(3,460 Views)

Hi, NI experts

 

I'd like to hear some opinions about this problem from you.

 

I tried two ways to save data in TDMS file.

1) Read/write function from FPGA to host computer seems to lose a lot of data points because of the high sampling speed (40us / 1data).

 

2) DMA FIFO function showed an error right after I turned on TDMS function.

=> error -50400 occurred at Invoke Method: FIFO.Read in TDMS_DMA FIFO_rev 3.25.vi 
      Possible reason(s):

      NI Platform Services: The transfer did not complete within the timeout period or within the specified number of retries.

 

 I think samling rate of data caused data transfer via FIFO to be overflowed because of elements number for data in a short time.

 

 

Thank you.

 

0 Kudos
Message 6 of 7
(3,378 Views)

It would help if you showed some code.  If you followed the Producer/Consumer setup and read enough samples at a time, there should not be any issue.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 7
(3,364 Views)