QuTech-Delft / QMI

Quantum Measurement Infrastructure
Other
14 stars 4 forks source link

Adding QMI Drivers for Tenma power supplies #65

Closed heevasti closed 9 months ago

heevasti commented 9 months ago

Description =========== Add QMI drivers for the Tenma benchtop power supply models 72-13360 & 72-2550 in QMI. QMI instrument drivers, already working but rough versions can be found here 13360 and 2550. These are expecting for serial transport strings, but should be edited such that also other transport strings, especially (TBD in here) UDP transport can also be used.

There exists already a nice package for controlling Tenma power supplies via serial: https://github.com/kxtells/tenma-serial/blob/master/tenma/tenmaDcLib.py#L798 From this we could adopt the idea of creating a base class Tenma_72Base for our two drivers. In the base class would be defined some class attributes like the max Volt and Amp. We can probably ignore the NCONFS as at the moment there is no requirement to save/load configurations. We can leave the default baudrate attribute for serial implementations. Probably (but not checked) some rpc_methods could be implemented already in the base class, like open(), close() and get_idn(). For the rest check per method if the implementation can be in the base class. If not, line out the method with inputs, outputs and a docstring, but simply return NotImplementedError. The implementations will then be in the "concrete" classes.

Go through the example drivers' code and the pypi code and implement the necessary functions for classes Tenma_722550 and Tenma_7213360 in qmi.instruments.tenma.psu_72 module. Also remember to include description and imports in the __init__.py so that the QMI driver show nice description in the Sphinx-generated documentation as well (see other QMI drivers for examples).

You can also add nice CLI tools for testing.

Affected components


QMI

Modules to be created


qmi/instruments/tenma/psu_72.py

Modules to be modified


N/A

Tests to be created/updated


tests/instruments/tenma/test_psu_72.py

Documentation to be updated


CHANGELOG.md

Hardware


Tenma 72-2550 & 72-13360 can be used for testing and are both available at Hansonlab