ADC11/12 What samplerate should I expect when streaming

Post general discussions on using our drivers to write your own software here
Post Reply
pako

ADC11/12 What samplerate should I expect when streaming

Post by pako »

I have previeously posted a question on this subject:
"ADV11/12 How do you set samplerate when streaming", but I didn't get an answer, so I try again.

I am streaming continuously, and would like to be able to set the sampling rate, here is my code:

//Initialize!
n:=Channels_Count(channels); //n is the same as No_Channels
BUFFER_SIZE:=max_values*n;
TargetTime:=SampleRate*max_values*No_Channels;
actual := adc11_set_interval (TargetTime, BUFFER_SIZE, channels, n);

//Start capturing!
adc11_run (BUFFER_SIZE, BM_STREAM);

//Wait for data!
while Not(adc11_ready) do
begin
Sleep (Trunc(SampleRate/1000));
end;

//Get the data!
while Not(kbhit) do
begin
no_of_values := adc11_get_times_and_values (mytimes, myvalues, BUFFER_SIZE);
//Process the data!
//Wait before getting the next datablock!
Sleep (Trunc(SampleRate/1000));
end;


Now, this code works, but it takes quite a while before I start getting samples, if I set a samplingrate of 1 second I have to wait around 15 seconds before I start to get readings! is that normal behaviour?

At the same time the samplerate is not precisely 1 second but 0.999424 if I sample one channel and 0.901120 if I sample all 11 channels?

I find that the samplerate changes is a little pussling, because if I set the samplerate to say 1ms I get exactly 1ms, so why does it change just because I choose a longer sampleperiod?

If I continue to stream data as described above, I get a Errormessage from MEMMGR saying: End guard damaged File adc11usb.c line 1410

Is there some kind of handling that I have forgotten, it seams like I am running out of memoryspace, stackspace or something like that?



Regards Palle Koch

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

Post by markspencer »

Hi,

I am sorry it is taking so long to give you your answer.

The reason for this is the problem that you stated MemMgr error. This is a known bug, when the ADC-11 and USB are used together, this is under investigation. The fix will hopefully be available in the next beta release, but I am unable to give you a time frame.

Best regards,
Regards,

Mark Spencer

chrisb

Post by chrisb »

Hi,

Can you tell me if this has been fixed yet?

We are hoping to use the ADC-11/10 / USB Adaptor combination in a product we are developing which needs to stream 3 channels worth of data indefinitely to a PC at around 3333 Samples per Second (i.e. 10 kS/s divided over the 3 channels).

Are there any known issues / bugs with this setup still?

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

Post by markspencer »

Hi,

This has been fixed in an alhpa version of the driver, unfortunately, it is not fully tested and therefore not ready for release yet. However, if you wish to use this please send me an email requesting the driver and I will forward it to you. You should be aware that since it is in a alpha state that other bugs may be present.

tech@picotech.com

Best regards,
Mark S.
Regards,

Mark Spencer

Post Reply