From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FIFO DMA host question


@FraBaggio1 wrote:

So the problem is that I am generating more samples than the host buffer (that is in my case1Msamples=2^20). Is it right?


Correct.


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 21 of 31
(939 Views)

Thank you Crossrulz,

 

I have another question. If I wanted the host buffer to be greater than 2^20 (that is the Excel limit) could I save data without passing from saving into excel?  

 

Regards

Francesco

0 Kudos
Message 22 of 31
(926 Views)

FraBaggio1 wrote:

If I wanted the host buffer to be greater than 2^20 (that is the Excel limit) could I save data without passing from saving into excel?


You are doing that now.  The Write To Delimited File does not involve Excel.  It writes a text file.


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 23 of 31
(922 Views)

Ok, but if I set the host buffer at 1.6 Msamples it gives me an error. So I think that there is a limit in "Write To Delimited File" or not?

0 Kudos
Message 24 of 31
(920 Views)

Probably an Out Of Memory error.

 

You might want to look into using a Producer/Consumer setup so that you can log in parallel and write smaller chunks to the file.


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 25 of 31
(915 Views)

I saw the NI example, but I don't understand where to save data. In the consumer loop with a delimited spreadsheet?

 

Thank you 

0 Kudos
Message 26 of 31
(908 Views)

My recommendation is to look inside of the Write Delimited Spreadsheet and see how it works.  So for the consumer, open the file before the loop and close it after the loop.  Inside of the loop, use Array To Spreadsheet String for format your data and then Write To Text File to write it to the file.


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 27 of 31
(907 Views)

And so, what would be the advantages of using a producer/consumer loop? This way I could store more data because data is written in small chunks?

0 Kudos
Message 28 of 31
(897 Views)

The writing in smaller chunks is a bid advantage.  The other is that the logging can happen in parallel with the acquisition.


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 29 of 31
(894 Views)

And how can I decide the chunk size?

0 Kudos
Message 30 of 31
(890 Views)