viSci Posted August 19, 2009 Report Share Posted August 19, 2009 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. Quote Link to comment
Yair Posted August 19, 2009 Report Share Posted August 19, 2009 Did you try using String to IP followed by IP to String (be sure to set the Dot Notation input to T)? Also, I believe StIP has a right click option to return all the addresses the machine has. Quote Link to comment
viSci Posted August 19, 2009 Author Report Share Posted August 19, 2009 Yes, actually I am doing exactly that. Unfortunately, the alias names returned are identical for the 2 adapters in my PC. Quote Link to comment
Christian_L Posted August 19, 2009 Report Share Posted August 19, 2009 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. Quote Link to comment
Yair Posted August 20, 2009 Report Share Posted August 20, 2009 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). Quote Link to comment
Rolf Kalbermatter Posted August 25, 2009 Report Share Posted August 25, 2009 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.