Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

error 2- memory full & error 10846 - buffer overwrite

I am running a multi threaded application on Labview 6.1 on Win2000 that involves continuous buffered data acquisition on a PCI-6130E and serial communication. I am sampling 15 channels at 600Hz. I currently have a buffer size of 1000 and am reading 60 points at a time. The serial communication involves sending commands to a pump from a queue. The queue is maintained at about 500 commands and does not increase over time.

I am plagued with two errors: the first is buffer overwrite error 10846. This occurs only when running the serial communication thread and DAQ thread simultaneously. I have tried reducing sampling rate, increasing buffer size, and increasing the number of points read at a time. The only effec
t seems to be to postpone the crash for about an hour.

The other error is error 2 - memory full. Labview seems to use gradually more and more memory over time and crashes after a few hours at about 110,000K.

I am not sure if these two problems are related in some way, as I have only gotten error 2 after receiving and ignoring error 10846. Sometimes the program runs for about an hour and then Labview exits by itself. I'm wondering if this memory error could be a result of my chart histories being too large or from some kind of accumulation due to using a queue.

If anyone has any suggestions on how to fix any of these errors, or on how to diagnose their cause, I would appreciate your help.
0 Kudos
Message 1 of 4
(3,733 Views)
I suggest you concentrate on the memory leak.

There are many things that could cause this, some obivous others are very subtle.

Do the following and let us know what you find.

1) Reboot
2) Brinf up the task manager and check the performance before you start. Note memory usage and compare with the actual physical memory.
3) Run your app. Watch the memory usage.

Let us know what you find, and feel free to post your code.

I will not go into all of the things that can cause memory leaks because there have been many posting on this site on how to handle leaks, and I would only be scratching the surface.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 4
(3,733 Views)
Thanks for your help, Ben. Unfortunately I am unable to post the code, but I'll let you know what I came up with. I found that the memory leak seems to be coming from the queueing of commands and serial communication portion of my code. Over a 13 hour period, the memory usage increased at about 46K/min. Over a shorter period (16 min), the average usage increased 72K per minute. At this point I'm unsure about whether the rate of memory usage is highly variable, or whether it decreases over time. For this I'll have to do a few more tests.
0 Kudos
Message 3 of 4
(3,733 Views)
Cut down your serial I/O to the minimum required to convince yourself the serail is leaking or not.

You cannot post your code eh?

How are you doing your serial, You are not repeatedly opening and closing are you?

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 4
(3,733 Views)