Хочу сделать управление для осциллографа DSO-X 3034A через usb. Установил pyvisa, pyvisa-py, libvisa0. dmesg показывает, что осциллограф подключен:
[ 1912.431536] usb 3-11.4: new high-speed USB device number 9 using xhci_hcd
[ 1912.522143] usb 3-11.4: New USB device found, idVendor=0957, idProduct=17a4
[ 1912.522144] usb 3-11.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1912.522145] usb 3-11.4: Product: DSO-X 3034A
[ 1912.522146] usb 3-11.4: Manufacturer: Keysight Technologies
[ 1912.522147] usb 3-11.4: SerialNumber: MY53280538
~ python3 -m visa info
...
PyVISA Version: 1.8
Backends:
ni:
Version: 1.8 (bundled with PyVISA)
#1: /usr/lib/x86_64-linux-gnu/libvisa.so.0.0.0:
found by: auto
bitness: 64
Could not get more info:
VI_ERROR_NSUP_ATTR (-1073807331): The specified attribute is not defined or supported by the referenced object.
py:
Version: 0.2
ASRL INSTR:
Please install PySerial to use this resource type.
No module named 'serial'
GPIB INSTR:
Please install linux-gpib to use this resource type.
No module named 'gpib'
USB RAW: Available via PyUSB (1.0.0). Backend: libusb1
USB INSTR: Available via PyUSB (1.0.0). Backend: libusb1
TCPIP INSTR: Available
TCPIP SOCKET: Available
In [7]: rm = visa.ResourceManager()
In [8]: rm.list_resources()
Out[8]: ()
In [9]: rm = visa.ResourceManager('@py')
In [10]: rm.list_resources()
---------------------------------------------------------------------------
VisaIOError Traceback (most recent call last)
<ipython-input-10-a14d33fc6d00> in <module>()
----> 1 rm.list_resources()
/usr/local/lib/python3.4/dist-packages/pyvisa/highlevel.py in list_resources(self, query)
1558 """
1559
-> 1560 return self.visalib.list_resources(self.session, query)
1561
1562 def list_resources_info(self, query='?*::INSTR'):
/usr/local/lib/python3.4/dist-packages/pyvisa-py/highlevel.py in list_resources(self, session, query)
236 return resources
237
--> 238 raise errors.VisaIOError(errors.StatusCode.error_resource_not_found.value)
239
240 def read(self, session, count):
VisaIOError: VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system.