FC_RetainImageSave - General Information

Overview

Type:

Function

Available as of:

SystemInterface_1.32.6.0

Versions:

Current version

Task

Save the contents of the retain memory (non-volatile memory) in a file.

Description

The function stores the entire content of the retain memory into the specified file. Because the addressing and assignment of the variables in the retain memory cannot be predicted, the entire retain memory is stored. Additionally, own information can be stored with the file.

If a file with the same name and storage location exists, this file is overwritten.

NOTE: While the function is executed, the retain data cannot be changed. Otherwise, inconsistent retain data may be the result if such data are loaded later. It must be ensured that the retain data are not accessed during the execution of the function FC_RetainImageSave().
NOTE: The typical runtime of the function in a controller is 400 ms to store the retain memory on the drive ide0:.

Interface

Input

Data type

Description

i_sRetainImageFileName

STRING[80]

Name of the file in which the content of the retain memory is to be stored.

The file name automatically receives the extension .ret. The file can be stored in any existing directory of the controller. The file name must not include any special characters or wildcards.

i_sUserInfo

STRING[255]

Information that also has to be stored in the file of the memory image of the retain memory.

Return Value

Data type

Description

DINT

0: The retain memory has been stored successfully.

-1: The retain memory could not be stored because an invalid file name was specified. The file name contains special characters ":", "\" or "/" and wildcards "*" or "?".

-2: The retain memory could not be stored because the directory does not exist in which the memory image has to be stored.

-3: The retain memory could not be stored because a general error is detected in the function FC_RetainImageSave().

Examples

diResult := FC_RetainImageSave('karton', 'Speicherabbild Kartonierer'); 

The retain memory is saved to the file 'karton.ret' on the default device 'ide0:'.

diResult := FC_RetainImageSave(‚ide0:\retain\plister' ‚Speicherabild Plister'); 

The retain memory is saved to the file 'plister.ret' in the directory 'retain' on the default device 'ide0:'.

diResult := FC_RetainImageSave(‚remote:ide0:\etikett' ‚Speicherabbild Etikettierer'); 

The retain memory is saved to the file 'etikett.ret', which is located on the drive 'ide0:', which is again located on the remote device 'remote:'.