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.
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.
07-23-2014 12:18 PM
Hi,
I need to process more than 10E+6 data values. I want to put all these values into an array to process them but it seems to be that I can only put 10E+5 (100000) values into an array.
Where does this limitation come from and how can I solve this problem?
Anybody?
Thank you.
Solved! Go to Solution.
07-23-2014 12:34 PM
07-23-2014 12:34 PM
You can find the answer already on the forum (several similar threads). The problem is memory related - if there is a continuous block available (fragmentation) and if copies of the array are made - to avoid running out of memory.
One of the threads on the forum: http://forums.ni.com/t5/LabVIEW/what-is-the-maximum-size-of-an-array/td-p/25263/page/2
07-23-2014 12:35 PM
The limitation really depends on the size of the Physical memory you have in your PC. How do you say that you are not able to handle array 10E6? Are you getting Not enough memory error?
I would suggest even if you have a larger memory don't handle such a big array, which will endup in memory leak. Try to divide the array as chunks and perform the operation what you want.
07-24-2014 01:51 AM
Hi,
thank you for your answer. I know that PC memory is directly related to the size of an array but I have 3GB of RAM and only Labview is open.
I need to reed a txt file containing a bit more than 1 million sampling points and put them into an array.
Sometimes I need a 2D array.
Please see the code.
thank you very much.
07-24-2014 02:11 AM
So overall, all these stepwise manupulations will create a lot of extra data copies in memory. The code could be streamlined significantly!
07-24-2014 06:35 AM
Hi,
thank you for your answer.
you are completely right, I open too much indicators.
The file I have to open is a txt file of about 1MB.
I want to read the text file and put right away into an array of doubles, no string.
07-24-2014 07:05 AM
@bmw318 wrote:
Hi,
thank you for your answer.
you are completely right, I open too much indicators.
The file I have to open is a txt file of about 1MB.
I want to read the text file and put right away into an array of doubles, no string.
Read the entire file and use the Spreadsheet String To Array, just like you currently have. But use a 2D array of Doubles instead of string for the data type.
07-24-2014 07:57 AM
Hi,
I did so but no change. The max. number is still 10E5 and there are integers. I use %f and even %e as format string for the spreadsheet to string vi.
I read a TXT file.
Weird.
07-24-2014 08:18 AM
How do you say you are reading only 10E5 data? Can you attach the txt file here? What is the text file has only that much of data?