11-27-2016 10:45 PM
Hi,
I see from the data sheet that the actual sample rate used in hardware can be quite different to the desired sample rate. Eg my current 9239 can sample at 50kHz, 25kHz, 12.5kHz etc. So if I request 44100 kHz sample rate, I actually get 50kHz.
How can I find the actual sample rate used? My DAQmx read outputs an array of doubles. Using waveorm read output you can look at the number of samples and the length of the waveform to determine sample rate. But I do not want a waveform, I want an array of doubles!
I would like to use the same code across different cards and the user can set the desired sample rate. Actual sample rate is needed for processing.
Does anyone know how to determine actual sample rate used by DAQmx read?
Thanks
Ashley
Solved! Go to Solution.
11-28-2016 12:15 AM
11-28-2016 02:04 PM - edited 11-28-2016 02:10 PM
Hi,
Thanks for your help. I had seen both of those articles but got stuck. I can not read the properties from the DAQmx Timing property node as shown in the picture in the first link. See attached picture...
If I download the example VI at the first link, it shows the correct property being read. If I click on that and select property, I only get the same options shown in the picture below. If I change the DAQmx task create from AO voltage to AI voltage, I get an error that the SampClk.Rate property is not supported. Perhaps it is only an analog out thing?
Thanks
Ashley
.
11-28-2016 02:28 PM
SOLVED...
I was able to implement the timing property node in my VI by copying and pasting it from the example VI HERE. I now get the correct actual sample rate.
04-08-2022 12:43 PM
For those of you who (like me) were unable to find an example file to drag this from, you can get this property node as follows:
Search for "Timing Property Node" and place on block diagram
Right click -> "Select Filter..."
Select "Show All Attributes"
Hit OK
Now you can see all attributes under the class.
Click the preselected property value, and navigate to the Sample Clock submenu, and the options should be there.
04-08-2022 03:07 PM
Good tip when needed. Not sure how common it is for that option to be off. I just dropped a DAQmx Timing property node into a new vi and found that "Show All Attributes" was already selected by default. This was true for both LV 2018 (32-bit) and LV 2020 (64-bit).
Perhaps it's a persistent setting, remembering some time in the distant past when I selected "All Attributes"? I remember kudo'ing a request for such persistance many years ago...
<search> Nope, not exactly. Turns out it was something similar but not quite the same.
-Kevin P