Programming Examples; Changing Function And Range - Keithley 6514 Instruction Manual

System electrometer
Hide thumbs Also See for 6514:
Table of Contents

Advertisement

E-2
Example Programs

Programming examples

All examples assume QuickBASIC version 4.5 or higher and a CEC IEEE-488 interface card
with CEC driver version 2.11 or higher, with the Model 6514 at address 14 on the IEEE-488 bus.

Changing function and range

The Model 6514 has independent range control for each of its four measurement functions.
This means, for example, that autorange can be turned on for Volts while leaving it off for the
rest of the functions.
Another difference is in the parameter for the range command. The parameter value for the
:RANGe command is given as "the maximum value to measure". The instrument interprets this
parameter and goes to the appropriate range. When you query the range with :RANGe?, the
instrument sends back the full scale value of its present range.
Note that the Model 6514 rounds the range parameter to an integer before choosing the appro-
priate range. Sending VOLTage:RANGe 21.6 will set the Volts function to the 200V range. The
parameter 21.6 is rounded to 22, which exceeds the 20V range.
The following program demonstrates range and function changes. A measurement will be
taken while on the Amps and Ohms function:
' For QuickBASIC 4.5 and CEC PC488 interface card, edit the follow-
ing
' line where the QuickBASIC libraries are on your computer:
' Initialize the CEC interface as address 21:
' Restore RST defaults:
' Set Amps for 20uA range and Ohms for 2MW range:
' Switch to Amps function and take reading. Each READ?
' will trigger one reading:
' Switch to Ohms function and take reading:
'$INCLUDE: 'c:\qb45\ieeeqb.bi'
CALL initialize(21, 0)
CALL SEND(14, "*rst", status%)
CALL SEND(14, "curr:rang 20e-6", status%)
CALL SEND(14, "res:rang 2e6", status%)
CALL SEND(14, "func 'curr'", status%)
CALL SEND(14, "read?", status%)
reading%$ = SPACE$(80)
CALL ENTER(reading$, length%, 14, status%)
PRINT reading$
CALL SEND(14, "func 'res'", status%)
CALL SEND(14, "read?", status%)
reading%$ = SPACE$(80)
CALL ENTER(reading$, length%, 14, status%)
PRINT reading$

Advertisement

Table of Contents
loading

Table of Contents