verSetAppProfile (Function) (obsolete)

Top  Previous  Next

Architecture:

X32

Device support:

All

Firmware version:

1.00


This function is used to set the name and version number of the application.

It is only necessary to set this information once - for example the first time the application is initialized.

The information will be saved to Flash memory by the firmware. The name and version number chosen are entirely up to the application and its contents are not used by the firmware.
 

 

Input:                

name : STRING

The name of the application.

Maximum size is 15 characters.

 

version : INT

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

 

Returns:

None.

 

Declaration:

FUNCTION verSetAppProfile;
VAR_INPUT
  name   : STRING; // name of application
  version : INT;     // Version of application
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
VAR
  UpgChk : verCheckUpgrade;
END_VAR;
 
PROGRAM test;
 
  // Set Application name and version
  IF boardType() < 100 OR boardVersion() >= 252 THEN
    verSetAppProfile(name := "VerTest", version := 422);
  END_IF;
  ...
 
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;