Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I reduce memory usage of a running vi?

My vi saves date/time and 6 other numbers (e.g. temperature, flow rate, etc.) every second into a text file and displays the info graphically via a stacked waveform plot. Often, the program stops on its own and ceases to save information into the text file. According to the windows task manager, memory usage by labview increases 8-12 KB per second; could this have anything to do with the program halting and what can I do about it?
0 Kudos
Message 1 of 2
(3,512 Views)
Hi nsuzuki,

There could be a number of places where your program may be running into memory issues. Here are two excellent links to help get started in troubleshooting your issue:

  1. Developer Zone: Managing Memory

  2. Developer Zone: Optimizing Performance



Check out the LabVIEW Help page titled Performance Tips file too (open LabVIEW->Help->VI, Function, & How-to Help->Search->Performance Tips). There are great suggestions here on how to change little details in your code to make it run faster.

This KnowledgeBase 2T9ICKTL: How Can I Optimize the Memory Use in My LabVIEW VI? is also a great place to get ideas.

Another extremely useful utility is the VI Profile Window that can be used to track down which particular VIs and code segments are consuming more memory than others. Refer to KnowledgeBase 2ZHD73IP: How Do I Use the VI Profile Window? for more information.

Hope this helps! Good luck!

Kileen Cheng
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,512 Views)