User manual
Programming with the PicoScope 6000 Series60
Copyright © 2009-2013 Pico Technology Ltd. All rights reserved.ps6000pg.en r9
3.9.33
ps6000SetDataBuffer
PICO_STATUS ps6000SetDataBuffer
(
short handle,
PS6000_CHANNEL channel,
short * buffer,
unsigned long bufferLth,
PS6000_RATIO_MODE downSampleRatioMode
)
This function tells the driver where to store the data, either unprocessed or
downsampled, that will be returned after the next call to one of the GetValues
functions. The function allows you to specify only a single buffer, so for aggregation
mode, which requires two buffers, you need to call ps6000SetDataBuffers instead.
You must allocate memory for the buffer before calling this function.
Applicability
Block, rapid block and streaming modes. All downsampling modes
except aggregation.
Arguments
handle, the handle of the required device
channel, the channel you want to use with the buffer. Use one of
these values:
PS6000_CHANNEL_A
PS6000_CHANNEL_B
PS6000_CHANNEL_C
PS6000_CHANNEL_D
buffer, the location of the buffer
bufferLth, the size of the buffer array
downSampleRatioMode, the downsampling mode. See
ps6000GetValues for the available modes, but note that a single call
to ps6000SetDataBuffer can only associate one buffer with one
downsampling mode. If you intend to call ps6000GetValues with
more than one downsampling mode activated, then you must call
ps6000SetDataBuffer several times to associate a separate buffer
with each downsampling mode.
Returns
PICO_OK
PICO_INVALID_HANDLE
PICO_INVALID_CHANNEL
PICO_RATIO_MODE_NOT_SUPPORTED
PICO_DRIVER_FUNCTION
PICO_INVALID_PARAMETER