Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB-6009

Solved!
Go to solution

Hello,

 

I am attempting to use a NI USB-6009 to acquire a low-frequency (~1 to 2 Hz) signal.  I've run into the problem that the hardware only supports using "On Demand" sampling, so I can't set the number of samples I want or the frequency with DAQmx functions in LabVIEW.  Because the timing is critical to the functioning of my VI, I need to be able to know what the sampling frequency is.  What is the best way to determine this?  Attached is a screenshot of one of the sections of my VI where I use DAQmx.  You can see that I am really looking for the time between each loop itneration, as I read one sample per loop.  Is there a better way to take a series of samples?

 

 

Regards,

 

Steve

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

Hi Steve,

 

The USB 6009 supports hardware timed sampling. Here's a section from the manual.

6009.PNG

 

It looks like you are setting up your task in MAX. To use hardware timing, set the "Acquisition Mode" to either "Finite Samples" or "Continuous Samples" You'll be able to set the sampling frequency "Rate (Hz)".

You might want to get rid of that loop and use the "Analog Waveform 1 Channel N Samples" version of the DAQmx read. Set 1000 as your number of samples per channel, and you'll get back a waveform data type that will work nicely with the tone measurement.

 

-Luke

 

Message 2 of 3
(3,163 Views)
Solution
Accepted by topic author kodex1717

Fantastic!

 

I had normally used the method you described, but recieved an error in MAX telling me I couldn't select the "continuous samples" option.  However, now it works.  Not sure what changed, but in can case, thank you. 🙂

 

Regards,

 

Steve

Message 3 of 3
(3,145 Views)