ns=2;s=DEPRAG Smart/Network/TCP/IP/AddClient
Creates a new, fully parameterized TCP/IP client. The client can be retrieved from the "ActiveClients" list via the returned index.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bTcpIpAddClient : BOOL;
OutputDataTcpIpAddClient : ST_Int32OutputData;
hrTcpIpAddClient : HRESULT;
fbTcpIp : FB_TcpIp;
END_VAR
hrTcpIpAddClient := fbTcpIp.AddClient(
bExecute := bTcpIpAddClient,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sHostAddress := '10.10.222.101',
nPortNumber := 4540,
nConnectionTimeoutInMilliseconds := 5000,
OutputData => OutputDataTcpIpAddClient);
IF hrTcpIpAddClient <> S_FALSE THEN
bTcpIpAddClient := 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".