NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you open multiple VISA sessions to the same IP address

Is it possible to open two different VISA sessions to the same IP address? We are using SOCKET, not INSTR. We come accross this in the case of modular instruments where two devices share the same IP adress. This can also be looked at as if you have two channels and you want to call viOpen() for each.

I think I know the answer because I've tried this and if a session is already open to the device then I get the error VI_ERROR_RSRC_NFOUND returned from viOpen().

Is this a limitation in VISA, Windows, or just sockets in general? Could it be a limitation of the device? Or is it possible and I'm just missing something?

David Clark
Software Design Engineer
C&H Technologies, Inc.
www.chtech.com
0 Kudos
Message 1 of 3
(3,181 Views)
Hello,

I am not sure at what level this is occurring (although I suspect at the VISA level), however, I am looking into this further! Good question; have you attempted to play with the access modes for the open function? Attempting to use No Lock for Shared Lock may allow more flexibility. Give it a shot and I will as well; repost with whatever your results are and we'll compare!

Best Regards,

JLS
Best,
JLS
Sixclear
0 Kudos
Message 2 of 3
(3,164 Views)
Thanks for the reply. I just realized that I posted this on the Teststand board. I meant for it to be posted on the "Instrument Control" (GPIB, Serial, VISA, IVI) board so I would like to move the discussion over there.

http://forums.ni.com/ni/board/message?board.id=140&message.id=9607

I did briefly try to play around with the Access Mode parameter of the open function to no avail. I also tried to connect to a simple TCP server on a PC (using NI's TCP examples for CVI). In this case I could open multiple sessions to the server like I want but I could only use the last opened VISA handle to send a message across. There is plenty more I can try but first I want to what to see if the VISA gurus have any suggestions.

David Clark
0 Kudos
Message 3 of 3
(3,147 Views)