LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA communications with LAN

Solved!
Go to solution

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

Download All
0 Kudos
Message 1 of 5
(3,551 Views)

 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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(3,513 Views)
Solution
Accepted by topic author GuentherS
0 Kudos
Message 3 of 5
(3,495 Views)

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

0 Kudos
Message 4 of 5
(3,478 Views)

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.

Capture.PNG

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 5
(3,464 Views)