LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Recording data at desired instants in FPGA using Memory Method

You are wanting to stream data from your FGPA to your RT. The data comes in bursts, and you don't want to lose anything.

 

As deceased said, you should use DMA.FIFOs to achieve this. Deceased's method of two sequential FIFO reads on the RT side is correct; the first reads 0 elements and the second reads the number of elements found to be remaining by the first 'read'. You have remaining elements because you are writing elements between the two reads (plausible).

 

I do not understand the problem; you should be reading in a loop, reading values from the FIFO on the RT side continuously and logging them to a TDMS file (for example). So you should eventually run the buffer down when you turn off acquisition on the FGPA. Your problem might be solved by something simple like sending a stop command to the FPGA to stop writing to the FIFO.

 

Another tip; your DMA.FIFO can have different buffer sizes on the FPGA and the RT. You could use this to store a large number of elements (10's to 100's of ksamples) on the RT and then read them out all at once. I would recommend to read a smaller number more regularly though if the RT would just be sitting around not doing anything between the big reads though.

CLA - Kudos is how we show our appreciation for comments that helped us!
0 Kudos
Message 11 of 11
(175 Views)