Closed vDorst closed 11 months ago
That's an odd one indeed. Ideally I would like to see how commercial VISA implementation handle the issue. Keysight offers VISA for Linux but only for specific kernel versions. Otherwise if you have access to a Windows machine you can go with whatever implementation you like. I would really like this data point because according to the VISA specification the serial number is a mandatory field of the address. Maybe we are just reading the serial wrong, your lsusb seem to think the serial number is 3.
It is a cheap clone. Even info screen shows that the serial number has no value. So I think they forgot it to program it!
We also have a real SIGLENT Technologies function generator which works fine because it reports an serial number.
Bus 005 Device 006: ID f4ed:ee3a Shenzhen Siglent Co., Ltd. SDG1010 Waveform Generator (TMC mode)
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0xf4ed Shenzhen Siglent Co., Ltd.
idProduct 0xee3a SDG1010 Waveform Generator (TMC mode)
bcdDevice 2.00
iManufacturer 1 SIGLENT Technologies Co,. Ltd.
iProduct 2 SDG1010
iSerial 3 SDG100E<snip; 5 numbers>
bNumConfigurations 1
Resouce list: ('ASRL/dev/ttyS0::INSTR', 'ASRL/dev/ttyUSB1::INSTR', 'USB0::62701::60986::SDG100E<snip; 5 numbers>::0::INSTR')
IDN request: *IDN SDG,SDG1010,SDG100E<snip; 5 numbers>,1.01.01.37R3,02-00-00-23-26
I there an other way to open a device just based on USBID? Otherwise I have to stick to older https://github.com/python-ivi/python-usbtmc library.\
In python-usbtmc I use it like this:
import usbtmc
instr = usbtmc.Instrument(2391, 5973)
I was exploring your library because it is maintained. I also don't need the features of VISA. I currently send raw command already.
Sorry but I currently haven't the time to testing the Keysight VISA software in Windows.
It is fine to close this issue. I understand that you not going to chang the code for just one faulty device.
The USBTMC norm requires the instrument to report a serial number. However RAW USB instrument that are technically supported only by NI can omit it. And NI VISA will report something similar to N/A but it does not appear to be normalized.
As a consequence I would likely accept a PR doing the following:
However note that if you do not need any VISA functionality you could also consider simply using libusb directly. Sorry for the delay I started answering on my phone but lost the message and though I had commented.
I have a cheap
Siglent Technologies SDG1032X
clone akaALP1005
But pyvisa connect string looks like
USB0::62701::60986::::0::INSTR
Python code and backtrace.
lsusb output:
Instrument details
Siglent Technologies SDG1032X
clone akaALP1005
Output of
pyvisa-info
I patched the code to make it work. Is is not an elegant solution but it works.
python script
output