PC Oscilloscope User Guide PicoScope 2104, PicoScope 2105

PicoScope 2104 & 2105 PC Oscilloscope User Guide
12
Copyright 2006 Pico Technology Limited. All rights reserved.PS2100044-1.0
3.3.5
ps2000_get_unit_info
short ps2000_get_unit_info ( short handle,
char * string,
short string_length,
short info )
This function writes information about the oscilloscope to a character string. If the unit
fails to open, only information types
0
and
6
are available to explain why the last open
unit call failed.
Arguments
handle
, the handle to the device from which
info
is required. If an
invalid handle is passed, the error code from the last unit that failed
to open is returned.
* string
, a pointer to the character string buffer in the calling
function where the unit information string (selected with
info
) will be
stored. If a null pointer is passed, no information will be written.
string_length
, the length of the character string buffer. If the string
is not long enough to accept all of the information, only the first
string_length
characters are returned.
info
, an enumerated type specifying what information is required
from the driver.
Returns The length of the string written to the character string buffer,
string
,
by the function. If one of the parameters is out of range, or a null
pointer is passed for
string
, zero will be returned.
info
Information returned Example
PS2000_DRIVER_VERSION (0)
Version number of the DLL used by the
PicoScope 2000 Series driver.
"1, 3, 0, 0"
PS2000_USB_VERSION (1)
Type of USB connection that is being used
to connect the oscilloscope to the
computer.
"2.0"
PS2000_HARDWARE_VERSION
(2)
Hardware version of the attached
oscilloscope.
"4"
PS2000_VARIANT_INFO (3)
Model of PicoScope 2000 Series unit that is
attached to the computer.
"2105"
PS2000_BATCH_AND_SERIAL
(4)
Batch and serial number of the
oscilloscope.
"INR73/6"
PS2000_CAL_DATE (5)
Calibration date of the oscilloscope. "17Jan06"
PS2000_ERROR_CODE (6)
One of the Error codes. "0"