ProductVersion

Read TwinCAT TIA

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

Contains the currently used 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:

    bReadProductVersion
    A boolean variable that can be used to trigger the execution of the ReadProductVersion command.
    OutputReadProductVersion
    A variable of type "STRING(80)" into which the return value of the ReadProductVersion property is written.
    hrReadProductVersion
    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
   bReadProductVersion    : BOOL;
   OutputReadProductVersion : STRING(80);
   hrReadProductVersion  : HRESULT;

   fbSoftwareItemIdentification : FB_SoftwareItemId;
END_VAR

hrReadProductVersion := fbSoftwareItemIdentification.ReadProductVersion(
      bExecute := bReadProductVersion
      ConnectionHandle  := depragSmartConnection.ConnectionHandle,
      OutputData   => OutputReadProductVersion);

IF hrReadProductVersion <> S_FALSE THEN 
   bReadProductVersion := 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".