Keithley 2002 User Manual page 326

Hide thumbs Also See for 2002:
Table of Contents

Advertisement

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.
Program (astream.bas)
'$INCLUDE: 'ieeeqb.bi'
DIM rdg!(1000)
CALL initialize(21, 0)
CALL setoutputEOS(10, 0)
CALL setinputEOS(10)
CALL settimeout(5000)
cmd$ = ":syst:pres"
GOSUB sendcmd
cmd$ = ":init:cont off; :abor"
GOSUB sendcmd
cmd$ = ":syst:azer:stat off"
GOSUB sendcmd
cmd$ = ":init:cont on"
GOSUB sendcmd
cmd$ = ":sens:func 'Volt:DC'"
GOSUB sendcmd
cmd$ = ":sens:volt:dc:dig 4.5; rang:auto off" ' Set for 4.5 Digits
GOSUB sendcmd
cmd$ = ":sens:volt:dc:rang:upp 20"
GOSUB sendcmd
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.
' PC controller at 21
' Set Input EOS to LF
' Set Output EOS to LF
' Set timeout 5 seconds
' Reset 2002
' Stop Trigger Model
' Turn Autozero off
' Start Trigger Model
' Set 2002 for DCV
' Autoranging off
' Set for 20VDC Range
Example Programs
G-9

Advertisement

Table of Contents
loading

Table of Contents