LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can Ni-Daq in Labwindows 6.1 multithread?

I use Ni-DAQ, no DAQmx. My version of labwindows is 6.0 or 6.1 (and, by the way, the FFT() function has a memory leak. Is there a patch for that?).

I'm trying to continuously output white noise and read the output after it's been put through a filter. I've written a test case using the Easy I/O for Daq library, and it seems to not like the idea of multithreading. Would the normal NI-Daq libraries be any different?

This code actually tries two differnt things. It tries running the output in its own thread and doing the reading in the main thread. Then it tries running the output and the input in separate threads, whereupon I get an error stating that the board is improperly configured.  

Would putting the output in a timer solve my problems?

Thanks to those who take the time to answer,

Jason Espinosa

University of Miami Astrophysics lab.
-Jason Espinosa

LabWindows 6.0
PCI-6036E
0 Kudos
Message 1 of 2
(2,870 Views)
Hi Jason,

Regarding the memory leak, see this thread. After looking over your app you might consider looking at the architecture of the multithreaded example program that installs with CVI. It is located under Program Files\CVI (version)\samples\apps\daqmthread. This will give you a baseline on how to set up a multithreaded application using NI-DAQ. The Easy IO library is thread-safe as well as the standard DAQ libraries as well. The example above uses the Easy IO library in its implementation.

Another site you should take a look at is the Multithreading in LabWindows/CVI. This gives numerous examples of different ways to implement multithreaded apps in CVI. You may consider doing a queue-style implementation for this app. See here as well.
Test Engineer - CTA
0 Kudos
Message 2 of 2
(2,853 Views)