Skip to content

Conversation

@herm
Copy link
Contributor

@herm herm commented Nov 19, 2015

No description provided.

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)

Copy link
Contributor Author

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?

@alexforencich
Copy link
Contributor

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.

@herm
Copy link
Contributor Author

herm commented Jan 7, 2016

I removed the pyvisa import. While I was at it I noticed the really strange exception handling code there and fixed it.

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

@alexforencich
Copy link
Contributor

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.

@SimplicityGuy
Copy link

(Doesn't look like I can reply to @alexforencich previous comment. Indeed, those look GPIB specific. control_ren handles the case that GPIB is over USB, TCP/IP, or directly via GPIB, but that still doesn't make these generic across all VISA types.

Is there anyway to determine if the connection is GPIB or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants