From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory is Full

I'm having spontaniuosly memory is full errors. This is happening on a LV 6.1/7.1 and slower machines with 512 Mb ram and 400 Mhz operating speed...
 
This is all happening in sub vi OPM Processed Sample Scan with OSNR A.zip 
 
The message appearing is also attached and says this : Memory is Full and stopped at node 0X5DA0C of sub vi "OPM Processed Sample Scan with OSNR A.vi"
 
Attached are the sub vi, the lib and the picture of the error occuring... Help is very much apprecheated as i need to trail next week!!!
0 Kudos
Message 1 of 3
(2,606 Views)

Your code is overloaded with local variables, sequence frames and structured by C programmer experience. So try to discover the LabVIEW way of dataflow programming. Perhaps you need to learn a bit about dataflow in LabVIEW. Than You'll return to memory problem if any remains.

Here is a quote:

Use sequence structures sparingly since they hide code. Try to rely on data
flow rather than sequence structures to control the order of execution.With
sequence structures, you break the left to right data flow paradigm
whenever you use a sequence local. To help control data flow, you can use
error clusters.

If you must use a sequence structure, consider using a Flat Sequence
structure so you do not hide any code. If you use a Stacked Sequence
structure in the VI, save the VI with the most important frame showing.
Chapter 6 LabVIEW Style Guide
© National Instruments Corporation 6-15 LabVIEW Development Guidelines

http://zone.ni.com/devzone%5Cconceptd.nsf/webmain/CB5E46406090C61C86256A7000559B66?opendocument
http://zone.ni.com/devzone/conceptd.nsf/webmain/C74CEC177A289DBD86256C4E00600196
Sergey
Message 2 of 3
(2,590 Views)
Your programming style is similar to what I described here quite a while ago.
 
Basically you first break all dataflow by using local variables, then you stack sequences waist deep to force dataflow. In addition, you force dataflow where it is not even needed, e.g. for parsing various parts of a string. It is completely irrelevant in what order these occur.
 
This is not in the spirit of LabVIEW and you are well advised to carefully read the LabVIEW style guide.
 
All your local variables create extra data copies. In addition you create extra data copies because your VI is peppered with coercion dots. Sometimes the array is DBL, sometimes SGL, some subVIS want I16, but you feed it I32, etc.
 
Still, I cannot see how this subVI causes your memory problems unless your arrays get very big. How big do they get?
 
Attached is a quick modification and cleanup of your "OPM Processed Sample Scan with OSNR A.vi", NO local and NO sequences! Currently, it only outpus data for values that are actually read during the call. (You return stale values on some terminals, depending on the "command"). If you want to retain that functionality, place all the output terminals inside cases and update them only if new data arrives.
 
I also don't like these millions of connectors on the connector pane. Maybe you can reduce your data to a few logically picked clusters.

Message Edited by altenbach on 03-31-2006 02:16 PM

Message 3 of 3
(2,572 Views)