User manual

PicoScope 6000 Series Programmer's Guide 7
Copyright © 2009-2013 Pico Technology Ltd. All rights reserved. ps6000pg.en r9
3.3
Voltage ranges
You can set a device input channel to any voltage range from ±50 mV to ±20 V with
the ps6000SetChannel function. Each sample is scaled to 16 bits so that the values
returned to your application are as follows:
Constant
Voltage
Value returned
decimal
hex
PS6000_MIN_VALUE
minimum
-32 512
8100
zero
0
0000
PS6000_MAX_VALUE
maximum
32 512
7F00
3.4
Triggering
PicoScope 6000 Series oscilloscopes can either start collecting data immediately, or be
programmed to wait for a trigger event to occur. In both cases you need to use the
PicoScope 6000 trigger functions ps6000SetTriggerChannelConditions,
ps6000SetTriggerChannelDirections and
ps6000SetTriggerChannelProperties. A trigger event can occur when one of the
signal or trigger input channels crosses a threshold voltage on either a rising or a
falling edge.
3.5
Sampling modes
PicoScope 6000 Series oscilloscopes can run in various sampling modes.
Block mode. In this mode, the scope stores data in internal RAM and then
transfers it to the PC. When the data has been collected it is possible to examine
the data, with an optional downsampling factor. The data is lost when a new run is
started in the same segment, the settings are changed, or the scope is powered
down.
ETS mode. In this mode, it is possible to increase the effective sampling rate of
the scope when capturing repetitive signals. It is a modified form of block mode.
Rapid block mode. This is a variant of block mode that allows you to capture
more than one waveform at a time with a minimum of delay between captures. You
can use downsampling in this mode if you wish.
Streaming mode. In this mode, data is passed directly to the PC without being
stored in the scope's internal RAM. This enables long periods of slow data collection
for chart recorder and data-logging applications. Streaming mode also provides fast
streaming at up to 13.33 MS/s (75 ns per sample) with USB 2.0 or 156 MS/s with
USB 3.0. Downsampling and triggering are supported in this mode.
In all sampling modes, the driver returns data asynchronously using a callback. This is
a call to one of the functions in your own application. When you request data from the
scope, you pass to the driver a pointer to your callback function. When the driver has
written the data to your buffer, it makes a callback (calls your function) to signal that
the data is ready. The callback function then signals to the application that the data is
available.
Because the callback is called asynchronously from the rest of your application, in a
separate thread, you must ensure that it does not corrupt any global variables while it
runs.
In block mode, you can also poll the driver instead of using a callback.