Beruflich Dokumente
Kultur Dokumente
ActiveFactory Workbook
Section 1 Introduction 5-3
Lab 11 Use ActiveFactory Workbook Basic Functions 5-21
Lab 12 Use Other ActiveFactory Workbook Functions 5-31
Lab 13 Use the Tag Analysis Wizard 5-37
Lab 14 Create an Hourly-Average Shift Report 5-43
5-2 Module 5 ActiveFactory Workbook
Module Objectives
z Explain Workbook GUI elements and functionality.
z Successfully use the Workbook application to create a variety of reports using the Excel
spreadsheet format.
Wonderware Training
Section 1 Introduction 5-3
Section 1 Introduction
Section Objective
z Understand ActiveFactory Workbook uses and operation.
Introduction
ActiveFactory Workbook is an add-in to Microsoft Excel that displays Historian data in Excel
spreadsheet format in order to perform data analysis and to develop standard reports. The reports
that you create with ActiveFactory Workbook can be saved, allowing you to run a report again at
any time.
Workbook is used to embed your SQL statements directly into the Microsoft Excel worksheets to
facilitate the repeated retrieval of data from the Historian.
When the add-in is loaded, the ActiveFactory menu and toolbar appear. Use these menu
commands and toolbar buttons to create Workbook functions. When the functions are executed,
SQL queries are sent to the server, and the requested data is then returned to the worksheet.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-4 Module 5 ActiveFactory Workbook
Tag Search
Use the Tag Search button to search the Historian for the tags you want in your report, and place
them on the Sheet. Once you have located the tags you are looking for, this function can insert the
Tagnames into the highlighted cell in the spreadsheet. By using the Tag Search function, you
reduce the possibility of error comparing to entering the tagname manually.
a. Click the Tag Search button.
The Tag Selection window displays.
b. Use the Filter criteria to search for the tags you wish to display in your report.
c. Holding the Control key, select each tag you wish to display in your report.
d. Click the underscore button to the right of the Select cell range to insert tags field.
e. Select the first cell where you want the tag label(s) to show. The tag names will cascade down
the cells in the column.
Note: It is best to start the tag label list on or after row 2 because row 1 will be used for column
headers later.
Wonderware Training
Section 1 Introduction 5-5
Live Values
The Live Values button launches a function that brings the latest value of selected tags from the
Historian and inserts them into the selected cells. Note that because Excel does not automatically
refresh the data in the sheet, once the values are inserted, the function will not execute again until
the sheet is refreshed.
a. Click the Live Values button.
b. Select the desired Server in the Step 1 of 3 dialog box.
c. Select the Support multiple data types check box to allow for the selection of dissimilar data
types for the same query. That is, a mix of analog, discrete, string, and/or event tags.
d. Click the underscore button to the right of the Select cell range to insert tags field.
e. Select the cell(s) containing the tag names for your report, and click the button to close the
cell range selector.
f. If you want to use a named tag range variable instead, click Binding Options and then
configure the range. See the Help topic: Using Binding Options for more information.
g. Click Next.
h. In the Step 2 of 3 dialog box, specify the location of the worksheet cell(s) that will contain the
output.
i. Select the Enter the results as an array-formula check box to insert the results as an array
formula. An array formula can perform one or more calculations and then return either a single
result or multiple results. An array formula allows for the resending of the query, since the
query parameters are included in the cells that contain the query results.
j. Select the Select cells to specify format options check box to specify a range of cells that
contain formatting information. Click Next.
k. In the Live Values - Step 3 of 3 window, select the values you wish to display in your report.
z Tag name: The unique name of the tag within the IndustrialSQL Server system.
z Date time: The timestamp for the returned value. For delta retrieval, this is typically
the time at which the value was acquired by the IndustrialSQL Server. For cyclic
retrieval, this is the specific time requested or calculated (using a SQL function).
z Include milliseconds: Used to include milliseconds in the timestamp.
z Quality: The basic data quality indicator associated with the data value.
z Replace poor quality values: The text string of "poor" will replace the current value if
the value has a quality <> 0 or 133.
z Detect date time: Only applicable to event tags. The timestamp reflecting when the
event was detected by the event system.
z OPC Quality: The quality value received from the data source. Only available if you
selected the Support multiple data types check box in the Step 1 of 3 dialog box.
l. Click Finish.
The report displays:
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-6 Module 5 ActiveFactory Workbook
History Values
The History Values button launches a function that brings the historical values of selected tags
from the Historian and inserts them into the selected cells. The method of retrieval can be
configured through the interface of the function. Note that because Excel does not automatically
refresh the data in the sheet, once the values are inserted, the function will not execute again until
the sheet is refreshed.
You can retrieve history data for specified analog, discrete, string, and/or event tags. However, you
cant retrieve data for event tags and other types of tags in the same query. To retrieve data for
event tags, create a separate query that only includes event tags.
a. Use the Tag Search button to enter one or more tagnames in the sheet.
b. Click the History Values button.
c. In the Servers list, click the name of the server to use in the Step 1 of 4 dialog box.
d. In the Select cell(s) containing tag name(s) list, specify the location of the worksheet cell(s)
that contains the tag name(s).
e. If you want to use a named tag range variable instead, click Binding Options and then
configure the range.
f. Click Next. The Step 2 of 4 dialog box appears.
g. In the Select cell for output list, specify the location of the worksheet cell(s) that will contain the
output.
h. Select the Enter the results as an array-formula check box to insert the results as an array
formula. An array formula can perform one or more calculations and then return either a single
result or multiple results. An array formula allows for the resending of the query, since the
query parameters are included in the cells that contain the query results.
i. Select the Select cells to specify format options check box to specify a range of cells that
contain formatting information.Click Next.
j. Click Next. The History Values - Step 3 of 4 dialog box appears.
Wonderware Training
Section 1 Introduction 5-7
z Format Tab
Value based criteria (narrow tables)
There is one row for each value returned by each tag
Each row shows the timestamp and value for one tag
Tag based criteria (wide tables)
There is one row for each timestamp in the combined result sets of all the tags
Each row shows the values for all the tags at that time
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-8 Module 5 ActiveFactory Workbook
Wonderware Training
Section 1 Introduction 5-9
z Order Tab: Define the order for the results by selecting items on the left and clicking the >
arrow to move them to the list on the right.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-10 Module 5 ActiveFactory Workbook
z Criteria Tab
Limit the results based upon selection criteria in the Criteria tab.
z To configure criteria for a discrete tag select the first Value check box and set the
criteria to be either a 1 or a 0.
z To configure criteria for an analog tag select the first Value check box and set the
criteria for the data value. For example, the value must be greater than ( > ) 1500.
z (Optional) Select the second Value check box and set another criteria for the data
value. For example, the value must be less than ( < ) 2000.
z (Optional) Select the Value not null check box to filter out NULL values from the
results.
z (Optional) In the Quality list, click the quality criteria for the data. Only data values that
match the quality you specify (Good, Bad, Doubtful) are returned.
l. Click Next.
Wonderware Training
Section 1 Introduction 5-11
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-12 Module 5 ActiveFactory Workbook
Aggregate Values
You can view aggregated values for specified tags. Aggregations supported are count, minimum,
maximum, sum, average, and standard deviation. Aggregations are calculated using the standard
SQL Server aggregation functions.
a. Click the Aggregate Values button.
Format Tab
b. Select the desired format.
z Narrow query format: In this format, there is one row for a single tag's value for a
particular timestamp.
z Wide query format: In this format, there is one row for one or more tag values for a single
timestamp, thus providing a "wide" view of the data. To use the wide query format, you
must specify the timestamp and one or more tagnames as the column names in the query
syntax. The results will contain a column for the timestamp and columns for the value of
each specified tag at that timestamp.
Time Tab
c. In the Time area, use the time picker to select the start and end times for the query.
d. To return the data with a timestamp that reflects the time zone setting of the Historian, select
the Use time zone of the server check box.
e. To return the data with a timestamp that reflects a time zone setting, different than that of the
local client computer, click the name of the appropriate time zone to use in the Time Zone list.
Criteria Tab
f. To configure criteria for a discrete tag select the first Value check box and set the criteria to be
either a 1 or a 0.
g. To configure criteria for an analog tag select the first Value check box and set the criteria for
the data value. For example, the value must be greater than ( > ) 1500.
h. (Optional) Select the second Value check box and set another criteria for the data value. For
example, the value must be less than ( < ) 2000.
i. (Optional) Select the Value not null check box to filter out NULL values from the results.
j. (Optional) In the Quality list, click the quality criteria for the data. Only data values that match
the quality you specify (Good, Bad, Doubtful) are returned.
Wonderware Training
Section 1 Introduction 5-13
k. (Optional) In the Criteria applicability list, select the moment at which the edge detection
criteria is met.
z None: true: Returns all rows that successfully meet the criteria; no edge detection is
implemented at the specified resolution.
z Leading: first true: Returns only rows that are the first to successfully meet the criteria
(return true) after a row did not successfully meet the criteria (returned false). This is also
known as leading edge detection.
z Trailing: no longer true: Returns only rows that are the first to fail the criteria (return
false) after a row successfully met the criteria (returned true). This is also known as
trailing edge detection.
z Both: first true or no longer true: All rows satisfying both the leading and trailing
conditions are returned.
Calculations Tab
Use the Calculations tab to configure the aggregations to perform on the values for the selected
tag(s).
l. Display calculated values for each tag separately: If selected, one row of calculated values
is returned for each tag. If this check box is not selected, then all values for all specified tags
are included for a single aggregation.
m. Count: The total number of values for the tag.
n. Minimum: The minimum value for the tag.
o. Maximum: The maximum value for the tag.
p. Average: The average value for the tag.
q. Sum: The sum of all values for the tag.
r. Standard deviation: The statistical standard deviation of all values for the tag.
s. Decimal places: The number of decimal places to display for the data value. This applies only
to analog tags.
Retrieval Tab
Use the Retrieval tab to specify the granularity of the data to be returned.
t. In the Mode area, select the retrieval mode.
z Cyclic: Cyclic based retrieval is the retrieval of stored data for the given time period based
on a specified cyclic retrieval resolution, regardless of whether or not the value of the
tag(s) has changed.
z Delta: Delta retrieval, or retrieval based on exception, is the retrieval of only the changed
tag values for a tag(s) for the given time interval. That is, duplicate values are not returned.
If you selected the cyclic retrieval mode, configure additional options in the Cyclic area.
z XX values over equal time intervals: The number of rows to be returned for a specified
time period. For cyclic retrieval, the rows are spaced evenly across the time period, and
the default row count is 100 rows. For cyclic retrieval, the row count is applied for each tag
in a query.
z Values spaced every XX ms: The sampling rate, in milliseconds, for retrieving the data in
cyclic mode. The system will return values stored over the requested time period at the
interval specified by the resolution. For example, if you specify a 5000 ms resolution, the
system will query for all data during the time period and then only return those values that
occur at each 5000 ms interval, starting with the start date and ending with the end date.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-14 Module 5 ActiveFactory Workbook
If you selected the delta retrieval mode, configure additional options in the Delta area.
z Limit to: The total number of consecutive rows to be returned, starting from the first row in
the record set.
z Time deadband: The minimum time, in milliseconds, between returned values for a single
tag. Applies only to delta retrieval.
z Value deadband: The percentage of full scale (range), in engineering units. Any value
changes that are less than this percentage will not be returned. Applies only to delta
retrieval. The default is 0.
Source Tab
Use the Source tab to specify the data version and type of table for the query.
u. In the Source area, specify the Historian tables from which data will be retrieved.
z Manual history tables: Normal SQL Server tables that are used to store data. These are
the ManualAnalogHistory and ManualDiscreteHistory tables.
z Extension tables: Logical tables that are populated from the IndustrialSQL Server data
files. These tables support the IndustrialSQL Server time domain extensions for handling
data.
z Both: Select this option to retrieve data from both the manual and extension tables.
v. In the Version area, specify what version of data should be retrieved.
z Original value: The original value as it was received from the data source (for example,
the I/O Server) to the IndustrialSQL Server.
z Latest value: The latest value that is stored in the IndustrialSQL Server with the same
timestamp as the original value. Multiple versions are created as the result of data inserts
and updates.
Direct Query
You can use the Query client to build a query, which is inserted into the Query window. The Query
tool is discussed in greater detail in Module 6, ActiveFactory Query.
a. Click the Query button to start the Query client tool.
b. In the Servers list, click the name of the server to use.
c. In the Query window, type the SQL query to execute against the database.
d. Select the Enter the results as an array-formula check box to insert the results as an array
formula. An array formula can perform one or more calculations and then return either a single
result or multiple results. An array formula allows for the resending of the query, since the
query parameters are included in the cells that contain the query results.
e. Select the Specify format options (select cells) check box to specify a range of cells that
contain formatting information. The formatting information in the cells will be applied to the
query results. For more information, see Selecting Cells.
f. In the Select cell for output list, specify the location of the worksheet cell(s) that will contain
the output. Click on the button to select the cell(s) using your mouse. For more information,
see Selecting Cells.
g. Click OK.
To edit the query, click in the cell that contains the red triangle.
Wonderware Training
Section 1 Introduction 5-15
Convert Function
Convert Function changes selected cells that contain functions to the results of the functions.
This converts an executable cell to a static value. Refreshing the function or the sheet after using
the Convert Function will not update the value of the cell.
a. Select the function to convert. If you want to convert an array formula, select any cell in the
array.
b. Click the Convert Function toolbar button.
Convert Sheet
Convert Sheet changes all the functions on the active sheet to the results of the functions. This
converts an executable worksheet to a static worksheet. Refreshing the function or the sheet after
using the Convert Sheet function will not update the value of the cell.
a. Select the sheet to convert.
b. Click the Convert Sheet to Values toolbar button.
Edit Function
The Edit Function button allows you to edit the function in the highlighted cell. If the function in
the cell was entered using one of the wizards (for example, History Values), then the dialog box for
that function will appear and allow you to modify the options that were entered.
a. Select the function to edit. If you want to edit an array formula, select any cell in the array.
b. Click the Edit Function toolbar button.
c. If applicable, the appropriate wizard opens, allowing you to edit the query.
Refresh Function
The Refresh Function button executes the function associated with the selected cells. You can
refresh any function or array formula in the worksheet.
a. Select the function to refresh. If you want to refresh an array formula, select any cell in the
array.
b. Click the Refresh Function toolbar button.
c. The function is executed and the results are returned.
Refresh Sheet
The Refresh Sheet button refreshes the active worksheet, and re-executes all the functions on
the worksheet.
a. Select any cell in the sheet.
b. Click the Refresh Sheet toolbar button.
c. The query is executed and the worksheet is updated with the returned results.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-16 Module 5 ActiveFactory Workbook
Tag Analysis
In addition to creating valuable reports, you can use ActiveFactory Workbook to generate
statistics, charts, and graphics that are useful for analyses. Wizards are provided to guide you
through selecting the required options.
a. Click ActiveFactory / Tag Analysis. The Tag Analysis Step 1 of 5 dialog box appears.
b. Select the tag analysis you want to run:
z Analog Tag analysis: Analog Tag analysis (graph, statistics, etc.)
z Batch analysis: Graph - analog tag over two time periods
z Scatter analysis: Scatter plot - two analog tags
z Discrete tag analysis: Discrete Tag analysis (graph, statistics, etc.)
z Analog values at discrete transition analysis: Graph - analog tag values at discrete tag
transitions
z Analog/Discrete: Graph - analog vs. discrete tags
Note: Selection of the Analog Tag analysis or the Batch analysis will result in a total of five
dialog boxes. Selection of any of the remaining analysis types will result in a total of four dialog
boxes. The following figures display the dialog boxes presented with the Analog tag analysis.
Differences in the dialog boxes are noted.
c. Click Next.
The Tag Analysis - Step 2 of 5 dialog box appears. The dialog box options will differ depending
upon what type of Analysis you selected.
d. In the Servers list, click the name of the Server to use.
e. In the tag field(s), specify the name of the tag(s) to analyze. Click the ellipsis button to open
the Tag Picker and browse for the tag.
Wonderware Training
Section 1 Introduction 5-17
f. Click Next.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-18 Module 5 ActiveFactory Workbook
Wonderware Training
Section 1 Introduction 5-19
Information that you specified using the wizard are assigned to cells in the worksheet. The
following values will be returned based upon the type of Analysis you chose.
Analog values
Analog Tag Batch Scatter Discrete tag at discrete Analog/
analysis Analysis Analysis Analysis transition Discrete
Analysis
Server Server Server Server Server Server
Tag Tag Tag 1 Tag Discrete Tag Discrete Tag
Row or Start Time 1 Tag 2 Row or Analog Tag Analog Tag
Resolution Chart Legend Resolution
Start Time Row or Row or Start Time Row or Row or
Resolution Resolution Resolution Resolution
Duration Start Time Start Time 1 Duration Start Time Start Time
Low Limit Duration Duration Duration Duration
High Limit Start Time 2 Start Time 2 Row or
Chart Legend resolution to
use for the
discrete tag
Start Time 2
m. Click in the workbook to view the functions that are inserted to create the analysis report.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-20 Module 5 ActiveFactory Workbook
Wonderware Training
Lab 11 Use ActiveFactory Workbook Basic Functions 5-21
Introduction
The following lab will demonstrate the basic functionality of ActiveFactory Workbook.
Objective
At the end of this lab, you should have a thorough understanding of how to report Historian
process data within the Excel spreadsheet environment.
To complete this lab, the following tasks must be completed successfully:
z Connect to the Server
z Insert a Live Value Function
z Insert a History Value Function
z Format Title and Date
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-22 Module 5 ActiveFactory Workbook
Wonderware Training
Lab 11 Use ActiveFactory Workbook Basic Functions 5-23
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-24 Module 5 ActiveFactory Workbook
Wonderware Training
Lab 11 Use ActiveFactory Workbook Basic Functions 5-25
20. Insert your cursor into the Select cell(s) containing tag name(s): field in the Live Values
Step 1 of 3 dialog box.
21. Click on cell A4.
22. Press the left mouse button and drag the cursor over the remaining tagname cells.
23. Click Next.
24. Ensure the output location is cell B3 (using the previous steps).
25. Click Next.
26. Leave the default settings in the Live Values - Step 3 of 3 dialog box.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-26 Module 5 ActiveFactory Workbook
Note: To view the function that was created, click in any cell containing results (this does not
include the headings). The function appears in the formula bar.
{=wwAnalogLive("[server name]",Sheet1!$A$4:$A$6,TRUE,TRUE,FALSE,TRUE,
FALSE)}
28. Click the Refresh Sheet button in the Workbook toolbar to see the tag values change within
the cell fields.
29. Save the report to C:/Program Files/Wonderware/ActiveFactory/Labs folder as
MyReport.xls.
Wonderware Training
Lab 11 Use ActiveFactory Workbook Basic Functions 5-27
33. Ensure the output cell is A1 on Sheet 2 in the History Values - Step 2 of 4 dialog box, using the
previous steps, and click Next.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-28 Module 5 ActiveFactory Workbook
34. Click the More>> button to see all of the display options.
35. Select the wwRetrievalMode, wwCycleCount, and wwTimeZone options.
36. Click the Format tab.
37. In the Format tab, select the Tag based Criteria (wide tables) option.
38. Click the Retrieval tab.
39. Change the Retrieval mode to BestFit.
40. In the Cyclic attributes pane of the Retrieval/Main options tab change the Values over equal
time intervals to 100.
41. Click the Order tab.
Wonderware Training
Lab 11 Use ActiveFactory Workbook Basic Functions 5-29
42. Order by DateTime by selecting the DateTime field and clicking the > button.
43. Click Next.
44. Accept the (default) last 10 minutes. This defines the relative time period of the query
function.
45. Click Finish.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-30 Module 5 ActiveFactory Workbook
The query returns 100 values for the specified time period using the BestFit retrieval mode.
Wonderware Training
Lab 12 Use Other ActiveFactory Workbook Functions 5-31
Introduction
The following lab will demonstrate the functionality of the ActiveFactory Workbook Aggregate,
Named Ranges, Query Functions, and Tag Analysis functions.
Objective
At the end of this lab, you should have a thorough understanding of how to report Historian
process data within the Excel spreadsheet environment.
To complete this lab, the following tasks must be completed successfully:
z Insert an Aggregate Value Function
z Configure Named Ranges
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-32 Module 5 ActiveFactory Workbook
8. Click the Aggregate Values button within the ActiveFactory toolbar. Notice the Aggregate
Values icon in the ActiveFactory toolbar is identical to the AutoSum icon in the Excel toolbar.
Be sure to select the correct icon.
Wonderware Training
Lab 12 Use Other ActiveFactory Workbook Functions 5-33
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-34 Module 5 ActiveFactory Workbook
12. Select the Calculations tab in the Aggregate Values Step 3 of 4 dialog box.
13. Select Average Calculation Type.
14. Click Next.
15. Select the Absolute Time option.
16. Click the first radio button after Absolute Time (upper field).
17. Insert your cursor into the left-hand Absolute Time (start) field.
18. Select cell B3 in the Excel worksheet. The cell animates and its address should appear in the
field.
19. Repeat the above steps to insert the End Time value into the second field. The end time is
contained in cell B4.
20. Click Finish.
21. Alter the times in cells B3 and B4. The tag Average should change accordingly.
Wonderware Training
Lab 12 Use Other ActiveFactory Workbook Functions 5-35
30. Press the Enter key to ensure the entire range has been named.
31. Click Sheet 3 of the Workbook.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-36 Module 5 ActiveFactory Workbook
36. Ensure the output cell location is correct ($A$1) in the Live Values - Step 2 of 3 dialog box.
37. Click Next.
38. Accept the default display options in the Step 3 of 3 dialog box: Click Finish.
The tag range is inserted into the worksheet.
You can also name cells containing the start and end times, and then reference them by name in
history and aggregate functions.
Wonderware Training
Lab 13 Use the Tag Analysis Wizard 5-37
Introduction
The following lab demonstrates the functionality of ActiveFactory Workbooks Tag Analysis Wizard
in order to display various chart analyses.
Objective
At the end of this lab, you should have a thorough understanding of how to use the Tag Analysis
Wizard to add Process Data charts to your Excel report.
To complete this lab, the following task must be completed successfully:
z Use the Tag Analysis Wizard
z Create applied data representations within Excel
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-38 Module 5 ActiveFactory Workbook
5. Ensure that the server name displays your Historian within the Select Tags area.
6. Select the ReactLevel and ReactTemp tags using the Ellipsis buttons in the dialog box to
open the Tag Selection control.
7. Click Next.
Wonderware Training
Lab 13 Use the Tag Analysis Wizard 5-39
From this dialog box you can specify the resolution (number of rows and spacing).
10. For this lab, accept the default settings in the wizard.
11. Click Finish.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-40 Module 5 ActiveFactory Workbook
At the completion of the wizard steps, a new sheet is created and the input tags are inserted
into column A. This is true for each type of analysis.
12. Change one of the tags in the analysis by changing the text in Cell A2 from ReactLevel to
SysTimeSec. Notice that the data in column B changes as well as the scatter plot. Cell B1
continues to read ReactLevel.
13. Change cell B1 to read SysTimeSec.
14. Create a new Tag Analysis using the Analog tag analysis type. Excel will create a new sheet
automatically. Use the ReactLevel tag.
15. Accept all the defaults in steps 3, 4 and 5 and click Finish.
Wonderware Training
Lab 13 Use the Tag Analysis Wizard 5-41
16. To preserve the results of this tag analysis, use the Convert Sheet button on the Workbook
toolbar.
17. Save the report to C:/Program Files/Wonderware/ActiveFactory/Labs folder as
TagAnalysis.xls.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-42 Module 5 ActiveFactory Workbook
Wonderware Training
Lab 14 Create an Hourly-Average Shift Report 5-43
Introduction
The following lab demonstrates use of formatting, aggregate functions, and time ranges within
Excel.
Objective
At the end of this lab, you should have a thorough understanding of how to create a report based
on a specific time range (Shift).
To complete this lab, the following tasks must be completed successfully:
z Create and Format a New Report
z Create Shift Time Range
z Insert Aggregate Value Function
z Modify Cell Formulas
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-44 Module 5 ActiveFactory Workbook
Wonderware Training
Lab 14 Create an Hourly-Average Shift Report 5-45
21. Select cell A6 and position the cursor over the lower right-hand corner of the cell. The cursor
should turn into a + icon, indicating a handle.
22. Drag the handle downwards to cell A12. This will increment each of the highlighted cells by
one hour.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-46 Module 5 ActiveFactory Workbook
The date and time should now appear in each of the cells. Your instructor will indicate what
time span to use.
Note: If cells need to be resized, a series of #s will appear in the cell fields. The cells can be
resized by double-clicking the column border at the top of the worksheet.
Wonderware Training
Lab 14 Create an Hourly-Average Shift Report 5-47
Note: (C5) is selected because the output will contain 2 cells: (C4) contains the tagname,
(C5) contains the aggregate value for that time (last hour of data).
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-48 Module 5 ActiveFactory Workbook
Wonderware Training
Lab 14 Create an Hourly-Average Shift Report 5-49
The dialog box should now look like the following figure.
41. Click Finish.
The average value for the hour appears along side the date/time cell:
Note: The value is calculated against the previous hour, so the first one appears at 9:00, the
second at 10:00, etc.
Fundamentals of the Wonderware Historian 9.0 and ActiveFactory Software 9.2 Course
5-50 Module 5 ActiveFactory Workbook
Changing the cell reference creates relative cell referencing and enables the average values
to be cascaded down the column.
44. Press the Enter key to save the changes.
45. Highlight cell C6 and drag it down to row 12.
The cell values are refreshed during the drag-down. This is because the wwAggregate formula
is being dynamically copied into each cell.
You can now change the tagname reference or the date/time from within the worksheet field
and Workbook will calculate the new values.
Note: If aggregate values are required for standardized reports, it will be worth configuring the
Historian Event/Summary system to automatically calculate these values.
46. Save the report (to the same folder as the Trend files) as ShiftAvg_DataAcq.xls.
Wonderware Training