Example Programs
G-14
Measure High Speed Channels;
Model 2001-SCAN
Microsoft QuickBASIC 4.5
Keithley KPC-488.2 Interface
©1992, Keithley Instruments, Inc.
Description
This program measures (DCV) the two high speed channels
(ch 5 and 10) of the Model 2001-SCAN Scanner Card. Each
channel is measured five times for a total of 10 measure-
ments. The DCV reading and the elapsed time for each mea-
surement are displayed on the computer CRT.
Required equipment
• Model 2002 Multimeter
• Model 2001-SCAN Scanner Card (installed in the
Model 2002)
• 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 (scan2001.bas)
'$INCLUDE: 'ieeeqb.bi'
CLS
CALL initialize(21, 0)
DIM k2002data AS STRING * 20
CALL send(16, "*RST; :init:cont off; :abor", gpib.status%)
' Disable continuous initiation
' and put 2002 in idle.
CALL send(16, ":trig:sour bus; coun 10", gpib.status%)
' Set trigger layer source to BUS
' and count to 10.
CALL send(16, ":sens:func 'Volt:DC'", gpib.status%)
' Select DCV function
CALL send(16, ":sens:volt:dc:nplc .01", gpib.status%)
' Set reading rate to 0.01 nplc
CALL send(16, ":form:elem read,chan", gpib.status%)
' Include reading and channel
' number in data string
CALL send(16, ":sens:volt:dc:aver:stat 0", gpib.status%)
' Disable filter
CALL send(16, ":init:cont on", gpib.statsu%)
' Take 2002 out of idle
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: ......