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

ValueError: No device found. #21

Open
mustafacc opened this issue Oct 17, 2021 · 7 comments
Open

ValueError: No device found. #21

mustafacc opened this issue Oct 17, 2021 · 7 comments

Comments

@mustafacc
Copy link

I'm getting a ValueError("No device found.") exception when attempting to connect to the instrument. I'm checking the instrument in the NI Max device manager and it is available and I can communicate with it. Any help would be appreciated!

Operating system: Windows 10 21H2 - 64bit
Python: Python 3.9.5 (anaconda distribution)
Keithley model: Keithley 2604B connected via USB

image

  File "C:\Users\user\Nextcloud\Lab data LC group\MLP01-4060-Scylla\Mustafa\20211015_KeithleyCtrl_py3\example.py", line 9, in <module>
    k = Keithley2600('USB0::0x05E6::0x2604::4371376::INSTR')

  File "C:\ProgramData\Miniconda3\lib\site-packages\keithley2600\keithley_driver.py", line 1684, in __new__
    instance = Keithley2600(*args, **kwargs)

  File "C:\ProgramData\Miniconda3\lib\site-packages\keithley2600\keithley_driver.py", line 842, in __init__
    Keithley2600Base.__init__(

  File "C:\ProgramData\Miniconda3\lib\site-packages\keithley2600\keithley_driver.py", line 567, in __init__
    self.connect(**kwargs)

  File "C:\ProgramData\Miniconda3\lib\site-packages\keithley2600\keithley_driver.py", line 585, in connect
    self.connection = self.rm.open_resource(self.visa_address, **kwargs)

  File "C:\ProgramData\Miniconda3\lib\site-packages\pyvisa\highlevel.py", line 3304, in open_resource
    res.open(access_mode, open_timeout)

  File "C:\ProgramData\Miniconda3\lib\site-packages\pyvisa\resources\resource.py", line 297, in open
    self.session, status = self._resource_manager.open_bare_resource(

  File "C:\ProgramData\Miniconda3\lib\site-packages\pyvisa\highlevel.py", line 3232, in open_bare_resource
    return self.visalib.open(self.session, resource_name, access_mode, open_timeout)

  File "C:\ProgramData\Miniconda3\lib\site-packages\pyvisa_py\highlevel.py", line 167, in open
    sess = cls(session, resource_name, parsed, open_timeout)

  File "C:\ProgramData\Miniconda3\lib\site-packages\pyvisa_py\sessions.py", line 323, in __init__
    self.after_parsing()

  File "C:\ProgramData\Miniconda3\lib\site-packages\pyvisa_py\usb.py", line 81, in after_parsing
    self.interface = self._intf_cls(

  File "C:\ProgramData\Miniconda3\lib\site-packages\pyvisa_py\protocols\usbtmc.py", line 287, in __init__
    super(USBTMC, self).__init__(vendor, product, serial_number, **kwargs)

  File "C:\ProgramData\Miniconda3\lib\site-packages\pyvisa_py\protocols\usbtmc.py", line 199, in __init__
    raise ValueError("No device found.")

ValueError: No device found.

image

@mtorrec
Copy link

mtorrec commented Mar 4, 2022

I am experiencing the same issue, were you finally able to connect to the instrument?

@mustafacc
Copy link
Author

Unfortunately not.

@GuiBBT
Copy link

GuiBBT commented Jul 25, 2022

I have the same issue here with the python version 3.9.15. Seems strange that I'm able to find the instrument with the usb.core.find() but the Keithley driver doesn't find it ...

Anyone figured out how to make connection please ? Spend 2 days on it and still nothing

@GuiBBT
Copy link

GuiBBT commented Jul 25, 2022

from keithley2600 import Keithley2600
import usb.core
import pyvisa
import usb.util

dev = usb.core.find()
print("DEVICE FOUND : VID = " + str(dev.idVendor) + "\t\tPID = " + str(dev.idProduct))

print("\nALL USB DEVICES FOUND")
print(usb.core.show_devices())

pyvisa.ResourceManager('@py')
rm = pyvisa.ResourceManager('@py')
print(rm.list_resources())

k = Keithley2600('USB0::0x05E6::0x2634::4106018::INSTR')

With this code I get :

DEVICE FOUND : VID = 1510 PID = 9780
ALL USB DEVICES FOUND
DEVICE ID 05e6:2634 on Bus 000 Address 001, Specified at interface
('USB0::1510::9780::4106018\x00::0::INSTR',)

After that the code exit itself.
I have to rerun the code in debug mode and launch in the evaluate expression the ligne Keithley2600('USB0::0x05E6::0x2634::4106018::INSTR') to have the error "NoDeviceFound"

@GuiBBT
Copy link

GuiBBT commented Jul 25, 2022

Another comment (maybe a dummy one, sry for that), is that normal that when I use debug into the driver functions, the debug exists itself and doesn't end program ? In other files the debug is working well

@GuiBBT
Copy link

GuiBBT commented Jul 26, 2022

I guess I found at least why I get "NoDeviceFound" Hopefully it will help others ....

The fast is that when I go in the menu of my Keithley 2634B, in communication I get only "RS232", "LAN" and "GPIB". It seems the USB isn't activated on my SMU so ... can't work of course. I don't get why the USB is present and has a controller inside the SMU (driver installation on windows when plugged) but still, I think that's my issue. I'm going to use GPIB when hardware available

@geesk
Copy link

geesk commented Mar 22, 2024

For anyone still looking for way to solve this issue. This worked for me.

k = Keithley2600('USB0::0x05E6::0x2634::4106018::INSTR')
to
k = Keithley2600('USB0::0x05E6::0x2634::4106018::INSTR'. "")

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

4 participants