Closed XaniXxable closed 2 years ago
Just to be sure, you can run your script once just fine, but running it second time fail with a timeout ?
Yeah. I start the scirpt it runs. I start it againg it fails. Every second run it runs into that timeout.
I am trying to fix some issues with USB resource related to how we initialize the communication in https://github.com/pyvisa/pyvisa-py/issues/336
In your case maybe there are also some issues with closing the connection but could you try running with that branch to see if it helps.
Yeah I can check that, this can take a while since I have to install it on the pi offline.
Thanks (the PR touches a single file so you can probably just copy this one over: usbtmc.py)
Sorry for the late response. Your fix helped so far. I tested it know multiple times and it worked fine! :)
Great thanks for testing !!!
Hi, I do have a problem with my connection to the instrument. I can establish a connection, but after closing it and reopen it again it will fail with
pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.
. Running the program again will work again, but after that fail again....I already tried with different version, the version below is the installed version, I also tried it with the latest one. Got the same effect there as well.
Instrument details
Output of
pyvisa-info
old versionThis I installed in a venv, to not mess with my dependencies. Output of
pyvisa-info
latestHere is my code I used to recreate the problem:
And here is the full traceback: