Persistence Channel
A persistence channel defines the storage settings for one or more groups of persistent variables. It can be added to a Persistence Manager node by use of the command Add submodule instance. Below a Persistence Manager node, up to 64 channels can be created.
Persistence

In this dialog, one or more groups can be defined which are managed by this channel. By default, the instance name of the channel module instance is available in the list. To create a new group, a unique name must be entered and added with the Add button. Remove can be used to delete selected groups.
Variables can be assigned to groups through the attribute ac_persist
. For more information see: Definition of Persistent Variables, Attribute 'ac.persist'
Persisted Variables: This list shows all persistent variables assigned to one of the persistence groups listed above.
Parameter
The Parameters tab provides a list of options relating to the storage of variables:

tPeriodicSaving: After this interval has elapsed, the variables are stored. Entering the value t#0s
will switch off this periodic saving.
xSaveOnChange: If this is set to TRUE, the current value will be constantly compared with the last saved value, and if they are different, the current value will be stored. Persistence channels, which have set xSaveOnChange=FALSE
, will be stored at a shutdown of the controller as well at a reset (warm, cold, origin). Moreover, periodic saving can take place.
xReadVarsDuringInit: If this is set to TRUE
, the persistent variable values will be read during the initialization of the application. Otherwise, they are loaded in the first application cycle.
xCompressTags: If this is set to TRUE
, the instance paths of the variables will be saved in a compressed format. For more information see: Storage Format, Compressed Archives.
xConsistentCopyInHighPrioTask: If this is set to TRUE
, the variables are copied from the highest priority task and saved in the lower priority task. This option is used to avoid data inconsistencies when variables are changed in a high priority task.
xConvertVarsWithDifferentType: If this is set to TRUE
, the persistence channel will to try to convert the value read from the archive to the target data type (if the data type of the value is different from that of the target). If successful, the value from the archive will be accepted; if not, the value will be rejected. This function supports the following conversions:
Data type in the archive | Target data type | Description |
---|---|---|
any Integer | any Integer | only if the value is in the range covered by the current data type |
any Integer | Real | |
any Integer | LReal | |
all data types | String | |
Real | LReal | |
Real | ANY_INT | only if the archive value is an integer in the correct range |
LReal | Real | only if the value is in the range covered by a REAL |
LReal | ANY_INT | only if the archive value is an integer in the correct range |
xIntegrityCheckBeforeReading: If this is set to TRUE
, the integrity of the database is checked.
xSeparateArchivePerToplevelInstance: If this is set to TRUE
, a separate archive is created for each toplevel instance.
Warning
If you modify the parameter afterwards (TRUE
<-> FALSE
), the archive name will get changed and persistent variables might get lost!
xMakeDataCRCConsistencyCheck: If this is set to TRUE
, a CRC value is calculated at the beginning and end of the save operation. These two values must be the same to successfully complete the save operation.
uiSavingRetriesIfCRCConsistencyCheckFails: Specifies the number of times to repeat the storage if xMakeDataCRCConsistencyCheckFails is set to TRUE
and the CRC values do not match.
xLogSaveTimeEnabled: If this is set to TRUE
, the time needed for writing is logged.
eAutomaticActionOnlineChange: Behavior, if and how the values of variables are stored during an online change.
None: No storage
Save: The values are saved. Thus also changes to the configuration are taken over into the persistence memory (for example adding or renaming variables).
Load: The values are loaded from the persistence memory. Thus, possible initializations (by e.g.
FB_INIT
,IModule.Init
, and module parameters) are overwritten by the persisted values.LoadAndSave: The values are loaded as well as written from the persistence memory.
eAutomaticActionPlcStop: Determines whether the values of variables are stored during a reset.
None: No storage
Save: The values are saved.
HMI, Information
For details about these dialogs, see the help page HMI, and Information