Description of scripts used:
The script automatically prefixes the archive with the current date.
The name of the CSV file is "Archive_Date.csv".
The script is structured so that the storage path configured is created automatically at Runtime. Therefore, the storage path does not have to be created manually beforehand on the memory card. The "Script_Storage_Path" script executes this function.
The script is called by a certain trigger event (e.g. clicking a button).
The script first checks whether a memory card (with MP277) is available. If no memory card is available, a system message is issued.
If the file to be archived does not already exist on the data carrier, a new file is created.
An existing file is opened, the data attached and then the file is closed again.
The "Script_Storage_Path" script splits the specified storage path with the "\" character into separate "subfolders" and writes these one after the other to the storage medium.
The function is executed until there are no more "\" characters in the storage path.
The storage path is transferred as parameter to the "Script_Storage_Path" script
(see Script "Storage_Tag_V1" Lines 29 and 21).
Do not use the internal memory of the operator panel as storage path. This is not allowed.
The VBS functionality gives you a wide range of options for influencing the display and parameterization. You can change the scripts as you wish to suit your requirements.
The scripts have "comments" that give brief descriptions of the individual steps. Please refer to the WinCC flexible Online Help or relevant specialist literature for detailed information on the functions and commands used.