Installation guide
PicoScope 4000 Series (A API) Programmer's Guide 9
Copyright © 2008-2014 Pico Technology Ltd. All rights reserved. ps4000apg.en r1
Downsampling. When the data has been collected, you can set an optional
downsampling factor and examine the data. Downsampling is the process of
reducing the amount of data by combining adjacent samples using one of several
algorithms. It is useful for zooming in and out of the data without having to
repeatedly transfer the entire contents of the scope's buffer to the PC.
Memory segmentation. The scope's internal memory can be divided into
segments so that you can capture several waveforms in succession. Configure this
using ps4000aMemorySegments.
Data retention. The data is lost when a new run is started in the same segment,
the number of segments is changed, or the scope is powered down.
See Using block mode for programming details.
3.6.1.1
Using block mode
This is the general procedure for reading and displaying data in block mode using a
single memory segment:
1. Open the oscilloscope using ps4000aOpenUnit.
2. Select channel ranges and AC/DC coupling using ps4000aSetChannel.
3. Using ps4000aGetTimebase, select timebases until the required nanoseconds
per sample is located.
4. Use the trigger setup functions
[1] [2] [3] [4]
to set up the trigger if required.
5. Start the oscilloscope running using ps4000aRunBlock.
6. Wait until the oscilloscope is ready using the ps4000aBlockReady callback.
7. Use ps4000aSetDataBuffer to tell the driver where your memory buffer is.
8. Transfer the block of data from the oscilloscope using ps4000aGetValues.
9. Display the data.
10. Repeat steps 5 to 9.
11. Stop the oscilloscope using ps4000aStop.
12. Request new views of stored data using different downsampling parameters: see
Retrieving stored data.