Jump to content

Labview 7.1 app occupying the most of the system memory


Recommended Posts

Dear All,

I developed a application software for third party instuments using Labview 7.1.

In my code there many while loops having its own time delay.

After running the application the program occupying the most of the system memory.

What could be the solution.

Thank u all,

Regards,

muni

Link to comment
After running the application the program occupying the most of the system memory.
After running --- by this I assume you mean that the VI has come to a complete stop and yet lots of memory is still being used. If the VI is still running, there are lots of things that could be taking up memory that we could talk about. But after a VI finishes, here's the list:

  1. You could simply have a very large VI hierarchy. When you load the VIs into memory for the first time, look at how much memory is being used. It could be that it is already using lots of memory. That probably isn't your problem -- it takes a lot of VIs to make an impact like that, but I have seen some apps get big enough that their raw code size is huge.
  2. When the VI finishes running, what front panels are open? Every open front panel will store data in its controls/indicators. If you have lots of panels open and a giant array or a long long long string gets passed through those VIs while the VI is running, every single control/indicator that shows the array/string will have stored a copy of that array/string as part of its display.
  3. The dataspaces of VIs expand to contain the data that passes through them (large arrays, large strings), just like the front panel, and LV does not deallocate that space on the assumption that if you're leaving the VI open, you are probably going to run the VI again and the second execution will be faster because memory is already allocated for data of that size. You can use Tools>>Profile to see which subVIs are getting to be the largest. Consider dynamically loading and unloading those subVIs --- open the VI that calls the subVI and then pop up on the subVI node call and select "Call Setup...". In the dialog that appears, click "Reload for each call".

Hope that helps.

Link to comment

Look into your code and see if you are either building arrays by just stacking data on them or you are building strings by concatenation.

Both leave you open to inheriting the C problem of memory leakage.

Much better to declare arrays of fixed size and then fill them, declare strings of fixed size and then insert characters. More work but no leaks.

Link to comment
  • 1 month later...

I developed a application software for third party instuments using Labview 7.1.

In my code there many while loops having its own time delay.

I don't know if this is the case here ,

but my experience with code written in old LW, and upgraded to new is mixed.

I have some old code written in and old LW7 that in strange way don't work in LW 8.6.

But If I write(draw) new code that to me seems exactly the same starts working.

why?? I DON*T KNOW. I have just excepted the fact.

Good loock

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.