Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

VB 2005 MStudio 8.0.1 Memory leak

Hi,
 
I'm having some problem with MStudio 8.0.1 and visual basic 2005. I've done an application that read AI, DI and set AO, DO with some MStudio components. My application have a memory leak.

I've track down the memory leak to the function were I read AI and DI and the function were I set AO voltage. We are using a PXI-6229 for AO, a SCXI-1004 for AI and SCXI-1162HV for DI.
 
I will attach the two functions I'm using to acquire the data in a small application I've made for you to help me with this memory leak. Once you click start in this application, the memory will increase, slow down a bit and will continue to increase time over time.
 
Thanks for your help, and sorry for the French note in the application.
0 Kudos
Message 1 of 7
(4,815 Views)

Hello Crusader,

I have taken a look at your code, and it appears to be ok.  However I am seeing the similar behavior to what you describe.  I will look into this further and get back to you when I have more information.

Regards,

Jesse O.
Applications Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 2 of 7
(4,778 Views)
Thanks, I will wait for an answer, since  we can't use correctly our application using this code since the application is hugging all the computer memory after 1-2 days of 24h running.
0 Kudos
Message 3 of 7
(4,775 Views)
Crusader,

I have taken another look at your code, and I have been able to run it for a while without any increase in memory by removing the start and stop for each of your tasks.  Since you are only performing software timed i/o you do not require these start and stops.

Once you comment them out everything should be ok.  For example make this code:

ReadAITask.Start()

Data = AIReader.ReadSingleSample()

ReadAITask.Stop()

this:

Data = AIReader.ReadSingleSample()

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
0 Kudos
Message 4 of 7
(4,761 Views)

Hi,

I've tried your solution and it worked. I don't really understand why, but it worked.

Thanks !

0 Kudos
Message 5 of 7
(4,746 Views)
I am having a similair problem. I have NOT tried removing the start and stop. See the message "Why does EndReadMultiSample cause the daqmx dll to run out of memory". The symptom sounds the same. I am using EndReadMultiSample though.
0 Kudos
Message 6 of 7
(4,559 Views)

Hello Crusader.

I tried this out and it looks like the original memory leak described in this thread no longer occurs in DAQmx 8.3.1 

Bilal Durrani
NI
0 Kudos
Message 7 of 7
(4,227 Views)