Store PLCnext CommunityPLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community


 How to create a Blog Entry

Access to PlcNext webserver on DHCP

I would like to share an application story from Ignacio Aláez, a Solution Engineering Expert from Phoenix Contact Spain, which might be of interest to the PLCnext Community.

As part of a project we have the problem of accessing a Plcnext webserver when the IP is assigned via DHCP.

We found a workaround using the free service Duckdns :

There is a variety of ways to login, for instance via Google account. You get a token and aftewards you can select a domain like : http://

The service has an API that can be used from Plcnext Engineer.

With the help of FB PBCL_SysNetwork ( part of PlcnextBase library ), you can readout the IP that has been assigned to the plc by the DHCP server.

Using again a FB from the same library, PBCL_SysLinuxShell, this command can be sent to Duckdns:

curl -s --connect-timeout 5 -m 15 ">&ip=<your_local_ip>&verbose=true"

The trick is to update your host not with the public address of your router ( this is the normal use of this service ), but with you local address assigned by DHCP.

You have to type in a browser running in a pc in the local network. This browser will go to Duckdkns to resolve the IP and it will answer with the local IP.