From 19be882ef214f0dbfbfd8b1f12bb0db091afcdd0 Mon Sep 17 00:00:00 2001 From: Adam Verner <34060105+AdamVerner@users.noreply.github.com> Date: Fri, 17 Feb 2023 13:50:17 +0100 Subject: [PATCH 1/5] add support for QL355TP --- qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py b/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py index f823caa6472..7966c0d30b4 100644 --- a/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py +++ b/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py @@ -233,6 +233,7 @@ def __init__(self, name: str, address: str, **kwargs: Any) -> None: "PL601-P": 1, "PL303QMD-P": 2, "PL303QMT-P": 3, + "QL355TP": 3, } if (_model not in _numOutputChannels.keys()) or (_model is None): From 8577033fc622a122b38b80830ba251d8146df2b2 Mon Sep 17 00:00:00 2001 From: Adam Verner <34060105+AdamVerner@users.noreply.github.com> Date: Fri, 17 Feb 2023 13:53:42 +0100 Subject: [PATCH 2/5] Move _numOutputChannels out of init --- .../instrument_drivers/AimTTi/_AimTTi_PL_P.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py b/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py index 7966c0d30b4..a1e7146a043 100644 --- a/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py +++ b/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py @@ -213,6 +213,16 @@ class AimTTi(VisaInstrument): This is the QCoDeS driver for the Aim TTi PL-P series power supply. Tested with Aim TTi PL601-P equipped with a single output channel. """ + + _numOutputChannels = { + "PL068-P": 1, + "PL155-P": 1, + "PL303-P": 1, + "PL601-P": 1, + "PL303QMD-P": 2, + "PL303QMT-P": 3, + "QL355TP": 3, + } def __init__(self, name: str, address: str, **kwargs: Any) -> None: """ @@ -226,20 +236,10 @@ def __init__(self, name: str, address: str, **kwargs: Any) -> None: _model = self.get_idn()["model"] - _numOutputChannels = { - "PL068-P": 1, - "PL155-P": 1, - "PL303-P": 1, - "PL601-P": 1, - "PL303QMD-P": 2, - "PL303QMT-P": 3, - "QL355TP": 3, - } - - if (_model not in _numOutputChannels.keys()) or (_model is None): + if (_model not in self._numOutputChannels.keys()) or (_model is None): raise NotKnownModel("Unknown model, connection cannot be " "established.") - self.numOfChannels = _numOutputChannels[_model] + self.numOfChannels = self._numOutputChannels[_model] for i in range(1, self.numOfChannels + 1): channel = AimTTiChannel(self, f"ch{i}", i) channels.append(channel) From a090a79683f105388a00c7752baa48668f1966b2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 17 Feb 2023 12:58:17 +0000 Subject: [PATCH 3/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py b/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py index a1e7146a043..55a4637544a 100644 --- a/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py +++ b/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py @@ -213,7 +213,7 @@ class AimTTi(VisaInstrument): This is the QCoDeS driver for the Aim TTi PL-P series power supply. Tested with Aim TTi PL601-P equipped with a single output channel. """ - + _numOutputChannels = { "PL068-P": 1, "PL155-P": 1, From a6e7f3b0ab420fd240852c6b2e2588cb3bc62457 Mon Sep 17 00:00:00 2001 From: Adam Verner Date: Sun, 19 Feb 2023 16:29:16 +0100 Subject: [PATCH 4/5] add separate class for driver --- qcodes/instrument_drivers/AimTTi/Aim_TTi_QL355_TP.py | 9 +++++++++ qcodes/instrument_drivers/AimTTi/__init__.py | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 qcodes/instrument_drivers/AimTTi/Aim_TTi_QL355_TP.py diff --git a/qcodes/instrument_drivers/AimTTi/Aim_TTi_QL355_TP.py b/qcodes/instrument_drivers/AimTTi/Aim_TTi_QL355_TP.py new file mode 100644 index 00000000000..e60573eec11 --- /dev/null +++ b/qcodes/instrument_drivers/AimTTi/Aim_TTi_QL355_TP.py @@ -0,0 +1,9 @@ +from ._AimTTi_PL_P import AimTTi + + +class AimTTiQL355TP(AimTTi): + """ + This is the QCoDeS driver for the Aim TTi QL355TP series power supply. + """ + + pass diff --git a/qcodes/instrument_drivers/AimTTi/__init__.py b/qcodes/instrument_drivers/AimTTi/__init__.py index 0e0932d9d0a..ffc6aa1bd86 100644 --- a/qcodes/instrument_drivers/AimTTi/__init__.py +++ b/qcodes/instrument_drivers/AimTTi/__init__.py @@ -5,6 +5,7 @@ from .Aim_TTi_PL303QMD_P import AimTTiPL303QMDP from .Aim_TTi_PL303QMT_P import AimTTiPL303QMTP from .Aim_TTi_PL601_P import AimTTiPL601 +from .Aim_TTi_QL355_TP import AimTTiQL355TP __all__ = [ "AimTTiChannel", @@ -14,5 +15,6 @@ "AimTTiPL303QMDP", "AimTTiPL303QMTP", "AimTTiPL601", + "AimTTiQL355TP", "NotKnownModel", ] From f8caf8cd10df09fff2f99429c6bc2e465ba73327 Mon Sep 17 00:00:00 2001 From: Adam Verner Date: Sun, 19 Feb 2023 16:29:41 +0100 Subject: [PATCH 5/5] add doc fragment --- docs/changes/newsfragments/5021.improved_driver | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 docs/changes/newsfragments/5021.improved_driver diff --git a/docs/changes/newsfragments/5021.improved_driver b/docs/changes/newsfragments/5021.improved_driver new file mode 100644 index 00000000000..2a43e5c6cce --- /dev/null +++ b/docs/changes/newsfragments/5021.improved_driver @@ -0,0 +1,2 @@ +Added support for AimTTi QL355TP power supply. +Moved _numOutputChannels lookup table to the class body.