07-18-2013 01:01 AM
HI NI Discussion Forum,
I had a file of 250000 datas ,am reading that file and putting to the shift Register,After that I am indexing for one element and remaining datas again transfering to the Shift Register.Bu am Facing Not Enough Memory issue.Please give any solution.
DS
07-18-2013 01:42 AM
@Jitu32 wrote:
After that I am indexing for one element and remaining datas again transfering to the Shift Register.Bu am Facing Not Enough Memory issue.
If you are indexing an element, all original data remains, so your quote of "remaining data" makes no sense. Please show us your code instead. Are you maybe using "delete from array" instead?
It is recommended to keep the size of the array in the shift register constant.
07-18-2013 03:11 AM
Step of Code :
Step 1: Read the Binary file (250000 Data's) and putting in the Shift Register.
Step 2: Taking One Data from the Shift Register- Using Delete from Array Function,taking Index zero element from the Array of Length 1 and after that remaining data's putting to the Same shift register.
Step 3: After stopping the VI,Remaining Data's Writing to the Binary File.
With Regards
DS
07-18-2013 03:18 AM - edited 07-18-2013 03:18 AM
Hi DS,
is there a reason to read a file with 250k data elements, get the first data element and write back 249999 data elements to the same file?
Like this?
Why do you need a shift register at all?
Attach your VI! Or atleast a picture of the block diagram!
07-18-2013 03:22 AM
HI,
Step 2 is a Iterative Step,Once the trigger came ,we will take one Dats from the Delete Array....This happens in real Systems....
07-18-2013 03:27 AM
Hi Jitu,
you should really use IndexArray instead of DeleteFromArray. Store the current index in the shift register, increment the index with each "trigger"...
DeleteFromArray comes with penalties regarding memory menagement - as you have noticed by now!
07-18-2013 03:57 AM - edited 07-18-2013 04:03 AM
Can i Conclude that by Putting more than 250000 datas in the Shift register will not cause Memory issue..
Here I am attching the Screen shot of the code
Here Total 3 events is there as follows:
1. Reading the File.
2. Taking one Data.
3. Writing to File
With Regards
DS
07-18-2013 04:05 AM - edited 07-18-2013 04:05 AM
07-18-2013 04:21 AM
Screen Shot attached...
07-18-2013 04:31 AM
Hi Jitu,
you're not dealing with 250000 data elements, but with 250000 lines of text. Each line may have 80 chars or even more, so you easily need lots of MB of RAM. Then additionally creating data copies (due to DeleteFromArray) doubles RAM usage.
- Why do you use DeleteFromArray and IndexArray both? DeleteFromArray will output the same as the additional IndexArray...
- Don't use DeleteFromArray. Use IndexArray and store the current index in an additional file. So you don't need to re-save that data file all the time!