Test and Measurement Forum

Picoscope Buffer

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

Picoscope Buffer

Postby Rumchiller » Wed Feb 25, 2015 10:05 am


Could you provide me some information to the ps3000aSetDataBuffer function? In general I know that I have to set a certain place for the provided data. But how exactly does it work?

"* buffer" - I think the location in the scopes memory? More info on how to declare please.
"bufferLth" - How long it should be?
"segmentIndex" - When I set more segments with "ps3000aMemorySegments", how it works exactly?

Maybe you have a good link for me with general infos about how buffers works and how to set them (with the Picoscope).

Its my first attempt to communicate with an external device with Matlab, so bear with me :|

Thanks for your help!


PS: Matlab2014 32bit, Win7 64bit, Picoscope 3203D, Picotech Instrument-Driver.
Posts: 0
Joined: Sat Feb 21, 2015 12:18 pm

Re: Picoscope Buffer

Postby Hitesh » Mon Mar 02, 2015 4:43 pm

Hi Reggie,

The buffer parameter is a pointer to the array in which data is to be stored. For this particular call you have to use a libpointer object in order to pass the array to the driver - there is code in the example scripts that shows how to do this e.g.

Code: Select all
data.BUFFER_SIZE = 1024;
channelA = enuminfo.enPS3000AChannel.PS3000A_CHANNEL_A;
pBufferChA = libpointer('int16Ptr',zeros(1024,1));

status = invoke(ps3000a_obj, 'ps3000aSetDataBuffer', channelA, pBufferChA, data.BUFFER_SIZE, 0, 0);

The bufferLth parameter is the length of the array (the sum of the pre- and post-trigger samples if collecting raw data).

The segmentIndex parameter would normally be set to 0, if the memory of the device has not been segmented.

If the device memory has been segmented into n segments, then 0 corresponds to the first segment, 1 would be second and so on until n - 1 corresponds to the last. The memory in each segment is shared between the enabled channels.

I hope this helps.

Technical Specialist
Pico Technology
Site Admin
Site Admin
Posts: 2196
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests