Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

9239 number of samples versus rate

Solved!
Go to solution

Hi All,

 

I am running a VI for the 9239. 

 

In it I set the sample clcok to 2048.

 

I then set the the number of samples to 20480, i.e run for ten seconds.

 

However instead of the final point being measured at 10s it is measure at 9.82992

 

If it is set for 2048 samples the final time is 0.98256

 

I realise that say if I had a rate of 5 samples per second and a took five samples, I would get the following 0, .2, .4, .6, .8

 

but if I was to increase this to 10 samples, I would get

 

0, .2, .4, .6, .8, 1, 1.2, 1.3, 1.4, 1.6, 1.8

 

The important point here is that the offset remains the same

 

In addiiton 1 - 1/2048 =.99951171875  not .98256.

 

Does anyone know what is going on here?

 

Sean

 

0 Kudos
Message 1 of 4
(3,152 Views)

Hi Sean,

 

The behavior comes from the fact that the 9239 only has a certain number of fixed sample rates available.  They are defined by the following equation:

 

         2010-11-23_133056.png

 

 

If using the internal Master Timebase, then fM would be 12.8 MHz  (±100 ppm).

 

So, if you specify a rate of 2048, the driver will actually coerce this up to 2083.3333 Hz (n=24).  20480 samples divided by 2083.333 Hz gives 9.8304 seconds, which is approximately the time you measured.

 

 

Best Regards,

John Passiak
0 Kudos
Message 2 of 4
(3,143 Views)
Solution
Accepted by SeanJ

To add to that,

 

You made a very good point about the first sample being taken at t=0.  Accounting for this we get:

 

 

20480 samples

 

    (20480 / 2083.33333) * (1-1/20480) = 9.82992

 

 

2048 Samples

 

    (2048 / 2083.33333) * (1-1/2048) = 0.98256

 

 

 

Which gives exactly the numbers that you reported.

 

 

Best Regards,

John Passiak
Message 3 of 4
(3,140 Views)

Thanks John, mystery solved!

0 Kudos
Message 4 of 4
(3,130 Views)