LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Where does Sting to IP get the net address if the computer is disconnected from the net? It should return the same I

P/Net address� it did not change. Internet Protocal(TCP/IP) Properties did not change. When the network is physically disconnected, my VI after several runs returns 127.0.0.1. So, how do I get my IP address whether it�s connected to the network or not?Thanks in advance for your help.
0 Kudos
Message 1 of 6
(3,209 Views)
P/Net address� it did not change. Internet Protocal(TCP/IP) Properties did not change. When the network is physically disconnected, my VI after several runs returns 127.0.0.1. So, how do I get my IP address whether it�s connected to the network or not?If you're getting a dynamically assigned IP address from the network, then String to IP will return that IP but it may not be constant. See if TCP/IP properties are set to "Obtain an IP address automatically". If you disconnect from the network, then the IP address will default to something and I wouldn't be surprised if the default is 127.0.0.1. If you want to always have the same IP, then the ICP/IP properties should be changed to use a fixed IP but you'll certainly need to check with your IS department before doing so.
0 Kudos
Message 2 of 6
(3,209 Views)
P/Net address� it did not change. Internet Protocal(TCP/IP) Properties did not change. When the network is physically disconnected, my VI after several runs returns 127.0.0.1. So, how do I get my IP address whether it�s connected to the network or not?Thanks for the quick response. In my properties it is NOT set for Obtain an IP address automatically. It is set for use the following IP address:-(
0 Kudos
Message 3 of 6
(3,209 Views)
P/Net address� it did not change. Internet Protocal(TCP/IP) Properties did not change. When the network is physically disconnected, my VI after several runs returns 127.0.0.1. So, how do I get my IP address whether it�s connected to the network or not?The only thing I can think of is to set the value yourself. I assume you have the name terminal of the "String to IP" left blank. If you are running with a static IP address that will never change, then why not set that statically in the VI. If you wire string constant with the quad-dotted notation to the string to IP it will accept that value without checking to see if the network cable is connected.
0 Kudos
Message 4 of 6
(3,209 Views)
P/Net address� it did not change. Internet Protocal(TCP/IP) Properties did not change. When the network is physically disconnected, my VI after several runs returns 127.0.0.1. So, how do I get my IP address whether it�s connected to the network or not?Thanks for the input. But...I will be running the same executable on five different computers. The computer will not have a monitor, mouse or keyboard. So I don't want to maintain five versons of the code. And I need to be able to install the code on other computers via the network as needed. So when the network is down I need the computer to accomplish several task based on its IP address. Once the network comes back up it will continue with its other task.
0 Kudos
Message 5 of 6
(3,209 Views)
P/Net address� it did not change. Internet Protocal(TCP/IP) Properties did not change. When the network is physically disconnected, my VI after several runs returns 127.0.0.1. So, how do I get my IP address whether it�s connected to the network or not?What string are you feeding into the VI. If it is a Wins or a Domain name it must be resolved. If the network is disconnected, the name will be resolved by referencing the host name file on the PC. If the network is connected, the name will be resolved by the DNS or Wins server defined in the TCP/IP properties. If you are refering to the local machine, it may not matter as 127.0.0.1 is the local host IP address.
0 Kudos
Message 6 of 6
(3,209 Views)