Keithley 2002 User Manual page 329

Hide thumbs Also See for 2002:
Table of Contents

Advertisement

Example Programs
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)
Program (fastscan.bas)
CALL Initialize(21, 0)
'--- Setup 2001 measurement mode
DIM k2001data AS STRING * 1500
CLS
CALL SEND(16, "*RST", GPIB.STATUS%)
SLEEP 2
'format readings
CALL SEND(16, ":form:elem read", GPIB.STATUS%)
'dcv config CALL SEND(16, ":sens:func 'VOLT:DC'", GPIB.STATUS%)
CALL SEND(16, ":sens:volt:dc:nplc .01", GPIB.STATUS%)
CALL SEND(16, ":sens:volt:dc:rang 2", GPIB.STATUS%)
'configure scan
CALL SEND(16, ":rout:scan:int (@5,10)", GPIB.STATUS%)
'config trig
CALL SEND(16, ":init:cont off; :abor", GPIB.STATUS%)
CALL SEND(16, ":arm:lay1:sour bus", GPIB.STATUS%)
CALL SEND(16, ":arm:lay2:sour imm", GPIB.STATUS%)
CALL SEND(16, ":trig:sour imm; coun inf", GPIB.STATUS%)
CALL SEND(16, ":init:cont on", GPIB.STATUS%)
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.
' Init as system controller
' Reset 2002
' Return readings only
' Select DCV function
' Select 0.01 plc reading rate
' Select 2V range
' Scan list = chans 5 & 10
' Disable continuous initiation
' and place 2002 in idle
' Set layer 1 to bus source
' Set layer 2 to immediate source
' Set trigger layer to immediate
' source and infinite count
' Take 2002 out of idle

Advertisement

Table of Contents
loading

Table of Contents