Test and Measurement Forum

2206A Streaming Mode Help

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

2206A Streaming Mode Help

Postby Cwebster » Fri Aug 29, 2014 1:53 pm


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.

Posts: 0
Joined: Fri Aug 29, 2014 1:21 pm

Re: 2206A Streaming Mode Help

Postby Karunen » Fri Sep 05, 2014 9:51 am

Hi Cwebster,

Streaming can be a bit confusing.

You may want to have a look at http://www.picotech.com/education/oscilloscopes/data-acquisition-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,

Technical Specialist
Pico Technology
Advanced User
Advanced User
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 1 guest