RCC2414: How to Backup Program Using Clone Unit

Return to:  Horner Tech Support FAQ

 

This section includes:

 

 

Overview

The Fail-Safe System is a set of features that allow an application to continue running in the event of certain types of "soft" failures.

 

These "soft" failures include:

  • Battery power loss

  • Battery-Backed Register RAM or Application flash corruption due to, for example, an excessive EMI event.

 

The Fail-Safe System has the following capabilities:

  • Manually backup the current battery-backed RAM Register Settings into flash memory.

  • Manually restore Register Settings from the values previously backed up in flash memory to battery-backed RAM.

  • Detect corrupted Register Settings at power-up and then automatically restore them from flash.

  • Detect corrupted or empty application in flash memory at power-up and then automatically load the AUTOLOAD.PGM application file from Removable Media (Compact flash or microSD).

  • If an automatic Register Restore or Application Load occurs, the OCS can automatically be placed in RUN mode.

 

 

Resources

For further information on this controller, please refer to the following documents on the Horner website.

 

Manual Numbers for RCC2414

User Manual

MAN1078

Datasheet

MAN1033

 

 

Settings

To use the Fail-Safe feature, the user needs to do the following:

 

  1. From Cscape, create AUTOLOAD.PGM for the application program using ‘Export to Removable Media’.

  2. Place the Removable Media with AUTOLOAD.PGM in the device.

  3. Set the ‘Enable AutoLoad’ option in the device to YES.

  4. Set the ‘Enable AutoRun’ option to YES if the controller needs to be placed in RUN mode automatically after automatic restore of data or AutoLoad operation.

  5. Backup the current battery-backed RAM Register contents in onboard flash memory.

 

 

Backup / Restore Data

Backup OCS Data - When initiated, this will allow the user to manually copy battery-backed RAM contents on to the onboard flash memory of the OCS. This will have the effect of backing up all the registers and controller settings (Network ID, etc.) that would otherwise be lost due to a battery failure. %SR164.4 is set to 1 when backup operation is performed.

 

 

Restore OCS Data - When initiated, this will allow the user to manually copy the backed-up data from the onboard flash to the battery-backed RAM.

A restore operation will be automatically initiated if 1) a backup has been previously created and 2) on power-up the battery-backed RAM registers fail their check.

 

The following process will be followed for restoring data:

  • The controller will be placed in IDLE mode.

  • Data will be copied from onboard flash memory to OCS battery-backed RAM

  • The controller will reset.

  • The controller will be put in RUN mode if the AutoRun setting is ‘Yes’, or else it will remain in IDLE mode.

 

%SR164.3 is set to 1 when an automatic restore operation is performed. This bit is reset to the value of “0” when a new backup is created.

 

Restoring of data can be manually performed by setting %SR164.14 to 1, this in turn sets %SR164.15 to 1. The user needs to set %SR164.15 to 0 complete the restore operation or set %SR164.14 to 0 to abort.

 

 

Clear Backup Data

When initiated, the backup data will be erased from the onboard flash and no backup will exist. %SR164.4 and %SR164.3 is reset to 0 when backed up data is erased.

 

 

 

AutoLoad

This option allows the user to specify whether the OCS automatically loads the application AUTOLOAD.PGM located in Removable Media.

When the AutoLoad setting is enabled (set to YES), it can be automatically initiated at power-up.

 

The automatic initiation will happen only in the following two cases:

  • When there is no application program in the OCS and a valid AUTOLOAD.PGM is available in the removable media of the device.

  • When the program residing in onboard memory is corrupted and a valid AUTOLOAD.PGM is available in the removable media of the device.

 

When the AutoLoad setting is not enabled (set to NO), OCS will be in IDLE mode and the application is not loaded.

 

%SR164.6 can be set to enable AutoLoad feature.

 

The OCS follows the following sequence in execution of AutoLoad:

 

 

 

AutoRun

This option, when enabled (YES), allows the user to automatically place the OCS into RUN mode after the AutoLoad operation or automatic Restore Data operation.

 

When the AutoRun setting is disabled (NO), the OCS remains in the IDLE mode after a Restore Data or AutoLoad operation.

 

%SR164.5 can be set for putting the system into RUN mode automatically, once an AutoLoad has been performed or an Automatic Restore has occurred.

Delete this text and replace it with your own content.