LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Query DAQmx maximum sampleing rate

Highlighted

Is there a way to query the maximum sampling rate for a DAQmx channel?

 

I am writing some code to output an analog waveform, and it may be plugged into devices with various capabilities. I can write the software for the lowest common denominator, but if you put it on higher performance equipment and look at the waveform on a scope, you can see the waveform stepping through the values. I'd like to be able to adjust the sampling rate when I am making the waveform so that the better equipment gets a higher resolution waveform.

 

I could just make another parameter that the user adjusts, but I'd prefer a solution that does not require them to memorize what the equipment capabilities are.

 

 

--

Brian Rose
0 Kudos
Message 1 of 8
(940 Views)
Highlighted

Hi Brian,

 

We do have a DAQmx Timing Property that will return the maximum sample rate for your task:

 

 

2010-03-12_154414.png

 

From what it sounds like, this is what you are looking for.  Let me know if you have any questions!

 

 

Best Regards,

John Passiak
0 Kudos
Message 2 of 8
(936 Views)
Highlighted
You can use a DAQmx Device property and select I/O Type>Analog Input>Timing and Maximum Single Channel Rate and Maximum Multiple Channel Rate
0 Kudos
Message 3 of 8
(931 Views)
Highlighted

Here's what I came up with. It seems to work well when I send it to a USB-6259, but the property node barfs when I try to send it to a USB-6008 analog output channel.

 

Attached is the VI saved in Labview 8.0 format.

 

 

--

Brian Rose
0 Kudos
Message 4 of 8
(923 Views)
Highlighted

I'm not aware of that technical term 'barf'.

 

Since the 6008 has no sample clock for analog output, you might want to first read the 'Sample clock supported' property.

0 Kudos
Message 5 of 8
(920 Views)
Highlighted

I also notice that the Sample Clock setting comes from elsewhere in the program (see below).  It should match with the rate that you are resampling your waveform to be genreated (you can just feed in the Max Rate property to the DAQmx Timing vi).

 

 

2010-03-12_165819.png

 

 

Best Regards,

John Passiak
0 Kudos
Message 6 of 8
(913 Views)
Highlighted

 

Dennis,

 

Where is the "Sample clock supported" property? I dropped a DAQmx Timing propery node and I do not see that property.

 

Can I use DAQmx to send a waveform to the 6008, or do I need to send it one sample at a time in a software loop? The datasheet mentions that it can support up to 150 samples per second, so I assumed that DAQmx could handle the nitty gritty details as long as the waveform is within the limits of the device.

--

Brian Rose
0 Kudos
Message 7 of 8
(874 Views)
Highlighted

With my version of DAQmx, it's a device property - I/O Type>Analog Output>Timing>Sample Clock Supported.

 

The only supported timing on the 6008/6009 is On Demand. That spec is about the max you can expect with writing a single sample at a time with software. This is of course, highly dependent on the pc, your code, the OS, etc.

0 Kudos
Message 8 of 8
(870 Views)