RemoveAll

TwinCAT
Devices DEPRAG devices Sequence controller

ns=2;s=DEPRAG Smart/Devices/DEPRAG/AST/RemoveAll

Terminates connections to all devices and removes them from the ActiveDevices list.

Returns:

    RemoveAll
    A variable of type OpcMethodReturnValueVoid.

Examples:

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

Beckhoff parameter:

    bAstRemoveAll
    A boolean variable that can be used to trigger the execution of the RemoveAll command.
    outputAstRemoveAll
    An instance of the ST_VoidOutputData structure into which the return value of the RemoveAll method is written.
    hrAstRemoveAll
    This can be used to monitor the execution of the command. Error codes have the type HRESULT.
    fbAst
    An instance of the FB_AST 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
      bAstRemoveAll      : BOOL;
      outputAstRemoveAll     : ST_VoidOutputData;                                          
      hrAstRemoveAll      : HRESULT;  

     fbAst   : FB_AST;
END_VAR

hrAstRemoveAll := fbAst.RemoveAll(
       bExecute    := bAstRemoveAll,   
       ConnectionHandle := depragSmartConnection.ConnectionHandle, 
       OutputData   => outputAstRemoveAll);
IF hrAstRemoveAll <> S_FALSE THEN 
 bAstRemoveAll := 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".