Trending Event-based Data         

Event charts allow you to set queries to retrieve data based on various criteria. To limit the amount of data that is retrieved, you can set a time restriction on the query. You can define the initial time of an event query by selecting one of the following options on the HintTime tab of the Event Chart Configuration Event tab:

Absolute time – defines a fixed date and time for the time criteria, for example, March 25, 2003 at 4:33 PM.

Relative time – defines a relative date and time for the time criteria, for example, yesterday at the current local time. By default, the relative time is set to the current local time (Now).

Range – defines a start and stop time. These times can be absolute or relative.

Event queries refine the initial time span by specifying a search criteria. Each search criteria defines:

When you select a criteria filter other than N/A, you must also supply an expression. An expression specifies the start or end values to search for. For example, in the event query PRODUCT=Last W3244, all values after W3244 are filtered out. The expression is W3244 but the start value for the event query depends on the current time span and could be any value, such as W3230, W3235, or W3240.

When you create an event query, the chart locates the data that satisfies the query within the initial time span. Upon locating this data, the event automatically resets its time to match the time span for the event query.

If you enter a second event query, the time span of the first query is refined. For example, assume the initial time span is June 12, 2001 from 7:00 AM to noon. Using the event query ID=B100, the chart finds that this condition is true only from 8:15 AM until 9:30 AM and automatically resets the event's time span to match the time span of the first query. Now, assume you enter the event query Lot=M-27. Using this second query, the chart searches from 8:15 to 9:30 and finds that this condition is true only from 8:30 to 9:00 AM and automatically resets the event's time span to match the time span of the second query.

After a time span (an event and its queries) is defined, you can assign a pen to it as you would in a Time chart. In an Event chart, assigning a pen to a time span is done by selecting an event for the pen you are configuring. By assigning a pen to an event, you select the time span for the pen to use.

You can create multiple events in an Event chart. This feature allows you to switch the pen's time span by changing events.

You can assign one time zone to an event. The time zone can be set to match the Client Time Zone (the time zone set on the computer's operating system), the Display Time Criteria Time Zone (the time zone that is set for the current display), or any specific time zone. However, because you can assign up to three unique event query tags, the Tag and Data Server time zones are not supported. The time zone that is configured for an event is passed down to all data pens that are associated with the event.

Event queries return values that have a start and end time. Consequently, you may not see the data for the last value of the query tag because the value's end time falls outside the end time of the event query. To correct this, specify an event query end time that is later than the end time of the value you want to include in the query. The same thing happens with the start time. The first value returned is the first value with a start and end time. If the first value is not the one you expect, adjust the start time of the event query to be earlier than the start time of the value you want to head the list.

Example: Trending Single Events

You can use an event chart in many different ways. One way might be to trend values of a specific data source. For example, suppose you want to trend the temperature used by the reactor on Line 5 of your chemical manufacturing plant. You know that six lots, Lot_25 through Lot_30, were made yesterday, but you do not have the exact times of each product.

In order to trend this information with an Event chart, you must first create an event by clicking the Add a New Event button on the Event tab and entering a name for the event, when prompted.

Next, specify the initial time frame for the event in the Events Hint Time tab. The initial time determines the initial set of data retrieved from the server. This data, in turn, determines the initial values available for the first event query.

The initial time is comprised of a start date and time, an end date and time, and a time zone. Since you only want to examine data for yesterday, enter yesterday's date as the start and end date. The start and end time is 12:00:00 AM to 11:59:59 PM.

With the chart's initial time set, select the query tags to determine the time span of the temperature you want to trend on the Query Tags tab. Since you are interested only in Line 5 and Lot_25 through Lot_30, the event queries you enter might be:


These event queries result in setting the event's time span to Lot_25's start time and an end time of 11:59:59 when Lot_30 finished.

Next, create the pen for the event. In this case, you will need one for the temperature of the reactor on Line 5, such as L5ReactTemp.F_CV. You can create the pen the same way you would in a Time chart:

  1. Select the Pens tab.

  2. Click the Add button.

  3. Select the data source you want to use from the Data Source Browser.

When the event chart plots the data for this data source, you can examine the trend and determine if the reactor's temperature was in an acceptable range during the manufacture of Lot_25 through Lot_30.

Example: Comparing Two Existing Event Trends

Another way you might use an event chart is to compare the trends of two existing historical data sources. For example, in a water treatment plant, the water is divided into several tanks as it is treated chemically. In this environment, you might want to compare the current flow rate of the pumps across the entire treatment plant. By comparing the flow rates, you can learn which pumps are slowing down and in need of repair.

To plot the flow rates of the three pumps that drain Tanks 5, 6, and 7, create an event for each tank by clicking the Add button on the Event tab three times. When prompted, enter a name for each event. For example, you might call these events Tank5, Tank6, and Tank7.

Second, define the event query for each event on the Event Query Tags tab. To do this, select the event you want to configure and define the data source and condition for the event query. For example, when defining the query for Tank 7, you might select the following event query:

Tank_Number.A_CV = T7

Third, create a pen for each event (select the event from the Event list box on the Data tab). When the event chart plots the data for each pen, you can examine the trends and determine which pumps may require maintenance.

Example: Comparing a Real Time Event Trend to an Existing Event Trend

Event charts can also synchronize one trend to another. Using this feature, you can monitor the current production of your products by plotting near real time trends against existing historical trends.

Synchronization of the two trends occurs after both trends are configured. However, the trends are not displayed and updated at run-time until you enable the Auto Refresh option in the chart.

NOTE: The Auto Refresh option is enabled by default.

You can synchronize trends on single-tier transitions (for example, a batch transition) or on two-tier transitions (for example, phase transitions that occur in a batch). To synchronize on single-tier transitions only, define one event query for the historical trend. To synchronize on two-tier transitions, define two event queries.   

The event you create for the historical trend is called the master event. When you configure an event as a master event, the event chart adds the name of the event to a list of master events that other events can synchronize to.   

Creating a master event is similar to creating any other event:

  1. Add the event to the chart by clicking the Add Event button.

  2. Enter a name for the event when prompted.

  3. Select the Master Event check box to configure the event as a master event.

  4. Select the Level 2 check box to synchronize on two-tier transitions. To synchronize on single-tier transitions only, clear the check box.

  5. Select a start date and time, an end date and time, and a time zone for the event.

  6. Select event queries for the event on the Query Tags tab.

  7. Assign a pen to the event.

Creating the event for the real time trend is slightly different. Click the Add New Event button to add the real time event then, instead of selecting event queries for the event, select the Synchronize with Event check box. When you enable this option, you can select the master event to synchronize to.

Selecting the Synchronize with Event check box completes the real time event's event query fields automatically. This chart completes these fields by copying the event queries of the historical event and then selecting the latest values of each query to calculate the real time event's start time. The end time of the real time trend is assumed to be the current time.

For example, assume you create an event for a historical trend as follows:

Event = Start1

Batch_Number.A_CV = B102

Synchronizing another event to Start1 automatically configures the second event's queries. The latest value for each query tag used by Start1 is selected automatically. In this case, the currently running batch is B109. Consequently, the second event might be defined as follows:

Event = Start2

Batch_Number.A_CV = B109

This configuration is good for synchronizing current and previous values of the same tag. However, you may want to compare data from Lines 1 and 2. For example, you might define an event for Line 1 as follows:

Event = Line 1

Line1.Lot_Number.A_CV = S72

Next, you want to define an event for Line 2. However, you do not want the query tag for Line 2 to be the same as Line 1. Instead you want the Line 2 event to be:

Event = Line 2

Line2.Lot_Number.A_CV = S84

However, by default, the Event chart configures the query tag as:

Line1.Lot_Number.A_CV = S75

To correct this, use the Data Source Browser to select the data source you require.

After selecting the Synchronize with Event check box and the required query tags, complete the configuration by assigning a pen to the real time event.

Overflow Percentage

When synchronized batches vary in length, overflow percentage can be used to plot the percentage of batch overrun. On the Event chart Configuration panel's Chart tab, you can set the overflow percentage. The overflow percentage that you enter is the percentage of the master event's time span added to the chart. For example, if the master event time span is 6 minutes and an event overflow percentage of 25 is entered, the overall time span becomes 8 minutes with the last 2 minutes of the time span indicated as overflow on the chart's plot area (you can set a specific color to indicate the overflow area of the chart). When you run the chart, any data that goes beyond the time span of the master event is plotted in the chart's batch overrun area. See To set an Event chart's overflow percentage for detailed steps.

See Also

Event Charts

Configuring an Event chart

Event Groups

Linking Event Charts to other Objects