ResourceManager.open_resource() does not time out when trying to connect to TCP resource
See original GitHub issueHello, I am passing open_timeout
parameter when connecting to a non-connected device’s resource name like this:
resource_manager.open_resource("TCPIP0::10.0.20.20::inst0::INSTR", open_timeout=100)
so I expect it to throw timeout error after just 100 milliseconds but it waits for about 5 seconds until a VisaIOError is thrown.
PyVisa version: 1.9.1 Visa backend: NI Python version: 3.6 64-bit
What might be the problem?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Problem connecting to TCPIP instrument · Issue #12 · pyvisa ...
I'm trying to connect to my instrument via TCP/IP and I'm running into ... The SOCKET resource class is not implemented yet in...
Read more >Communicating with your instrument - PyVISA - Read the Docs
After importing pyvisa , we create a ResourceManager object. If called without arguments, PyVISA will prefer the default backend (IVI) which tries to...
Read more >What connection string do I use for pyvisa when my TCP ...
Tried ensuring that the newline termination character is sent and upped the timeout to 5 seconds (which did take effect, as it delayed...
Read more >Establishing communication with PyVISA
The resource manager class contains a method that lists the devices it detects that are connected to the computer. The 'print' statement prints...
Read more >Solved: Re: Connection TCP timeout - NXP Community
Using wireshark I have see that my router reject the SYN packet of TCP connection with windows size = 0 and I have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can reproduce. However it seems to be a bad documentation issue on PyVisa side since the VISA specification says (page 85 about viOpen):
Hence in the absence of any lock, this timeout does not have any effect. We need to fix PyVISA documentation and possibly pyvisa-py implementation to conform to this (but this is lower priority).
Closed by #451