Operation
3-16
The program is written in Microsoft QuickBASIC 4.5 using
the Keithley KPC-488.2 (or Capital Equipment Corporation)
IEEE interface and the HP-style Universal Language Driver
(CECHP). Note that before the program can be run, the
Universal Language Driver must first be installed. To install
the driver, enter cechp at the DOS prompt.
If the CECHP command is in your AUTOEXEC.BAT file,
the driver will automatically be installed each time you turn
on your computer.
■ Open drivers and set terminator
The following program statements are required at the
beginning of the program. They open the driver files and set
the input terminator for CRLF.
OPEN ‘‘ieee’’ FOR OUTPUT AS #1
OPEN ‘‘ieee’’ FOR INPUT AS #2
PRINT #1, ‘‘interm crlf’’
■ Configure temperature measurements
After opening the drivers and setting the terminator, add the
following program statements to configure the Model 2001/
2002 to make Type K thermocouple temperature measure-
ments:
‘Comments
PRINT #1, ‘‘output 16; *rst’’ ‘1
PRINT #1, ‘‘output 16; func ‘temp’’’ ‘2
PRINT #1, ‘‘output 16; temp:tran tc’’ ‘3
PRINT #1, ‘‘output 16; temp:tc:type k’’ ‘4
PRINT #1, ‘‘output 16; unit:temp f’’ ‘5
PRINT #1, ‘‘output 16; temp:rjun:rsel real’’ ‘6
PRINT #1, ‘‘output 16; rout:scan:func ‘7
(@1), ‘rjun1’’’
PRINT #1, ‘‘output 16; rout:scan:func ‘8
(@2:6), ‘temp’’’
PRINT #1, ‘‘output 16; rout:clos (@1)’’ ‘9
PRINT #1, ‘‘output 16; temp:rjun1:acq’’ ‘10
PRINT #1, ‘‘output 16; rout:open:all’’ ‘11
‘Comments
1 Returns the instrument to the *RST default
conditions.
2 Selects the TEMP function.
3 through 5 Configures instrument for type K thermo-
couple temperature measurements using ˚F
units.
6 Selects the REAL reference junction type.
The *RST command (line 1) sets the real
reference junction coefficient to 0.20m V/˚C
and sets the reference offest to 54.63mV @0˚C.
7 and 8 Selects channel 1 for the reference junction
and channels 2 through 6 for temperature
measurements.
9 through 11 Acquires the reference junction temperature
(channel 1).
■ Configure and perform automatic scanning
Add the following statements to the program to configure
and perform two scans of five channels (2 through 6):
‘Comments
PRINT #1, ‘‘output 16; trig:coun 10’’ ‘12
PRINT #1, ‘‘output 16; trig:sour tim’’ ‘13
PRINT #1, ‘‘output 16; trig:tim 0.5’’ ‘14
PRINT #1, ‘‘output 16; rout:scan (@2:6)’’ ‘15
PRINT #1, ‘‘output 16; rout:scan:lsel int’’ ‘16
PRINT #1, ‘‘output 16; trac:poin:auto on’’ ‘17
PRINT #1, ‘‘output 16; trac:feed sens’’ ‘18
PRINT #1, ‘‘output 16; trac:feed:cont next’’ ‘19
PRINT #1, ‘‘output 16; form:elem read, ‘20
chan, unit’’
PRINT #1, ‘‘output 16; init’’ ‘21
PRINT #1, ‘‘output 16; trac:data?’’ ‘22
PRINT #1, ‘‘enter 16’’ ‘23
LINE INPUT #2, A$ ‘24
PRINT A$ ‘25
END