LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

memory allocation

hi,

I using LV for hydraulics simulations. So i have to deal with a lot of inputs/outputs. The inputs are very large text files. concernings the outputs i only need the information for LV, so i think it is better to code them in binary files than in text files.
I also use a lot of sub vis that i created.
My problem is that i use a lot of memory and it seems that i have less and less memory as far as i'm using the program.
i need help
thanks

gaetan
0 Kudos
Message 1 of 4
(2,567 Views)
Here are several tips I learned from experience, hope you find it usefull:

A. Check if Array/String inputs are empty, if they are, skip the step (for example, concatenate string vi and build array vi).

B. Use concatenate string and build array VIs sparsingly.

C. Close unused references.

D. when reading large files, read small chunk at a time.

Other people may have additional tips. At the mean time, check the Application notes from Labview "Help >> Search Labview Bookshelf >> Application notes and white papers >> Labview performances and memory management"

-Joe
0 Kudos
Message 2 of 4
(2,567 Views)
which OS and LV version are you using?
I had an effect with LV 5.1.1 and Win98, that the write-to-file function
made my vi to use more and more memory. With Win2k is was no problem.

Niko

gs wrote:

> hi,
>
> I using LV for hydraulics simulations. So i have to deal with a lot of
> inputs/outputs. The inputs are very large text files. concernings the
> outputs i only need the information for LV, so i think it is better to
> code them in binary files than in text files.
> I also use a lot of sub vis that i created.
> My problem is that i use a lot of memory and it seems that i have less
> and less memory as far as i'm using the program.
> i need help
> thanks
>
> gaetan
0 Kudos
Message 3 of 4
(2,567 Views)
Hi,

If you are reading/writing the entire file, you can safe memory by opening a
reference to the large files, and traversing it. Use the "File I/O>Advanced
File Functions" functions. E.g. use "Open File", "Seek", "Read File" and
"Close File" (last two are not in the advanced section) to read data from
any position.

By using the "pos mode (0:2)" option in a while loop, and read or write data
little by little. I use this (with two file references) to split 180 MB
files into 30 small files. It takes time, but not much memory.

Regards,

Wiebe.



"gs" wrote in message
news:5065000000080000007AD20000-1079395200000@exchange.ni.com...
> hi,
>
> I using LV for hydraulics simulations. So i have to deal with a lot of
> inputs/outputs. The inputs are very l
arge text files. concernings the
> outputs i only need the information for LV, so i think it is better to
> code them in binary files than in text files.
> I also use a lot of sub vis that i created.
> My problem is that i use a lot of memory and it seems that i have less
> and less memory as far as i'm using the program.
> i need help
> thanks
>
> gaetan
0 Kudos
Message 4 of 4
(2,567 Views)