ns=2;s=DEPRAG Smart/Network/TCP/IP/ActiveClients/0/Connect
The command establishes a connection between TCP/IP client and server.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bTcpIpConnect : BOOL;
OutputDataTcpIpConnect : ST_VoidOutputData;
hrTcpIpConnect : HRESULT;
fbTcpIp : FB_TcpIp;
END_VAR
hrTcpIpConnect := fbTcpIp.Connect(
bExecute := bTcpIpConnect,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sClientId := '0',
OutputData => OutputDataTcpIpConnect);
IF hrTcpIpConnect <> S_FALSE THEN
bTcpIpConnect := 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".