2206A Streaming Mode Help

Post general discussions on using our drivers to write your own software here
Post Reply
Cwebster
Newbie
Posts: 0
Joined: Fri Aug 29, 2014 1:21 pm

2206A Streaming Mode Help

Post by Cwebster »

Hi,

I'm new to programming with the Picoscopes and I've been reading the programmers guide but cannot seem to get my head around using the Streaming Mode with the 2206A scope.

I have the Channels and Trigger setup, and I have set the data buffers up as so:
Using RATIO_MODE_AGGREGATE so I have 2 buffers;
iBufferMax[2][MAX_SAMPLES] with iBufferMax[0][...] for Channel A and iBufferMax[1][...] for Channel B,
and the same with iBufferMin[2][MAX_SAMPLES].

I passed the first array position in the arrays as the parameters for the ps2000aSetDataBuffers(), and this is where my confusion starts:

Does the program automatically move through the buffer (e.g. from iBufferMax[0][0] to iBufferMax[0][1000] etc), or do I have to keep re-assigning the data buffers using a loop? I saw something similar to this in an example and I don't understand it fully.

Buffers aside, I also don't understand how to read the data back using the ps2000aGetStreamingLatestValues() and ps2000aStreamingReady() functions, if anyone could explain this to me I would be very grateful.

Thanks,

Karunen
Advanced User
Advanced User
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Re: 2206A Streaming Mode Help

Post by Karunen »

Hi Cwebster,

Streaming can be a bit confusing.

You may want to have a look at http://www.picotech.com/education/oscil ... modes.html

Once you have set up the driver buffer you do not have to set them up again.

But we use an application buffer to hold the values as the driver buffer gets overwritten each time the device returns values.

ps2000aGetStreamingLatestValues() has a pointer to ps2000aStreamingReady() which is a C style Callback.

Now in the Callback you will want to spend as little time as possible, so we just copy the data from the driver buffer into the application buffer.

ps2000aGetStreamingLatestValues() calls the callback (ps2000aStreamingReady()) and using that we can also set the variables you send into pParameter.

If you require more information or this is unclear please let me know and we will trying to create something the explains the situation in more detail.

Kind Regards,
Karunen

Technical Specialist
Pico Technology

Post Reply