Conversation
ivi/interface/pyvisa.py
Outdated
There was a problem hiding this comment.
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.
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.
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.