01-08-2019 10:00 AM
Hi everybody
I have a bunch of Keysight E36100 power supplies connected to an 8-port hub connected to a LAN-USB adaptor.
When I'm using the VISA function "Find instruments", it finds all the power supplies and shows them in the form "TCPIP0::192.168.10.2::inst0::INSTR" and so on. However, when I use this VISA string to communicate with the instrument, it does not work. Sometimes VISA open throws an error -1073807194 "connection for the given session has been lost", sometimes VISA write gives the error -1073807298 "Could not perform operation because of I/O error".
I attached the small VI I used for this test.
It seems that the "0" after TCPIP is the problem. If I'm opening the VISA session with "TCPIP::192.168.10.2::inst0::INSTR" everything works.(Set the Manual button and edit the string in "Addr")
However, it gets weirder. Once I used the string without "0" then the string with "0" also works fine (Manual = false again).
What is going on here?
Why can't I immediately use the VISA strings as they come out from "Find instruments"?
What is happening when I use the string without "0"?
I'm using LV2018f2 and VISA 18.5
Thanks
Guenther
Solved! Go to Solution.
01-08-2019 02:09 PM
help for the VISA open will show you the "0" is selecting the board (ethernet port?).
There is a "keep alive" setting available that may help out.
That is all I can offer.
Ben
01-09-2019 01:57 AM
See this.
I had similar issues.
https://forums.ni.com/t5/LabVIEW/VISA-error-with-TCP-IP-BK-precision-2190E/m-p/3876316
Benoit
01-09-2019 08:27 AM
Hi guys
thanks for your input.
@ Ben: When I started this project I thought that the number after TCPIP should designate the interface (similar to GPIB where it works perfectly) and that the LAN-USB adapter should be 1 or at least not 0. But TCPIP1 never worked.
What is a "keep alive" setting and where can I find it?
@ Benoit: the timeout setting at VISA open was the crucial point. I wired a value of 3000ms and now it works with TCPIP0. Thanks!
Best regards
Guenther
01-09-2019 10:36 AM
Just as an FYI, whenever I change something that affects the way a whole system performs, like a timeout, I will read that property first, write the new value, do my thing, then take the output of the read and write it back to the property, just in case there's something downstream that would like the previous value.