Jump to content

Can the VI Server IP Address be derived?


Recommended Posts

I have a PC that is connected to a mxi based pxi chassis that contains a pxi-6682 GPS timing module.

The pxi-6682 has a ethernet adapter that appears to the PC as a second ethernet adapter card.

The problem is that if I poll labview for a list of adapters by name, both the 6682 and local adapter

have inherited the same name (the network computer name). Thus there does not seem to be a way to

get to the actual adapter names (which are different) allowing me to find the IP address being used

by VI Server. So my question is:

1. Is there a way to find the IP address of the VI Server

2. Is there a way to get the actual assigned name of each ethenet adapter card

Thanks for your help.

Link to comment
Thus there does not seem to be a way to

get to the actual adapter names (which are different) allowing me to find the IP address being used

by VI Server. So my question is:

1. Is there a way to find the IP address of the VI Server

Based on a quick test, I think the answer is both. On my laptop with a wired and wirelesss network interface, LV 8.6.1 opens a VI server on both adapters and I can connect to either one from a remote system.

I tried the following code to determine which adapter was already used by VI Server and it turned out both.

post-3370-125070382803_thumb.png

Link to comment

Unfortunately, the alias names returned are identical for the 2 adapters in my PC.

That's because the function returns the machine alias in the network, not the adapter name. The adapter name itself has no real meaning.

I'm not sure what you're actually trying to do, but I am fairly sure that LabVIEW doesn't open the VI server on any NIC. It just reserves the port you requested and the OS forms the connection based on the requests it gets.

Let's say you have two addresses on your PC - 1.1.1.1 and 2.2.2.2 and your VI server port is 3363.

I'm pretty sure that anyone can use either 1.1.1.1:3363 or 2.2.2.2:3363 and both will work, although not at the same time, because once a connection to the port has been opened, you can't connect to that port until it's been released (and possibly for a while after that too).

Link to comment

That's because the function returns the machine alias in the network, not the adapter name. The adapter name itself has no real meaning.

I'm not sure what you're actually trying to do, but I am fairly sure that LabVIEW doesn't open the VI server on any NIC. It just reserves the port you requested and the OS forms the connection based on the requests it gets.

Let's say you have two addresses on your PC - 1.1.1.1 and 2.2.2.2 and your VI server port is 3363.

I'm pretty sure that anyone can use either 1.1.1.1:3363 or 2.2.2.2:3363 and both will work, although not at the same time, because once a connection to the port has been opened, you can't connect to that port until it's been released (and possibly for a while after that too).

Most likely things are a little trickier than that. The Create Listener function has an optional net address input that allows to bind the according listen socket only to a specific network adapter. But leaving that open will bind the listen socket to all network adapters. And this is most likely what the VI server does too. It can't really know which interface you want to use and making that configurable adds yet another setting and makes the VI server configuration more complex. So binding to all interfaces is the most simple approach here.

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.