12

PicoScope 2104 & 2105 PC Oscilloscope User Guide

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

"1, 3, 0, 0"

 

 

PicoScope 2000 Series driver.

 

PS2000_USB_VERSION (1)

Type of USB connection that is being used

"2.0"

 

 

to connect the oscilloscope to the

 

 

 

computer.

 

PS2000_HARDWARE_VERSION

Hardware version of the attached

"4"

(2)

 

oscilloscope.

 

PS2000_VARIANT_INFO (3)

Model of PicoScope 2000 Series unit that is "2105"

 

 

attached to the computer.

 

PS2000_BATCH_AND_SERIAL

Batch and serial number of the

"INR73/6"

(4)

 

oscilloscope.

 

PS2000_CAL_DATE (5)

Calibration date of the oscilloscope.

"17Jan06"

PS2000_ERROR_CODE (6)

One of the Error codes.

"0"

PS2100044-1.0

Copyright 2006 Pico Technology Limited. All rights reserved.

Page 14
Image 14
Pico Communications PicoScope 2104, PicoScope 2105 manual 5 ps2000getunitinfo, Information returned Example