GetLatestFinalValueObject

TwinCAT
Devices DEPRAG devices Sequence controller ActiveDevices One client Process data Final values of the last screw connection

ns=2;s=DEPRAG Smart/Devices/DEPRAG/AST/ActiveDevices/0/ProcessData/LatestFinalValueObject/GetLatestFinalValueObject

General information about the screw connection (status, duration, ...).

Returns:

    GetLatestFinalValueObject
    A variable of type OpcMethodReturnValueLatestFinalValueSmart. The Result property contains the 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:

    bAstGetLatestFinalValueObject
    A boolean variable that can be used to trigger the execution of the GetLatestFinalValueObject command.
    outputAstGetLatestFinalValueObject
    An instance of the St_AstGetLatestFinalValueSmartOutputData structure into which the return value of the GetLatestFinalValueObject method is written.
    hrAstGetLatestFinalValueObject
    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 the final values of the last screw connection are to be fetched.
    ConnectionHandle
    "ConnectionHandle" received when establishing a connection between DEPRAG Smart Server and your OPC UA client.


VAR
    bAstGetLatestFinalValueObject   : BOOL;
    outputAstGetLatestFinalValueObject : ST_AstGetLatestFinalValueSmartOutputData
    hrAstGetLatestFinalValueObject   : HRESULT;

    fbAst   : FB_AST;
END_VAR

hrAstGetLatestFinalValueObject := fbAst.GetLatestFinalValueObject(
       bExecute    := bAstGetLatestFinalValueObject,   
       ConnectionHandle := depragSmartConnection.ConnectionHandle,
       sDeviceId   := '0', 
       OutputData   => outputAstGetLatestFinalValueObject);
IF hrAstGetLatestFinalValueObject <> S_FALSE THEN 
 bAstGetLatestFinalValueObject := 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".