Using the ihistorian Excel Add-In



Similar documents
Excel Companion. (Profit Embedded PHD) User's Guide

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1

NETWORK PRINT MONITOR User Guide

File Management Utility User Guide

Microsoft Access 2010 handout

Time & Expense Entry WalkThrough

Tips and Tricks SAGE ACCPAC INTELLIGENCE

Vector HelpDesk - Administrator s Guide

Create a New Database in Access 2010

-lead Grabber Business 2010 User Guide

Asset Track Getting Started Guide. An Introduction to Asset Track

Viewing and Troubleshooting Perfmon Logs

Information Server Documentation SIMATIC. Information Server V8.0 Update 1 Information Server Documentation. Introduction 1. Web application basics 2

Microsoft Access 2010 Part 1: Introduction to Access

Legal Notes. Regarding Trademarks KYOCERA MITA Corporation

Introduction to Microsoft Access 2003

Legal Notes. Regarding Trademarks KYOCERA Document Solutions Inc.

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

User Guide for TASKE Desktop

Utilities ComCash

Simply Accounting Intelligence Tips and Tricks Booklet Vol. 1

ArchestrA Log Viewer User s Guide Invensys Systems, Inc.

Intellect Platform - Tables and Templates Basic Document Management System - A101

Note: With v3.2, the DocuSign Fetch application was renamed DocuSign Retrieve.

Excel 2010: Create your first spreadsheet

H-ITT CRS V2 Quick Start Guide. Install the software and test the hardware

IRA Pivot Table Review and Using Analyze to Modify Reports. For help,

Business Insight Report Authoring Getting Started Guide

Blackbaud, Inc. This publication, or any part thereof, may not be reproduced or transmitted in any form or by any means, electronic, or

EXCEL Using Excel for Data Query & Management. Information Technology. MS Office Excel 2007 Users Guide. IT Training & Development

Excel Working with Data Lists

Kaseya 2. User Guide. for VSA 6.3

TimeValue Software Due Date Tracking and Task Management Software

Kaseya 2. User Guide. Version 7.0. English

Strategic Asset Tracking System User Guide

Microsoft Access 2010 Overview of Basics

How To Manage A Cart In A Remote Management Software

Chapter 16. Using Dynamic Data Exchange (DDE)

Results CRM 2012 User Manual

Table Of Contents. iii

Corporate Telephony Toolbar User Guide

DataPA OpenAnalytics End User Training

Enterprise Toolbar User s Guide. Revised March 2015

Copyright. Proprietary Notice

STC: Descriptive Statistics in Excel Running Descriptive and Correlational Analysis in Excel 2013

ScriptLogic File System Auditor User Guide

Search help. More on Office.com: images templates. Here are some basic tasks that you can do in Microsoft Excel 2010.

EzyScript User Manual

PortfolioCenter Export Wizard in Practice: Evaluating IRA Account Holder Ages and Calculating Required Minimum Distribution (RMD) Amounts

TIBCO Spotfire Automation Services 6.5. User s Manual

ADMINISTRATOR'S GUIDE. Version 12.20

Generating a Custom Bill of Materials

Event Record Monitoring and Analysis Software. Software Rev. 3.0 and Up. User s Guide

Extension Course Notes, Attachments, and Document Management Version 9.0

Attix5 Pro Server Edition

Access Queries (Office 2003)

To reuse a template that you ve recently used, click Recent Templates, click the template that you want, and then click Create.

Editor Manual for SharePoint Version December 2005

ACCESS Importing and Exporting Data Files. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818)

SirsiDynix Symphony 3.2 Reports Training Guide DOC-REPTGEN-S

Chapter 2: Clients, charts of accounts, and bank accounts

Using Delphi Data with Excel and Access

Word 2010: Mail Merge to with Attachments

Use Find & Replace Commands under Home tab to search and replace data.

Microsoft Access Basics

Microsoft Visual Studio Integration Guide

WebSphere Business Monitor V6.2 Business space dashboards

Ansur Test Executive. Users Manual

Excel Database Management Microsoft Excel 2003

USER MANUAL APPLICATION MONITOR. Version March 2015

Excel for Data Cleaning and Management

Microsoft Excel 2007 Mini Skills Overview of Tables

NorthClark Computing, Inc. Bill of Material and Parts Master Maintenance. Administrator s Guide

User Guide Online Backup

Snapshot Reports for 800xA User Guide

HRS 750: UDW+ Ad Hoc Reports Training 2015 Version 1.1

Excel What you will do:

Virtual CD v10. Network Management Server Manual. H+H Software GmbH

13 Managing Devices. Your computer is an assembly of many components from different manufacturers. LESSON OBJECTIVES

Using Spreadsheets, Selection Sets, and COGO Controls

WebSphere Business Monitor V7.0 Business space dashboards

Abstract. For notes detailing the changes in each release, see the MySQL for Excel Release Notes. For legal information, see the Legal Notices.

Decision Support AITS University Administration. Web Intelligence Rich Client 4.1 User Guide

Importing TSM Data into Microsoft Excel using Microsoft Query

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

Excel Database Management

Scheduling Software User s Guide

MODULE 2: SMARTLIST, REPORTS AND INQUIRIES

Smart Web. User Guide. Amcom Software, Inc.

Microsoft Outlook 2013 Part 1: Introduction to Outlook

Enterprise Reporting Advanced Web Intelligence Training. Enterprise Reporting Services

Search help. More on Office.com: images templates

Utility Billing Software Manual

Scribe Online Integration Services (IS) Tutorial

Microsoft Access 2007

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC

Web Mail Classic Web Mail

How To Create A Powerpoint Intelligence Report In A Pivot Table In A Powerpoints.Com

MULTIFUNCTIONAL DIGITAL SYSTEMS. Operator s Manual for AddressBook Viewer

Secure Website and Reader Application User Guide

Transcription:

Using the ihistorian Excel Add-In

Proprietary Notice The manual and software contain confidential information which represents trade secrets of GE Fanuc International, Inc. and/or its suppliers, and may not be copied or disclosed except as provided in the license with GE Fanuc International, Inc. The information in this manual is subject to change without notice and should not be construed as a commitment by GE Fanuc International, Inc. GE Fanuc International, Inc. assumes no responsibility for any errors that may be in this document. 2003 GE Fanuc International, Inc. ALL RIGHTS RESERVED. Trademarks 2003 GE Fanuc International, Inc. All rights reserved. Microsoft is a registered trademark of Microsoft Corporation. All other brands or names are property of their respective holders. ihistorian Version 2.0 2.03

Contents Why You Should Read This Manual...v 1. Understanding the ihistorian Excel Add-In... 1 Understanding Excel Add-In Conventions... 2 Installing The Excel Add-in with ihistorian... 3 2. Using the ihistorian Excel Add-In... 5 Selecting Options... 5 Searching Tags... 7 Querying Current Values... 7 Querying Raw Data... 7 Querying Calculated Data...8 Querying Filtered Data... 8 Exporting Tags... 8 Importing Tags... 9 Adding New Tags or Modifying Tag Parameters... 9 Deleting Tags... 10 Exporting Data... 10 Importing Data... 11 Searching Messages...11 Exporting Messages... 11 Importing Messages... 11 Listing Archives... 12 Listing Collectors... 12 Contents iii

3. Defining Reports... 13 Building Dynamic Reports... 13 Sharing Excel Reports... 13 Using the Sample Reports... 13 Sample Report 1 ihistorian Statistical Analysis... 14 Sample Report 2 Daily Report... 16 Sample Report 3 Batch Report... 19 Troubleshooting the Excel Add-In Sample Reports... 21 Running a Report Using Visual Basic... 22 Array Formulas for the ihistorian Excel Add-In... 23 Description of Array Formula Parameters... 24 Editing an Array Formula in Microsoft Excel... 28 4. Troubleshooting the Excel Add-In... 29 Troubleshooting General Imports... 29 Troubleshooting Tag Imports... 30 Troubleshooting Data Imports... 30 iv Using the ihistorian Excel Add-In

Why You Should Read This Manual The Using the ihistorian Excel Add-In manual is intended for process control engineers, integrators, and developers responsible for creating and maintaining ihistorian reports in Excel. This manual provides descriptive material and specific operating procedures for performing all common tasks. Reference Documents For related information about ihistorian, refer to the following documents: Getting Started with ihistorian Using the ihistorian Administrator ihistorian Data Collectors Migrating Advanced and Classic ihistorian Data ihistorian Software Development Kit (SDK) Online Help System Why You Should Read This Manual v

vi Using the ihistorian Excel Add-In

1. Understanding the ihistorian Excel Add-In The ihistorian Excel Add-In greatly expands the power and benefits of using the ihistorian data archiving and retrieval system. Using the Add-In, you can: Retrieve selected data from any archive file. Display it in a customized report. Present the data in any of 12 standard chart formats. Calculate derived variables from raw data values. Perform mathematical functions to smooth or characterize data. Import, export, and modify tags, data, and messages all with familiar Excel commands, macros, and computational techniques. Create dynamic reports that you can share among users. A major benefit of using the Excel Add-In is the ability to add tags to ihistorian by generating a tag worksheet using the standard Excel tools, editing the parameters, and then bulk importing the information directly into ihistorian. Using similar techniques, you can export tag parameters to Excel, make bulk changes, and then import the changes back into ihistorian in a simple, straightforward procedure. Chapter 1. Understanding the ihistorian Excel Add-In 1

Understanding Excel Add-In Conventions The Excel Add-In uses several conventions in its dialog boxes. These conventions are important to take full advantage of the features of the ihistorian Excel Add-In. The selection of tags, times, and events should always be via cell references. Try not to type these items directly into dialog boxes. Rather, select them in the worksheet. Many dialog boxes support selecting multiple statistics or attributes. You can select multiple items in a list using one of the following methods: Dragging the mouse over multiple items. Pressing the Shift key and clicking the ends of a contiguous range. Pressing the Control key and clicking multiple individual items. Specifying an Output Cell is always optional. If you do not specify an output cell, the active cell is used as the starting point for output. When you specify an output cell, that cell is used as the starting point for output. If you select a range for an output cell, the top left cell in the range is used as the starting point for output. Specifying an Output Range determines how many data points are retrieved from a given query. It is important for these functions to specify whether data points should be sorted in ascending or descending order by selecting the appropriate option. Ensure when you are specifying an Output Range or an Output Cell that the active cells are not the same cells that you specified with tag name cell references. This will lead to circular cell referencing and incorrect values. Specifying data retrieval into Rows or Cols determines how multiple attributes or statistics are displayed in the worksheet. Specifying data retrieval into Rows or Cols only applies when the dialog box inserts a single function into the worksheet. When you select a multi-cell output range, the orientation of that range determines whether the requested data is returned into rows or columns. 2 Using the ihistorian Excel Add-In

Microsoft Excel imposes a 255 character limit on their formulas. If you attempt to create a formula with more than 255 characters, you will receive an error message. Excel does not support the use of the right and left arrow keys of the keyboard to move between characters in text boxes and fields in the dialog boxes. The maximum number of columns allowed in an Excel worksheet is 256. For example, if you are trying to display a recordset returned from the Search Tags query that returns more than 256 records, the query will not return any data. If no parameters in an Excel formula change, the formula does not recalculate unless you edit (press F2) the formula and force a change. For example, if you change a Hi Scale value from 100 to 50 and then import a tag, the Hi Scale field will display 100 when looking at the tag information. When retrieving data in the Excel Add-In, be sure to leave at least one blank line at the top of the output display for the column header labels. If you do not, the header labels will not show. In several of the fields, an underscore appears at the right side of the field. If you click the underscore, the dialog box instantly changes to a minimized display. You can return to the original display by clicking the box again. The purpose of this feature is to permit you immediately to see an unobstructed view of your worksheet or other windows as you work your way through the dialog box and to allow you to select a cell or range of cells in the worksheet. Installing The Excel Add-in with ihistorian Before you install the Excel Add-In, verify that Microsoft Excel is already installed on your computer. Microsoft Excel is a prerequisite for the Add-In the Add-In will not function without it. You install the Excel Add-In package as one of the standard installation options from the ihistorian Install CD. Run the Install CD on the computer on which you want to use the Excel Add-In and select the Excel Add-In option at the prompt. Refer to the Getting Started with ihistorian for the complete installation procedure. NOTE: If you are running the ihistorian Excel Add-In on Office 97, you must install Office 97 Service Release 1 or greater. Chapter 1. Understanding the ihistorian Excel Add-In 3

After you install the Excel Add-In, use the following procedure to activate the Add- In: [1] Open a new worksheet, select Add-Ins from the Tools menu. The Add-Ins dialog box, shown in Figure 1-1, appears. Figure 1-1: Excel Add-Ins Dialog Box [2] Select ihistorian Add-In and click OK. The Add-In is now ready to use and the ihistorian menu is now available in the Excel Toolbar. TIP: If the ihistorian Add-In is not listed, click the Browse button to locate the ihistorian.xla file. 4 Using the ihistorian Excel Add-In

2. Using the ihistorian Excel Add-In This chapter describes recommended procedures for setting up the Excel Add-In and using the various options and commands. Selecting Options To select options for running the Excel Add-In, select Options from the ihistorian menu. The ihistorian Excel Add-In dialog box, shown in Figure 2-1, appears. Figure 2-1: Add-In Options Dialog Box Chapter 2. Using the ihistorian Excel Add-In 5

This dialog box allows you to select several options for running the Add-In. The choices and the effects of each are listed in the following table. Field Internal vs. External References Automatically Update Links to Add-In (Yes/No) Show/Hide Header Labels Color Assign Default Server Description Choosing Use External References allows your application to reference cells in other worksheets and workbooks in addition to the current one. If you choose Use Internal References instead, you can only access cells in the current worksheet. The default setting is Use External References. Add-In functions are maintained as worksheet links. If users who share worksheets do not have Microsoft Office installed the same way, it is necessary to turn this feature on. When on, this feature automatically reestablishes any formula links that may be broken due to differences among users in Microsoft Office installation. The default setting enables this feature. The Auto Update feature allows sharing of worksheets. You must, however, install the Excel Add-In in the exact same Microsoft Office Library Path as the other worksheets if you want to use the sharing feature. When opening a worksheet with links to another worksheet, you may receive a message prompting you to update all linked information in the workbook (Yes) or keep the existing information (No). Intellution recommends that you select No and keep the existing information. The links will be automatically updated for your worksheet. Save your worksheet after the links have been updated. This option lets you display or suppress the column header labels that are automatically placed in the worksheet when entering formulas throughout the ihistorian Dialogs. The default setting is Show Labels. Allows you to select the header name color from the drop-down list: black, blue, red, green, magenta, cyan, or yellow. This dialog box shows the current server assignment. You can modify the setting by clicking the Edit button and accessing the ihistorian Server Managers dialog box. This dialog box allows you to save user connection information, add or connect to a new server, delete a server, and modify the default server. 6 Using the ihistorian Excel Add-In

Field Adjust Column Widths Save/Default/Cancel Description This option lets you automatically adjust the width of columns in your worksheet as formulas are inserted by ihistorian dialogs. Click Adjust Header Column Width to modify the width of header labels; click Adjust Data Column Width to modify the data column widths to accommodate the data values. Enabling these options usually makes the worksheet much more readable. However, doing so can sometimes make the worksheet calculate too much when building a large report. In such cases, disable the automatic feature and adjust individual columns manually. These action buttons let you apply your choices of options. Click Save to apply the settings you entered, click Default to select default settings for all options, and click Cancel to close the dialog box. Searching Tags The Search Tags command lets you scan the tags on a specified server and then to perform actions on one or more tags you select from that group. When you select the Search Tags command in the ihistorian menu, the ihistorian Tag Search dialog box appears. Once you have searched for tags, you need to select them to add them to the current worksheet. Querying Current Values Querying Current Values retrieves the most recently updated value of one or more Tags or process variables. Querying Raw Data Raw data values are the values actually stored in the archive, after applying collector and archive compression, but before applying any interpolation, smoothing, or other signal processing calculations. Querying Raw Data retrieves these values for selected tags. Chapter 2. Using the ihistorian Excel Add-In 7

The Raw Data Query returns a number of data points based on the number of rows or columns specified in the output range. If you are not viewing all your data points, select enough rows or columns to display all the data. Querying Calculated Data Querying Calculated Data retrieves data that is the result of performing specified calculations on raw data values in the archive. Querying Filtered Data The Query Filtered Data function is similar to the calculated data query, with the addition of a search filter on the data. The Search Filter allows you to filter the actual data retrieved with a filter condition. This is useful when trying to retrieve all data for a specific Batch ID, Lot Number, or Product Code and for filtering data where certain limits were exceeded, such as all data where this temperature exceeded a certain value. Exporting Tags The Export Tags function permits you to send tag information from the ihistorian Server to an Excel worksheet or to another system, which may be either local or remote. NOTE: Before importing or exporting tags, data, or messages, you should be aware of a convention used with the ihistorian application. The Server is the reference point for all import and export functions, as illustrated in Figure 2-2. If you want to move tag information from the Server into your worksheet, you must use the Export Tags command. Conversely, if you want to move data from your worksheet to the server, you must use the Import Data command. Intellution recommends that you first export a tag and then import it, to become familiar with the procedure and what the data looks like. 8 Using the ihistorian Excel Add-In

Figure 2-2: Import/Export Reference Convention Importing Tags The Import Tags function permits you to move tag information into the ihistorian Server from an Excel Worksheet or from another system, which may be either local or remote. When used with the Excel Add-In, the Import Tags function moves selected information from your current worksheet into the specified ihistorian Server. There is no error checking when you import tags through the Excel Add-In. For example, with the Excel Add-In you can successfully import unsolicited tags without a calculation dependency (trigger). The ihistorian Administrator prevents you from performing this import, however. As another example, the Excel Add-In allows you to import circular references, while the ihistorian Administrator does not. Adding New Tags or Modifying Tag Parameters You can use the Excel Add-In to add tags to your ihistorian system or to modify parameters for existing tags. For example, you can generate and define new tags either automatically or manually in an Excel worksheet and then import them in bulk to the ihistorian system. This can be a very convenient mechanism when you are working with large numbers of tags. Chapter 2. Using the ihistorian Excel Add-In 9

If any conflicting names or parameters occur, the system displays a warning message to alert you to the problem. You can then eliminate the conflict and try again. You can also modify tag parameters by editing them in the worksheet and then bulk importing them into ihistorian. To add tags using the ihistorian Excel Add-In: [1] Build a tag worksheet in Excel using macros or any other tools you are familiar with. Since ihistorian requires information about each tag that varies with the type of tag selected, verify that you have included all required information in the worksheet before attempting to import it into ihistorian. To determine what specific tag information is required, refer to the documentation provided with your SCADA application. [2] Use the Import Tags command to bulk import this information into your ihistorian application. NOTE: If any errors on the import occur, a dialog appears detailing the issues encountered during the import. If any error occurred with any line of the import, the whole import is aborted. Deleting Tags You cannot use the Excel Add-In to delete tags from your ihistorian system. For more information on deleting tags, refer to the Deleting a Tag section of the Using the ihistorian Administrator manual. Exporting Data The Export Data function allows you to move values from the ihistorian Server to your Excel worksheet or to another system in the same way you move tag information with Export Tags. NOTE: Before importing or exporting tags, data, or messages, you should be aware of a convention used with the ihistorian application. The Server is the reference point for all import and export functions. If you want to move tag information from the Server into your worksheet, you must use the Export Tags command. Conversely, if you want to move data from your worksheet to the server, you must use the Import Data command. 10 Using the ihistorian Excel Add-In

Importing Data The Import Data command is the converse of the Export Data command. It moves selected information from your current worksheet into the specified Server in the same way the Import Tags command functions. Searching Messages The Search Messages function lets you search the archives for selected types of messages generated during a specific time period and to display selected fields from those messages. This puts a dynamic formula in the worksheet. Dynamic formulas allow you to build a dynamic message report that you can build, save, and re-use. Exporting Messages The Exporting Messages function lets you find messages and export them from the server to your worksheet or to a CSV or XML file. You can specify the server and select the messages to be exported by specifying a start time, an end time, or a text string, using standard wildcards, where applicable. You can also select which fields of the messages are exported, such as time stamp, topic, message string, message number, substitutions, or username. Importing Messages The Importing Messages command writes all messages from the worksheet into the server. When you initiate the import function, a dialog box asks if you want to import messages from your worksheet into a specified server. If you reply Yes, it scans your worksheet for messages, writes them to the server, and notifies you that the operation succeeded or failed. If you choose to export messages from ihistorian into Excel and then import the messages back into the ihistorian, note that the Importing Messages function only allows you to add messages to the ihistorian Server. It does not allow you to modify or remove any existing messages. Chapter 2. Using the ihistorian Excel Add-In 11

Listing Archives The List Archive function returns a list of selected statistics about an archive file. You can specify the server, the archive file name, and the type of information displayed, such as start time, end time, file name, target file size, current file size, current or read-only status, last backup time, and last backup users. You can also specify a range of cells for the display. To return details for more than one item, specify a substring in the Archive Name field that exists in each archive you want listed. For example, if you had archives Hero5_Archive0001-010, you could specify the substring Hero5_Archive to return the details for all those archives. Ensure that your selected output range allows for all the archives to be listed or only the number rows/columns specified in the output range will be filled in. Listing Collectors The List Collectors function returns a list of selected statistics about a collector. You can specify the server, the collector name, and select the type of information displayed. You can also specify the range of cells for the display. To return details for more than one item, specify a substring in the Collector Name field that exists in each collector you want listed. For example, if you had collectors Hero5_Collector0001-010, you could specify the substring Hero5_Collector to return the details for all those collectors. Ensure that your selected output range allows for all the collectors to be listed or only the number rows/columns specified in the output range will be filled in. 12 Using the ihistorian Excel Add-In

3. Defining Reports The ability to generate a wide range of custom reports is a major benefit of using the ihistorian Excel Add-In. Using this versatile tool, you can use all the standard, familiar Excel tools and techniques to access the ihistorian archives and build reports and charts of all types to fit your specific needs. If you want, you can use the sample reports included with ihistorian almost as is just change the tags to fit your application. As an alternative, use the setup worksheets as a starting point and adapt them to your particular situation. Building Dynamic Reports You can define a report so that Excel recalculates the worksheet whenever the contents of specific cells, such as start times or dates, change. In this way, the report generates a dynamic snapshot of process performance, updated regularly in real time. You can also, of course, manually initiate recalculation at any time. The primary rule to follow in building a dynamic report is to use formulas with cell references that contain variable information rather fixed data, so that recalculation produces new data each time it occurs. You then initiate recalculation by changing certain inputs manually or automatically. Sharing Excel Reports You can share any Excel reports you develop with the ihistorian Excel Add-In as you would any other Excel workbook. Each client using the worksheets, however, must have the ihistorian Excel Add-In installed and enabled inside Excel. Using the Sample Reports The ihistorian application includes three typical sample reports. These reports clearly demonstrate the power and ease-of-use of the Excel Add-In. Use them directly in your application or modify them to fit your requirements. Chapter 3. Defining Reports 13

The three sample Excel reports are built using tags from the Simulation Collector. You must have the Simulation Collector installed on a machine and collecting data to the ihistorian Server in order for these reports to work. The ihistorian Batch Report Sample.xls file also uses Batch ID and Product ID tags from the Simulation Collector. These are Simulation Collector points that are configured to store string data types. To ensure that the sample reports work correctly, you must add the string tags. These are the last 5 tags in the tag collector list. Add the string tags in the ihistorian Administrator by browsing the Simulation Collector and adding all of the tags by selecting the Add All Tags check box. Alternatively, you can run the Add Tags to Simulation Collector.bat batch file in the ihistorian\server directory of the machine that has the Simulation Collector. In addition, when you first install the Simulation Collector it prompts you for the number of simulation tags it should create (but you must still add the tags for collection using one of the two methods above). The default is 1000. Do not make this value less than 30. When opening a Sample Excel report, you may receive a message prompting you to update all linked information in the workbook (Yes) or keep the existing information (No). Intellution recommends that you select No and keep the existing information. The links will be automatically updated for your worksheet. Save your worksheet after the links have been updated. Sample Report 1 ihistorian Statistical Analysis This report, illustrated in Figure 3-1, calculates, for a specified time period, a number of statistical properties of a tag, such as average, maximum, minimum, standard deviation, 2 sigma and 3 sigma control limits, and correlation coefficients for other tags. It displays charts of various types for several of these variables. 14 Using the ihistorian Excel Add-In

Figure 3-1: Sample Report 1 ihistorian Statistical Analysis The chart at the lower left is a plot of the main variable vs. time with sigma control limits indicated by the straight lines. The two charts to the right are scatter diagrams that show the correlation between the main variable and two other variables. The chart at the top right is a histogram of data values of the main variable that shows how the data points are distributed. Figure 3-2 shows the worksheet associated with the sample report that contains the data used to generate the report. Chapter 3. Defining Reports 15

Figure 3-2: Sample Report 1 Data Values Sample Report 2 Daily Report This sample report, shown in Figure 3-3, shows how the measured values and selected statistical properties of specified tags have varied during the previous 24- hour period. This sample is an example of a typical daily performance report in an industrial plant. 16 Using the ihistorian Excel Add-In

Figure 3-3: Sample Report 2 Daily Report Values The report shown in Figure 3-4 is a collection of chart plots of the data displayed in the report of Figure 3-3. Chapter 3. Defining Reports 17

Figure 3-4: Sample Report 2 Daily Report Charts Figure 3-5 shows the worksheet used to set up the Daily Sample Report. Edit the worksheet to adapt this report to your application. 18 Using the ihistorian Excel Add-In

Figure 3-5: Sample Report 2 Daily Report Setup Worksheet Sample Report 3 Batch Report The sample report shown in Figure 3-6 is an example of a report that might be used with a batch type of industrial process. The table at the top of the report shows the batch identification, the start and end times, product name, and computed statistics for several process variables. The charts show how selected process parameters varied during the batch cycle. Chapter 3. Defining Reports 19

Figure 3-6: Sample Report 3 Batch Report Figure 3-7 shows the configuration worksheet used to generate the report shown in Figure 3-6. Edit this worksheet to adapt it to your requirements. 20 Using the ihistorian Excel Add-In

Figure 3-7: Sample Report 3 Batch Report Setup Worksheet Troubleshooting the Excel Add-In Sample Reports If you follow the recommended installation procedures, you should not have any difficulty in running the Sample Reports. If you do encounter any problems, they are likely to relate to the locations of files and the links to those files. When opening a Sample Excel report, you may receive a message prompting you to update all linked information in the workbook (Yes) or keep the existing information (No). Intellution recommends that you select No and keep the existing information. The links will be automatically updated for your worksheet. Save your worksheet after the links have been updated. For problems in the worksheets themselves, refer to Excel online Help for assistance. Chapter 3. Defining Reports 21

Running a Report Using Visual Basic The following Visual Basic example shows you how to create a hidden instance of Microsoft Excel, open a preconfigured ihistorian report in that instance, and then print the report to the default printer. If you want to use the following example, you need to modify the path of the.xla and.xls files. The paths that you need to edit are bolded in the following example. To use this example, a user must have the privileges to run the collector as a Windows service in Windows and a default printer must be installed. If ihistorian security is enabled, the user must have ih Readers membership. Tag level security can override this privilege. You can trigger this example to run on an event basis or on a polled basis. Most likely, you would run this example on an event basis. However, you could run it on a polled basis through the Windows Task Scheduler. Sub CreateExcelObjects() Dim xlapp As Excel.Application Dim wkbnewbook As Excel.Workbook Dim wkssheet As Excel.Worksheet Dim strbookname As String ' Create new hidden instance of Excel. Set xlapp = New Excel.Application ' Open the preconfigured ihistorian Excel Add-in report. Workbooks.Open "C:\Program Files\Microsoft Office\Office10\Library\iHistorian.xla" Set wkbnewbook = Workbooks.Open("c:\testih.xls", 0, False) 'xlapp.visible = True With wkbnewbook For Each wkssheet In.Worksheets Select Case wkssheet.name Case "tag1" wkssheet.select.refreshall.printout End Select Next wkssheet.close False 22 Using the ihistorian Excel Add-In

End With Set wkbnewbook = Nothing xlapp.quit Set xlapp = Nothing End Sub Array Formulas for the ihistorian Excel Add-In In Microsoft Excel, an array formula is a data request that inputs a set of parameters and returns a result or list of results. The ihistorian Excel Add-In uses the following array formulas: ihsearchtags(pserver,ptagmask,pdescriptionmask,pcollector,parraysize,psort,p RowCol,Parameters()) ihquerydata(pserver,ptagname,pstarttime,pendtime,psamplingmode,pcalculati onmode,psamplinginterval,pnumberofsamples,pdirection,pfiltertag,pfilte rmode,pfiltercomparisonmode,pfiltercomparisonvalue,parraysize,psort,p RowCol,Parameters()) ihquerymessages(pserver,ptopic,pstarttime,pendtime,psearchtext,parraysize,p Sort,pRowCol,Parameters()) ihlistarchives(pserver,parchivenamemask,parraysize,psort,prowcol,parameter s()) ihlistcollectors(pserver,pcollectornamemask,parraysize,psort,prowcol,paramet ers()) When inserting an array formula, you cannot overwrite part of the range of another array formula in your worksheet. The range includes cells without data displayed. An error message appears if you try to do so. Reselect a different output range to insert the formula. Chapter 3. Defining Reports 23

Description of Array Formula Parameters Table 3-1 describes the parameters for the array formulas for the ihistorian Excel Add-In. Table 3-1: Descriptions of Array Formula Parameters Parameter parchivenamemask parraysize pcalculationmode pcollector pcollectornamemask pdescriptionmask pdirection pendtime Description A search mask you can use to browse the archivers. Use standard Windows wildcard characters. The number of cells that the array spans. The type of calculation mode. See the Calculation Modes section in the Getting Started with ihistorian guide for a complete list. The collector or collector mask that you want to query. A search mask for browsing collectors. Use standard Windows wildcard characters. A search mask for browsing tag descriptions. Use standard Windows wildcard characters. The direction (forward or backward from the start time) of data sampling from the archive. The end time used to refine your query. 24 Using the ihistorian Excel Add-In

Table 3-1: Descriptions of Array Formula Parameters Parameter pfiltercomparisonmode pfiltercomparisonvalue Description The type of comparison to be made on the filter comparison value: Equal Filter condition is True when the FilterTag is equal to the comparison value. EqualFirst Filter condition is True when the FilterTag is equal to the first comparison value. EqualLast Filter condition is True when the FilterTag is equal to the last comparison value. NotEqual Filter condition is True when the FilterTag is NOT equal to the comparison value. LessThan Filter condition is True when the FilterTag is less than the comparison value. GreaterThan Filter condition is True when the FilterTag is greater than the comparison value. LessThanEqual Filter condition is True when the FilterTag is less than or equal to the comparison value. GreaterThanEqual Filter condition is True when the FilterTag is greater than or equal to the comparison value. The FilterComparisonMode defines how archive values for the FilterTag should be compared to the FilterValue to establish the state of the filter condition. If a FilterTag and FilterComparisonValue are supplied, time periods are filtered from the results where the filter condition is False. The value to compare the filter tag with when applying the appropriate filter to the DataRecordset query (to determine the appropriate filter times). Chapter 3. Defining Reports 25

Table 3-1: Descriptions of Array Formula Parameters Parameter pfiltermode pfiltertag Description The type of time filter: ExactTime Retrieves data for the exact times that the filter condition is True (only True). BeforeTime Retrieves data from the time of the last False filter condition up until the time of the True condition (False until True). AfterTime Retrieves data from the time of the True filter condition up until the time of next False condition (True until False). BeforeAndAfterTime Retrieves data from the time of the last False filter condition up until the time of next False condition (While True). The FilterMode defines how time periods before and after transitions in the filter condition should be handled. For example, AfterTime indicates that the filter condition should be True starting at the timestamp of the archive value that triggered the True condition and leading up to the timestamp of the archive value that triggered the False condition. The single tagname used when applying the filter criteria. Entering a tag for this parameter indicates that you want to perform a filtered data query. The other filter fields are disregarded unless you specify a filter tag. 26 Using the ihistorian Excel Add-In

Table 3-1: Descriptions of Array Formula Parameters Parameter pnumberofsamples prowcol psamplinginterval psamplingmode psearchtext pserver Description Number of samples from the archive to retrieve. Samples will be evenly spaced within the time range defined by start time and end time for most sampling modes. For the RawByNumber sampling mode, the NumberOfSamples column determines the maximum number of values to retrieve. For the RawByTime sampling mode, the NumberOfSamples is ignored. The sorting criteria used: 0 for Columns and 1 for Rows. For non-raw sampled data, this column represents a positive integer for the time interval (in milliseconds) between returned samples. The type of sampling mode used by the query. See the Sampling Modes section in the Getting Started with ihistorian guide for a complete list. The text or mask that you want to search for in the message. Name of the server on which you are retrieving data. If you are running Excel on the same server that you are retrieving data from, you do not have to enter a string, as the default server is used. psort The sorting criteria used for the rows or columns: 0 for Descending and 1 for Ascending. pstarttime ptagmask ptagname The start time used to refine your query. A search mask for browsing tagnames. Use standard Windows wildcard characters. The tagname or tagname mask that you want to query. Chapter 3. Defining Reports 27

Table 3-1: Descriptions of Array Formula Parameters Parameter ptopic Parameters() Description The message topic: Connections Configuration General Services Performance Security Output display of the array formula. This field can include be one or more parameters. Editing an Array Formula in Microsoft Excel To edit an array formula in Microsoft Excel, follow these steps: [1] Click on the cell in the spreadsheet that contains the array formula. [2] Click in the formula bar at the top of the screen. [3] Edit the formula that appears in this bar. [4] Press Ctrl+Shift+Enter. [5] Select Save from the File menu. NOTE: To exit a formula array without editing it, press the Esc key. 28 Using the ihistorian Excel Add-In

4. Troubleshooting the Excel Add-In This chapter contains troubleshooting information for using the Excel Add-In with ihistorian. In particular, it describes what to do if an error occurs with any of the following: General imports Tag imports Data imports Troubleshooting General Imports If you experience problems with general imports and want to resolve them, check the following: Review the ihistoriansdkerrors.log in Notepad or another text editor. This file is usually located in your Windows\System32 folder. ihistorian records additional information for some errors in this file. Sometimes, by reviewing this file you can determine the cause of the error. If using ihistorian security, verify that the user has the appropriate security rights. If the rights are incorrect, log in as user with the correct privileges or change the rights for the current user. Verify that no empty rows appear between valid rows in your spreadsheet. These empty rows can cause issues. Note if any errors occur. If an error occurs with any line of the import, ihistorian aborts the whole import. Chapter 4. Troubleshooting the Excel Add-In 29

Troubleshooting Tag Imports If you experience problems with tag imports and want to resolve them, check the following: Make sure that you are not trying to import the Calculation Execution Time, Last Modified, or Last Modified User fields for each tag. These fields are read-only. As such, you can export them but can not import them. Check that your collector does not contain any duplicate tagnames. Duplicate tagnames will cause errors to occur. Verify that the number of tags that you want to import does exceed the maximum licensed tag count. If it does, you will not be able to import the tags. Troubleshooting Data Imports If you experience problems with a data import and want to resolve it, try the following steps: If any archives are online, ensure that the timestamps are not prior to the start time of the oldest online archive. Ensure that the timestamps are within the active hours setting in the Archive Maintenance screen of the ihistorian Administrator. Ensure that the timestamps are not for a time greater than 15 minutes ahead of the system time on the ihistorian Server. Ensure that the tags are valid ihistorian tags. To do this, import your tags before importing their associated data. 30 Using the ihistorian Excel Add-In

Index adding new tags 9 A exporting data 10 exporting messages 11 exporting tags 8 C conventions 255 character limit 3 256 maximum number of columns 3 avoiding circular references 2 no right and left arrow keys 3 recalculation 3 rows or columns 2 selecting multiple attributes 2 selection of tags, times, and events 2 specifying an output cell 2 specifying an output range 2 understanding 2 deleting tags 10 Excel Add-In troubleshooting 21 D E importing data 11 messages 11 tags 9 installing the Excel add-in 3 listing archives 12 listing collectors 12 I L M modifying tag parameters 9 O options adjust column widths 7 assign default server 6 automatically update links 6 internal vs. external references 6 selecting 5 show/don t show header labels 6 Index 31

Q querying calculated data 8 querying current values 7 querying filtered data 8 querying raw data 7 R reference documents v Reports building dynamic reports 13 defining 13 sharing reports 13 using the sample reports 13 S Sample reports daily report 16 statistical analysis 14 searching messages 11 searching tags 7 troubleshooting Excel Add-In 21 T U understanding Excel add-in conventions 2 32 Using the ihistorian Excel Add-In