RemoveAll

TwinCAT
Network TCP/IP client

ns=2;s=DEPRAG Smart/Network/TCP/IP/RemoveAll

The command terminates all active TCP/IP connections and removes all clients from the ActiveClients list.

Returns:

    RemoveAll
    A variable of the OpcMethodReturnValueVoid type. The method has no command-specific return values.

Examples:

In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:

Beckhoff parameter:

    bTcpIpRemoveAll
    A boolean variable that can be used to trigger the execution of the RemoveAll command.
    OutputDataTcpIpRemoveAll
    An instance of the ST_VoidOutputData structure into which the return value of the RemoveAll method is written.
    hrTcpIpRemoveAll
    This can be used to monitor the execution of the command. Error codes have the type HRESULT.
    fbTcpIp
    An instance of the "FB_TcpIp" function block supplied with the DEPRAG Smart library.
    ConnectionHandle
    "ConnectionHandle" received when establishing a connection between DEPRAG Smart Server and your OPC UA client.


VAR
    bTcpIpRemoveAll    : BOOL;
    OutputDataTcpIpRemoveAll : ST_VoidOutputData;
    hrTcpIpRemoveAll   : HRESULT;

    fbTcpIp  : FB_TcpIp;
END_VAR

hrTcpIpRemoveAll := fbTcpIp.RemoveAll(
        bExecute   := bTcpIpRemoveAll, 
        ConnectionHandle := depragSmartConnection.ConnectionHandle, 
        OutputData   => OutputDataTcpIpRemoveAll);
IF hrTcpIpRemoveAll <> S_FALSE THEN 
    bTcpIpRemoveAll := 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".