Skip to content

Commit

Permalink
Added temperature measurement to DMM6500
Browse files Browse the repository at this point in the history
  • Loading branch information
mtiggelman committed May 16, 2022
1 parent 78839ee commit de7422c
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions qcodes_contrib_drivers/drivers/Tektronix/Keithley_6500.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, parent: VisaInstrument, name: str, channel: str) -> None:
name: Channel name (e.g. 'CH1')
channel: Name of the quantity to measure (e.g. 'VOLT' for DC voltage measurement)
"""
valid_channels = ['VOLT', 'CURR', 'RES', 'FRES']
valid_channels = ['VOLT', 'CURR', 'RES', 'FRES', 'TEMP']
if channel.upper() not in valid_channels:
raise ValueError(f"Channel must be one of the following: {', '.join(valid_channels)}")
super().__init__(parent, name)
Expand All @@ -27,7 +27,7 @@ def __init__(self, parent: VisaInstrument, name: str, channel: str) -> None:
label=partial(self._get_label, channel),
get_parser=float,
get_cmd=partial(self.parent._measure, channel),
docstring="Measure value of chosen quantity (Current/Voltage/Resistance)."
docstring="Measure value of chosen quantity (Current/Voltage/Resistance/Temperature)."
)

self.add_parameter('nplc',
Expand All @@ -49,7 +49,7 @@ def _get_unit(quantity: str) -> str:
Returns: Corresponding unit string
"""
channel_units = {'VOLT': 'V', 'CURR': 'A', 'RES': 'Ohm', 'FRES': 'Ohm'}
channel_units = {'VOLT': 'V', 'CURR': 'A', 'RES': 'Ohm', 'FRES': 'Ohm', 'TEMP': 'C'}
return channel_units[quantity]

@staticmethod
Expand All @@ -65,7 +65,8 @@ def _get_label(quantity: str) -> str:
channel_labels = {'VOLT': 'Measured voltage.',
'CURR': 'Measured current.',
'RES': 'Measured resistance',
'FRES': 'Measured resistance (4w)'}
'FRES': 'Measured resistance (4w)',
'TEMP': 'Measured temperature'}
return channel_labels[quantity]


Expand All @@ -86,7 +87,7 @@ def __init__(self, name: str,
**kwargs: Keyword arguments to pass to __init__ function of VisaInstrument class
"""
super().__init__(name, address, terminator=terminator, **kwargs)
for quantity in ['VOLT', 'CURR', 'RES', 'FRES']:
for quantity in ['VOLT', 'CURR', 'RES', 'FRES', 'TEMP']:
channel = Keithley_Sense(self, quantity.lower(), quantity)
self.add_submodule(quantity.lower(), channel)

Expand Down Expand Up @@ -123,6 +124,13 @@ def __init__(self, name: str,
get_cmd=partial(self._measure, 'CURR')
)

self.add_parameter('temperature',
unit='C',
label='Measured temperature',
get_parser=float,
get_cmd=partial(self._measure, 'TEMP')
)

self.connect_message()

# check if scanner card is connected
Expand Down

0 comments on commit de7422c

Please sign in to comment.