-
Notifications
You must be signed in to change notification settings - Fork 130
Add missing pyvisa functions. #42
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
base: master
Are you sure you want to change the base?
Conversation
ivi/interface/pyvisa.py
Outdated
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.
In the general case of any VISA device, this doesn't seem correct. What if the instrument is an USB or Ethernet, but talks VISA?
(similar concern for line 124)
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.
I was not able to find a more general VISA function for this purpose. Can you point me to one?
|
Yeah, the remote and local calls here do not seem right. Also, why is pyvisa added as an import? pyvisa is generally imported as just visa, and the imported pyvisa does not seem to be used anywhere. |
Conflicts: ivi/interface/pyvisa.py
|
I removed the pyvisa import. While I was at it I noticed the really strange exception handling code there and fixed it. |
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.
I would recommend using the control_ren method instead, as this should be generic enough across different types of VISA connections.
For reference, see ControlRenMixin in https://github.com/hgrecco/pyvisa/blob/898b948ec835f3cac8ee4aaec9317237ad5a31bd/pyvisa/resources/messagebased.py
|
Still seeing stuff that looks GPIB specific. If those calls are guaranteed to not cause issues with USBTMC, VXI11, serial, etc. connections, then maybe they can stay in. Otherwise, there need to be checks so that they only get called for GPIB connections. |
|
(Doesn't look like I can reply to @alexforencich previous comment. Indeed, those look GPIB specific. Is there anyway to determine if the connection is GPIB or not? |
No description provided.