ToolDataItemKeys

TwinCAT
Devices DEPRAG devices Sequence controller ActiveDevices One client System info Tool data

ns=2;s=DEPRAG Smart/Devices/DEPRAG/AST/ActiveDevices/0/SystemOverview/ToolData/ToolDataItemKeys

Requests all keys of the tool data.

Returns:

    ToolDataItemKeys
    A variable of type OpcMethodReturnValueStringArray. The Result property contains the command-specific return values.
      Result
      All keys of the tool data in a string array.

Examples:

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

Beckhoff parameter:

    bAstToolDataItemKeys
    A boolean variable that can be used to trigger the execution of the ToolDataItemKeys command.
    outputAstToolDataItemKeys
    An instance of the ST_ToolDataKeysOutputData structure into which the return value of the ToolDataItemKeys method is written.
    hrAstToolDataItemKeys
    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.
    sDeviceId
    A string value specifying the device for which tool data is to be fetched.
    ConnectionHandle
    "ConnectionHandle" received when establishing a connection between DEPRAG Smart Server and your OPC UA client.


VAR
     bAstToolDataItemKeys    : BOOL;
     outputAstToolDataItemKeys   : ST_ToolDataKeysOutputData;                                          
     hrAstToolDataItemKeys    : HRESULT;

     fbAst   : FB_AST;
END_VAR

hrAstToolDataItemKeys := fbAst.ToolDataItemKeys(
       bExecute    := bAstToolDataKeys,   
       ConnectionHandle := depragSmartConnection.ConnectionHandle,
       sDeviceId   := '0',
       OutputData   => outputAstToolDataKeys);
IF hrAstToolDataKeys <> S_FALSE THEN 
 bAstToolDataKeys := 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".