Closed wscode99 closed 4 years ago
@itayperl have you observed the same since you are the most recent contributor to that backend ?
Hi @wscode99, can you confirm whether you're running the latest pyvisa-py master?
@MatthieuDartiailh, not after adding REN support. Such timeouts were exactly the behavior I was seeing before making my changes.
Thanks @itayperl I misremembered your issue then (I though it was a complete communication failure). So running pyvisa-py master with pyvisa master sounds good.
I updated pyvisa to master: PyVISA (1.10.2.dev146+g124c46b), but unable to update pyvisa-py.
When run:> pip3 install git+https://github.com/pyvisa/pyvisa-py.git#egg=pyvisa-py Get following error: Could not find a version that satisfies the requirement pyvisa>1.10.1 (from pyvisa-py) (from versions: 1.3, 1.4, 1.5, 1.6, 1.6.1, 1.6.2, 1.6.3, 1.7, 1.8, 1.9.0, 1.9.1, 1.10.0, 1.10.1) No matching distribution found for pyvisa>1.10.1 (from pyvisa-py)
When run:> pip3 install ./Downloads/pyvisa-py-master.zip
Get following error:
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-wq0d_fa7-build/
@wscode99 try to install them both in the same command:
pip install git+https://github.com/pyvisa/pyvisa.git git+https://github.com/pyvisa/pyvisa-py.git
I cannot reproduce locally. Maybe try to upgrade pip.
I was able to update when install both in the same command. Thank you @itayperl But the problem of response time to a query still persists. It is taking "timeout" time duration to return a response. Please help.
Now the pyvisa-info return the following: Machine Details: Platform ID: Linux-5.4.0-42-generic-x86_64-with-Ubuntu-18.04-bionic Processor: x86_64
Python: Implementation: CPython Executable: /usr/bin/python3 Version: 3.6.9 Compiler: GCC 8.4.0 Bits: 64bit Build: Jul 17 2020 12:50:27 (#default) Unicode: UCS4
PyVISA Version: 1.10.2.dev146+g124c46b
Backends: ivi: Version: 1.10.2.dev146+g124c46b (bundled with PyVISA) Binary library: Not found py: Version: 0.4.1.dev45+gf4ef165 ASRL INSTR: Available via PySerial (3.4) USB INSTR: Available via PyUSB (1.0.2). Backend: libusb1 USB RAW: Available via PyUSB (1.0.2). Backend: libusb1 TCPIP INSTR: Available TCPIP SOCKET: Available GPIB INSTR: Please install linux-gpib (Linux) or gpib-ctypes (Windows, Linux) to use this resource type. Note that installing gpib-ctypes will give you access to a broader range of funcionality. No module named 'gpib'
Thanks @itayperl I misremembered your issue then (I though it was a complete communication failure). So running pyvisa-py master with pyvisa master sounds good.
Er, sorry, my bad, it was a complete failure in my case without REN control. I failed to notice that the commands did return a valid response here after the timeout. So this must be a different issue.
@itayperl are you able to reproduce @wscode99 issue ?
No, I'm not. The issue is probably specific to the device type/class/manufacturer @wscode99 is using. The only USBTMC device I have right now is a Thorlabs PM101 and it works flawlessly so far on the latest master.
Hi @MatthieuDartiailh and @itayperl, I figured out that this problem occurs when pyvisa-py is installed on Linux VM machine (using Virtualbox) where the machine OS is Windows. When pyvisa-py is installed on machine with Linux, then it works as expected! You can close this ticket
Thanks for the feedback @wscode99 ! I will keep open till I add a note about this in the FAQ for future reference.
When connecting to an instrument via USB, the response time to a query is taking "timeout" time duration and not when the response is available by instrument.
For example:
The expected behavior is that query should return immediately when the instrument put the answer in output buffer and should not be affected by timeout settings, unless the timeout time is not long enough to the instrument answer to query.
Output of
pyvisa-info
pyvisa-info Machine Details: Platform ID: Linux-5.3.0-62-generic-x86_64-with-Ubuntu-18.04-bionic Processor: x86_64Python: Implementation: CPython Executable: /usr/bin/python3 Version: 3.6.9 Compiler: GCC 8.4.0 Bits: 64bit Build: Apr 18 2020 01:56:04 (#default) Unicode: UCS4
PyVISA Version: 1.10.1
Backends: ni: Version: 1.10.1 (bundled with PyVISA) Binary library: Not found py: Version: 0.4.1 ASRL INSTR: Available via PySerial (3.4) USB INSTR: Available via PyUSB (1.0.2). Backend: libusb1 USB RAW: Available via PyUSB (1.0.2). Backend: libusb1 TCPIP INSTR: Available TCPIP SOCKET: Available GPIB INSTR: Please install linux-gpib (Linux) or gpib-ctypes (Windows, Linux) to use this resource type. Note that installing gpib-ctypes will give you access to a broader range of funcionality. No module named 'gpib'