Installation guide

PicoScope 4000 Series (A API) Programmer's Guide 11
Copyright © 2008-2014 Pico Technology Ltd. All rights reserved. ps4000apg.en r1
3.6.2.2
Rapid block mode example 1: no downsampling
#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 number of
captures required)
// set the number of waveforms to 100
ps4000aSetNoOfCaptures (handle, 100);
pParameter = false;
ps4000aRunBlock
(
handle,
0, // noOfPreTriggerSamples,
10000, // noOfPostTriggerSamples,
1, // timebase to be used,
&timeIndisposedMs,
1, // segmentIndex
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 = PS4000A_CHANNEL_A; c <= PS4000A_CHANNEL_H; c++)
{
ps4000aSetDataBuffer
(
handle,
c,
&buffer[c][i],
MAX_SAMPLES,
i,
PS4000A_RATIO_MODE_NONE
);
}
}
Comments: buffer has been created as a two-dimensional array of pointers to
int16_t types, 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.