QCoDeS Example with Tektronix Keithley Digital Multimeter DMM6500

Initialization and Connection

The Keithley digital multimeter DMM6500 for the measurement of voltage, current, and resistance, amongst others. The driver implements the measurement of DC voltage and current, as well as the measurement of a resistance via 2- or 4-wire measurement.

[1]:
import qcodes as qc
import qcodes_contrib_drivers.drivers.Tektronix.Keithley_6500 as dmm6500

Create the instrument (in this case a DMM6500 connected via USB). If a scanner card is inserted, it will be detected.

[3]:
dmm = dmm6500.Keithley_6500('dmm_1','TCPIP0::192.168.1.12::inst0::INSTR')
Connected to: KEITHLEY INSTRUMENTS DMM6500 (serial:04438044, firmware:1.0.04b) in 0.07s
Scanner card 2000-SCAN detected.

Performing simple measurements

The different senses (DC voltage, DC current, 2 wire resistance, 4 wire resistance) are implemented as channels. For measuring the resistance via a two wire measurement enter:

[6]:
dmm.res.measure.get()
[6]:
5799.959

The commands for the different measurable quantities are: - dmm.res.measure.get(): 2 wire resistance - dmm.fres.measure.get(): 4 wire resistance - dmm.volt.measure.get(): DC voltage - dmm.curr.measure.get(): DC current

Alternatively the measurable quantities can be accessd directly via one of the following commands: - dmm.resistance.get(): 2 wire resistance - dmm.resistance_4w.get(): 4 wire resistance - dmm.voltage_dc.get(): DC voltage - dmm.current_dc.get(): DC current For instance, the resistance via a two wire measurement can be measured with the following command:

[7]:
dmm.resistance.get()
[7]:
5793.865

Querying the active terminal

The DMM6500 has a front and a rear terminal. The active terminal can only be switched via a knob on the front panel of the multimeter. The currently active terminal can be queried via:

[8]:
dmm.active_terminal.get()
[8]:
'FRON'

If the rear terminal is active, the same command returns:

[9]:
dmm.active_terminal.get()
[9]:
'REAR'

Using the 2000-SCAN scanning card

The 2000-SCAN scanning card allows to measure up to 10 channels via the rear terminal. To measure e.g. the resistance via channel 1, use:

[10]:
dmm.ch1.resistance.get()
[10]:
5798.519

Checking the active terminal

If the wrong terminal is active, an error is raised:

[11]:
dmm.ch1.resistance.get()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-11-7c3ed5015dc0> in <module>
----> 1 dmm.ch1.resistance.get()

c:\users\frequency conversion\appdata\local\programs\python\python38\lib\site-packages\qcodes\instrument\parameter.py in get_wrapper(*args, **kwargs)
    583             except Exception as e:
    584                 e.args = e.args + ('getting {}'.format(self),)
--> 585                 raise e
    586
    587         return get_wrapper

c:\users\frequency conversion\appdata\local\programs\python\python38\lib\site-packages\qcodes\instrument\parameter.py in get_wrapper(*args, **kwargs)
    570             try:
    571                 # There might be cases where a .get also has args/kwargs
--> 572                 raw_value = get_function(*args, **kwargs)
    573
    574                 value = self._from_raw_value_to_value(raw_value)

c:\users\frequency conversion\appdata\local\programs\python\python38\lib\site-packages\qcodes\utils\command.py in __call__(self, *args)
    176             raise TypeError(
    177                 'command takes exactly {} args'.format(self.arg_count))
--> 178         return self.exec_function(*args)

c:\users\frequency conversion\documents\code\qcodes_contrib_drivers\qcodes_contrib_drivers\drivers\Tektronix\Keithley_2000_Scan.py in _measure(self, quantity)
     63             return self.ask("READ?")
     64         else:
---> 65             raise RuntimeError("Front terminal is active instead of rear terminal.")

RuntimeError: ('Front terminal is active instead of rear terminal.', 'getting dmm-1_ch1_resistance')
[12]:
dmm.resistance.get()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-12-84d4b9528614> in <module>
----> 1 dmm.resistance.get()

c:\users\frequency conversion\appdata\local\programs\python\python38\lib\site-packages\qcodes\instrument\parameter.py in get_wrapper(*args, **kwargs)
    583             except Exception as e:
    584                 e.args = e.args + ('getting {}'.format(self),)
--> 585                 raise e
    586
    587         return get_wrapper

c:\users\frequency conversion\appdata\local\programs\python\python38\lib\site-packages\qcodes\instrument\parameter.py in get_wrapper(*args, **kwargs)
    570             try:
    571                 # There might be cases where a .get also has args/kwargs
--> 572                 raw_value = get_function(*args, **kwargs)
    573
    574                 value = self._from_raw_value_to_value(raw_value)

c:\users\frequency conversion\appdata\local\programs\python\python38\lib\site-packages\qcodes\utils\command.py in __call__(self, *args)
    176             raise TypeError(
    177                 'command takes exactly {} args'.format(self.arg_count))
--> 178         return self.exec_function(*args)

c:\users\frequency conversion\documents\code\qcodes_contrib_drivers\qcodes_contrib_drivers\drivers\Tektronix\Keithley_6500.py in _measure(self, quantity)
    152             return self.ask(f"MEAS:{quantity}?")
    153         else:
--> 154             raise RuntimeError("Rear terminal is active instead of front terminal.")

RuntimeError: ('Rear terminal is active instead of front terminal.', 'getting dmm-1_resistance')