Siemens Industry Online Support
Siemens AG
Entry type: FAQ, Entry ID: 40347325, Entry date: 07/01/2015

In WinCC, how can exported archive segments of Alarm Logging or Tag Logging be connected/removed in Runtime?

  • Entry
  • Associated product(s)
Archived alarms or archived tags are no longer displayed in Runtime if the "overall maximum time period for all alarms" set in the archive configuration is exceeded.

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
No. Procedure
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.

You can also open the Properties dialog in Runtime via the "Properties Dialog" icon if available.

3 Under "Key Functions", you enable the "Connect Backup" and "Remove Backup" options. Then click "OK".
4 Connect archive segments in Runtime
  1. Click the "Connect Backup" icon and then click the "..." button.
  2. From the list you select the folder containing the archive segments required.
  3. Select the path required from the list presented and confirm the selection with "OK". Multiple selections are possible.

Disconnect archive segments in Runtime

  1. Click the "Remove Backup" icon.
  2. Select the archive segments no longer required and confirm the selection with "OK". Multiple selections are possible.

Connect/disconnect archive segments using a VBS script
Use the VBS functions below to connect/disconnect archive segments.

  • HMIRuntime.Logging.AlarmLogs.Restore
  • HMIRuntime.Logging.AlarmLogs.Remove
  • HMIRuntime.Logging.DataLogs.Restore
  • HMIRuntime.Logging.DataLogs.Remove

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.

Fig. 01

Registration required connect_archiv-backup_in_runtime.zip (19.6 KB)

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.

No. Procedure
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.
Attribute "Static" column
Foreground ja
Fit window ja
Screen name (WinCC 7.x)
Screen name (WinCC 6.2 SP2)


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.

Additional Keywords
Subarchives, Archive segment

Security information
In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about industrial security, please visit