Working with the HistoryTrend

In this How To section we will cover working with data in the History Trend and introduce some of the display options to help you visualize your history data in a dynamic and informative way.

Preparation

To work through this example and to use the History Trend display you must first have archived data to work with. We can use history data from an OPC server I/O item or even the Generic, Action or Data Holder Items that were created as part of the Infrastructure Hands On examples. For any of these items, the Archive Options-Value Storage Strategy needs to be set to either Raw History or one (or more) of the aggregation options. This can be done by selecting the appropriate checkbox in the Object Properties Panel.

Archive Options - Value Storage Strategy
Figure 1. Archive Options - Value Storage Strategy
  • Open a History Trend display by selecting a data item in the I/O Model tree, right clicking and selecting Add item to… > History Trend > Last 10 minutes

Opening a HistoryTrend Display from I/O Item Context Menu
Figure 2. Opening a HistoryTrend Display from I/O Item Context Menu
  • The HistoryTrend should look similar to the example shown below:

Example HistoryTrend Display
Figure 3. Example HistoryTrend Display

Adding I/O Items to the HistoryTrend

There are various ways to add more items to the same HistoryTrend display:

  • Using the context menu of objects in the I/O Model panel. Right click on the I/O object and select Add item to… > History Trend . The currently visible display is always the first option in the Add item to…​ sub-menu. Alternatively you can use the Alt+Enter shortcut

Adding New Items to HistoryTrend Display - Context Menu
Figure 4. Adding New Items to HistoryTrend Display - Context Menu
  • Drag and drop Items into the HistoryTrend display. Select the item you wish to add in the I/O Model panel and drag into the HistoryTrend display, then release the mouse button

Adding New Items to HistoryTrend - Drag and Drop
Figure 5. Adding New Items to HistoryTrend - Drag and Drop
Items can also be added to the HistoryTrend display using the Object Search panel, as described in the Model Panels chapter.
  • Add as many items to the HistoryTrend display as you like. The display should look like the example below with the trend line for each displayed in a different color:

HistoryTrend Display with Multiple Items Added
Figure 6. HistoryTrend Display with Multiple Items Added

Removing I/O Items from the HistoryTrend Display

To remove items from the display, right click on the item in the legend at the bottom of the display. This opens the context menu from where Remove item(s) can be selected. It is possible to select and remove multiple items at a time.

Remove Items from HistoryTrend Display - Context Menu
Figure 7. Remove Items from HistoryTrend Display - Context Menu

Legend and Trend Line Configuration

The trend line for each item in the display can be configured using the options in the legend at the bottom. Each of the columns in the configuration table controls a different display feature or operation on the trend line. The table columns can be changed by using the column selection dialogue in the top left corner of the legend. The default visible columns can be altered in the General Settings dialogue for HistoryTrend displays. The table below explains some of the important configuration options.

Table 1. Trend Line Configuration Options
Column Description

#

The number of the trend line

State

The visual representation of the current system state of the item being trended. Should be green to indicate that the current data is good.

Color

Color of the trend line. Click to select a different color

Object Path/Item Name

Path of the Object in the system and the Item name (path cannot be configured, however the item name can be changed in the Object Properties panel)

Trend Type

Trend type configuration. Select from the dropdown box to select from multiple options for the trend type display

Dash

Dash type configuration. Select any from the dropdown box to change the way the trend line’s dash is displayed

Size

Dash size configuration. Select any from the dropdown box to change the line thickness

Marker

The marker configuration. Select any from the dropdown menu to change the way the trend line’s marker is displayed

Aggregate

The aggregate used to retrieve trend line data from the archive. Select from the dropdown menu to switch between aggregates

Curve Fitting

The display options and fitting type for a trend line curve fit. A fit type has to be selected for the curve fitting to be visible

Y-Axis

Select Y-Axis position. This option becomes available when a multiple or stacked Y-Axis is selected from the options in the menu bar of the display.

Minimal Y-Axis Value

Select how the minimal Y-Axis value is calculated or configure a value of your choice by selecting from the drop down menu

Maximal Y-Axis Value

Select how the maximal Y-Axis value is calculated or configure a value of your choice by selecting from the drop down menu

Use Range

Select to set the Y-Axis range to the EU range configured in the item’s object properties panel

Show Limits

Select to show high and low limit lines. These values are taken from the limits set in the Object Properties panel

Visible

Select to toggle the item’s trend line on/off in the display

Training Task
Change the Color, Trend Type, Marker Type and Aggregates of your displayed items. Notice how the different changes effect the display. How do the Value Band and Candlestick trend types effect the aggregate selection options.

The example below demonstrates some of the trend configuration options:

Example of the Trend Configuration Options in HistoryTrend Display
Figure 8. Example of the Trend Configuration Options in HistoryTrend Display

Zooming

You can zoom in and out of the HistoryTrend display in multiple ways.

  • By holding down the left mouse button and dragging across the area to be zoomed into:

Mouse Zooming in the HistoryTrend
Figure 9. Mouse Zooming in the HistoryTrend
  • Release the mouse button to zoom into the selected area. The zooming bars on the bottom and right of the display can be used to navigate around the display.

Mouse Zoomed in Region
Figure 10. Mouse Zoomed in Region
  • You can repeatedly zoom in on an already zoomed in on area. The zoom bars can also be used to zoom in further on a selected area by holding down the mouse button on either end of the bars and dragging to adjust the size.

Zooming does not automatically fetch higher resolution data from the server, but relies on the data already available in the HistoryTrend. To see a higher resolution of the zoomed area, refetch the data when zoomed in using the icon refresh 02 32 button (see Refetching Data in the Changing Time Period section)
  • The scroll wheel on the middle of the mouse can also be used to zoom in and out of the HistoryTrend display

Horizontal Zoom Bar

An effective way to navigate and zoom in on data sets in the HistoryTrend display is to use the Horizontal Zoom Bar.

  • Click the TIP: Zoombar button in the menu bar of the HistoryTrend display. This toggles the Horizontal Zoombar on/off.

Zoombar button in HistoryTrend Menu Bar
Figure 11. Zoombar button in HistoryTrend Menu Bar
  • This opens the chart preview display underneath the main HistoryTrend display.

Horizontal Zoombar and Preview Window
Figure 12. Horizontal Zoombar and Preview Window
  • Adjust the size of the preview window by holding down the mouse button and dragging the side bars to the desired zoom level. The preview is displayed in the main HistoryTrend display window.

  • Drag the preview window horizontally to navigate the HistoryTrend data

Horizontal Zoombar Navigation
Figure 13. Horizontal Zoombar Navigation
  • Click the right mouse button to zoom out of the selected area at any time

Changing Time Period

The time period displayed in a HistoryTrend display can be chosen upon opening the display from a preset list (for example: the last 10 minutes or the last hour). However exact time periods can be specified and displayed at any point using the time period dialogue.

Select Start/End Time

  • Click on the Select Time Period icon in the menu bar of the HistoryTrend display to open the Time Period Setting dialogue.

Select Time Period Icon
Figure 14. Select Time Period Icon
Time Period Setting Dialogue
Figure 15. Time Period Setting Dialogue

Using this dialogue the following time settings for the HistoryTrend display can be changed:

  • Start Time - Absolute or Relative

  • End Time - Absolute or Relative

  • Interval - Length of Intervals to be fetched from the archive

Times can be entered into the Start and End time fields as absolute or relative values. To toggle between the two click on the ←| icon above the respective fields. Click on the down arrow to set the time to "Now".

The total time period is displayed in the box between the two fields and can be altered to a value from the preset list.

Time Period Settings - Absolute Time
Figure 16. Time Period Settings - Absolute Time

Intervals

system:inmation always retrieves intervals of data from the archive, and returns the requested aggregate based on the specified or calculated interval length.

The interval length can be specified in the Time Settings using the options in the central part of the dialogue:

  • Length Specify the length of each interval from preset list (1 sec, 1 hour, 1 day etc)

  • Count Specify the number of requested intervals, the length of the interval will then be calculated

  • Advanced Specify interval length in exact time units, number of requested intervals will be calculated

  • Default Interval length will automatically be selected based on the requested time period

  • Maximum Resolution Interval length will automatically be calculated based on requested time period and available numbers of pixels in the HistoryTrend display area

Training Task: Calculate the number of Intervals
When a HistoryTrend time period is set from 2AM to 4AM and the interval length is set to 3 minutes, how many intervals will be requested?
Training Task: Force Intervals
Open the Time Period setting dialogue and change the interval type from default to Length. Select a high interval length and click Apply. Check the appearance of the trend. Afterwards, repeat this with a small interval length and compare the appearance of the two.

Moving Time Period

Once the HistoryTrend is loaded with a set time period, the time period can be shifted back and forth using the arrow buttons in the icon menu bar. This allows you to “page” through the history of an item in the HistoryTrend.

Moving Time Period in HistoryTrend - "Page" Function
Figure 17. Moving Time Period in HistoryTrend - "Page" Function
The amount that the time period is shifted depends on a global configuration value that by default is 75% of the time period used. This means a trend period showing 1 hour of data would be moved by 45 minutes (e.g. 2:00 AM to 3:00 AM shifted forward would become 2:45 AM to 3:45 AM).

Refetching Data

Refetching data basically means, querying the server again for data of a given time period. This makes particular sense when:

  • The trend is zoomed in

  • The trend is using a relative start and end time (particularly when the end time is "Now")

To refetch trend data click the TIP: Refetch button in the menu bar of the HistoryTrend display.

Refetch Trend Data
Figure 18. Refetch Trend Data

TIP:*Training Task: Refetch zoomed trend* Zoom in on your trend. Check the size and position of the zoom bars, then click refetch and check the zoom bars again

Be aware that refetching data will change the number or length of intervals requested.

Auto-Update (Rolling Trend)

When the HistoryTrend time period is set to display relative start and end times, it can be configured to update itself automatically. If this mode is active, every time that a new interval is available on the server side, it will be added to the trend display.

  • Click the Start/Pause icon in the menu bar of HistoryTrend display to begin auto-update

Start Auto-Update in History Trend
Figure 19. Start Auto-Update in History Trend
  • Click on the pause icon to pause the HistoryTrend update

Pause Auto-Update
Figure 20. Pause Auto-Update
Training Task: Auto Updating Trend Change the time period of your trend to relative time (for example, the last 10 minutes) and start Auto-Update. Check how often the updates are applied. How can you speed this up?
Highest update rate for rolling trends is once every 10 seconds.

Axes

X-Axis

The X-Axis in HistoryTrend is always a date time axis. Only its display format and the number of labels can be changed in the HistoryTrend settings.

Y-Axis

The HistoryTrend display has multiple options for displaying the Y-Axis including the use of multiple Y-Axes.

  • Click on the TIP: icon in the menu bar of HistoryTrend display and select the multiple or stacked option

Multiple Y-Axes Selection
Figure 21. Multiple Y-Axes Selection

TIP:*Training Task: Y-Axis modes* Change the Y-Axis mode from Common, to Multiple and then lastly to Stacked Charts. Notice how the HistoryTrend display changes and the position of the Y-Axis.

Stacked Y-Axis Display
Figure 22. Stacked Y-Axis Display

Cursor Lines

Cursor lines are vertical lines that can be displayed on the main display area. They report the value of each visible trend line at the x position of the line and are particularly useful for highlighting important parts of the HistoryTrend data. To add a cursor line:

  • Click the TIP: add cursor line button in the icon menu bar. The cursor is added and value information displayed in a floating panel

Add Cursor to HistoryTrend Display
Figure 23. Add Cursor to HistoryTrend Display
  • Drag the cursor horizontally across the display to change the values displayed in the floating information panel

  • Add another cursor to the display using the TIP: button. Both sets of values for each cursor are displayed in the same panel

  • Click the Floating Panel icon to change the cursor display options

Cursor Display Options
Figure 24. Cursor Display Options
  • Click the Cursor Top detailed icon to have the values for each cursor displayed in separate panels at the top of each cursor. These panels are attached to the cursor and move as the cursor is dragged within the display

Detailed Cursor Option
Figure 25. Detailed Cursor Option
Training Task
Experiment with the other cursor display options within HistoryTrend to achieve the appearance that works best for you.