ns=2;s=DEPRAG Smart/Network/TCP/IP/ActiveClients/0/Disconnect
The command terminates the 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
bTcpIpDisconnect : BOOL;
OutputDataTcpIpDisconnect : ST_VoidOutputData;
hrTcpIpDisconnect : HRESULT;
fbTcpIp : FB_TcpIp;
END_VAR
hrTcpIpDisconnect := fbTcpIp.Disconnect(
bExecute := bTcpIpDisconnect,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sClientId := '0',
OutputData => OutputDataTcpIpDisconnect);
IF hrTcpIpDisconnect <> S_FALSE THEN
bTcpIpDisconnect := 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".