Tech Note 108: How to Use the New Summary Features of Wonderware Historian 10.0

Summary

One of the new features included with Wonderware Historian version 10.0 (and higher) is tag replication. You can replicate tags locally, or to a “Tier-2 Historian” for aggregate/summary information. This feature bypasses the event system, and stores information in Historian History Blocks. You can customize tagname conventions for replicated tags, create your own schedules, and more. The purpose of this document is to demonstrate local Historian tag replication for storing analog summarized and state summary values.

Procedure

Chapter 1 – Creating a Custom Replication Schedule

1. The first topic is the Replication Schedules for Historian 10.0’s new summary features. A “Replication Schedule” defines the interval or specific times for summary periods.

By default the Historian will create a replication schedule for 1 minute, 5 minutes, 15 minutes, 30 minutes, 1 hour, and 1 day.

As a note, replication is triggered at the scheduled interval calculated from the beginning of the day (local time). For example, if you specify a 5-hour interval: replication will have summary values at 0:00, 5:00, 10:00, 15:00, 20:00 and again at 1:00. This is only the case for periodic schedules, not custom ones. Custom replication schedules are a list of start times (local time) to trigger the summary. These will only trigger at the specified times and will not necessarily trigger at the end of the day.

2. To add your own replication schedule, navigate to “Configuration Editor→System Configuration→Replication→Replication Schedules” right-click on “Replication Schedules”, and finally select the “New Replication Schedule” option.

3. Here you can specify your own time interval, or even a specific time. In this example the schedule was named “Noon” and has been configured to trigger at 12:00 pm local time.

Also, by checking the “Automatically create replication group for each new Replication Server” check box, you can have the Historian automatically create the new schedule as a replication group for each new Replication Server. For all existing Replication Servers, you will need to add it manually in order to add the schedule to the group (including the local Replication Server).

You can also define a “Schedule Abbreviation” that is used when new replication groups are defined using the particular schedule. The schedule abbreviation is automatically generated as the interval is modified, but you can override the default. For example, with a tag named TankLevel configured for 3 minute replication using the schedule abbreviation 3M, the abbreviation is included in the destination tag name: “TankLevel.3M”.

4. Below is an image of the new schedule, which has been added to the list of all available schedules.

5. To add the new schedule to an existing Replication Server, in this case “Local Replication”, navigate to “Configuration Editor→System Configuration→Replication→Replication Servers→SERVER” (where “SERVER” is the server the value is being replicated to), and then into the desired summary type (analog summary, or state summary). Right-click on the summary folder, and then select the “New Replication Group” option.

6. You will need to give the group a name, select which schedule you would like to use, and finally whether you would like to accept the defaults for “Summary Replication Naming Scheme” and “Group Abbreviation” or define your own.

7. Below is an image of the new group after it has been added to the “Analog Summary Replication” type.

Chapter 2 – Adding Analog Tags for Summary Replication

8. To add a tag for analog summary replication simply select the desired schedule group (in this example”5 minutes” was used), right-click in the right-hand side, and select the “Add XX Tag(s)”, where “XX” is either “Single” or “Multiple”. For the first example, a single tag will be added.

As a note, Analog Summary Replication produces summary statistics for analog tags. The statistics relate only to the recorded interval. Statistics available are:

  • Time-weighted average
  • Standard deviation
  • Integral
  • First value in a period with timestamp
  • Last value in a period with timestamp
  • Minimum value in a period with timestamp
  • Maximum value in a period with timestamp
  • Start time of summary period
  • End time of summary period
  • OPC Quality
  • Percentage of values with Good quality
  • Value

9. You will first need to select the replication server, which is “Local Replication” in this example, then the replication group (schedule), and finally the desired tag. You can either manually type the tagname or select the ellipse button for the “Tag Finder”. The Tag Finder will be used for this example.

10. To use the Tag Finder you can simply leave all fields blank and click “Find Now” for a full list of Historian tags. For this example, “Contains” will be used as criteria for the tagname.

11. You can type part of the desired tagname into the first or both fields, and then click “Find Now” to list all tags matching that criteria. Find the tag on the left-hand side, select it, and then finally add it by selecting the “>” button (or all matching tags by selecting “>>”).

12. Once you click “OK” from the previous step, you will be back in the window opened from step 8. The “Destination Tag Name” field will automatically be populated based upon the “SummaryReplicationNamingScheme” Historian system parameter. You can, however, change this.

13. Below is an example of a tag that has been added for local replication.

14. The next topic is adding multiple tags. To do so, right-click on the right-hand side, and this time select the “Add Multiple Tags” option.

15. This will automatically open the Tag Finder window. Once again, you can simply leave all fields blank and click “Find Now” for a full list of Historian tags. For this example, “Contains” will be used with “min” as the tagname criteria.
In the “Found Tags” section on the left-hand side, you can now select multiple tags, and then add them to the “Target Tags” list by clicking the “>” button.

16. When all desired tags have been added, click the “OK” button to proceed.

17. You will be prompted with a confirmation window similar to the image below. If everything is correct, press the “Apply” button.

18. With the additions applied, click “Close” to proceed.

19. Below is an image of the two tags that have been successfully added to the Analog Summary Replication.

Chapter 3 – Adding Tags for State Summary Replication

20. For State Summary Replication, which summarizes the states of a tag value, you can add a single tag to a schedule or multiple tags. For this example a single tag will be added to the 5 minute schedule.

State summary replication can be applied to analog (integer only), discrete, and string tags.

You use this for analyzing process variables with a limited number of states, such as a machine’s state of running/starting/stopping/off. State summary replication provides the following, for each distinct state:

  • Total time
  • Percent of the cycle
  • Shortest time
  • Longest time
  • Average time
  • OPC Quality
  • Value

21. You will first need to select the replication server, which is “Local Replication” in this example, then the replication group (schedule), the maximum states (see note below), and finally the desired tag. You can either manually type the tagname or select the ellipse button for the “Tag Finder.”

When defining a state summary tag, in the Maximum States box, type the maximum number of states allowed in the same reporting period. The default number of maximum states is 10. The replication subsystem will calculate summaries for the first 10 distinct states, in the order in which they occur in the data (not in numeric or alphabetic order). The higher the number of maximum states, the more system resources are used to keep track of the time-in-state for each distinct state.

22. When your tag has been added, you should see it appear on the right-hand side for the selected schedule.

Chapter 4 – Example Queries for Retrieving Replicated Data

23. The image below uses a fairly simple SQL query to retrieve data for our summary tags, for this example the summary tag “SysTimeMin.5M was used. The query is as follows:

SELECT * FROM AnalogSummaryHistory

WHERE Tagname = 'SysTimeMin.5M'

The results in the image below are just a few of the pieces of data stored for a summary tag. See Chapter 5 – Stored Summary Information for a complete list of all data stored for an Analog Summary Replication tag.

24. The image below uses a fairly simple SQL query to retrieve data for our summary tags, for this example the state summary tag “SysPulse.S5M” was used. The query is as follows:

SELECT * FROM StateSummaryHistory

WHERE Tagname = 'SysPulse.S5M'

The results in the image below are just a few of the pieces of data stored for a summary tag. See Chapter 5 – Stored Summary Information for a complete list of all data stored for a State Summary Replication tag.

Chapter 5 – Stored Summary Information

25. Below is a table containing the unique pieces of information that are stored for Analog Summary Replication tags. Any of these fields can be used when building a SQL query for specific retrieval.

26. Below is a table containing the unique pieces of information that are stored for State Summary Replication tags. Any of these fields can be used when building a SQL query for specific retrieval.

Created by Nick Edgett

All Wonderware PacWest Tech Notes are provided “as is” without warranty of any kind.