LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

computer crash because of memory

Hello,
we have made a program for outdoor measurements for DSC cells using LabView 8.5. It has to work for long time, but it crashes always after 5-7 hours. We've noticed that during the measurements campaign the page file increases considerably.
The hardware we use are NI-DAQ and Keythley. We need to know the reason why and how LabView manages memory resources (for example local variable, shift register, etc).
 
Silvia
0 Kudos
Message 1 of 9
(2,933 Views)
A quick search on www.NI.com for Memory Management will yield some good results, including this one.  You should probably also check out this page, which tells you how to show buffer allocations on your block diagram.  A buffer allocation will signal where a copy of the data on the wire is being made, copies of arrays (in a for or wile loop for instance) can add up pretty quickly.  You should also check and make sure that you are closing all references that you open, as well as closing any write to file instances that you use. 
0 Kudos
Message 2 of 9
(2,928 Views)
Thanks for the advices,
could you tell me what do you mean with "closing all the references"?
 
Silvia
0 Kudos
Message 3 of 9
(2,913 Views)
Sure thing.  If you open a reference to another VI within your VI (for instance, to call the VI without having the main VI hang until the VI completes) you need to be sure to close the reference.  The reason for this is that if you are opening a reference in a loop without closing it, it will keep loading the VI into memory over and over again.  This is a common way to build a memory leak.  I am not sure if make use of references in your program or not, so this may not apply to you.
0 Kudos
Message 4 of 9
(2,908 Views)

Hi Silvia,

you could have a look at this link to understand how LabVIEW manages memory resources and how you can reduce memory usage.

Regards,

Serena Monti

Applications Engineering

National Instruments

Message 5 of 9
(2,890 Views)

Hi,

I want to improve the memory management in my own labview program.

How does the structure "In Place Element Structure " work? I'd like to use it when  I build arrays...

thanks

Silvia   

0 Kudos
Message 6 of 9
(2,828 Views)

Also writing any Measurement data to File / Disk more frequently rather that moving Data around in LabVIEW could also help.

Craig

LabVIEW 2012
0 Kudos
Message 7 of 9
(2,821 Views)
Hi Silvia,

please keep things in one place!
Best regards,
GerdW


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


GerdW wrote:
please keep things in one place!

LOL. A question about "in place" that is "all over the place". 😄
0 Kudos
Message 9 of 9
(2,805 Views)