LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB-6001 set sampling rate not respected

Hello helpers! 

 

For some reason the sampling rate defined in the following two examples( VIs attached as screenshots A and B) is not respected at all. Instead it outputs at a much faster rate. I've also attached the oscilloscope readout in this post which was the same for both the VIs.

 

The DAQ card I use is NI USB-6001. Is this a limitation to the device model? 

 

Thanks in advance for the help 🙂

Sampling rate error VI-B.PNG

Sampling rate error VI-A.PNG

  

Oscilloscope out.jpg

 

Cheers,

Vivek

0 Kudos
Message 1 of 4
(2,923 Views)

Set aside external clocking...

 

We can only REQUEST a sample rate. The actual sample rate is limited by the clock chip and the clock divider logic. DAQmx will choose a sample rate as close as possible to the requested rate. If you need to know what rate was selected there property node that will tell you that.

 

Ben  

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 4
(2,906 Views)

Use the DAQmx Timing VI to set your timing. Your first example won't work because you're not setting up your timing. The second one might work but setting just a few properties might mean you get something wrong.

 

DAQ output doesn't use the waveform timing for its timing source, you have to use the aforementioned Timing vi to set that.

0 Kudos
Message 3 of 4
(2,893 Views)

LabVIEW ships with Examples!  Look up the Analog Output examples and simplify it to suit your situation (you don't need the Tab Control for Trigger settings, for example).  Note, in particular, the use of the DAQmx Timing VI, the fact that the data are written to DAQmx Write before the DAQ device is started (so there's something to output!), and other differences.

 

Bob Schor

0 Kudos
Message 4 of 4
(2,698 Views)