From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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. Waveform chart or Queues to blame?

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
(3,457 Views)

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?

0 Kudos
Message 2 of 12
(3,449 Views)

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
(3,447 Views)

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
(3,443 Views)

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

0 Kudos
Message 5 of 12
(3,430 Views)

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
(3,426 Views)

@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?

0 Kudos
Message 7 of 12
(3,424 Views)

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

0 Kudos
Message 8 of 12
(3,418 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
(3,379 Views)

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
(3,361 Views)