Skip to main content

Module: Data Storage

The submodule Data Storage defines the storage format of a persistence channel.

. Choose one of the following storage formats:
  • ASCIIFileStorage: Saving the values in ASCII format in a file.

    The ASCIIFileStorage format allows to open the archive file in a text editor and to modify the values. Comments can be added to ASCII file archive. These will be ignored when the file is read.

  • BinaryFileStorage: Saving the values in binary format in a file.

  • BinaryMemoryStorage:Saving the values in binary format to the "RETAIN" area of the compiler or the device concerned (example: to the NVRAM of such a device.)

  • PersistentBinaryMemoryStorage: Saving the values in binary format to the "Persistent" area of the compiler or the device concerned (example: to the NVRAM of such a device.)

Below the persistence channel insert a Data Storage module of the desired format. If necessary, modify the configuration in Parameter tab:

Dialog: Parameters

sArchiveName

Name of the archive file

By default the placeholder %CHANNEL_NAME% is defined. This placeholder will be replaced by the instance name of the superior persistence channel. The archive name must be unique, because all archive files get stored by default in the installation directory of the controller.

Note: The default storage location for archive files depends on the runtime system version. See: Persistence Manager Overview

xDoubleStorage

If activated (TRUE), the variables are stored alternately in two different archives (sArchive1, sArchive2). In case of a corrupted file (example: due to a shutdown of the controller during the storage of variables), the backup file will be used. When the file is opened the Persistence Manager checks the time stamp of both archives. In case of no damage the newer archive will be used, otherwise the other one.

udiMaximumFileSize

The maximum file size in bytes

If 0 is defined, no limit is set or checked. So the file size can reach any size.

bySeparator

ASCII value for separator between variable name and value.

udiMemDataSize

Size of the memory in the "RETAIN" variable area, which is created for the module.

The value is compared to the size of the data to be stored. If the value is definitely too small a compiler error is created. If it is possibly too small a warning is displayed in the message view.

Dialog: Information

For details about this dialog, see: Information.