pyvisa / pyvisa-py

A pure python PyVISA backend
https://pyvisa-py.readthedocs.io
MIT License
288 stars 124 forks source link

Hislip implementation does not support custom sub addresses #358

Closed alxthm closed 1 year ago

alxthm commented 1 year ago

Hislip support was added with version 6.0 (PR #331), but the current pyvisa-py implementation does not allow custom sub addresses in the resource name: the protocols.hislip.Instrument class is always used with the default hislip0 sub address (see code).

For instance, the following resource names will wait for a response forever during Instrument.initialize:

TCPIP::instrument_host_name::hislip_CHASSIS1_SLOT3,4880::INSTR

or

TCPIP::instrument_host_name::hislip_CHASSIS1_SLOT3::INSTR

I believe this could be fixed by providing the parsed.lan_device_name as a parameter to hislip.Instrument.__init__ and to hislip.Instrument.initialize