Test and Measurement Forum

my_get_overview_buffers() called spontaneously

Post your C and C++ discussions here

my_get_overview_buffers() called spontaneously

Postby davidweisgerber » Wed Sep 23, 2009 12:31 pm

Hi folks,
I am writing an application which needs to process the data coming from the PicoScope all the time (to be detailed: It reads events from a photomultiplier tube).
To acheive this, the PicoScope 2000 runs in fast streaming mode and calls
ps2000_get_streaming_last_values every 25ms. The problem is, that the callback function that I pass to ps2000_get_streaming_last_values is called sometimes without having called ps2000_get_streaming_last_values before.
So I am not totally sure how the concept of the whole API is.
I thought the idea was, that the ps2000_get_streaming_last_values is called, than this function pauses the data acquisition from the device so that I can access the buffers than it calls my callback function where I can copy the buffers to my process space and then the data acquisition thread is resumed.

Any information?
davidweisgerber
User
User
 
Posts: 2
Joined: Wed Aug 26, 2009 2:13 pm

Postby Robin » Thu Sep 24, 2009 8:20 am

Hi

The overview buffer is circular and when the buffer fills up, some of the data will be loacted at the end and some at the beginning. In this case, the callback function is called twice, once for each of these data blocks.

We have changed the way that the driver works now, such that the callback is only called once. In this case, the data block at the end of the buffer is returned, but the data that has overflowed to the beginning of the buffer is not returned until the next call to ps2000_get_streaming_last_values.

I hope this makes sense.

I have attached the latest driver version.

Robin
Attachments
PS2000.zip
(340.75 KiB) Downloaded 127 times
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: my_get_overview_buffers() called spontaneously

Postby davidweisgerber » Tue Oct 27, 2009 10:44 am

Thanks, we will play with it a little bit.
davidweisgerber
User
User
 
Posts: 2
Joined: Wed Aug 26, 2009 2:13 pm


Return to C and C++

Who is online

Users browsing this forum: No registered users and 1 guest