User manual

PicoScope 6000 Series Programmer's Guide 13
Copyright © 2009-2013 Pico Technology Ltd. All rights reserved. ps6000pg.en r9
3.5.2.3
Rapid block mode example 2: using 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 number of
captures required)
// set the number of waveforms to 100
ps6000SetNoOfCaptures (handle, 100);
pParameter = false;
ps6000RunBlock
(
handle,
0, //noOfPreTriggerSamples,
1000000, // noOfPostTriggerSamples,
1, // timebase to be used,
1, // oversample
&timeIndisposedMs,
1, // oversample
lpReady,
&pParameter
);
Comments: the set-up for running the device is exactly the same whether or not
aggregation will be used when you retrieve the samples.
for (int c = PS6000_CHANNEL_A; c <= PS6000_CHANNEL_D; c++)
{
ps6000SetDataBuffers
(
handle,
c,
&bufferMax[c],
&bufferMin[c]
MAX_SAMPLES,
PS6000_RATIO_MODE_AGGREGATE
);
}
Comments: since only one waveform will be retrieved at a time, you only need to set
up one pair of buffers; one for the maximum samples and one for the minimum
samples. Again, the buffer sizes are 1000 samples.