LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory is full. Waveform chart or Queues to blame?

Highlighted

Hi, I am writing a LabVIEW application and it comes up with failures in Obtain queue with error 2.  Possible reason LabVIEW: Memory is full or NI-488: No Listeners on the GPIB.

 

I have no GPIB. 

 

The failure happens after about 8 hours.  I also have four waveform charts with chart history set to 172800 with data going in at 1 per second on each (one chart has two plots).  8 hours is 28800 points per chart.

My machine is an i5 running windows 7 64 bit with 8G of memory.  LabVIEW is 2012.

 

I have see heaps of things saying that it's not the total memory available but whether LabVIEW can find contiguous memory for each chart.  Can anyone tell me if the number of points I get to is likely to cause this memory problem?

 

Any suggestions on debugging this?  The only thing I can think of is decreasing the chart history length to something less than 28800 and running again.  This seems like a very slow way of finding the bug.

 

Thanks for any suggestions

 

Paul

0 Kudos
Message 1 of 12
(1,516 Views)
Highlighted

To troubleshoot, you could run it much faster using simulated data.

 

What are the datatypes?

 

Do you also have local variables of the charts? Can you show us some code? Where does the queue fit in? How big is it? What datatype?


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 12
(1,508 Views)
Highlighted

I just made up a little test VI with four waveform charts and put them in a loop writing random numbers into it and it easily gets over 1000000 points so it's not that.

0 Kudos
Message 3 of 12
(1,506 Views)
Highlighted

Thanks altenbach,

 

As you see I just tried the fast test and it's not that.

 

My code is too unwieldy to post conveniently. I have quite a few queues sending strings to graphers and logging stuff.  As far as I know all the queues never have more than one thing on them.

 

I will probably have to look elsewhere.

0 Kudos
Message 4 of 12
(1,502 Views)
Highlighted

You did not answer my questions about local variables and value property nodes.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 5 of 12
(1,489 Views)
Highlighted

Sorry,

 

I don't have any local variables of the charts.  I use property nodes of the chart to reset the history at the start and also where  I am updating the chart.  I pass a reference to a subVI and write to a value property node in the subVI.

 

0 Kudos
Message 6 of 12
(1,485 Views)
Highlighted

@pgaastra wrote:

I pass a reference to a subVI and write to a value property node in the subVI. 


That probably causes additional datacopies in memory. Not sure....

 

How does the memory use look over time, e.g. in the task manager?


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 7 of 12
(1,483 Views)
Highlighted

Task manager shows nothing unusual.  That is only a small proportion of memory used.

0 Kudos
Message 8 of 12
(1,477 Views)

Are you constantly creating new references to your queues by, for instance, using "Obtain Queue" in a loop?

0 Kudos
Message 9 of 12
(1,438 Views)
Highlighted

pgaastra wrote:I use property nodes of the chart...where  I am updating the chart.  I pass a reference to a subVI and write to a value property node in the subVI.

That's an issue.  Writing to the value using a property node forces a thread swap, forcing the UI thread to run.  Not likely your memory issue, but will definately slow down your program.  I recommend using a User Event to pass the chart data up to your main VI to update the chart.

 

Usually, memory issues are related to arrays and how they are built.  So I would look closely at places where you build arrays.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 12
(1,420 Views)