Installation guide

Programming with the PicoScope 4000 Series (A API)10
Copyright © 2008-2014 Pico Technology Ltd. All rights reserved.ps4000apg.en r1
3.6.2
Rapid block mode
In normal block mode, the PicoScope 4000 Series scopes collect one waveform at a
time. You start the the device running, wait until all samples are collected by the
device, and then download the data to the PC or start another run. There is a time
overhead of tens of milliseconds associated with starting a run, causing a gap between
waveforms. When you collect data from the device, there is another minimum time
overhead which is most noticeable when using a small number of samples.
Rapid block mode allows you to sample several waveforms at a time with the
minimum time between waveforms. It reduces the gap from milliseconds to about 2.5
microseconds.
See Using rapid block mode for details.
3.6.2.1
Using rapid block mode
You can use rapid block mode with or without downsampling. The following
procedure shows you how to use it without downsampling.
Without downsampling
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. Set the number of memory segments equal to or greater than the number of
captures required using ps4000aMemorySegments. Use
ps4000aSetNoOfCaptures before each run to specify the number of
waveforms to capture.
6. Start the oscilloscope running using ps4000aRunBlock.
7. Wait until the oscilloscope is ready using the ps4000aBlockReady callback.
8. Use ps4000aSetDataBuffer to tell the driver where your memory buffers are.
9. Transfer the blocks of data from the oscilloscope using
ps4000aGetValuesBulk.
10. Retrieve the time offset for each data segment using
ps4000aGetValuesTriggerTimeOffsetBulk.
11. Display the data.
12. Repeat steps 6 to 11 if necessary.
13. Stop the oscilloscope using ps4000aStop.
With downsampling
To use rapid block mode with downsampling, follow steps 1 to 9 above and then
proceed as follows:
10a. Call ps4000aSetDataBuffers to set up one pair of buffers for every waveform
segment required.
11a. Call ps4000aGetValues for each pair of buffers.
12a. Retrieve the time offset for each data segment using
ps4000aGetTriggerTimeOffset64.
Continue from step 13 above.