Getting IP address from system

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: Getting IP address from system

Post by AMitchneck »

Depending on the specific panel and port I have seen the default set to dynamic or 192.168.0.1. My guess if you are getting the loop back IP is it is set to dynamic. You can determine this from the IP shown on the bottom left of the screen while panel is loading project. You can change the IP from the service menu by pressing and holding the screen from when the hourglass appears until the screen goes gray stating something along the lines of "entering calibration in xx seconds." Once the gray screen appears, let go of screen then press again to open service menu; click set IP and to confirm/change IP settings.
Adam M.
Controls Engineer
FlexEnergy

AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: Getting IP address from system

Post by AMitchneck »

Forgot to mention - the hourglass I'm referring to for entering the service menu is the hourglass that appears right after you power the panel. So, to enter the service menu you will need to power cycle the panel.
Adam M.
Controls Engineer
FlexEnergy

wlederer
Posts: 175
Joined: Fri Jan 27, 2012 4:20 am

Re: Getting IP address from system

Post by wlederer »

Thank You Adam. The IP address is set as static (I checked). But the method offered shows the correct address if HMI connected to a network or laptop only. If the HMI Ethernet port is disconnected, the IP address shown is different. In this case it is: "No 192.*.*.* IP".

AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: Getting IP address from system

Post by AMitchneck »

Curious. I've never tried getting the IP address of a panel, but I have used C# to get a computer's IP address using similar method as here https://stackoverflow.com/questions/680 ... ip-address. It was a while ago, but, if I remember correctly, this method returned only "active" IP addresses (aka usable). I would take it since the static IP is unusable with the network cable unplugged that it does not show up in the list. One IP that I know always shows up in the list is 127.0.0.1 so my take at this point is the code you are using on the panel probably returns the first usable IP and thus returns 127.0.0.1 when no physical connections are available.
Adam M.
Controls Engineer
FlexEnergy

wlederer
Posts: 175
Joined: Fri Jan 27, 2012 4:20 am

Re: Getting IP address from system

Post by wlederer »

Thank You Adam for the link, it is very interesting information. Original task was to check, if the HMI configured as OPC server or client. But, it is not clear, how to check by script, if a controller (OPC client) active or not.
Anyway, the problem is solved, because we know now what IP address is shown when the HMI is not connected to Ethernet and the IP address is shown correct when the HMI is connected to Ethernet network or PC.

Post Reply