Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding sample rate and number of samples

 

Hi,
I'm using a USB-4431 to receive a analog signal from an accelerometer and to send a analog signal.
I want that the input and the output works at the same frequency. I know that this device don't alow synchronization, but I'm trying to sync to the maximum by software, is it possible?
Until know I have a basic doubt, I don't undersand the logic of the values of sample rate and number of samples for an AI and an AO.
I hope you can help me.
 
Thanks

Sílvia

0 Kudos
Message 1 of 6
(18,405 Views)

Hi,

 

I think I just realized how the sample rate and number of samples work.
The sample rate is the samples it acquire or generate in a second and the number of samples indicates the amount of signal that was acquired or generated.
For improved process, this number must be large or small?

 

Thanks,

Silvia

0 Kudos
Message 2 of 6
(18,371 Views)

Hi Silvia,

 

As you said, The sample rate is the number of sample you want to generate or acquire per second. The number of samples is the number of samples you want to read or write each time you use the read or write function.

 

Are you using it in finite or continuous mode ? In finite mode, the number of sample is the total number of sample you will read or write. In continuous mode, the number of sample is the number of sample you will read or write at each call of the read or write function in a while loop.

If you are in continuous mode, you need to read enough sample if your sample rate is high and if your sample rate is low and you acquire many samples it won't refresh very often.

But don't worry if you don't read enough samples, you will know it easily as you will get an error.

 

I hope this helps,

 

0 Kudos
Message 3 of 6
(18,348 Views)

Hi Charlotte,

 

Fisrt of all, thanks for your help.

I'm using continuous mode.

In the last row, you wanted to say that if the sample rate is high and the number of samples is low, it won't refresh very often?

I put a number of samples iqual to the sample rate, is this a good choice?

 

Thanks,

Sílvia

0 Kudos
Message 4 of 6
(18,319 Views)

Hi Silvia,

 

I was saying that if you are at a high sample rate, the number of sample needs to be high so that every sample is retrieved from the buffer and so that the buffer can be loaded again with the new values.

 

If you are at a low sample rate, you will have to wait until you get all the sample to see a refresh. For example if you are at 1Hz and you set the number of sample to 10 you will have to wait 10s between every refresh. 

 

A number of sample equal to the sample rate should work fine. And as I said if you are doing error checking, you don't have to worry about choosing wrong values because you will then get an error and so you will know about it.

 

Regards,

 

Message 5 of 6
(18,286 Views)

Hi Charlotte F.

 

I have seen the example in the finding example of Labview program for the 5733 ADC of FPGA. In FPGA program, the signal is sampled at 120MHz but the program uses sample numbers to transfer data to the computer (HOST program). It uses finite mode for transferring.

Could you please explain in more details about this content?

Thank you very much.

Dong

0 Kudos
Message 6 of 6
(12,908 Views)