Skip to content

Commit

Permalink
Merge pull request #6889 from panasee/oxford-ips-driver-new-parameters
Browse files Browse the repository at this point in the history
Oxford ips driver new parameters
  • Loading branch information
astafan8 authored Feb 21, 2025
2 parents f915c1d + 05b40f1 commit 799b174
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/changes/newsfragments/6889.improved_driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Added several parameters into the oxford MercuryiPS driver,
enabling the control of the heaters and the sensing of internal temperatures
(magnet, PT1, and PT2 stage of cryogenic system).
Added `heater_switch` parameter to manage the heater switch status and settings.
The heater switch control is bound to each WorkerPS, accepting "ON" and "OFF" as inputs.
Added `magnet_temp`, `pt1_temp`, and `pt2_temp` parameters for reading temperatures
from different sensors, utilizing the new `_temp_parser` function.
Currently, the addresses of temperature sensors are written statically in the driver.
54 changes: 54 additions & 0 deletions src/qcodes/instrument_drivers/oxford/MercuryiPS_VISA.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ def _signal_parser(our_scaling: float, response: str) -> float:
return float(digits) * their_scaling * our_scaling


def _temp_parser(response: str) -> float:
"""
Parse a response string into a correct SI temperature value.
Args:
response: What comes back from instrument.ask
"""
return float(response.split(":")[-1][:-1])


class OxfordMercuryWorkerPS(InstrumentChannel):
"""
Class to hold a worker power supply for the Oxford MercuryiPS
Expand Down Expand Up @@ -102,6 +113,15 @@ def __init__(
else:
self.psu_string = "PSU"

self.heater_switch: Parameter = self.add_parameter(
"heater_switch",
label="Heater switch status/set",
get_cmd=partial(self._param_getter, "SIG:SWHT"),
set_cmd=partial(self._param_setter, "SIG:SWHT"),
get_parser=_response_preparser,
)
"""Parameter heater switch"""

self.voltage: Parameter = self.add_parameter(
"voltage",
label="Output voltage",
Expand Down Expand Up @@ -339,6 +359,40 @@ def __init__(
x=self.GRPX.field(), y=self.GRPY.field(), z=self.GRPZ.field()
)

self._magnet_temp_addr = "DEV:MB1.T1:TEMP"
self._pt1_temp_addr = "DEV:DB8.T1:TEMP"
self._pt2_temp_addr = "DEV:DB7.T1:TEMP"

self.magnet_temp: Parameter = self.add_parameter(
name="magnet_temp",
label="Magnet Temperature",
unit="K",
docstring="Temperature of the magnet sensor",
get_cmd="READ:" + self._magnet_temp_addr + ":SIG:TEMP?",
get_parser=_temp_parser,
)
"""Parameter magnet temperature"""

self.pt1_temp: Parameter = self.add_parameter(
name="pt1_temp",
label="pt1 Temperature",
unit="K",
docstring="Temperature of the pt1",
get_cmd="READ:" + self._pt1_temp_addr + ":SIG:TEMP?",
get_parser=_temp_parser,
)
"""Parameter pt1 temperature"""

self.pt2_temp: Parameter = self.add_parameter(
name="pt2_temp",
label="pt2 Temperature",
unit="K",
docstring="Temperature of the pt2",
get_cmd="READ:" + self._pt2_temp_addr + ":SIG:TEMP?",
get_parser=_temp_parser,
)
"""Parameter pt2 temperature"""

for coord, unit in zip(
["x", "y", "z", "r", "theta", "phi", "rho"],
["T", "T", "T", "T", "degrees", "degrees", "T"],
Expand Down

0 comments on commit 799b174

Please sign in to comment.