Programming the 2000 Series Oscilloscopes
8Copyright © 2006–2022 Pico Technology Ltd. All rights reserved.ps2000pg.en-12
PicoScope 2000 Series Programmer's Guide
2 Programming the 2000 Series
Oscilloscopes
2.1 General procedure
The ps2000.dll library in your PicoScope installation directory allows you to program a
PicoScope 2000 Series oscilloscope using standard C function calls.
A typical program for capturing data consists of the following steps:
Open the oscilloscope.
Set up the input channels with the required voltage ranges and coupling mode.
Set up triggering.
Start capturing data. (See Sampling modes, where programming is discussed in more
detail.)
Wait until the oscilloscope is ready.
Copy data to a buffer.
Stop capturing data.
Close the oscilloscope.
Numerous sample programs are included in the SDK. These show how to use the functions of
the driver software in each of the modes available.
2.2 Driver
Your application will communicate with a PicoScope 2000 API driver called ps2000.dll, which
is supplied in 32-bit and 64-bit versions. The driver exports the ps2000 function definitions in
standard C format, but this does not limit you to programming in C. You can use the API with
any programming language that supports standard C calls.
The API driver depends on a low-level driver called WinUsb.sys (supplied in 32-bit and 64-bit
versions), which is installed by the SDK and configured when you plug the oscilloscope into
each USB port for the first time. Your application does not call this driver directly.
2.3 Voltage ranges
You can set the gain for each channel with the ps2000_set_channel function. The input
voltage ranges available depend on the oscilloscope model.
The driver scales all readings to 16 bits, regardless of the voltage range the oscilloscope is set
to. The following table shows the relationship between the reading from the driver and the
signal level.
Indicates a buffer overrun in fast streaming
mode.