Example Programs
G-9
When the prompt (?) is displayed on the computer CRT,
press Enter to display the 1000 readings.
Required equipment
• Model 2002 Multimeter
• 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 (astream.bas)
'$INCLUDE: 'ieeeqb.bi'
DIM rdg!(1000)
CALL initialize(21, 0)
' PC controller at 21
CALL setoutputEOS(10, 0)
' Set Input EOS to LF
CALL setinputEOS(10)
' Set Output EOS to LF
CALL settimeout(5000)
' Set timeout 5 seconds
cmd$ = ":syst:pres"
' Reset 2002
GOSUB sendcmd
cmd$ = ":init:cont off; :abor"
' Stop Trigger Model
GOSUB sendcmd
cmd$ = ":syst:azer:stat off"
' Turn Autozero off
GOSUB sendcmd
cmd$ = ":init:cont on"
' Start Trigger Model
GOSUB sendcmd
cmd$ = ":sens:func 'Volt:DC'"
' Set 2002 for DCV
GOSUB sendcmd
cmd$ = ":sens:volt:dc:dig 4.5; rang:auto off" ' Set for 4.5 Digits
' Autoranging off
GOSUB sendcmd
cmd$ = ":sens:volt:dc:rang:upp 20"
' Set for 20VDC Range
GOSUB sendcmd
High Speed Data Transfer Over Bus
Microsoft QuickBASIC 4.5
Keithley KPC-488.2 Interface
©1992, Keithley Instruments, Inc.
Description
This program demonstrates how fast the Model 2002 can
make measurements and send them to the computer. Speed
is optimized by configuring the Model 2002 as follows:
Function/Range: 20 VDC
Auto Zero: Off
Autorange: Off
Resolution: 4 1/2 digits
Acquisition Method: ASTREAM
Display: Disabled
This program will take 1000 measurements on the 20VDC
range and send them to the computer. The total elapsed time
(in seconds) to take the readings and send them to the com-
puter is displayed on the computer CRT. The rate (readings
per second) is also calculated and displayed.
Summary of Contents for 2002
Page 123: ...Front Panel Operation 2 106...
Page 145: ...IEEE 488 Reference 3 22...
Page 167: ...IEEE 488 Reference 3 44...
Page 284: ...A Specifications A 1...
Page 362: ......
Page 364: ...This page left blank intentionally...
Page 365: ......