User manual

Example Programs
G-12
Microsoft QuickBASIC 4.5
Any one of the following IEEE-488 interfaces:
Keithley Model KPC-488.2
Keithley Model KPC-488.2AT
Capital Equipment Corporation PC<>488
The program assumes that the Model 2002 is set to address
16.
Loading user library
The user library for QuickBASIC 4.5 is provided with the
IEEE-488 interface (ieeeqb.qlb). Assuming QuickBASIC
and the user library are in the same DOS directory, enter the
following command line from the DOS prompt:
QB /L ieeeqb.qlb
The above command line will load QuickBASIC and the
user library.
Program (fastscan.bas)
CALL Initialize(21, 0) ' Init as system controller
'--- Setup 2001 measurement mode
DIM k2001data AS STRING * 1500
CLS
CALL SEND(16, "*RST", GPIB.STATUS%) ' Reset 2002
SLEEP 2
'format readings
CALL SEND(16, ":form:elem read", GPIB.STATUS%)
' Return readings only
'dcv config CALL SEND(16, ":sens:func 'VOLT:DC'", GPIB.STATUS%)
' Select DCV function
CALL SEND(16, ":sens:volt:dc:nplc .01", GPIB.STATUS%)
' Select 0.01 plc reading rate
CALL SEND(16, ":sens:volt:dc:rang 2", GPIB.STATUS%)
' Select 2V range
'configure scan
CALL SEND(16, ":rout:scan:int (@5,10)", GPIB.STATUS%)
' Scan list = chans 5 & 10
'config trig
CALL SEND(16, ":init:cont off; :abor", GPIB.STATUS%)
' Disable continuous initiation
' and place 2002 in idle
CALL SEND(16, ":arm:lay1:sour bus", GPIB.STATUS%)
' Set layer 1 to bus source
CALL SEND(16, ":arm:lay2:sour imm", GPIB.STATUS%)
' Set layer 2 to immediate source
CALL SEND(16, ":trig:sour imm; coun inf", GPIB.STATUS%)
' Set trigger layer to immediate
' source and infinite count
CALL SEND(16, ":init:cont on", GPIB.STATUS%) ' Take 2002 out of idle
Scan High Speed Channels;
Model 2001-SCAN
Microsoft QuickBASIC 4.5
Keithley KPC-488.2 Interface
©1992, Keithley Instruments, Inc.
Description
This program scans and measures (DCV) the two high speed
channels (ch 5 and 10) of the Model 2001-SCAN Scanner
Card. The 2-channel scan keeps repeating until the buffer of
the Model 2002 is filled. The readings are then sent to the
computer where they are displayed.
Required equipment
Model 2001 Multimeter
Model 2001-SCAN Scanner Card (installed in the
Model 2002)