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.
We do have a DAQmx Timing Property that will return the maximum sample rate for your task:
From what it sounds like, this is what you are looking for. Let me know if you have any questions!
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.
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.
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).
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.
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.