ns=2;s=DEPRAG Smart/Network/Tools/Ping
This command sends an ICMP (Internet Control Message Protocol) request to the configured host address. A corresponding response is expected from the host address within the configured time. This function is useful for testing network availability, PLC reachability, network status diagnostics, etc.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bPingServer : BOOL;
OutputDataPing : ST_PingOutputData;
hrPing : HRESULT;
fbTools : FB_Tools;
END_VAR
hrPing := fbTools.Ping(bPingServer, depragSmartConnection.ConnectionHandle, '10.10.222.110', 3, 5000, OutputData => OutputDataPing);
IF hrPing <> S_FALSE THEN
bPingServer := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".