Defining Data Sources for Enhanced Charts

One of the most dynamic features of charts is the integration of both real-time and historical data in the same chart, which lets you easily view all types of data in the iFIX WorkSpace. You need to define the data sources you want to trend. The following sections show you how to select a data source and configure its properties.

Adding Data Sources to Your Chart

Each data source must be defined. At the top of the Data Sources tab of the Chart Customization dialog box is the Data Sources List area, which lists the data sources in Data Server.NODE.TAG.FIELD format.

NOTE: If you are adding a data source to an SPC (X-Bar, R-Bar, or S-Bar) Chart, you must use the SD block. For a histogram, you must use the HS block. For XY charts, you can use any block except SD, HS, ETR, SQT, SQD or PA.

There are many ways to add a new data source to your chart:

  • Click Add in the Data Sources List area, and enter a data source in the field that appears.
  • Double-click a blank field in the Data Sources List and enter a data source in the field.
  • Click the Browse button to the right of the field to display the Expression Builder, which allows you to search for global data sources through a data source browser. To learn how to use the Expression Builder and define data sources, refer to the Animating Object Properties chapter in the Creating Pictures manual. For more information on data sources, refer to the System Architecture section of the Understanding iFIX manual.
  • Write a VBA script. Refer to the Writing Scripts manual for more information.

For XY charts, you can only add two data sources, one for the X axis and one for the Y axis.

To modify an existing data source in the Data Sources list, double-click the data source and enter an alternate data source. To change the order of the data source in the chart's legend, click the data source you want to move in the Data Sources List area, and then click either the up or down arrow.

To delete a data source, select the data source from the list and click the Delete button.

Defining Data Properties

To control how the data is presented by the configured data source(s), you can define the data properties for your chart. You can do this by selecting the properties you want on the Data tab on the Data Sources tab. The following properties can be defined:

  • High Limit – Displays the high limit value defined for the selected data source.
  • Low Limit – Displays the low limit value defined for the selected data source.
  • Fetch Limits – At run-time, automatically retrieves the low and high limits assigned to the selected data source. If this option is selected, then the manually entered High and Low Limits will not be considered.
  • Show Gaps – Determines whether a blank space or a line is displayed to represent an area in a plot where there is no data. This field is not available for XY charts.
  • Interpolate Data – Causes the lines between plotted data to display as slopes, rather than flat lines. This field is not available for XY charts.
  • Maximum Display Points – Determines how many data points will be displayed for the data source over a given span duration. This field is not available for XY charts.
  • Historical Mode Determines how iFIX selects data from a historical data source and displays it in the chart, and determines what each displayed value represents. This field is not available for XY charts.

The following table provides some examples of data properties applied to a chart.

Data Property Examples

Use this property...

To...

High Limit

Low Limit

Specify high and low limit values for trending. To do this, enter the low and high limit values you want to trend for the selected data source in the Low Limit and High Limit fields, respectively.

Fetch Limits

Retrieve the limit range assigned to the data source at run time. For example, you may have a data source with limits that are unknown or prone to change in the configuration environment.

By selecting Fetch Limits, you can set the data source's high and low limits equal to that of the data source at run time.

Maximum Display Points

Determine how many data points display for the data source in the chart based on a set duration.

For example, if the maximum points are 500, and the duration is 500 seconds, then the maximum number of points that the chart will maintain is 1 per second.

Selecting a Historical Display Mode

NOTE: This feature is not available for XY charts. The data is always interpolated.

Data sources displaying historical data offer additional flexibility in how the data is displayed by offering a historical mode, available on the Data tab on the Data Sources tab. Select a mode from the Historical Mode drop-down list. The display mode determines how iFIX selects data from a historical data source and displays it in the chart, and determines what each displayed value represents.

Historical modes are directly related to Span Interval and Span Duration properties for the time group. The Span Interval determines the range of data that the display mode uses to calculate the point of data that is trended. Time group properties are further described in the Defining Time Ranges section.

The following table shows the different historical modes you can choose from, and how trending differs for each mode.

Historical Modes

If you select this mode...

Then...

Sample

The last valid value found is trended, up to and including the start of the interval.

Avg

The average of all valid data found during the interval is trended, starting at the beginning of the interval, 12:00:00.

High

The highest valid data point value found during the interval is trended, starting at the beginning of the interval, 12:00:00.

Low

The lowest valid data point value found during the interval is trended, starting at the beginning of the interval, 12:00:00

Interpolated

The data is interpreted by assuming that the line between two values is a straight line. All points along that line are estimated except the starting point and the ending point. Simple linear interpolation is used to estimate the line. Available for Proficy Historian only.

Trend

The raw data for the minimum and maximum values for each interval is returned.

Let's examine an example of a data source configured to display in sample mode. Assume that the following data is available for a data source and the Interval is set to 10 minutes.

Time

Data Value

12:00:00

0.0

12:01:00

1.00

12:02:00

2.00

12:03:00

3.00

12:04:00

4.00

12:05:00

5.00

12:06:00

6.00

12:07:00

7.00

12:08:00

8.00

12:09:00

9.00

Using the above chart, the values are trended as indicated:

Avg – 4.5 is trended from 12:00:00 to 12:10:00.

High – 9.0 is trended from 12:00:00 to 12:10:00.

Low – 0.0 is trended from 12:00:00 to 12:10:00.

The value, 0.0 at 12:00:00 (the start of the interval), is trended for the duration of the interval, from 12:00:00 up to 12:10:00. If 0.0 is not a valid point, then the last valid value found prior to the start of the interval is trended.

You can enter a data source more than once to display data in different modes. For example, if you trend an Analog Input block, you can enter the block twice in the Data Sources List: once in Sample mode, and again in Average mode.

NOTE: Sample mode is the fastest mode for displaying historical data. However, the average, high, and low modes may provide more detailed data values for your application. The trend mode is the preferred mode for retrieving data for plotting over long time periods.

See Also

How Do I...