Use correct sense function for sense parameters in Keysight 344xxA driver#6723
Use correct sense function for sense parameters in Keysight 344xxA driver#6723jenshnielsen merged 14 commits intomicrosoft:mainfrom
Conversation
|
@microsoft-github-policy-service agree company="University of Bonn" |
|
@einsmein Could you review this since I think you looked at the 344xx not that long ago |
|
@janekfleper The second option would be ideal. It reflects the instrument interface where we specify measurement types with every sense function. Have you tested this code on the instrument? In that case LGTM |
astafan8
left a comment
There was a problem hiding this comment.
just a tiny correction :)
src/qcodes/instrument_drivers/Keysight/private/Keysight_344xxA_submodules.py
Outdated
Show resolved
Hide resolved
src/qcodes/instrument_drivers/Keysight/private/Keysight_344xxA_submodules.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Mikhail Astafev <astafan8@gmail.com>
|
I have tested the changes on the model 34465A and I would also have the models 34470 and 34411A available for further testing. But since these models are all equally affected by the changes, I don't think it is necessary here. |
Head branch was pushed to by a user without write access
src/qcodes/instrument_drivers/Keysight/private/Keysight_344xxA_submodules.py
Show resolved
Hide resolved
This only includes the six sense functions implemented in the instrument driver. The other sense functions do not all support the parameters NPLC, autorange, autozero, aperture_mode and aperture_time.
Head branch was pushed to by a user without write access
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6723 +/- ##
==========================================
+ Coverage 59.89% 59.91% +0.02%
==========================================
Files 342 342
Lines 31459 31475 +16
==========================================
+ Hits 18841 18857 +16
Misses 12618 12618 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The Keysight344xxA class implements the sense parameters without checking the sense function.
The parameters in the SENSE subsystem have to be handled based on the current sense function. By default the VISA path is always
"SENSe:VOLTage:DC"and the parameters will only get/set the values for the DC voltage measurement. The actual sense function that is currently used by the instrument completely ignored.I was not entirely sure how to implement this. I had the following other ideas how to solve this:
SenseParameterclass that overridesget_raw()andset_raw()to read the sense function just before calling eitherget()orset(), but according to the documentation you cannot use bothget_raw()andget_cmdat the same time. And it would also be overkill since I actually just need a decorator for the methodsget_raw()andset_raw(), I don't need to completely modify them. Is there a way to add such a decorator?Keysight344xxASensefor all the sense parameters to move them from the root instrument toself.sense. I could then override the methodsask()andwrite()in the module to "inject" the correct sense function path just before actually sending the command to the VISA handle.get_cmdandset_cmdand manually callself.ask()andself.write()with the correct commands.The merge request currently implements solution 3 for the parameters
NPLC,autorange,autozero,aperture_modeandaperture_time. The parametersrangeandresolutionare still missing since their validators require some extra work.Are you happy with the current approach or would you prefer one of the other two solutions? Or is there something that I am missing completely that would make the implementation a lot more straight forward?
I am looking forward to your feedback!