GetValueForMember

TwinCAT TIA
Local File and directory access XML reader ActiveXMLDocuments A reader

ns=2;s=DEPRAG Smart/Local/FileAndDirectoryAccess/Xml/ActiveXmlDocuments/0/GetValueForMember

The command returns the value of the specified XML element.

Parameters:

Returns:

    GetValueForMember
    A variable of type OpcMethodReturnValueString. The Result property contains the command-specific return values.
      Result
      The value of the specified XML element.

Examples:

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

Beckhoff parameter:

    bXmlGetValueForMember
    A boolean variable that can be used to trigger the execution of the GetValueForMember command.
    OutputDataXmlGetValueForMember
    An instance of the "ST_StringOutputData" structure into which the return value of the GetValueForMember method is written.
    hrXmlGetValueForMember
    This can be used to monitor the execution of the command. Error codes have the type "HRESULT".
    fbXml
    An instance of the "FB_Xml" function block supplied with the DEPRAG Smart library.
    MemberPath
    A STRING(255) variable containing the path of the XML element.
    ClientId
    A STRING(255) variable that uniquely identifies the XML document in the ActiveXmlDocuments list.
    ConnectionHandle
    "ConnectionHandle" received when establishing a connection between DEPRAG Smart Server and your OPC UA client.


VAR
       bXmlGetValueForMember   : BOOL;
       OutputDataXmlGetValueForMember : ST_StringOutputData;
       hrXmlGetValueForMember   : HRESULT;

       fbXml        : FB_Xml;
END_VAR

hrXmlGetValueForMember := fbXml.GetValueForMember(
       bExecute    := bXmlGetValueForMember,   
       ConnectionHandle := depragSmartConnection.ConnectionHandle, 
       MemberPath   := '',             
       ClientId   := '0',
       OutputData   => OutputDataXmlGetValueForMember);
IF hrXmlGetValueForMember <> S_FALSE THEN 
       bXmlGetValueForMember := 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".