09-26-2019 06:29 AM
Hello,
While HSDIO data acuire beyond 5M samples I get a memoy full error pop up on my LabVIEW window.
I have attached the Vi file.
Memory usage data :
Front Panel Objects: 86K
Block Diagram Objects: 54K
Code: 11K
Data: 175166K
Total: 175317K
Total VI Size On Disk: 89219K
Compiled Code Complexity:0.4
Last compiled with : Full compiler optimizations
Is there any way to increase the buffer size or any other means to solve this issue.
Regards,
Skanda
09-26-2019 06:43 AM
How many samples do you request?
Perhaps it is worth requesting data not in one piece, but in parts?
09-26-2019 06:46 AM
I have a case to sample 5.6M, which i cant do in parts.
Is there any limitation for maximum samples?
Regards,
Skanda
09-26-2019 06:51 AM
Limitations depend on the size of RAM and the degree of its load. The more memory is used, the less likely it is that there will be a free block of the required length.
09-26-2019 06:58 AM
I believe I have sufficient RAM size(4GB). Also CPU utilization not going beyond 40% while sampling. I beleive any software or hardware buffer which is restricting the size of data sampling.
Regards,
Skanda
09-26-2019 08:17 AM
The issue is you are trying to write a file as STRINGS in a single go.
Do the math and figure out how much memory is required and then consider that the entire string has to be stored in contiguous memory...
Ben
09-26-2019 03:00 PM
@Skandaprasad93 wrote:
I believe I have sufficient RAM size(4GB). Also CPU utilization not going beyond 40% while sampling. I beleive any software or hardware buffer which is restricting the size of data sampling.
Regards,
Skanda
You do not have sufficient RAM. You have the addressable space of 1 32 bit application.....as Ben suggested, Do the math!
Oh, you want multiple applications to run while you are running ms office, a bunch of services , a web browser, several overlay channels in Windows Explorer, and still have RAM available for your Context to fit in 4Gb?
Have you ever watched the TV Show "Tool Time?"
Kudos for whoever links "I Don't think so Tim." first
09-27-2019 04:33 AM
I have upgraded to 32GB RAM and still the memory insufficient for the 5M sampling.
Also I am closing all other applications while sampling.
What else could be the problem??
Regards,
Skanda
09-27-2019 06:51 AM
@Skandaprasad93 wrote:
I have upgraded to 32GB RAM and still the memory insufficient for the 5M sampling.
Also I am closing all other applications while sampling.
What else could be the problem??
Regards,
Skanda
What is a "Sample?" how many bits? how is it stored? how much memory will you need?
You have posted a few pictures, you have not described your needs it terms we can help you with other than suggest that "Mathematics" could be applied.
09-27-2019 07:54 AM
@Skandaprasad93 wrote:
I have upgraded to 32GB RAM and still the memory insufficient for the 5M sampling.
Also I am closing all other applications while sampling.
What else could be the problem??
Regards,
Skanda
One of the images you posted indicated the error occurred when trying to write the data to a TEXT file in one big chunk (As I wrote above). When you write a text file in one go, you need a contiguous block of memory large enough to hold the text representation of the data.
How large does that contiguous block have to be?
It depends on how many sig figs are used for each sample but this is where you have to do the math.
The next factor to take into consideration is not how much RAM you machine has, but how large is the address space that your application is running in. If it is 32 bit LabVIEW, then your address space is 1/2 (MSB is reserved for the OS memory space) of 4G which is 2GByte of address space. That 2G of memory has to hold all of the code used in your app, plus the buffer with the raw data plus what it take to store TEXT being written to file and any other storage demands.
Now to complicate thing a bit more, the buffer holding the text has to be contiguous, as in one big block.
The above should explain why what you are trying does not work.
How to do this correctly?
Stream your data to disk in raw numeric form and then latter post process that data in reasonable chunks.
I delivered an digital microphone characterization application about 3 years ago that sampled the data at 400MHz and de-muxed the two channels as the data came in to reduce the data to normal audio range and THEN wrote it to disk. I also had to do the same FFT etc stuff and display the results live but I had to reduce the data first to even dream of making it work.
What you are trying to do is technically demanding and you just cant through some simple code at it and expect it to work.
For what it is worth...
Ben