hi,
as this question appears from time to time, I created a small sample how to get the network information from the available network interfaces into zenon.
I used the NetworkChange class from the .NET Framework (in namespace System.Net.NetworkInformation) and took the NetworkAddressChanged event to get notified about changes in the IP address. Alternativly, the NetworkAvailabilityChanged event could also be used - but there, I get no events if the IP changed (as the name already suggests)
The sample does the following:
Everytime the IP address of an adapter changes (can be because of a different allocation of an IP address or because we lost the connection or because the adapter was disabled), we get the information from all interfaces in the network. In this demo, I then write this information onto a zenon variable of type string and display that string in the runtime. In reality, you could e.g. execute a zenon function (by calling this.RtFunctions().Item("myFunction").Start()) or writing some values onto a zenon variable on which you can react with a limit violation or a reaction matrix.
Note that I tried my best to eliminate any possible errors, but: I cannot guarantee that the source code is without any mistakes.
It is a zenon 7.0 project optimized for 1280x1024. Feel free to try it out, improve it, add a comment or something else
best regards,
Martin