03-03-2014 08:15 AM
I think I found my problem with sampling rate.
I'm using a PCI-5122 scope card, and in many of my aquisitions, I'm setting the sample rate to 40MS/s. Apparently, this is not a valid number and the scope reverts to 50 MS/s
Later when I try to calculate cycles per second based on cycles per sample, I need the actual sample rate, and 40 MS/s ain't it.
I'm trying to coerce sampling rate.
please,.
03-04-2014 10:46 AM
The digitizer coerces the sample rate because of how the sample clock is derrived from the Reference Clock. The following information is on page 13 of the specifications:
http://digital.ni.com/manuals.nsf/websearch/C6B059C1BDD70101862574C8005567F1
The sample clock is created by dividing down the Reference clock (internal reference clock is 100MS/s) by decimation, and it divides it by N, which is an integer between 2 and 65530.
Thus 50MS/s uses a decimation factor of 2, and 33.3MS/s is the next valid sample rate with a decimation factor of 3. So when you specify a sample rate that is not possible, the driver automatically coerces the requested sample rate up to the next valid rate. You can obtain the actual sample rate used in an acquisition using the NI-SCOPE property "Actual Sample Rate", or the LabVIEW VI "niScope Sample Rate.vi". Using this property, you can get the values you need for your calculations.
I hope this helps!
Nathan