Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6008 analog output rate

Solved!
Go to solution

Hello,

 

I have just started using an NI USB-6008. At this stage I'm not looking to complete any specific task other than learning how to use the device. I have used LabVIEW a fair bit but never with this sort of hardware, and I'd like some help to understand it please.

 

In particular, I have attached a VI in which I'm attempting to output an analog signal through the USB-6008, and read it back in (also with the USB-6008 - I have wired the pins together). However, I don't understand what happens when I run this VI. I was expecting to output a 10 Hz sine signal for 1 second, record for 0.1 seconds, and see 1 complete cycle of the sine waveform. In practice I read ~10 cycles and then constant voltage. Presummably this means that either the read continues for longer than 0.1 second, or else the output signal is more than 10 Hz.

 

I also tried using timing related DAQmx VIs with the output pin, to try to set the output rate (samples/sec) but everything I tried returns errors. I also tried to open a few NI examples, but these returned errors as well and I got further just trying things on my own.

 

 

I may well have missed something obvious here, but any help would be appreciated!

 

Edit: I had to update this post & attached VI as I had made some mistakes. The default values on the front panel show what I see after running the VI.

0 Kudos
Message 1 of 3
(4,164 Views)

I've found some further information, could someone confirm if the following is correct please?

 

The USB-6008 only has one mode of operation: "on demand". In this mode, samples are written as fast as possible. Pressumably this means at about 150 samples/sec, which is given as the fastest output rate.  I'm not sure that this is fast enough to explain what I see the VI attached to the previous post though.

 

"On demand" also means that the "dt" part of the waveform type is ignored by the "DAQmx Write (Analog Wfm 1Chan NSamp)" VI.

 

If these things are true, I guess that actually writting a signal that has timing should be done one sample at a time in a loop with some time delay to (roughly) set the output rate?

0 Kudos
Message 2 of 3
(4,152 Views)
Solution
Accepted by topic author Orbital

Hi Orbital,

 

As far as I know, you will need to use the DAQmx Read and Write VIs in loops and use timing functions to determine the data rates you desire.

 

I also did a quick search and found a white paper which you may find helpful: http://www.ni.com/white-paper/9541/en/

 

Regards,

Jake A

Applications Engineer
National Instruments UK and Ireland
Message 3 of 3
(4,125 Views)