CheckForUpdate

TwinCAT TIA

ns=2;s=DEPRAG Smart/SoftwareItemIdentification/CheckForUpdate

Checks if a new software update is available.

Returns:

    CheckForUpdate
    A structure variable of type OpcMethodReturnValueUpdateState. The Result property contains the command-specific return values.
      Result
      A structure of type UpdateState that provides information about the availability of a new software version.

Examples:

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

Beckhoff parameter:

    bCheckForUpdate
    A boolean variable that can be used to trigger the execution of the CheckForUpdate command.
    OutputDataCheckForUpdate
    An instance of the "ST_CheckForUpdateOutputData" structure into which the return value of the CheckForUpdate method is written.
    hrCheckForUpdate
    This can be used to monitor the execution of the command. Error codes have the type "HRESULT".
    fbSoftwareItemIdentification
    An instance of the "FB_SoftwareItemId" 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
   bCheckForUpdate    : BOOL;
   OutputDataCheckForUpdate : ST_CheckForUpdateOutputData;
   hrCheckForUpdate   : HRESULT;

   fbSoftwareItemIdentification : FB_SoftwareItemId;
END_VAR

hrCheckForUpdate := fbSoftwareItemIdentification.CheckForUpdate(
      bExecute := bCheckForUpdate
      ConnectionHandle  := depragSmartConnection.ConnectionHandle,
      OutputData   => OutputDataCheckForUpdate);

IF hrCheckForUpdate <> S_FALSE THEN 
   bCheckForUpdate := 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".