-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small improvements to visa backend #4219
Conversation
jenshnielsen
commented
Jun 2, 2022
•
edited
Loading
edited
- Slightly better docs and logging
- Correct the backend name to reflect current pyvisa
- Remove deprecated fallback for visa address with library included
- Let pyvisa figure out the default termination char
Codecov Report
@@ Coverage Diff @@
## master #4219 +/- ##
==========================================
- Coverage 67.02% 66.99% -0.04%
==========================================
Files 233 233
Lines 31525 31517 -8
==========================================
- Hits 21130 21114 -16
- Misses 10395 10403 +8 |
By default. This should not change any thing for most instruments but will set the default terminator to `\r` for rs232 instruments.
@astafan8 Could you have another look. I made a change to not set the visa termination char unless explicitly given to match pyvisa here https://pyvisa.readthedocs.io/en/1.8/resources.html#termination-characters |
seems like the right thing to do. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking changes notes are added, so i think it's good to go
Get value of terminator from visa_handle.read_termination Its not clear if this should be read or write and really we should log both so extend snapshot with explicit read and write terminators
bors merge |
@jenshnielsen @astafan8 Thank you both for incorporating this fix. I made terminator as a default argument in my local 2012 driver. kwargs won't be able to pass it down to visa.py right? I don't see visa.py looking for kwargs to determine terminator. So far I like qcodes being installed and updated on pip. I haven't used it like a repository. So it will take a while for the new version to be pip?
|
It would be nice if you can test the changes before we release a new version so we are sure it works. The value will be passed to the instrument with the current If you do What I would like you to do is.
I suspect that number 2 will work since that should be equivalet to what pyvisa does by default |
Dear Jens @jenshnielsen and Mikhail @astafan8 , TPS2012('tek', 'ASRL5::INSTR', terminator='\n') also works. The line "terminator = None" as default is good. |
Thanks @gztony1227 i will go ahead and close the issue then |