Pico Communications PicoScope 2104 manual 5 ps2000getunitinfo, Information returned Example

Page 14

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.

Image 14
Contents PicoScope 2104 Table of Contents Overview Safety symbolsIntroduction IntroductionSafety warning FCC noticeCE notice Licence conditionsCompany details WarrantyTrademarks AddressProduct information Minimum system requirementsInput connector Installation instructionsChecking the installation Connectors and controlsSpecifications Driver Driver error codesTechnical reference 2 ps2000flashled Functions1 ps2000closeunit 3 ps2000gettimebase 4 ps2000gettimesandvalues 5 ps2000getunitinfo Information returned Example6 ps2000getvalues 7 ps2000lastbuttonpress8 ps2000openunit 9 ps2000readyPs2000runblock 11 ps2000runstreaming Ps2000setchannel Code Enumeration Range13 ps2000setets Ps2000settrigger 15 ps2000stopSampling modes Advanced featuresMore on block mode ETS Equivalent Time Sampling More on streaming modeTriggering Voltage rangesScaling 7 AC/DC operationOversampling Reading VoltageCombining oscilloscopes Using streaming mode Using different modesUsing block mode Using ETS modeGUI example Programming1 C Console exampleExcel Visual BasicDelphi Agilent VEETroubleshooting Software error codesGlossary Glossary PicoScope software Real-time continuous modeStreaming mode TimebaseIndex ETSIndex USBInterworld Electronics & Computers Inc