my_get_overview_buffers() called spontaneously

Post your C and C++ discussions here
Post Reply
davidweisgerber
User
User
Posts: 2
Joined: Wed Aug 26, 2009 2:13 pm

my_get_overview_buffers() called spontaneously

Post by davidweisgerber »

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?

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Post by Robin »

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 447 times

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

Re: my_get_overview_buffers() called spontaneously

Post by davidweisgerber »

Thanks, we will play with it a little bit.

Post Reply