LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RAM allocation, print and export problem

Hello this is my first post but I have been checking out the forum solutions for almost a year now. But now I have a problem for which I couldn't find a solution in already posted treads.

 

I have an sub VI that presents data from measurements using array of clusters (graphs,labels in cluster). I get the data on FTP server where data for each measurement is stored as a binary file. The problem is printing and exporting the data to CSV (~1000+ measurements) which really puts a strain on RAM and usually results in "Out of memory" error. I'm using the reload for each call setup configuration for both print and export sub VI, which does release RAM memory(at least the task manager shows memory being released) but Labview doesen't seem to know how to reuse released memory. I would love to post the code but I would have to post at least 20 sub VIs so that you can run the application and test it yourself. 

 

Thanks in advance.   

0 Kudos
Message 1 of 4
(2,880 Views)

Hi HudTuner,

 

I didn't get what you try to do (i think i'm not the only one).

 

1) What do you use to export data to CSV? and more important, how many data are we talking about - MB, 10MB, 100MB ?

2) What do you mean under you use "reload for each call setup configuration for both print and export sub VI"? What are those VIs? if there are from LV libray, which one do you use?

3) If you don't want to export whole code, you can clean the code to leave just problematic parts in it, and you can post snippet  from your code (MINIMIZED and READABLE)

4) if you have readable and small code Smiley Wink which you want to share and you want to be sure you post all needed subVIs, then use Save As, and choose Duplicate hierarchy to new location, and send zipped files, or if you use project, you can save files for distribution. It will easy sharing your VIs.

 

I guess you use Windows as operating system. On Windows, LabVIEW should be able to use released memory. There are some useful tools which helps you to monitor memory taken by certaing VIs. The easiest is to use Performance and Memory tool (menu Tools -> Profile). There you can get deeper view on which particular VI is causing problem.

 

However, as i told, as I'm not sure what exactly you do, I can't be much helpful.

 

 

Stefo

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 2 of 4
(2,847 Views)

Thanks for the answer.

For exportnig data into CSV I use my own VI, size of exports are  ~500+ MB. But I think that I have eliminated the problem with the export. The only problem I'm facing now is that the memory isn't released when I am finished with the export sub vi. The memory is released when I close the whole application but I want to be able to do multiple exports without having to close the whole application. :smileywink:

0 Kudos
Message 3 of 4
(2,837 Views)

Hi HudTuner,

 

I can state once again the same - as I don't see the code and I don't have look into your SubVIs, I can't be much helpful.

 

However, from what you told, I would guess you keep those data somewhere in SubVI, which might not have been released from memory - in general, memory is kept until LabVIEW releases VI from the memory. If VI is not reentrant, it should be fine, because in this case LabVIEW reuses the memory (if possible).

 

See VI Memory Usage of LabVIEW Help to get more information on how LabVIEW handles memory. In some cases, if your VI allocates large amount of memory, you can call Request Dealocation from Application Control -> Memory Control palette to request LabVIEW to deallocate memory.

 

 

I hope you find many interesting information in mentioned help which will help.

 

 

Regards,

Stefo

 

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 4 of 4
(2,813 Views)