Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx execution speed

Solved!
Go to solution

Hi,

 

I'm programming a simple control application in C under Windows, with NI-DAQmx and Visual Studio. Using a USB-6003, the software reads a single value on each of 3 analog voltage inputs, does a bit of calculation and then writes a single value on each of 2 analog voltage outputs, the whole thing in an endless loop.

 

The excecution time for the calculation, loop overhead and everything else is just a few tens of microseconds. But the DAQmxReadAnalogF64 and DAQmxWriteAnalogF64 commands are taking around 1 millisecond each to execute - which is about 5x slower than I need it to be. I am using DAQmxStartTask before entering the loop.

 

Is this the best I can do with this hardware, or am I missing something? If the former is true, what direction should I go in to get these analog reads and writes running faster?

 

Thanks in advance!  

0 Kudos
Message 1 of 3
(1,325 Views)
Solution
Accepted by topic author DavidMoss

It seems that you are performing some sort of control, that should run live. Normally in this case, one needs a Chassis, like a cRIO or PXI, because they are equiped with controller hardware, on which the VI's run.

 

With a low cost USB device, calculation and VI execution will take place on your computer in Windows. This means that data is  acquired, sent over USB (which is not real-time capable) to the computer, perform calculations and then send some data back to the device for generating outputs. I have tried something similar with a USB-6211 and couldn't get the loop rate lower than 10ms I remember.



0 Kudos
Message 2 of 3
(1,297 Views)

Great, thanks, that helps a lot. 

0 Kudos
Message 3 of 3
(1,290 Views)