PicoScope 3000A Series Prog rammer's Guide 9
Copyright © 2011-2013 Pico Technology Limited. All rights reserved. ps3000abpg.en r9
2.7.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 ps3000aOpenUnit.
2. Select channel ranges and AC/DC coupling using ps3000aSetChannel. All channels
are enabled by default, so if you wish to allocate the buffer memory to fewer
channels, you must disable those that are not required.
3. [MSOs only] Set the digital port using ps3000aSetDigitalPort.
4. Using ps3000aGetTimebase, select timebases until the required nanoseconds per
sample is located.
5. Use the trigger setup functions ps3000aSetTriggerChannelConditionsV2,
ps3000aSetTriggerChannelDirections and ps3000aSetTriggerChannelProperties to
set up the trigger if required.
6. [MSOs only] Use the trigger setup functions
ps3000aSetTriggerDigitalPortProperties to set up the digital trigger if required.
7. Start the oscilloscope running using ps3000aRunBlock.
8. Wait until the oscilloscope is ready using the ps3000aBlockReady callback (or poll
using ps3000aIsReady).
9. Use ps3000aSetDataBuffer to tell the driver where your memory buffer is.
10. Transfer the block of data from the oscilloscope using ps3000aGetValues.
11. Display the data.
12. Stop the oscilloscope using ps3000aStop.
13. Repeat steps 7 to 11.
14. Request new views of stored data using different downsampling parameters: see
Retrieving stored data.
2.7.1.2 Asynchronous calls in block mode
The ps3000aGetValues function may take a long time to complete if a large amount of
data is being collected. For example, it can take 3.5 seconds to retrieve the full 128M
samples from a PicoScope 3206B using a USB 2.0 connection, or several minutes on
USB 1.1. To avoid hanging the calling thread, it is possible to call
ps3000aGetValuesAsync instead. This immediately returns control to the calling thread,
which then has the option of waiting for the data or calling ps3000aStop to abort the
operation.