verGetAppVersion (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Firmware version:

1.00 / 1.00.00


verGetAppVersion will return the version number that was previously set via Project: Settings.

 

Input:                

None.

 

Returns: INT

The version of the application scaled by 100 (2.10 = 210).

 

Declaration:

FUNCTION verGetAppVersion : INT;

 

 

Example:

INCLUDE rtcu.inc
 
VAR
   UpgChk : verCheckUpgrade;
END_VAR;
 
PROGRAM test;
 
   // Get Application name and version
   DebugFmt(message := "Application: " + verGetAppName() + " \1.\2",
            v1 := verGetAppVersion() / 100, 
            v2 := verGetAppVersion() MOD 100);
   ...
 
BEGIN
   UpgChk();
   ...
   // is Application ready to reset?
   IF ... THEN
      // is background upgrade ready?
      IF UpgChk.application OR UpgChk.firmware THEN
         // Reset RTCU device. The firmware or application is updated automatically
         boardReset();
      END_IF;
   END_IF;
   ...
END;
END_PROGRAM;