Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

When the NIDAQmx read functions (in C) are waiting for the data, are they using the CPU?

I'm developing a multithread aplication in C++ to aquire data from a PCI-6014. I'm using the read function from NIDAQmx (DAQmxReadAnalogScalarF64) with a infinite timeout.
But I really need to know if, while the function is waiting for the data to become available, is it using the CPU? The main point is that I can't have an occupied wait in my thread...
Hope someone has this information. I've checked the C Reference Help, but it has no information on that.
Thanks,
Marcelo
0 Kudos
Message 1 of 4
(2,636 Views)
Hi Marcelo,
The DAQmx Read functions may be using the CPU, but they are not blocking other processes or threads. The DAQmx driver is multithreaded so this should not tie up the processor completely.
Refer to this KnowledgeBase:
http://digital.ni.com/public.nsf/websearch/328E616C0237A23386256AE1005D87A1?OpenDocument

Nicholas C
National Instruments
Applications Engineering
0 Kudos
Message 2 of 4
(2,636 Views)
That helps, but I still need to know if the DAQmx read function will be using the CPU while waiting for the data. The real question is how does the read function work, does it wait for an interrupt from the PCI card to read the data or does it stay in a loop trying to fetch the data (and so using the CPU)???

Thanks for the help,
Marcelo
0 Kudos
Message 3 of 4
(2,636 Views)
Hi Marcello,
The DAQmx Read function will use as much of the CPU as it can while it is waiting. However, it is a very low priority thread and will relinquish CPU resources when other processes require it.

Nicholas C
National Instruments
Applications Engineering
0 Kudos
Message 4 of 4
(2,636 Views)