Ping from a PLC - webservice frontend

Hi all,

from time to time I need to ping a device from the PLC, for example in test setups a.s.o.

Therefore, for my own convinience, I coded a small library that exposes the ping functionality to a small web frontend (not nice, but functional :wink: ) that helps using ping like in routers or other embedded devices.
Additionally, some statistic values from a ethernet interface can be shown.

Here, I want to share this with you, maybe anyone else can somewhen utilize it, who knows?
It should be easy to use:

  • import the library “WebPing” (6.5 KB)

  • execute the function block “webPingInterface” in a task

  • That’s it.
    If everything is ok, you should now be able to open “<PLC’s_IP_address>/ping.cgi” in a browser and see the frontend.
    (internally, the function block uses the capabilities from the B&R Libraries AsICMP, AsHttp, AsETH, AsArCfg, AsHost to collect and provide the information shown in the web frontend).

Here’s a short description for the frontend:

Output when ping was successful:

Output when ping failed:

Output of statistic values of the PLC’s ethernet interface: