03-13-2014 05:10 PM
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
03-13-2014 05:18 PM
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?
03-13-2014 05:18 PM
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.
03-13-2014 05:24 PM
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.
03-13-2014 05:56 PM
You did not answer my questions about local variables and value property nodes.
03-13-2014 06:02 PM
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.
03-13-2014 06:04 PM
@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?
03-13-2014 06:12 PM
Task manager shows nothing unusual. That is only a small proportion of memory used.
03-14-2014 02:31 AM
03-14-2014 07:02 AM
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.