Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is daqmx analog input so slow with compact daq using NI 9219?

When doing 2 samples at the max rate of 100hz, why does daqmx analog input example vi "Acquire&Graph Voltage Int Clock" take almost 2 seconds to return the data when used with a NI 9219 in the compact daq chassis? This same vi is almost instantaneous with a pci multifunction card.
0 Kudos
Message 1 of 6
(4,624 Views)
Hi Rusty,
I'm not sure why you'd be seeing a delay of 2 seconds with your CompactDAQ.  I tested the same example program with my cDAQ and didn't see any noticeable delay, although I am using a different module.  Are you still seeing this issue?  If so I can track down a 9219 to copy your setup.
Thanks,
Luke
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(4,593 Views)

Hi Luke & thanks for the reply.

Yes, I'm still seeing the issue. I've run with a simulated device & it seems to run much faster, but when the actual hardware is connected, things seem to slow down. I know the 9219 isn't a "fast" device, but I didn't expect this. Initially I was using the Daqmx examples for AI Voltage & AI Resistance & couldn't understand why the speed wasn't there. Then I set up the application such that Daqmx Create Channel & Daqmx Timing vi's are initialized once at the beginning, then Daqmx Start, Read & Stop are inside a sampling while loop to monitor an output. There are some other things going on within the loop & I got errors if I didn't do the Start/Stop on either side of the Read. Daqmx Clear Task was placed to execute just before the application exits. It didn't seem to make an appreciable difference.

I don't know what else to try with this. If I can't speed it up, I'm going to have to look at replacing the hardware for something faster.

I'll be on vacation for two weeks starting 6/7, so I won't be able to do anything else during that period. I'll check the posts when I return.

Thanks for your help.

Rusty Johnson

0 Kudos
Message 3 of 6
(4,585 Views)
Hi Rusty,

The 9219 defaults to a 2 Hz high resolution sampling rate, and that rate isn't controlled quite the same for that module as it is some other ones.  Check out this application note and see if that helps.  Also, the driver may acquire one point of data when you call the DAQmx Start VI, and if the rate were 2 Hz, that might explain the timing that you're getting.

Regards,
Kyle
Message 4 of 6
(4,576 Views)

Kyle & Luke

Thanks! That turned the trick for this application. I had looked through the app notes on the 9219 & had not seen that one. I changed the DAQmx Channel Property Node to "Best 60Hz Rejection" & now it's working great.

Thanks Again, you both were a lot of help.

0 Kudos
Message 5 of 6
(4,569 Views)

Hey Guys!

 

Thank you so much!

 

This discussion have helped me so much in a VI.

 

Great!

0 Kudos
Message 6 of 6
(3,587 Views)