In WinCC, how can exported archive segments of Alarm Logging or Tag Logging be connected/removed in Runtime?
In order not to lose the data, you enable backup in the backup configuration. The archive backup saves the data in the target path set in separate segments with the "time for a single segment". When you need the backed-up data again in Runtime, there are various ways of reconnecting the backups of alarms or archive tags with Runtime.
The file names of an archive segment (2 files per segment) always end with a time stamp in the following format: YYYYMMDDhhmm (for example: 200908112245 for 11.08.2009 at 22.45)
You can find a detailed description of how to connect and remove exported archive backup segments in the WinCC information system in this path:
"Working with WinCC > Archiving Process Values > Configuration of Process Value Archiving".
"Working with WinCC > Setting up a Message System > Archiving Messages > Configuration of Message Archiving".
In the case of automatic connections, it is important that the archive segments are copied individually, one after another, to the corresponding path; otherwise, some of the archive segments may not be detected and connected correctly.
Connect/disconnect archive segments using a control (WinCC 7.0 and higher)
New WinCC controls are available with WinCC 7.0 and higher. The following controls connect/remove archive segments in Runtime via the toolbar:
- Alarm Control
- Trend Control
- Table Control
- Function Control
|1||Start WinCC and in the "Graphics Designer" you open the WinCC screen with the new control.|
|2||Double-click the control and go to the "Toolbar" tab.|
|3||Under "Key Functions", you enable the "Connect Backup" and "Remove Backup" options. Then click "OK".|
|4||Connect archive segments in Runtime |
Disconnect archive segments in Runtime
The following download contains a WinCC screen that provides a user interface for connecting/disconnecting archive segments. The download also contains the VBS scripts used also as a txt file.
The WinCC screen "ConnectBackup_V6-2-SP2.PDL" can be used with WinCC V6.2 SP2 and the WinCC screen "ConnectBackup_V7.x.PDL" (Fig. 01) can be used with WinCC V7.x.
Notes on the WinCC screen in the download
- The "ConnectBackup.PDL" screen shown in the picture window is 290 pixels wide and 350 pixels high. The picture window should be the same size, but is fitted automatically.
- The format specified is valid for input of the time range in the input fields. You can add specification of the time to this format (YYYY-MM-DD hh:mm:ss).
- You specify the starting time of the first archive segment in the "From:" input field and the starting time of the last archive segment in the "To:" input field. The output format selected is "2999-19-39" and it has to be changed to "2999-19-3929:59:59" if you add the times as well.
- In the "Folder" input field you must enter the target path of the archive segments that was set in the archive configuration in Alarm Logging and Tag Logging.
- When connecting/disconnecting Tag Logging archive segments, all archive segments (from TagLogging Fast and TagLogging Slow) in the specified time range are connected/disconnected.
- The corresponding buttons are disabled during connection/disconnection.
Notes on the script in the download
The VBS "Restore Method" is used in the script. The Timeout parameter of the "Restore Method" was assigned the value "-1", this means that there is an endless wait for the segment to be connected. A detailed description of the "Restore Method" and its parameters is available in the WinCC Information System in the path Working with WinCC > VBS for creating procedures and actions > VBS Reference > Methods > Methods N to R > Restore Methods.
It might take several minutes to connect the archive segments and this puts extra load on the Runtime. Therefore it is recommend to connect/remove archives at non-critical times.
Using the WinCC screen
To insert the WinCC screen contained in the download in a project, the following instructions show how to insert a picture window in a WinCC screen. The WinCC screen "ConnectBackup. PDL" is displayed in this picture window.
|1||Start WinCC and open the WinCC screen in which you want to connect/disconnect the archives.|
|2||Insert a picture window from the object palette ("Smart objects" > "Picture window") into the open WinCC screen.|
|3||Right-click the inserted picture window and select the "Properties" menu command.|
|4||Click on the "Properties" tab and in the tree view open "Picture window" > "Miscellaneous"|
|5||Make the following settings in the detail window and then close the Properties dialog.|
Subarchives, Archive segment