SystemDataItemsCount

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

ns=2;s=DEPRAG Smart/Devices/DEPRAG/AST/ActiveDevices/0/SystemOverview/SystemData/SystemDataItemsCount

Gets the number of items in the system data.

Returns:

    SystemDataItemsCount
    A variable of type OpcMethodReturnValueInt32. The Result property contains the command-specific return values.
      Result
      Number of items in the system data.

Examples:

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

Beckhoff parameter:

    bAstSystemDataItemsCount
    A boolean variable that can be used to trigger the execution of the SystemDataItemsCount command.
    outputAstSystemDataItemsCount
    An instance of the ST_Int32OutputData structure into which the return value of the SystemDataItemsCount method is written.
    hrAstSystemDataItemsCount
    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 to fetch the number of items in the system data.
    ConnectionHandle
    "ConnectionHandle" received when establishing a connection between DEPRAG Smart Server and your OPC UA client.


VAR
     bAstSystemDataItemsCount    : BOOL;
     outputAstSystemDataItemsCount   : ST_Int32OutputData;                                          
     hrAstSystemDataItemsCount    : HRESULT;

     fbAst   : FB_AST;
END_VAR

hrAstSystemDataItemsCount := fbAst.SystemDataItemsCount(
       bExecute    := bAstSystemDataItemsCount,   
       ConnectionHandle := depragSmartConnection.ConnectionHandle,
       sDeviceId   := '0',
       OutputData   => outputAstSystemDataItemsCount);
IF hrAstSystemDataItemsCount <> S_FALSE THEN 
    bAstSystemDataItemsCount := 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".