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.
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. |
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(). |
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:'.