From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory leak from DAQmxReadAnalogF64 ??

Hello all, I've been chasing a memory leak all week, and it appear that the call to DAQmxReadAnalogF64 is the issue. 

We're using a PCI-MIO-16XE card, Win7, CVI & Vision 2009.

The code works fine all day, but we're attempting 24-7 fatigue tests now, and it bombs after ~22 hours.  😞

 

I tried my project on a trial verison of CVI 2013, same results.  So I scribbled up a simple test to verify, and it does the same thing.

 

What am I doing wrong here? 

Did I find a problem with DAQmx?

 

Attached should be the 3 files needed to build the test.

Start Windows Task Manager, run the code, and watch the memory ratchet up. 

 

Could someone verify please, I'm losing sleep over this one.



Thanks,

Paul

 

0 Kudos
Message 1 of 2
(4,169 Views)

Doh!  Pilot error.

 

Replaced:

DAQmxRegisterSignalEvent(DAQmx_Val_SampleCompleteEvent);

with

DAQmxRegisterEveryNSamplesEvent(DAQmx_Val_Acquired_Into_Buffer);

 

and all works fine...

 

 When in doubt, RTFM  (and review the examples)

Paul

0 Kudos
Message 2 of 2
(4,148 Views)