Description
===========
Currently, the QMI transport layer does not have specific handling of a GPIB interface. Even though, not anymore commonly used, it is still present in some instrumentation like Tektronix's AWG 5014 model. And currently this interface is used for the AWG at the RT2 setup.
The GPIB device is usually a device that, when controlled through a PC, has an Ethernet, USB or similar interface to connect to the control PC. On some setups, USB/ethernet Prologix GPIB devices are used. The USB connector works on Linux, Mac and Windows and can use a VCP driver on Windows to 'serialize' the connection. Therefore, we can utilize these instruments with the regular serial/USB/tcp transport interfaces.
On the contrary, the National Instrument's GPIB connector although having these and several more interfacing options, the USB connection cannot be used with the present transport implementations. The 'drawback' of the NI GPIB USB connector is that it needs the pyvisa package to be used with SCPI-protocol instruments and works only on Windows. The construction of the string to give to the pyvisa manager is not the same as for USBTMC instruments, which creates the incompatibility.
Proposed addition
When using NI GPIB USB connector on Windows, we need to be able to connect to it using pyvisa. For pyvisa we need to input for target device, which is a string. For this partuclar case, it is in the format "GPIB::X::INSTR" where X is a device number, e.g. 1. We need
a transport parser class GpibTransportDescriptorParser in the transport.py
On this will be added also a try-except and exception handling as appropriate.
property _safe_device and methods write and _read_message can most likely be included the same way they are included in transport_usbtmc_visa.py. It is not clear if the static method list_resources() is needed - evaluate while implementing the class.
close(self) method should also be in like in QMI_UsbTmcTransport class.
On create_transport method in transport.py needs to be added handling for string format "gpib:devicenr[:timeout]". A new elif GpibTransportDescriptorParser.match_interface(...) is needed to return the correct transport class.
Affected components
QMI
Modules to be created
qmi/core/transport_gpib_visa.py
Modules to be modified
qmi/core/transport.py
Tests to be created/updated
tests/core/test_transport.py
tests/core/test_pyvisa_gpib_transport.py
Documentation to be updated
CHANGELOG.md
Sphinx documentation
QMI Confluence page
Hardware
A Windows GPIB-connected instrument with NI's USB-GPIB device.
Description =========== Currently, the QMI transport layer does not have specific handling of a GPIB interface. Even though, not anymore commonly used, it is still present in some instrumentation like Tektronix's AWG 5014 model. And currently this interface is used for the AWG at the RT2 setup.
The GPIB device is usually a device that, when controlled through a PC, has an Ethernet, USB or similar interface to connect to the control PC. On some setups, USB/ethernet Prologix GPIB devices are used. The USB connector works on Linux, Mac and Windows and can use a VCP driver on Windows to 'serialize' the connection. Therefore, we can utilize these instruments with the regular serial/USB/tcp transport interfaces. On the contrary, the National Instrument's GPIB connector although having these and several more interfacing options, the USB connection cannot be used with the present transport implementations. The 'drawback' of the NI GPIB USB connector is that it needs the
pyvisa
package to be used with SCPI-protocol instruments and works only on Windows. The construction of the string to give to thepyvisa
manager is not the same as for USBTMC instruments, which creates the incompatibility.Proposed addition
When using NI GPIB USB connector on Windows, we need to be able to connect to it using
pyvisa
. Forpyvisa
we need to input for target device, which is a string. For this partuclar case, it is in the format "GPIB::X::INSTR" whereX
is a device number, e.g.1
. We needGpibTransportDescriptorParser
in thetransport.py
transport_gpib_visa.py
module that has main classQMI_VisaGpibTransport
which inherits fromQMI_Transport
.devicenr: int
and optional inputtimeout: int = 40000
._open_transport(self)
withtry-except
and exception handling as appropriate._safe_device
and methodswrite
and_read_message
can most likely be included the same way they are included intransport_usbtmc_visa.py
. It is not clear if the static methodlist_resources()
is needed - evaluate while implementing the class.close(self)
method should also be in like inQMI_UsbTmcTransport
class.create_transport
method intransport.py
needs to be added handling for string format "gpib:devicenr[:timeout]". A newelif GpibTransportDescriptorParser.match_interface(...)
is needed to return the correct transport class.Affected components
QMI
Modules to be created
qmi/core/transport_gpib_visa.py
Modules to be modified
qmi/core/transport.py
Tests to be created/updated
tests/core/test_transport.py
tests/core/test_pyvisa_gpib_transport.py
Documentation to be updated
Hardware
A Windows GPIB-connected instrument with NI's USB-GPIB device.