All Keithley product names are trademarks or registered trademarks of Keithley Instruments, Inc.
Other brand and product names are trademarks or registered trademarks of their respective holders.
QuickBASIC 4.5 and
Microsoft BASIC 7.1
Table of Contents
Section 1 — Using the Library Routines............................................................................7
6.3DC Voltage Functions................................................................................................................................ 33
6.4AC Voltage Functions................................................................................................................................. 35
6.5DC Current Functions................................................................................................................................ 37
B.2Status Model Constants ............................................................................................................................. 75
You must have Rev C.10 or later of the National Instruments NI-488 Software or Rev 1.0 or later of the National Instruments NI-488.2 Software to use the Model 2001/7001 Support Software. Some older revisions
may work, but they are not guaranteed to do so. Use the following settings to set up your National Instruments Card (AT-GPIB card listed here; use all that are applicable) when you are conÞguring GPIB.COM
with IBCONF.EXE.
CIC Protocol .............................................................. no
Disable Device Unaddressing................................. no
1.1.2 Capital Equipment Corporation
You must have Rev 2.14 or later of the Capitial Equipment Corp. software to use the Model 2001/7001
Support Software. All older revisions will not work without the removal of SETATNMODE() from
SetupIEEE%() in CECQBX.BAS for BASIC 7.1 or in CEC.BAS for QuickBASIC 4.5.
1.1.3 IOTech Driver 488
You must have Rev 2.6 or later of the IOTech Driver 488 software to use the Model 2001/7001 Support Software. Some older revisions may work, but they are not guaranteed to do so.
1.1.4 Microsoft BASIC 7.1
Type A:INSTALL or B:INSTALL to install the Microsoft BASIC 7.1 Model 2001/7001 support software. The
installation program will prompt you for certain information to copy Þles and build the make Þles
MAKECEC.BAT, MAKEIOT.BAT, MAKENAT1.BAT, and MAKENAT2.BAT. These Þles will build the *.OBJ,
*.LIB, *.QLB, and *.EXE Þles needed to use the routines.
7
Installation Notes:
1. BC.EXE, LINK.EXE, and LIB.EXE must be installed in the BASIC 7.1 Compiler Directory.
2. NMAKE.EXE must be installed in the NMAKE Directory.
3. BCL71EFR.LIB, DTFMTER.LIB, QBXQLB.LIB, QBX.LIB and IEEE488.LIB (if installing CEC) must reside in the Library Files Directory.
4. FORMAT.BI, MOUSE.BI, MENU.BI, and MOUSE.BI must reside in the Include Files Directory.
5. The Model 2001/7001 Support Software Directory must exist, and you will be prompted to make it if it
does not.
1.1.5 QuickBASIC 4.5
Type A:INSTALL or B:INSTALL to install the QuickBASIC 4.5 Model 2001/7001 support software. The installation program will prompt you for certain information to copy Þles and build the make Þles
MAKECEC.BAT, MAKEIOT.BAT, MAKENAT1.BAT, and MAKENAT2.BAT. These Þles will build the *.OBJ,
*.LIB, and *.QLB Þles needed to use the routines.
Installation Notes:
1. BC.EXE, LINK.EXE, and LIB.EXE must be installed in the QuickBASIC 4.5 Compiler Directory.
2. BQLB45.LIB and IEEEQB.LIB (if installing CEC) must reside in the Library Files Directory.
3. The Model 2001/7001 Support Software directory must exist, and you will be prompted to make it if it
does not.
1.2General Instructions
1.2.1 Microsoft BASIC 7.1
To use a Quick Library in BASIC 7.1, start by issuing at the DOS prompt:
QBX /Lcecqbx.qlbto use CEC
QBX /Liotqbx.qlbto use IOTech
QBX /Lnatqbx1.qlbto use NI-488
QBX /Lnatqbx2.qlbto use NI-488.2
In your program, use Ô$INCLUDE:Õ20017001.BIÕ which contains the Model 2001/7001 library function definitions and CONSTants OR use Ô$INCLUDE:Õ2001DEMO.BIÕ to use the BASIC 7.1 User Interface routines
(WINDOW.BAS, MOUSE.BAS, MENU.BAS, GENERAL.BAS, UIASM.OBJ, and QBX.LIB), which are included in the libraries and quick-libraries. A sample setup follows:
Ô To use the BASIC 7.1 Windowing and Menu capabilities use:
Ô$INCLUDE:Õ2001DEMO.BIÕ
MenuInitÔ Initialize Menu system (also initializes mouse with MouseInit)
WindowInitÔ Initializes Windowing system
MouseShowÔ Reveal mouse cursor
SetupErr%=SetupIEEE%(0,0)Ô Setup IEEE interface
SetupErr%=SetupIEEE%(2001,16)Ô Setup Model 2001 at IEEE address 16
SetupErr%=SetupIEEE%(7001,7)Ô Setup Model 7001 at IEEE address 7
Ô
8
Ô User Program Follows
Ô
Ô OR: (No Windowing or pop-up error messages)
Ô (SEE QuickBASIC 4.5 Example)
Ô
Note: When using the National Instruments NI-488 rev C.10 or C.11 interface with BASIC 7.1, the following
ibxxx commands are unavailable:
ibrdi, ibrdia, ibwrti, ibwrtia, ilrdi, ilrdia, ilwrti, and ilwrtia.
Also, note that the ibÞnd and ibdev subroutines are now functions like ilÞnd% and ildev%. These limitations result from the BASIC 7.1 to Quick C link to support far strings in BASIC 7.1 which are not supported
by National Instruments in their older NI-488 drivers (rev C.11 or older). To use the entire line of ibxxx commands, National Instruments suggests upgrading to the latest NI-488 driver (rev C.14 as of the time of this
printing) and using the NI-488.2/NI-488 rev C.12 or newer Model 2001/7001 Support Software.
1.2.2 QuickBASIC 4.5
To use a Quick Library in QuickBASIC 4.5, start by issuing at the DOS prompt:
QB /Lcec.qlbto use CEC
QB /Liotech.qlbto use IOTech
QB /Lnat488_1.qlbto use NI-488
QB /Lnat488_2.qlbto use NI-488.2
In your program, use Ô$INCLUDE:Õ20017001.BIÕ, which contains the Model 2001/7001 library function definitions and CONSTants. A sample setup follows:
Ô$INCLUDE:Õ20017001.BIÕ
CONST TRUE = -1
CONST FALSE = 0
SetupErr%=SetupIEEE%(0,0)Ô Setup IEEE interface
SetupErr%=SetupIEEE%(2001,16)Ô Setup Model 2001 at IEEE address 16
SetupErr%=SetupIEEE%(7001,7)Ô Setup Model 7001 at IEEE address 7
Ô
Ô User Program Follows
Ô
1.2.3 Documentation Notes
1. All functions in this document use QuickBASIC 4.5 type cast notation (% Ñ integer, $ Ñ String, etc.).
2. Query forms of a function have the format of function-nameQ$, which returns a query string containing
the results of the speciÞed Model 2001/7001 parameters. Automatic values are returned as 0 for OFF
and 1 for ON.
3. If a function query returns more than one parameter, the responses will be separated by a semi-colon (;)
within the return string. Use the ParseQuery$ routine to return the speciÞed response string (parameter
number 1, 2, 3, etc.) from the query return string.
9
4. Any Model 2001/7001 command parameters out of range will not be sent to the instrument, leaving the
previously set or default values in tact. Also, the global variable, OutOfRange%, will be set to TRUE (-1).
5. Most Model 2001/7001 parameters that are double precision values will accept the constants MAXIMUM, MINIMUM, and DEFAULT. INF will be accepted for Trigger Model Count1# and Count2# parameters.
6. All example programs assume that QuickBASIC 4.5 or BASIC 7.1 setup commands listed above were
used before issuing any commands.
7. All string parameters that have their valid parameters listed with mixed case, like IMMediate, accept
either the short form (IMM) or the long form (IMMEDIATE) in any combination of case. This is comparable to the short and long form notation used for SCPI commands.
8. See Appendix A for a description of the Global Variables used in the Model 2001/7001 support software.
9. See Appendix B for a description the deÞned CONSTants used in the Model 2001/7001 support software.
10. See Appendix C for a list of all QuickBASIC 4.5 and BASIC 7.1 Þle names used by the Model 2001/7001
support software.
10
Section 2
Model 2001 / 7001 IEEE-488 Interface Routines
These functions and subroutines control the Models 2001/7001 with low-level IEEE-488 bus commands
speciÞc to each IEEE-488 interface manufacturer. If any IEEE-488 timeout errors occur, an error message will
be displayed. For BASIC 7.1 the WindowInit command must be issued at start up to see the messages. Also,
the TimeOutError% global variable (see Global Variables in Appendix A) will be set TRUE.
NOTE
These functions and subroutines also support the Model 7002 Switch System. Just send
Model 7001 commands to a Model 7002.
2.1FUNCTION SetupIEEE%(Device%, Address%)
Description
Sets up the speciÞc IEEE-488 interface to correctly handle data transfers between the Models 2001/7001 and
the host PC computer. Also, initializes either the 2001 or 7001 at the speciÞed addresses. CEC controllers will
be at IEEE address 21. IOTech controllers are usually at IEEE address 21. National Instruments controllers
are usually at IEEE address 0.
Parameters
Device%
0Initialize Interface Only
2001Change the IEEE address of the Model 2001 only
7001Change the IEEE address of the Model 7001 only
Address%
0-30if Device% is Model 2001 or 7001
ignoredif Device% is 0
Returns
TRUE (-1) if a TimeOutError occurred or a parameter is OutOfRange.
Global V ariables Affected (see Global Variables Appendix A) :
Before using any of the Model 2001 routines, the following commands must be issued:
11
Ô$INCLUDE:Õ20017001.BIÕ
SetupErr%=SetupIEEE%(0,0)Ô Setup IEEE interface
SetupErr%=SetupIEEE%(2001,16)Ô Setup Model 2001 at IEEE address 16
SetupErr%=SetupIEEE%(7001,7)Ô Setup Model 7001 at IEEE address 7
2.2SUB SendSDC2001
SUB SendSDC7001
Description
Sends the IEEE bus command SDC (Selected Device Clear) to the Model 2001/7001.
Global V ariables Affected (see Global Variables in Appendix A)
TimeOutError%
2.3FUNCTION Q2001$(Cmd$)
FUNCTION Q7001$(Cmd$)
Description
Gets a query response from the Model 2001/7001. Cmd$ must be a valid Model 2001/7001 query or else the
instrument will TimeOut. Multiple queries are allowed, and responses can be separated using the
ParseQuery$ function. If Cmd$=ÓÓ, then the function will still try to read data from the instrument. This
feature is good for reading large amounts of data from the Model 2001/7001 since the most that can be read
at one time is 2048 bytes.
Parameters
Cmd$
Ò Òtry to read the Model 2001/7001
<> Ò Òsend query and try to read Model 2001/7001
Returns
Query response from the Model 2001/7001 if Cmd$ was valid.
ÒError!Ó if Cmd$ not valid (i.e., a timeout error occurred).
12
Global V ariables Affected
TimeOutError%, Resp$
Example
Ô BASIC 7.1 or QB45 setup commands called before here
A$ = Q2001$(ÒVOLT:DC:RANGE?Ó)Ô return DC Voltage Range
2.4SUB Send2001(Cmd$)
SUB Send7001(Cmd$)
Description
Sends IEEE-488.2 and SCPI command strings to the Model 2001/7001.
Parameters
Cmd$Valid Model 2001/7001 488.2 or SCPI command or query.
Returns
Nothing
Must check the Model 2001/7001 EAV bit in the serial poll register to see if a command was accepted, or
look at the front panel of the instrument for an error message.
Global V ariables Affected (see Global Variables in Appendix A)
TimeOutError%, OutOfRange%
Example
Ô BASIC 7.1 or QB45 setup commands called before here
Send7001 ÒROUTE:CLOSE (@1!1:1!40)ÓÔClose channels 1-40 on card 1 of Model 7001
2.5SUB SendGET2001
SUB SendGET7001
Description
Sends the IEEE bus command GET to the Model 2001/7001.
Global V ariables Affected (see Global Variables in Appendix A)
TimeOutError%
Example
Ô BASIC 7.1 or QB45 setup commands called before here
SendGET2001Ô Trigger the Model 2001 to take reading
Reading$ = Q2001$(ÒDATA?Ó)Ô Get Model 2001 reading
13
2.6FUNCTION Wait2001RQS%
FUNCTION Wait7001RQS%
Description
Waits for the Model 2001/7001 to generate a Request for Service. The routine serial polls the Model 2001/
7001 to verify that the instrument is indeed generating a Request for Service. The wait can be aborted by
pressing the Esc key (QuickBASIC 4.5 and BASIC 7.1) or the right mouse button (BASIC 7.1 only).
Returns
FALSE (0) - if aborted.
TRUE (-1) - if a Model 2001/7001 Request for Service.
Example
Ô BASIC 7.1 or QB45 setup commands called before here
Poll% = Poll2001%Ô Clear and pending SRQÕs
SRE2001 MAVÔ Set up to SRQ on MAV
Send2001 ÒFETCH?ÓÔ Fetch a Model 2001 reading
DOÔ Set up an uninterruptable wait
LOOP UNTIL Wait2001RQS%
Reading$ = Q2001$(ÒÒ)Ô Get reading
14
Section 3
Model 2001 Buffer Routines
These routines are used to acquire readings in the Model 2001Õs data buffer. Up to 30,092 readings can be
stored in the Model 2001 with the MEM2 option and the compact format.
All routines will set the Global Variable TimeOutError% if an IEEE-488 Timeout error occurs. Functions that
have bounded parameters (maximum and/or minimum parameters) will set the Global Variable
OutOfRange% if a parameter is not within the limits speciÞed (see Global Variables in Appendix A).
3.1FUNCTION BufferSize2001%
Description
Finds the actual number of data points in the Model 2001 buffer. This function should be used since
TRACe:POINts? may not return the correct number of data points if the data buffer acquisition was aborted.
Returns
The actual number of data points in the Model 2001 buffer (anywhere from 2 to 30,092) depending on the
memory conÞguration of the Model 2001 being used.
Example
Ô BASIC 7.1 or QB45 setup commands called before here NumPoints% = BufferSize2001%
Ô Read Back Readings in double precision DIM BufferData#(1 to NumPoints%)
NumPoints% = Read2001BufferD%(BufferData#(), 0, BUFRDGS)
Sets up and acquires up to 30,092 readings in the Model 2001Õs data buffer. (Use with Read2001BufferS% or
Read2001BufferD% to read data). The data acquisition may be aborted by pressing Esc (QuickBASIC or BASIC 7.1) or by pressing the right mouse button (BASIC 7.1 Only).
Parameters
Func%, (also, see Function Constants, Appendix B)
0 Ñ Current Function
1 Ñ DCV
2 Ñ ACV
15
3 Ñ DCA
4 Ñ ACA
5 Ñ 2-wire Resistance
6 Ñ 4-wire Resistance
7 Ñ Frequency
8 Ñ Temperature
BurstMode%
If TRUE (non-zero), uses the fast Burst Mode of Reading acquisition available from the Model 2001. BurstMode is only applicable if Func% is 1 to 5.
NumDataPoints1%
2 to TRACE:POINTS? MAX (depends on the setting of Compact% and the memory option installed in the
Model 2001).
Compact%
TRUE (non-zero) Ñ use the COMPACT buffer format (readings only).
FALSE (zero) Ñ use the FULL buffer format (reading, time stamp, channel number, status, and units).
NOTE
The COMPACT format allows Þve times as many readings as does FULL. If BurstMode%
is set, only COMPACT format is valid.
Returns
The actual number of data points read from the Model 2001. If zero, then either a TimeOutError occurred
or an OutOfRange error occurred for Func% or NumDataPoints% < 2.
Example
Ô BASIC 7.1 or QB45 setup commands called before here
Ô Take 2000 DC Volt Burst Mode Readings:
NumPoints% = Take2001BufferReadings%(DCV, TRUE, 2000, TRUE)
Ô Read Back data in Single Precision Format:
DIM BufferData!(1 to NumPoints%)
NumPoints%=Read2001BufferS%(BufferData!(), 0, BUFRDGS)
FUNCTION Read2001BufferD% (ArrayName#(), DMA%, Fmt%)
16
Description
Retrieves all of the readings (up to 29,908 IEEE754 single or double precision readings) from the Model
2001Õs data buffer and stores them into a single or double precision array.
Parameters
ArrayName!, ArrayName#
Single or double precision array dimensioned large enough to handle the number of data points returned
by BufferSize2001% or Take2001BufferReadings%.
DMA%
0DonÕt use DMA
1Use DMA (IOTech or National Instruments)
1-7Use DMA channel conÞgured on CEC IEEE-488 Interface card
Fmt%
1Return Readings (FULL or COMPact Format)
2Return TimeStamp (Full Format only)
3Return Channel (Full Format only)
4Return Status (Full Format only)
5Return Units (Full Format only)
Also, see Read2001BufferS% and Read2001BufferD% Constants in Appendix B.
Returns
The actual number of data points transferred to the array. If zero, then either a TimeOutError occurred, an
OutOfRange error occurred, or ArrayName!() or ArrayName#() is dimensioned too small.
Example
Ô BASIC 7.1 or QB45 setup commands called before here
Ô Take 5000 AC Volt Full Format Mode Readings:
NumPoints% = Take2001BufferReadings%(ACV,FALSE,5000,FALSE)
Ô Read Back Readings and TimeStamp in double precision
DIM BufferData#(1 to NumPoints%), Times#(1 to NumPoints%)
NumPoints%=Read2001BufferD%(BufferData#(), 0, BUFRDGS)
NumPoints%=Read2001BufferD%(Times#(), 0, BUFTIMESTAMP)
DataViewD BufferData#(), NumPoints%
17
18
Section 4
General Routines
These routines provide data display, graphing, and data manipulating functions that make the handling of
the returned data from the Models 2001 and 7001 easier to handle.
NOTE
These functions and subroutines also support the Model 7002 Switch System. Just send
Model 7001 commands to a Model 7002.
All functions that have bounded parameters (maximum and/or minimum parameters) will set the Global
Variable OutOfRange% if a parameter is not within the limits speciÞed (see Global Variables in Appendix
A).
4.1FUNCTION ParseQuery$(Quer$, QuerNum%)
Description
Returns the query speciÞed by QuerNum inside Quer$. Queries are separated either by commas or semicolons. Also, leading and trailing spaces are removed.
Parameters
Quer$A string returned by any of the Model 2001/7001 query functions.
QuerNum%The number of the query to retrieve
Returns
ÒError!Ó if Quer$ = ÒÒ,
ÒInvalid Query Number.Ó if QuerNum% <= 0,
QuerNum% query in Quer$, or last query if QuerNum% is too large
Returns a string representation of a double precision number with an E in the exponent instead on a D, if
DoubleNumber# is large or small enough to be displayed in exponential format.
Parameters
DoubleNumber#Any valid double precision number
Returns
Double-precision mantissa, E, then exponent, or;
Double-precision number
Example
Ô BASIC 7.1 or QB45 setup commands called before here
A$ = Str1$(9.9d34) Ô A$ = Ò9.9E+34Ó
4.3FUNCTION IOTECH$(Address%)
Description
Returns a two-digit number string with a leading 0 for use with IOTechÕs IEEE Addressable commands.
Parameters
Address%0 to 30 Returns: Ò00Ó,Ó01Ó,..,Ó09Ó,Ó10Ó,Ó11Ó,..,Ó30Ó
Example
Ô BASIC 7.1 or QB45 setup commands called before here
PRINT #1, ÒOUTPUT Ò+IOTECH$(9)
Produces a simple X and Y auto-scaled graph using single (XYGraphS) or double (XYGraphD) precision data. These routines will plot YArray versus XArray if the size of the two arrays are equal. If they are not the
same, only the YArray is plotted versus its corresponding data point number. Use YStart and YStop to zoom
in on a particular area of the graph. Both the X and Y axes are scalable to the maximum and minimum of
the arrays within the speciÞed YStart and YStop interval.
Parameters
XArray!()Single-precision X-axis data array
XArray#()Double-precision X-axis data array
YArray!()Single-precision Y-axis data array
YArray#()Double-precision Y-axis data array
YStart%First Y data point to plot
YStop%Last Y data point to plot
XTitle$X-axis Title
YTitle$Y-axis Title
Title$Graph Title
UseCGA2%If non-zero, use CGA 640x200 mode so that GRAPHICS.COM can do a screen dump.
MaxMinScale%If non-zero, scale to the minimum and maximum values of the Y-axis data. This has an
effect only if all of the data points are the same sign.
Example
Ô BASIC 7.1 or QB45 setup commands called before here
NumPoints% = Take2001BufferReadings%(ACV,FALSE,5000,FALSE)
DIM BufferData#(1 to NumPoints%), Times#(1 to NumPoints%)
NumPoints%=Read2001BufferS%(BufferData#(), 0, BUFRDGS)
NumPoints%=Read2001BufferD%(Times#(), 0, BUFTIMESTAMP)
Ô Plot AC Voltage vs. Time scaled to AC Data
XYGraphD BufferData#(), Times#(), 1, NumPoints%, ÒTime (sec)Ó, ÒAC Voltage (Vrms)Ó, ÒAC Voltage vs.
TimeÓ, FALSE, TRUE
4.5SUB DataViewS(DataArray!(), NumDataPoints%)
SUB DataViewD(DataArray#(), NumDataPoints%)
Description
Views a single or double precision array, DataArray, NumDataPoints long using PageUp, PageDn, Home,
End, and the Arrow keys. Pressing Esc aborts the data display (QuickBASIC 4.5 and BASIC 7.1) as does
clicking the right mouse button (BASIC 7.1 only).
Parameters
DataArray!()Single precision data array to display
DataArray#()Double precision data array to display
NumDataPoints%Number of data points to display. If zero or more than the number of points actually
in the array, display whole array.
Returns
NumDataPoints% with the maximum number of data points in the array if NumDataPoints% was originally a variable and was 0 or larger than the number of points in the array.
Example
Ô BASIC 7.1 or QB45 setup commands called before here
21
NumPoints% = BufferSize2001%
Ô Read Back Readings in double precision
DIM BufferData#(1 to NumPoints%)
NumPoints% = Read2001BufferD%(BufferData#(), 0, BUFRDGS)
Ô View all Data Buffer Readings
DataViewD BufferData#(), NumPoints%
TRUE (non-zero) Ñ forces Screen Mode 2.
FALSE Ñ Automatically detect highest resolution
NumYPixels% Ñ must be a variable name
NumTextRows% Ñ must be a variable name
Returns
Screen Mode used.
NumYPixels in NumYPixels% if NumYPixels% is a variable.
NumTextRows in NumTextRows% if NumTextRows% is a variable.
Example
Ô BASIC 7.1 or QB45 setup commands called before here
Ô Given: a PC with a VGA monitor
Mode% = AutoGraphicsMode%(NumYPixels%, NumTextRows%, FALSE)
Ô Mode% = 11, NumYPixels% = 480, NumTextRows% = 60
22
Section 5
General Model 2001 / 7001 Routines
The following routines perform some extra functions that are not in the Model 2001/7001 and manipulate
the Model 2001/7001Õs front panel.
NOTE
These functions and subroutines also support the Model 7002 Switch System. Just send
Model 7001 commands to a Model 7002.
All of these routines will set the Global Variable TimeOutError% if an IEEE-488 Timeout Error occurs. Functions that have bounded parameters (maximum and/or minimum parameters) will set the Global Variable
OutOfRange% if a parameter is not within the limits speciÞed (see Global Variables in Appendix A).
5.1SUB Set2001Function(Func%)
Description
Puts the Model 2001 into the speciÞed measurement function.
Parameters
Func%(1-8) see Function Constants, Appendix B.
Example
Ô BASIC 7.1 or QB45 setup commands called before here
Ô All three of the following put the Model 2001 in AC Volts:
Set2001Function ACV
ACV2001
Send2001 ÒFUNC ÔVOLT:ACÕÓ
5.2FUNCTION Get2001Units$(Func%)
Description
Gets the proper Model 2001 units for the function speciÞed.
Parameters
Func%1-8, see Function Constants, Appendix B.
23
Returns
ÒError!Ó if a TimeOutError occurred, or
Func% = 1 (DC Volts): ÒVDC Ò
Func% = 2 (AC Volts):
<5-character string> + <0-4 character string>, where:
<5-character string> = Ò dB Ò, Ò dBm Ò, or ÒVAC Ò
<0-4 character string> = ÒÒ, ÒAvgÓ, ÒPeakÓ, Ò+PkÓ, Ò- PkÓ, or ÒRMSÓ
Func% = 3 (DC Current): ÒADCÓ or ÒADC ICktÓ
Func% = 4 (AC Current): ÒAAC AvgÓ or ÒAAC RMSÓ
Func% = 5 (2-wire Resistance): ÒΩ2WÓ or ÒΩ2W OcmpÓ
Func% = 6 (4-wire Resistance): ÒΩ4WÓ or ÒΩ4W OcmpÓ
Func% = 7 (Frequency): ÒHzÓ
Func% = 8 (Temperature): Ò¡FÓ, Ò¡CÓ, or Ò KÓ
Example
Ô BASIC 7.1 or QB45 setup commands called before here
Send2001 Ò*RSTÓ
Ô AC Voltage with the detector set to RMS will
Ô return ÒVAC RMSÓ
A$ = Get2001Units$(ACV)
5.3FUNCTION Get2001SaveRecallSize%
Description
Finds the number of Model 2001 Save/Recall (*SAV, *RCL) locations available for storing Model 2001 conÞgurations.
Returns
Model 2001 OptionSaveRecallSize
2001
2001/MEM1
2001/MEM2
Example
Ô BASIC 7.1 or QB45 setup commands called before here
Ô Model 2001 with MEM1 option
Ô RecNum% = number of setup location to recall
IF RecNum% < Get2001SaveRecallSize% AND RecNum% >= 0 THEN
Send2001 Ò*RCLÓ + STR$(RecNum%)
ELSE
PRINT ÒRecall Number is too large!Ó
ENDIF
1
5
10
24
5.4FUNCTION Get2001FuncHeader$(Func%)
Description
Returns the proper SENSe subsystem SCPI Header string for the function speciÞed.
Ô BASIC 7.1 or QB45 setup commands called before here
A$ = Get2001FuncHeader$(DCV) Ô A$ = ÒVOLT:DC:Ó
5.5FUNCTION Get2001Func%
Description
Finds the present Model 2001 Function
Returns
The Model 2001 function number from 1 to 8 as speciÞed by the Function Constants, Appendix B.
Example
Ô BASIC 7.1 or QB45 setup commands called before here
DCV2001
Func% = Get2001Func%Ô Put Model 2001 in DC Volts mode
Ô Func% = 1, which is the CONSTant DCV
Checks a given double precision value (CheckVal#) against the given minimum allowed value (MinVal#)
and the maximum allowed value (MaxVal#). It is used internally by the Model 2001/7001 routines to check
parameter ranges.
Parameters
CheckVal#Any double precision value or one of the following constants:
0 Ñ DonÕt check for MINIMUM, MAXIMUM, DEFAULT, or INF
1 Ñ Check for MINIMUM, MAXIMUM, or DEFAULT
2 Ñ Check for MINIMUM, MAXIMUM, DEFAULT, or INF
Associated constants:
CHECKNONE = 0
CHECKMINMAX = 1
CHECKINF = 2
Returns
A null string and sets OutOfRange global variable to TRUE (-1) if CheckVal# is out of range
An ASCII string representation of CheckVal# if in range
ÒMAXÓ, ÒMINÓ, ÒDEFÓ, or ÒINFÓ if CheckVal# is equivalent to one of the constants above.
Example
Ô BASIC 7.1 or QB45 setup commands called before here
Ô Checks for a value to be between 100# an 1000# inclusive
Value$ = Check2001Val$(MINIMUM, 100#, 1000#, CHECKMINMAX)
Ô Value$ = ÒMINÓ
5.7SUB Hit2001Key(HitKey%)
Description
Presses the speciÞed Model 2001 front panel key using SYSTEM:KEY.
Parameters
HitKey%1-23, 26-31 (OutOfRange% set and does nothing otherwise)
26
Loading...
+ 239 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.