Sampling frequency ADC212

Post general discussions on using our drivers to write your own software here
Post Reply
bc547c@hetnet.nl

Sampling frequency ADC212

Post by bc547c@hetnet.nl »

Hello there,

I'm using an ADC212/3 for my project. In this project i'm using both channels. I've set the oversampling to 1 and the timebase to 7.

The fastest samplingtime for 2 channels is 150MS/s (when you set the oversampling to 0 and the timebase to 0). What i've done is set the oversampling to 0 and the timebase to 7. This means that the sample frequency must be 11.73kHz!!

When i count the samples that are taken in 10 seconds, i just have 4950 samples. This should be 117300 samples!!

Does anybody know what i've forgotten or what i have done wrong?

Greetzzz,
Martijn :P

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

The sample rate of the ADC-212/3 when both channels are in use is 1.5Ms/s. At timebase 7 and oversample 1 the time interval between each sample will be 85.3333 microseconds, which would allow 11718.75 samples a second.

It is not possible to say that you will get continuous data over the 10 seconds. The process is upload setup to the unit sample the data and then download the data to the PC. During the upload time and download time there is a finite amount of time where the unit cannot sample.

However, another factor is the method you are using to sample the data, if using get value then there this will be effected by the windows clock. If using the get_values or get_times_and_values the maximum number of samples that be obtained in one run is the buffer size.

I would suggest that you have a look at the C example that can be downloaded from here.
Regards,

Mark Spencer

bc54c@hetnet.nl

Post by bc54c@hetnet.nl »

Hellow,

Thanks for your reaction. You said that at timebase 7 and oversample 1 the time interval between each sample will be 85.3333 microseconds, which would allow 11718.75 samples a second. But are these 11718.75 samples the total number of samples (11718.75/2=5859.38 per channel)or does each channel get 11718.75 samples per channel?

I know that the ADC needs time to upload and download, but it seems that it needs a whole lot of time to do this!! Normally i should get 11718.75 samples per second, but i got just 4950 per 10 seconds!!!

I find it strange, but i will take a closer look at the example program.

Tanks en greetzzz,

Martijn :D

Guest

Post by Guest »

Hi,

I wanted to try the "get_times_and_values" method, but this isn't available in the Visual Basic dll.

Do you also have an answere for my previous questions?

Greets,
Martijn

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

The number of sample I quoted 11718 if for each channel. To calculate the number of samples per second or the sample interval use this formulea:

(Max samples)/2^timebase

The maximum number of samples is 3,000,000 when one channel is active and 1,500,000 samples for each channel, when both channels are active.

The timebase you have selected is 7 and both channels are active so therefore:
number of samples = 1,500,000 /2^7 = 11718.75

time interval = 1 / number of samples = 85.33333 microseconds
I have adapted the example that we provide to use the function

adc200_get_times_and_values.

The function returns the required number of samples. To use this function you will have to include this line in your module.

Code: Select all

Declare Sub adc200_get_times_and_values Lib "c:\ADC20032.dll" (times As Long, buffer_a As Integer, buffer_b As Integer, ByVal no_of_values As Long)
Best regards,
Regards,

Mark Spencer

Guest

Post by Guest »

Hellow,

Sorry for the late reaction, but thanks for your help. The method adc200_get_times_and_values works okay. Now i have to write something so that this method is gonna work in my application.

I will notice you when its working okay.

Thanks and greets,
Martijn

Post Reply