LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NOT Enough Memory

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

0 Kudos
Message 1 of 18
(2,634 Views)

@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.

0 Kudos
Message 2 of 18
(2,625 Views)

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

0 Kudos
Message 3 of 18
(2,613 Views)

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?

check.png

Why do you need a shift register at all?

 

Attach your VI! Or atleast a picture of the block diagram!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 18
(2,609 Views)

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....

0 Kudos
Message 5 of 18
(2,605 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 18
(2,602 Views)

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

0 Kudos
Message 7 of 18
(2,592 Views)

no screenshot, no VI...

 

(Don't even try to attach BMP files. Convert them to PNG before attaching!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 18
(2,587 Views)

Screen Shot attached...

0 Kudos
Message 9 of 18
(2,582 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 18
(2,577 Views)