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

Interfacing with Python (Pyvisa) requires some work #49

Open
hb020 opened this issue Feb 20, 2025 · 2 comments
Open

Interfacing with Python (Pyvisa) requires some work #49

hb020 opened this issue Feb 20, 2025 · 2 comments

Comments

@hb020
Copy link

hb020 commented Feb 20, 2025

My main automation platform is around pyvisa (plus some custom code for prologix). I guess that goes for a lot of people.
It would be great if this code would be supported by pyvisa as well.

2 issues 'out of the box':

  • pyvisa will not discover the device by itself. What it supports is:
    • VXI-11 portmap (port 111, on UDP or TCP)
    • mDNS discovery of "HiSLIP" (not lxi, and not scpi-raw)
      neither of which are not supported by this firmware.
  • communication with the device requires setting of instrument.read_termination = '\n'

The latter is not an issue, but I'd really like to get discovery working. Am still looking if I can find a bypass via Python. And if that doesn't work, I am willing to see if I can integrate VXI-11 portmap or HiSLIP (which is newer, but I'll probably stick to the synchronous channel only). I have some previous work of the first of those two, but the last shouldn't be too complicated.

Will keep this ticket updated. If in the meantime you find a solution, that would be much appreciated.

Minimal python test code for discovery:

import pyvisa
rm = pyvisa.ResourceManager()  # do a discovery
resources = rm.list_resources(query="?*")  # list all devices found, no matter the type
print(resources)  # which prints nothing right now
@morgendagen
Copy link
Owner

Hi. Some sort of VXI-11 og HiSLIP support would be fantastic. I took a cursory look at it, but for my immediate requirements it was not required.

@hb020
Copy link
Author

hb020 commented Feb 25, 2025

I have the insides of a hislip server, it even handles discovery, but would require a lot more testing and some more code, as it takes 2 simultaneous sockets, and the state engine and the handshaking are rather involved. The coming week I won't have time for it, but I could try to work on that after that. There is some space free in the ROM, so why not. But I'd prefer to take that on in a second phase.

Also, many more devices are VXI-11 compatible than hislip compatible. hislip is complicated, and it shows in the support. Of my 5 more serious ethernet capable devices, all support VXI-11, 3 support both scpi-raw and scpi-telnet, and only 1 supports hislip.

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

No branches or pull requests

2 participants