ns=2;s=DEPRAG Smart/Network/Tools/IsReachable
This command can be used to check the reachability of a specified port at a configured IP address.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bIsReachable : BOOL;
OutputDataIsReachable : ST_BoolOutputData;
hrIsReachable : HRESULT;
fbTools : FB_Tools;
END_VAR
hrIsReachable := fbTools.IsReachable(bIsReachable, depragSmartConnection.ConnectionHandle, '10.10.222.101', 8883, 5000, OutputData => OutputDataIsReachable);
IF hrIsReachable <> S_FALSE THEN
bIsReachable := 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".