User manual

PicoScope 6000 Series Programmer's Guide 11
Copyright © 2009-2013 Pico Technology Ltd. All rights reserved. ps6000pg.en r9
3.5.2.2
Rapid block mode example 1: no aggregation
#define MAX_SAMPLES 1000
Set up the device up as usual.
Open the device
Channels
Trigger
Number of memory segments (this should be equal or more than the no of captures
required)
// set the number of waveforms to 100
ps6000SetNoOfCaptures (handle, 100);
pParameter = false;
ps6000RunBlock
(
handle,
0, // noOfPreTriggerSamples
10000, // noOfPostTriggerSamples
1, // timebase to be used
1, // oversample
&timeIndisposedMs,
1, // segment index
lpReady,
&pParameter
);
Comment: these variables have been set as an example and can be any valid value.
pParameter will be set true by your callback function lpReady.
while (!pParameter) Sleep (0);
for (int i = 0; i < 10; i++)
{
for (int c = PS6000_CHANNEL_A; c <= PS6000_CHANNEL_D; c++)
{
ps6000SetDataBufferBulk
(
handle,
c,
&buffer[c][i],
MAX_SAMPLES,
i
);
}
}
Comments: buffer has been created as a two-dimensional array of pointers to shorts,
which will contain 1000 samples as defined by MAX_SAMPLES. There are only 10
buffers set, but it is possible to set up to the number of captures you have requested.