LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DMA FIFO missing elements

I recommend taking out a lot of the logic you have in the read loop.  Simplify.  I would also change your queue to use a 1D array instead of a 2D.  Do the changing to a 2D in your write to disk loop.  And use Reshape Array to do that.  You are creating way too many memory allocations with the Decimate and Build Array functions (possibly the source of your slow down).


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
0 Kudos
Message 11 of 12
(356 Views)

Have you tried removing the writing to disk portion, to see if the problem is the rate at which you're reading from the FIFO? You're dealing with fairly large arrays (relative to the RAM and processing power of a cRIO) and then converting all the data to strings, which is computationally expensive. See if removing the file write and string conversion lets you read the DMA fast enough. If it does, then consider writing the data as binary with no manipulation - just write the raw array as it arrives from the FIFO. Then write a small program that runs on your computer (once you retrieve the files) to convert the data into text.

 

Also note that Decimate-Build Array-Transpose produces the same output as Reshape Array, but probably less efficiently. Try Reshape Array instead.

 

There's no need to make the FIFO Depth on the host a multiple of 1024, although of course there's no harm in doing so.

0 Kudos
Message 12 of 12
(348 Views)