Skip to content
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

Prologix support for both USB and ethernet versions #484

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

bobmcnamara
Copy link
Contributor

Support added for Prologix GPIB adapters, both USB and ethernet. Examples of usage:

import pyvisa
rm = pyvisa.ResourceManager()
prlgx = rm.open_resource("PRLGX-TCPIP::169.254.1.80::INTFC")
instr = rm.open_resource("GPIB::17::INSTR")
instr.query("*IDN?")

Or for USB version:

import pyvisa
rm = pyvisa.ResourceManager()
prlgx = rm.open_resource("PRLGX-ASRL::/dev/cu.usbserialXXX::INTFC")
instr = rm.open_resource("GPIB::17::INSTR")
instr.query("*IDN?")

  • [n/a] Closes # (insert issue number if relevant)
  • Executed ruff check . && ruff format -c . --check with no errors
  • [ToDo] The change is fully covered by automated unit tests
  • [ToDo] Documented in docs/ as appropriate
  • Added an entry to the CHANGES file

@MatthieuDartiailh
Copy link
Member

Thanks for the PR. I will do my best to review it by early next week.

Copy link
Member

@MatthieuDartiailh MatthieuDartiailh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a bunch of minor stylistic comments.

However I think there is one more serious issue related to thread safety that need to be addressed. When setting the gpib_addr of the interface we need to be sure that no thread will modify it before the interface is done doing the job we need it to do.

CHANGES Outdated Show resolved Hide resolved
pyvisa_py/gpib.py Outdated Show resolved Hide resolved
pyvisa_py/gpib.py Outdated Show resolved Hide resolved
pyvisa_py/gpib.py Outdated Show resolved Hide resolved
pyvisa_py/gpib.py Outdated Show resolved Hide resolved
pyvisa_py/prologix.py Outdated Show resolved Hide resolved
pyvisa_py/prologix.py Outdated Show resolved Hide resolved
pyvisa_py/prologix.py Outdated Show resolved Hide resolved
pyvisa_py/prologix.py Outdated Show resolved Hide resolved
pyvisa_py/prologix.py Outdated Show resolved Hide resolved
bobmcnamara and others added 9 commits January 29, 2025 10:00
Co-authored-by: Matthieu Dartiailh <[email protected]>
Co-authored-by: Matthieu Dartiailh <[email protected]>
Co-authored-by: Matthieu Dartiailh <[email protected]>
Co-authored-by: Matthieu Dartiailh <[email protected]>
Co-authored-by: Matthieu Dartiailh <[email protected]>
Co-authored-by: Matthieu Dartiailh <[email protected]>
Co-authored-by: Matthieu Dartiailh <[email protected]>
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.

2 participants