WWSystemPlatformCourse Part2 EntireManual
WWSystemPlatformCourse Part2 EntireManual
Revision B
December 2007
Part Number 11-GM-10001
W O N D E R W A R E T R A I N I N G
Wonderware System Platform
Course - Part 2
Wonderware Historian 9.0, ActiveFactory 9.2, Wonderware Information
Server 3.0
INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT NOTICE.
2007 by Invensys Systems, Inc. All rights reserved. No part of this document may be reproduced, stored in
or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical,
photocopying, recording or otherwise), or for any purpose, without the express written permission of Invensys
Systems, Inc. Except where noted, the companies, organizations, products, domain names, e-mail
addresses, logos, people, places and events depicted herein are fictitious and no association with any real
company, organization, product, domain name, e-mail address, logo, person, place or event is intended or
should be inferred.
Invensys and the author(s) assume no responsibility for errors or omissions and no liability is assumed for
damages resulting from the use of the information contained herein. Use of the Invensys software described
in this document is subject to the terms of the applicable Wonderware Corporation or Invensys Systems, Inc.,
license. These terms include provisions that limit your rights such as use restrictions, disclaimers of
warranties and limitations of Wonderware and Invensys liability. A copy of the applicable license will be
displayed upon initial installation of the software. If a copy of the license is not displayed or you require an
additional copy of the license, you may obtain one from Invensys' Wonderware business unit upon request by
calling 1.949.727.3200 or by sending an e-mail to support@wonderware.com.
Invensys; Wonderware; ActiveFactory; ArchestrA; DT Analyst; FactorySuite; FactorySuite A2; InBatch;
InControl; IndustrialSQL Server; InTouch; InTrack; QI Analyst; SCADAlarm; SPCPro; SuiteLink;
SuiteVoyager; WindowMaker; WindowViewer; Every system in your plant, working in concert; and the
Visualize, Analyze, Optimize logo are trademarks or service marks of Invensys plc, its subsidiaries and
affiliated companies. All other brands and product or service names may be the trademarks or service marks
of their respective owners.
Table of Contents 1
Wonderware System Platform Course - Part 2
Table of Contents
Module 1 Introduction .................................................................................1-1
Section 1 Course Introduction......................................................................... 1-3
Section 2 Introduction to the Wonderware Historian..................................... 1-19
Section 3 Introduction to ActiveFactory Software......................................... 1-25
Section 4 Introduction to Wonderware Information Server........................... 1-27
Module 2 Historian Configuration ..............................................................2-1
Section 1 Software, Hardware and Network Considerations.......................... 2-3
Section 2 System Licensing and Installation Notes ..................................... 2-13
Lab 1 Create a Galaxy ........................................................................... 2-17
Section 3 ArchestrA System Management Console Interface...................... 2-25
Section 4 System Configuration.................................................................... 2-31
Lab 2 Configuration................................................................................ 2-35
Module 3 History Data Storage and Retrieval ...........................................3-1
Section 1 Data Retrieval ................................................................................. 3-3
Section 2 Historian Time Domain Extensions................................................. 3-9
Lab 3 Query Examples........................................................................... 3-25
Module 4 ActiveFactory Trend ...................................................................4-1
Section 1 Introduction to ActiveFactory Software........................................... 4-3
Section 2 ActiveFactory Trend........................................................................ 4-7
Lab 4 Use ActiveFactory Trend Basic Functions.................................... 4-31
Lab 5 Configure Public Groups and Trend Sets..................................... 4-45
Lab 6 Configure Time Offsets and Target Regions................................ 4-57
Lab 7 Advanced Properties: Retrieval Styles......................................... 4-65
Module 5 ActiveFactory Workbook............................................................5-1
Section 1 Introduction..................................................................................... 5-3
Lab 8 Using ActiveFactory Workbook Basic Functions.......................... 5-21
Lab 9 Use Other ActiveFactory Workbook Functions............................. 5-31
Lab 10 Use the Tag Analysis Wizard..................................................... 5-37
Lab 11 Create an Hourly-Average Shift Report...................................... 5-41
Module 6 ActiveFactory Query ...................................................................6-1
Section 1 Introduction..................................................................................... 6-3
Lab 12 Use ActiveFactory Query ............................................................. 6-9
Lab 13 Use ActiveFactory Query in Excel.............................................. 6-23
Module 7 ActiveFactory Report ..................................................................7-1
Section 1 Introduction..................................................................................... 7-3
Lab 14 Using ActiveFactory Report.......................................................... 7-7
Lab 15 Wildcard Time Options and Report Editing................................ 7-15
Module 8 Manual Data.................................................................................8-1
Section 1 Manual Data Acquisition Service (MDAS) ...................................... 8-3
Lab 16 Importing Original Data ................................................................ 8-7
Lab 17 Importing Versioned Data........................................................... 8-11
Module 9 Historian Event System..............................................................9-1
Section 1 Introduction..................................................................................... 9-3
2 Wonderware System Platform Course - Part 2
Wonderware Training
Section 2 Defining Event Tags........................................................................9-9
Lab 18 Create Events ............................................................................9-15
Section 3 ActiveEvent ...................................................................................9-33
Lab 19 Using ActiveEvent.......................................................................9-37
Module 10 Introduction to Information Server ......................................... 10-1
Section 1 Hardware and Software Requirements .........................................10-3
Section 2 Information Server License Management .....................................10-5
Lab 20 Licensing Management...............................................................10-9
Module 11 Process Graphics ..................................................................... 11-1
Section 1 Convert & View InTouch Windows Over the Web.........................11-3
Lab 21 Convert and View InTouch Windows Over the Web.................11-25
Section 2 Configuring Write-Back for Factory Data Sources ......................11-37
Lab 22 Configuring Write-Back Access ................................................11-39
Module 12 Information Server Data Sources............................................ 12-1
Section 1 Configuring Data Sources .............................................................12-3
Section 2 Alarm Database Logger Utility.......................................................12-7
Lab 23 Configuring Data Sources.........................................................12-11
Module 13 Factory Alarms ......................................................................... 13-1
Section 1 Visualizing Factory Alarms............................................................13-3
Lab 24 Visualizing Factory Alarms..........................................................13-7
Module 14 ActiveFactory Reporting.......................................................... 14-1
Section 1 Introduction....................................................................................14-3
Section 2 Reports..........................................................................................14-7
Lab 25 Publishing Trend Reports .........................................................14-17
Lab 26 Publishing Workbook Reports...................................................14-25
Lab 27 Publishing Tag and Time Bound Reports .................................14-31
Section 3 Custom Folders...........................................................................14-43
Lab 28 Creating Report Folders............................................................14-45
Module 15 Table Weaver ............................................................................ 15-1
Section 1 Introduction....................................................................................15-3
Section 2 Defining Queries............................................................................15-9
Section 3 Defining Content Units ................................................................15-15
Lab 29 Define a Content Unit................................................................15-19
Section 4 Defining Displays.........................................................................15-27
Lab 30 Add Custom Displays to the Content Unit.................................15-33
Section 5 Defining Key Performance Indicators (KPIs)...............................15-45
Lab 31 Add KPIs to the Content Unit....................................................15-49
Section 6 Defining Links..............................................................................15-57
Lab 32 Add Links to the Content Unit...................................................15-61
Lab 33 Create a Filter Query................................................................15-73
Module 16 MultiViews ................................................................................. 16-1
Section 1 MultiViews .....................................................................................16-3
Lab 34 Configuring MultiViews .............................................................16-17
Section 2 Using Web Parts in MS SharePoint ............................................16-33
Module 17 ArchestrA Reports.................................................................... 17-1
Section 1 Introduction....................................................................................17-3
Table of Contents 3
Wonderware System Platform Course - Part 2
Module 18 Information Server Security and Customization....................18-1
Section 1 Managing Security........................................................................ 18-3
Lab 35 User Manager........................................................................... 18-15
Section 2 Panel Manager............................................................................ 18-29
Lab 36 Configuring Panel Manager...................................................... 18-37
Section 3 Portal Configuration.................................................................... 18-49
Lab 37 Portal Configuration.................................................................. 18-55
Section 4 Backup and Restore Utility.......................................................... 18-63
Appendix A Supported Animations & Scripts .............................................. A-1
Appendix B Using Web Parts in MS SharePoint .......................................... B-1
4 Wonderware System Platform Course - Part 2
Wonderware Training
Intentionally left blank
Module 1
Introduction
Section 1 Course Introduction 1-3
Section 2 Introduction to the Wonderware Historian 1-19
Section 3 Introduction to ActiveFactory Software 1-25
Section 4 Introduction to Wonderware Information Server 1-27
1-2 Module 1 Introduction
Wonderware Training
Module Objectives
Introduce and describe course and product elements
Introduce the Wonderware System Platform components
Explain software considerations
Section 1 Course Introduction 1-3
Wonderware System Platform Course - Part 2
Section 1 Course Introduction
This section describes the Wonderware System Platform Course - Part 2, the objectives of the
course, intended audience, prerequisites, and the course agenda. It also includes a description of
Wonderware Products.
Course Overview
The Wonderware System Platform Course - Part 2 is a five-day instructor-led class designed to
provide you with a fundamental understanding of the Wonderware
software involved in
information management, delivery, analysis and remote visualization for the Wonderware System
Platform. This class is the second part of a 2-part series. Part 1 provided you with the knowledge
necessary to develop and support applications using Wonderware Application Server.
In Part 2, key concepts and terms associated with the Wonderware Historian 9.0, ActiveFactory
9.2 and the Wonderware Information Server 3.0 are discussed. You will learn how they integrate
with ArchestrA
Control
Used to detect external events and send them to the Historian event
detector engine. Does not display a runtime interface.
Section 2 System Licensing and Installation Notes 2-15
Wonderware System Platform Course - Part 2
Historian Installation will fail unless the following Microsoft SQL Server installation options are
selected:
The Microsoft SQL Server Default instance option must be selected. Named instances of
SQL Server are not supported by the Historian.
Installation Operations
The installation program performs the following operations:
Installs the common components, such as SuiteLink
, NetDDE
Locates a running Microsoft SQL Server on the local computer. If you do not have the
required version of Microsoft SQL Server installed, you are required to install or upgrade it
prior to the Historian installation.
Logs on to the installed Microsoft SQL Server using a system administrator login. You
must be able to successfully log on to the Microsoft SQL Server to complete the setup.
Checks for required disk space based on the options that you have selected.
Creates and configures Historian databases files.
Creates the Historian directories on the hard disk and install program files.
Populates the Historian program or startup menu group with icons.
Microsoft SQL Server
A successful installation of the Wonderware depends upon proper configuration of Microsoft SQL
Server:
The required version of Microsoft SQL Server (minimum Personal Edition, or Express
Edition for SQL Server 2005) must be installed and running prior to installing the Historian.
If the Historian installation program detects that a Microsoft SQL Server or a required
service pack is not installed, you are required to have them installed for you.
You can also use an existing Microsoft SQL Server, provided that you have configured
certain options (logon, service pack installed) correctly.
Remote Microsoft SQL Servers are not supported.
The Microsoft SQL Server used by the Historian MUST be the primary instance of SQL
Server.
Multiple instances of Microsoft SQL Server on the same machine as the Historian are not
supported.
After the Historian installation is complete, the installation program restarts the Microsoft
SQL Server so that the installation changes can take effect. Any users connected to the
Microsoft SQL Server at that time are automatically disconnected.
A restart is not required for a re-installation of the Historian.
If you are installing the Historian management tools on a remote computer, only the
Microsoft SQL Server Client Utilities are required. If these utilities are not already installed,
you are prompted to install them prior to installing the Historian.
2-16 Module 2 Historian Configuration
Wonderware Training
The Microsoft SQL Server is deployed for this course with the following settings:
When installing Microsoft SQL Server, you must properly configure certain options prior to
installing the Historian:
Dictionary Sort Order: Use any of the case-insensitive sort orders supported by SQL
Server, such as the default.
Modifying the dictionary sort order after the installing the Historian will result in a loss of the
Historian databases.
Network Support: Use TCP/IP and any other support required at your site.
You can run the Microsoft SQL Server setup program to change these options.
Note: Microsoft SQL Server options should only be configured by a qualified Windows or SQL
Server administrator. For more information, see your Microsoft SQL Server documentation.
Option Default Value
SQL Server Services Set to use the Local System account.
Default Database Collation Dictionary order, case-insensitive, for use with 1252 char. set.
Security Mode Mixed.
Administrator Login Username is sa with a password of ww.
Lab 1 Create a Galaxy 2-17
Wonderware System Platform Course - Part 2
Lab 1 Create a Galaxy
Introduction
In this lab you will create a new Galaxy, import automation objects that represent a Mixer
application, configure the objects to run on the local computer, and deploy the Galaxy. Throughout
this class you will use this Mixer application. This lab will draw upon knowledge gained in the
prerequisite course.
Objectives
Upon completion of this lab you will be able to:
Create a Galaxy
Import Automation Objects
Configure imported Automation Objects to be used on a local computer
Deploy the Galaxy
2-18 Module 2 Historian Configuration
Wonderware Training
Galaxy Configuration
This figure shows the components of the process used as a real data source for this class. The
galaxy you are about to create will model this process within Application Server. These objects
have pre-configured attributes connecting to the real-time source; during the rest of the class you
will reference the attributes shown in the figure below.
Your instructor will provide you with a unique student number. Please note it here.
Student number (XX): _____
Mixer_XX0: ______________
Mixer_XX1: ______________
Lab 1 Create a Galaxy 2-19
Wonderware System Platform Course - Part 2
Create a Galaxy
1. Start the ArchestrA Integrated Development Environment (IDE) (Start / All Programs /
Wonderware / ArchestrA IDE).
2. Click New Galaxy.
3. Enter the GR node name. This is the name of the local computer. Your instructor will provide
this information. In the following example, the local computer name is WWSYSPLATFORM2.
4. Enter a Galaxy Name of WWGalaxy.
5. Select Base_Application_Server.cab in the Galaxy type drop-down box.
6. Click Create.
7. Click Close in the Create Galaxy window when Galaxy creation is complete.
8. Click Connect in the Connect To Galaxy window.
9. In the ArchestrA IDE, choose the Galaxy menu, and select Import / Object(s).
10. Navigate to the Mixer Objects.aaPKG file located in the C:\Wonderware Training folder and
click Open.
2-20 Module 2 Historian Configuration
Wonderware Training
11. Click OK to accept the defaults in the Import Preferences dialog box.
12. Click Close in the Import Automation Object(s) dialog box when the importing process is
complete.
13. In Deployment view, expand TWinPlatform as shown (press the * key on the number keypad).
14. Change the XX in the Mixer_XX0 and MixerXX1 object names to reflect your student number
(the number you noted on page 2-18).
Lab 1 Create a Galaxy 2-21
Wonderware System Platform Course - Part 2
15. You will receive a warning. Click Yes.
Configure and Deploy the Galaxy
16. In Deployment View, double-click the InControl object to open it for editing.
17. Modify the Server node: field as needed. Your instructor will provide the Server node name.
18. Click the Save and Close button.
19. Enter appropriate Check In comments and click OK.
20. Double-click the TAppEngine object to edit its settings.
21. Check the Enable storage to historian checkbox.
22. Verify the Enable tag hierarchy checkbox is checked.
2-22 Module 2 Historian Configuration
Wonderware Training
23. Enter the node name of the Historian in the Historian field.
24. Click the Save and Close button and check in the TAppEngine object.
25. Double-click the TWinPlatform object.
26. Enter your node name in the Network address field.
27. Click the Save and Close button and check in the TWinPlatform object.
Lab 1 Create a Galaxy 2-23
Wonderware System Platform Course - Part 2
28. Right-click the TWinPlatform object and choose Deploy.
29. Verify Cascade Deploy is checked and click OK.
30. Click Close when the deploy is complete.
31. Right-click an object in the Line1 Area and select View in Object Viewer.
2-24 Module 2 Historian Configuration
Wonderware Training
32. Add the following attributes to the Watch List to observe their values, and to ensure data is
being received.
InletValve_001.PV
LIT_001.PV
OutletValve_001.PV
TransferPump_001.PV
TT_001.PV
Section 3 ArchestrA System Management Console Interface 2-25
Wonderware System Platform Course - Part 2
Section 3 ArchestrA System Management Console Interface
This section introduces and explains the ArchestrA System Management Console (SMC) Interface
Elements.
The Historian leverages the functionality of the ArchestrA System Management Console (SMC) by
making all areas within the Historian available to the administrator.
ArchestrA System Management Console does not perform administrative functions, but hosts
tools that do. The primary type of tool you can add to a console is called a snap-in. Other items
that you can add include ActiveX controls, links to Web pages, folders, taskpad views, and tasks.
There are two general ways to use SMC:
in user mode, working with existing MMC consoles to administer a system
in author mode, creating new consoles or modifying existing MMC consoles
Section Objective
Introduce and explain the ArchestrA System Management Console Interface Elements
2-26 Module 2 Historian Configuration
Wonderware Training
The installation program of the Historian automatically creates a shortcut on the desktop:
a. Double-click the shortcut icon.
The ArchestrA System Management Console appears (see the following figure).
The ArchestrA System Management Console Tree View pane (left-side) is divided into two
main areas: The Management Console and the Configuration Editor. Other options that may
display are the Log viewer, Application Server managers, and so on.
The Management Console: This area is where the server housekeeping takes place.
From this area, you can monitor all communications, add and delete servers and groups,
access History Block information.
The Configuration Editor: This area is where tag import, I/O servers, IDAS, Storage
information, and the Public and Private Groups are administered.
The following figure shows the Status icon highlighted. The Historian has not yet been started.
Section 3 ArchestrA System Management Console Interface 2-27
Wonderware System Platform Course - Part 2
Management Console
a. Within the console root, expand IndustrialSQL Server Historians, IndustrialSQL Server
Group and the Server icons.
b. Expand the Management Console icon.
c. Highlight the Status icon. Within the Item, Module and Time/Message panes, you should see
current information about your server status.
This pane includes all system information in real-time.
d. Highlight the License status line within the Item pane:
The status message should be Valid.
Note: If the License Status message is not Valid, the Historian will log only system tags. No
other tags will be logged.
2-28 Module 2 Historian Configuration
Wonderware Training
Configuration Editor
e. Expand the Configuration Editor icon.
f. Expand any of the main icons in the Tree View pane.
This area contains a browser-like display of all system information.
Section 3 ArchestrA System Management Console Interface 2-29
Wonderware System Platform Course - Part 2
g. Expand the System Configuration folder and click the Parameters icon.
Storage and Headroom settings are configured from within this pane, and are discussed in
detail later in this manual.
h. Expand the Storage folder.
2-30 Module 2 Historian Configuration
Wonderware Training
Storage properties are stored within this folder.
Several different storage locations are available. Notice all four types have similar configurable
properties: Path, Deletion Threshold, Maximum size, and Age threshold.
Circular: Local storage location for historical data storage. When the free space on the disk
containing the circular storage location drops below a minimum threshold or the data is of a
specified age, the oldest data is deleted out of this storage location and replaced with new data.
Instead of data being deleted from the circular storage location, it can be moved into the alternate
storage location, if that location is defined.
Alternate: When circular data is scheduled for deletion, the storage subsystem will start moving
these history blocks to one or more alternate locations, if defined. Alternate storage locations are
numbered. A block of data moves sequentially through the alternate locations until it is finally
moved to the end of the last alternate location space, at which point the data is deleted from the
system.
Buffer: Used for temporary purposes, such as retrieval from a data archive. Data stored in the
buffer storage location can be accessed and viewed along with the data stored in the circular
storage location.
Permanent: Permanent storage locations are used to store critical data (for example, reactor
trips) that must not be overwritten. The storage subsystem will never attempt to delete data in this
location. Data in a permanent storage location can be accessed and viewed along with the data
stored in the circular storage location.
Section 4 System Configuration 2-31
Wonderware System Platform Course - Part 2
Section 4 System Configuration
This section introduces and explains the Historian System Configuration. It also introduces
Dynamic Configuration of the Historian parameters.
Overview
Configuration data is information about elements that make up the Historian system, such as tag
definitions, I/O Server definitions, storage locations for historical data files, and so on.
Configuration data is relatively static; that is, it is not constantly being changed as the result of
plant operation.
The configuration subsystem is responsible for handling and storing configuration data. When the
Historian is installed, all configuration information are defined automatically.
Configuration data is stored in Microsoft SQL Server tables within the Runtime database. If
InTouch is handling your I/O, you can easily import much of this information from existing InTouch
applications.
System Configuration for Manual Data is performed from within the ArchestrA System
Management Consoles Configuration Editor.
Bulk modifications and Historian system migrations can be performed using the Historian
Database Export/Import Utility.
The system can be configured at any time with no interruption in the acquisition, storage, and
retrieval of unaffected tags. Configuration data can be stored with a complete revision history.
Dynamic Configuration
The Historian supports dynamic configuration. In other words, tags and other objects in the
Historian database can be modified while the system is running.
The Historian detects and applies the modifications to its internal runtime state, when the
modifications are authorized by the user, without requiring the system to be restarted. In addition,
clients do not suffer interruptions due to configuration changes.
The dynamic configuration feature in the Historian caters for all possible database modifications
that affect the runtime operation of the system.
The dynamic configuration subsystem is designed to ensure that no loss of data occurs for tags
that are not affected by the modifications being applied. However, tags that require a change in
data acquisition configuration will obviously lose data during the reconfiguration.
For some types of configuration modifications, the system automatically creates a new history
block.
In all but one case, the system continues to run uninterrupted. The single exception that requires a
restart of the system is when you change the main historization path in the system, a parameter
that is rarely modified after installation.
Section Objectives
Introduce and explain the Historian System Configuration
Introduce Dynamic Configuration of the Historian parameters
2-32 Module 2 Historian Configuration
Wonderware Training
Dynamic configuration is usually a two-step process:
First, you modify one or more objects in the database, using the ArchestrA System
Management Console, Transact-SQL statements, or the database modification tool of
your choice.
Then, after making all of the modifications, you must commit the changes, which triggers
the dynamic configuration process in the server.
System Change Scenarios
Different types of dynamic changes to the database affect the system in different ways. A
summary of typical changes and their effect on the system follows.
Modifying System Parameters
Modification to system parameters usually takes effect immediately (a new history block is not
created).
Exceptions:
Adding headroom for one or more tag types (requires a new history block).
Changes to the AutoStart parameter (takes effect after the next full shutdown of the
system).
Modifying Storage Locations
Modifying the circular storage location requires a shutdown and restart of the Historian. Changes
to the other storage locations take effect immediately.
System Change Effects
Modifications to the tag database that changes the database footprint on the disk may result in
creation of a new history block.
If only data acquisition or retrieval characteristics of a tag are modified, the changes take effect
without requiring the system to create a new history block. Any change to the data source for the
tag (for example, modifying the item name, topic name or I/O Server name of the tag) results in a
short gap in data for the tag. This is because the system disconnects from the old data source and
connects to the new data source.
Adding, Deleting, and Modifying Tags
Adding one or more tags to the system generally results in creation of a new history block, unless
sufficient headroom is available for that particular tag type. In this case a new block is not required.
If the headroom is exceeded, a new block is created and the headroom is replenished to the
amount specified in the SystemParameter table.
Deleting one or more tags takes effect immediately.
Certain modifications to tags result in a new history block. Those modifications include:
Changing the integer size.
Changing the raw type.
Changing strings tags from fixed length to variable length or vice-versa.
Changing storage type from Not stored to Stored.
Section 4 System Configuration 2-33
Wonderware System Platform Course - Part 2
Changing a string tag from ASCII to Unicode or vice-versa,
Changing tag acquisition type from IDAS to Manual or vice-versa.
Headroom capability enables the user to define "space" storage to be readily available to the
system. In other words, settings are changed in order to add a few tags fairly quickly and with
no wait or delay when creating a new history block.
For example, when importing tags, the system merely checks the number of new tags against
the amount of headroom available and on that basis decides whether a new history block will
be created after the commit operation.
At the start of each new history block, however, the system will replenish the amount of
headroom to the setting specified by the user. If the user specified headroom for 100 discrete
tags and imports an application with 40 discrete tags (nothing else), the import happens
without a new block being created, but the system consumes 40 of the discrete headroom
"slots."
For the remainder of the duration of that block, the headroom remains at 60. Assuming no new
discrete tags are added, at the next block changeover (whether it is a scheduled block
changeover, or a block forced by the user), the discrete headroom internally will reset to 100.
Headroom settings should not be used to keep space "just in case" 10,000 tags will be added.
Memory and hard disk space is impacted.
Tag count validation for licensing purposes does not apply to pre-allocated tag memory; the tag
count is verified only when the tag definitions are committed.
Committing Changes
Committing database changes is the action that makes the Historian aware of changes in the
Runtime database. When the user modifies the Runtime database (using the Configuration Editor,
Query Analyzer, etc.) while the Historian is running, Historian is unaware of the changes until the
user commits the changes.
When the commit operation occurs, the Historian reads the modified info from the database to
keep in memory, and reconfigures the runtime components like IDAS, storage etc.
Modifications made to the database are done in a transactional fashion.
You can commit changes to the configuration of the system as often as needed. You can also
commit changes in batches or individually. There is no limit on the number of changes that may be
committed to the database.
Committing configuration changes typically takes effect within 10 seconds under maximum data
throughput conditions.
Cases in Which Configuration Changes will NOT be Committed
If the system is not running, or storage has not been started, any commit will be ignored, and the
contents of the ConfigStatusPending table will be cleaned up.
When the system is running, a commit will be disallowed:
While a previous dynamic configuration is still in progress.
While a new history block creation is in progress (initiated as a scheduled block
changeover, a dynamic configuration, or a user request). A block is deemed in progress
for five minutes after it has been created, and also ten minutes prior to the next scheduled
block changeover.
For each case, a message is displayed indicating that the commit was disallowed.
2-34 Module 2 Historian Configuration
Wonderware Training
Intentionally left blank
Lab 2 Configuration 2-35
Wonderware System Platform Course - Part 2
Lab 2 Configuration
Introduction
Next you will begin the process of system configuration to optimize the system for use. The tasks
performed in this lab can be performed within any environment depending on the planned number
of tags, system and network requirements, and so on.
Objective
Upon completion of this lab, you will be able to:
Start the Historian
Review Historian Registration Properties
Enable Autostart of the Historian
Configure Modification Tracking
2-36 Module 2 Historian Configuration
Wonderware Training
Start the Historian
1. Start the Historian (Start / All Programs / Wonderware / IndustrialSQL Server /
IndustrialSQL Server).
2. Expand the folders as shown below.
3. Right-click Status and choose Start InSQL.
4. Log in when prompted. Your instructor will give you the proper login information.
Each Module status changes to Started:
Lab 2 Configuration 2-37
Wonderware System Platform Course - Part 2
Review Historian Registration Properties
5. Select the Server icon.
6. Right-click and select Edit IndustrialSQL Server Registration Properties.
7. Check the Display InSQL Server state in console checkbox. This setting displays the status
of the server as a small icon on top of the Local Server icon.
8. Verify that the Always prompt for login information and the Use Windows authentication
checkboxes are checked. These settings define the security access to the Historian console.
9. Click OK.
In the following figure the server state is good/running:
Note: If the server is not started or any problems exist (incorrect service logins, etc.) the icon
displays a red square.
2-38 Module 2 Historian Configuration
Wonderware Training
Enable Modifications Tracking
Next you will configure the Historian to log any modifications made to configuration information.
10. Navigate to the Configuration Editor under your server name and expand System
Configuration. The folders are located within the Tree View (left-hand) pane of the ArchestrA
System Management Console.
11. Select Parameters in the System Configuration folder.
12. Double-click ModLogTrackingStatus in the Parameters list.
13. Set the Value to 7. This will log the following types of modifications: Inserts, Updates, and
Deletions.
14. Click OK.
15. Click once on the Configuration Editor to select it.
16. Right-click on the Configuration Editor and select Commit Pending Changes.
Lab 2 Configuration 2-39
Wonderware System Platform Course - Part 2
17. Click Display to see the Pending Changes.
The Pending Changes are displayed, indicating the ModLogTrackingStatus was recently
modified.
18. Click OK.
19. Click Commit.
Once the changes have been committed, a confirmation box will display.
20. Click OK.
2-40 Module 2 Historian Configuration
Wonderware Training
Track Modifications
21. Right-click Configuration Editor and select Track Modifications...
22. Click the Search button, accepting the default settings.
Lab 2 Configuration 2-41
Wonderware System Platform Course - Part 2
The Modification Tracker will display any modifications made after tracking was enabled.
23. Click Cancel when finished viewing, and Cancel again.
Configure System Parameters
Next you will configure the AutoStart parameter to true so that the Historian automatically starts.
24. Navigate to the Configuration Editor and expand System Configuration. The folders are
located within the Tree View (left-hand) pane of the ArchestrA System Management Console.
2-42 Module 2 Historian Configuration
Wonderware Training
25. Select Parameters in the System Configuration folder.
Double-click the AutoStart parameter.
Set the Value field entry to 1, and click OK. This will automatically start the Historian server the
next time the computer is restarted.
26. Commit pending changes as you did previously.
27. Track Modifications as you did previously to see the AutoStart line has been added.
Lab 2 Configuration 2-43
Wonderware System Platform Course - Part 2
28. Click Cancel when finished viewing, and Cancel again.
2-44 Module 2 Historian Configuration
Wonderware Training
Intentionally left blank
Module 3
History Data Storage and Retrieval
Section 1 Data Retrieval 3-3
Section 2 Historian Time Domain Extensions 3-9
Lab 3 Query Examples 3-25
3-2 Module 3 History Data Storage and Retrieval
Wonderware Training
Module Objectives
Explain high-level data retrieval and changes to the Historian OLE-DB Provider
Explain Historian SQL Query structures
Use SQL examples to show query syntax and data retrieval options
Section 1 Data Retrieval 3-3
Wonderware System Platform Course - Part 2
Section 1 Data Retrieval
This section explains the Data Retrieval Subsystem and features for the Historian.
Data Retrieval Subsystem
The purpose of the retrieval subsystem is to receive SQL queries from clients, locate the
requested data, perform any necessary processing, and then return the results. For configuration
and event data, retrieval is made possible by normal SQL queries, because these types of data
are stored in normal SQL Server database tables. History data, however, must be retrieved from
the history blocks and presented to clients as if it were also stored in SQL Server tables. To
accomplish retrieval from both of these data repositories, the retrieval subsystem includes:
An implementation of a SQL Server data provider, which determines whether the
requested data resides in normal SQL Server tables or in the history blocks.
A low-level retrieval layer, which is responsible for extracting the requested data from the
history blocks and presenting to the InSQL OLE DB provider as "virtual" history tables.
A set of SQL Server extensions, which are implemented as columns in the history tables.
You can use these extensions to specify the nature of the rowset that will be returned,
such as the number of rows returned, the resolution of the data, or the retrieval mode.
For more information on data storage, see the Online Help topic: Data Storage Subsystem.
Data Retrieval Features
Some of the main features of the data retrieval subsystem are:
All tag types can be included in the same query, when retrieving from the History table.
You do not need to separate analog, discrete, and string tags into different queries. Any
combination of tags may be submitted in a query.
Live data from the active image will be returned independent of the tag types in the list,
unless an ORDER BY clause is applied to the query.
Both fixed length and variable length strings are supported.
All internal time computation and manipulation is done using the Win32 FILETIME type.
The resolution of FILETIME is 100 nano-seconds.
All times are handled internally as absolute time (UTC). Conversions to and from local
time are handled going in and out of retrieval so the external interface is local time.
Non-realtime data is supported (for example, store-and-forward data or data imported
from a .CSV file).
Retrieval of different versions is supported.
Section Objective
Explain the Data Retrieval Subsystem and Features for the Historian
3-4 Module 3 History Data Storage and Retrieval
Wonderware Training
History Blocks: A SQL Server Remote Data Source
Remote data sources are simply data repositories that exist outside of a Microsoft SQL Server
database file (.MDF). Microsoft sometimes refers to these types of data sources as "non-local data
stores." In the case of the Historian, a remote data source is the set of history block files. All tag
data is stored in the history blocks. For more information on history blocks, see the Online Help
topic: History Blocks.
OLE DB technology can be used to access data in any remote data store. This access is
accomplished though a software component called an OLE DB provider.
About the InSQL OLE DB Provider
Object Linking and Embedding for Databases (OLE DB) is an application programming interface
(API) that allows COM-based client applications to access data that is not physically stored in the
Microsoft SQL Server to which they are connecting.
The benefit of using OLE DB is that it provides access to different types of data in a broader
manner. By using OLE DB, you can simultaneously access data from a variety of sources, such as
from a Microsoft SQL Server database, an Oracle database, and a Microsoft Access database. A
query that accesses data from multiple, dissimilar data sources such as these is called a
"heterogeneous query," with "heterogeneous" meaning "dissimilar." A heterogeneous query can
also be called a "distributed query," because the data can be distributed across various data
sources.
Microsoft SQL Server uses OLE DB to process heterogeneous queries and makes linking data
between the data sources much easier. Through OLE DB, Microsoft SQL Server supports
Transact-SQL queries against data stored in one or more SQL Server and heterogeneous
databases without any need for specialized gateway server applications.
The interface required to access data in a non-local data store (such as the Historian history
blocks) is provided by a "virtual" server, called an OLE DB provider. OLE DB providers allow you to
use the power of the Microsoft SQL Server query processor to make linking data stored in the
Microsoft SQL Server databases and from the history blocks much easier and more robust. Also,
the Historian OLE DB provider has a rich set of query capabilities.
The name of the Historian OLE DB provider is "INSQL." The INSQL OLE DB provider is installed
during Historian installation and then associated, or linked, with the Microsoft SQL Server. For
information on the syntax for linking the INSQL OLE DB provider, see the Online Help topic:
Linking the INSQL OLE DB Provider to the Microsoft SQL Server.
To access historical data using OLE DB, any COM-based client application must connect directly
to the Microsoft SQL Server and then specify to use the Historian OLE DB provider in the syntax of
the query.
When you execute a query and specify the Historian OLE DB provider in the syntax, the Microsoft
SQL Server parser will pass the appropriate parts of the data request to the Historian Server OLE
DB provider. The Historian OLE DB provider will then interface with the low-level retrieval layer to
locate the data store, extract the requested information, and return the data to the Microsoft SQL
Server as a rowset. Microsoft SQL Server will perform any other processing required on the data
and return the data to the client application as a result set and a set of output parameters, if
applicable.
The Historian OLE DB provider must be present on the server running Microsoft SQL Server. The
set of Transact-SQL operations that can be used to retrieve data in the history blocks depends on
the capabilities of the Historian OLE DB provider. The Historian OLE DB provider is SQL-92
compliant. For more information on OLE DB, see your Microsoft documentation.
Section 1 Data Retrieval 3-5
Wonderware System Platform Course - Part 2
Extension (Remote) Tables for History Data
Some of the history tables are rowset representations that provide a means for handling acquired
plant data. These tables are not part of normal SQL Server functionality. A normal SQL Server
table stores data directly in the database's data device file (.mdf). An extension table, however,
presents data as if it were a real table, but it does not physically exist in the data device. An
extension table is a logical table that is populated from other types of data files; thus, the data is
stored "remotely" from SQL Server. In the case of the Historian, the data files are the history
blocks generated by the storage system.
Note Extension tables are also called remote tables.
Data access from the history blocks is made possible by SQL Server's OLE DB provider
technology. Client applications must connect directly to the Microsoft SQL Server and then specify
to use the Historian OLE DB provider in the syntax of the query.
The extension tables are:
History (InSQL.Runtime.dbo.History)
HistoryBlock (INSQL.Runtime.dbo.HistoryBlock)
Live (INSQL.Runtime.dbo.Live)
WideHistory (INSQL.Runtime.dbo.WideHistory)
The AnalogHistory, DiscreteHistory, StringHistory, AnalogLive, DiscreteLive, StringLive,
AnalogWideHistory, DiscreteWideHistory, and StringWideHistory tables are provided for backward
compatibility. For more information, see the Online Help topic: Backward Compatibility Entities.
The AnalogHistory, DiscreteHistory, StringHistory, and History tables are the only tables which are
updateable. The remaining tables are read-only.
For more information on the history extension tables, see the Online Help topic: History Tables.
Query Syntax for the Historian OLE DB Provider
The most common Historian query is a SELECT statement:
SELECT select_list
FROM table_source
WHERE search_condition
[ GROUP BY group_by_expression ]
[ HAVING search_condition ]
[ ORDER BY order_expression [ ASC | DESC ] ]
A WHERE clause is mandatory when issuing a SELECT query against any extension table except
HistoryBlock.
There are four variations for issuing a SELECT statement to the Historian OLE DB provider to
retrieve history data, which will be discussed next:
Four-Part Naming Convention
Historian OLE DB Provider View
OPENQUERY Function
OPENROWSET Function
3-6 Module 3 History Data Storage and Retrieval
Wonderware Training
Using the Four-Part Naming Convention
The linked server name is simply a name by which the Historian OLE DB provider is known to the
Microsoft SQL Server. In order for a query to be passed on to the Historian OLE DB provider, you
must specify the linked server name and the extension table name as part of a four-part naming
convention.
For example, this query specifies to retrieve data from the History extension table in the Historian
OLE DB provider:
SELECT * FROM INSQL.Runtime.dbo.History
WHERE TagName = 'SysTimeSec'
AND DateTime >= '2001-09-12 12:59:00'
AND DateTime <= '2001-09-12 13:00:00'
The four-part naming convention is described in the following table:
In the case of four-part queries, SQL Server produces the statement that is sent to the Historian
OLE DB provider from the statement that the user executes. Sometimes this produced statement
is incorrect, too complex, or lacks portions of the WHERE clause required for the Historian OLE
DB provider to return data.
A typical error message when executing unsupported syntax is:
Server: Msg 7320, Level 16, State 2, Line 1
Could not execute query against OLE DB provider 'INSQL'.
[OLE/DB provider returned message: Historian did not receive a WHERE clause from SQL Server.
If one was specified, refer to the Historian OLE DB documentation]
For four-part queries against non-English SQL Servers running on non-English operating systems,
the default date format might differ from the English versions. For example, for a French or
German SQL Server running on the corresponding operating system, the date/time in a four-part
query must be:
yyyy-dd-mm hh:mm:ss.fff
For example:
2003-28-09 09:00:00.000
Part Name Description
linked_server Linked server name. By default, INSQL.
catalog Catalog in the OLE DB data source that contains the object from which you
want to retrieve data. For Microsoft SQL Server type databases, this is the
name of the database. To use the Historian OLE DB provider, the catalog
name will always be "Runtime."
schema Schema in the catalog that contains the object. For Microsoft SQL Server
type databases, this is the name of the login ID for accessing the data. To
use the Historian OLE DB provider, the catalog name will always be "dbo."
object_name Data object that the OLE DB provider can expose as a rowset. For the
Historian OLE DB provider, the object name is the name of the remote table
that contains the data you want to retrieve. For example, the History table.
Section 1 Data Retrieval 3-7
Wonderware System Platform Course - Part 2
Using a Historian OLE DB Provider View
Microsoft SQL Server views have been provided that will access each of the extension tables,
eliminating the need to type the four-part server name in the query. These views are named the
same as the provider table name. Note Backward compatibility views are named according to the
v_ProviderTableName convention.
For example:
SELECT * FROM History
WHERE TagName = 'SysTimeSec'
AND DateTime >= '2001-09-12 12:59:00'
AND DateTime <= '2001-09-12 13:00:00'
Using the OPENQUERY Function
You can use the linked server name in an OPENQUERY function to retrieve data from an
extension table. The OPENQUERY function is required to retrieve wide table data. For example:
SELECT * FROM OPENQUERY(INSQL, 'SELECT * FROM History
WHERE TagName = "SysTimeSec"
AND DateTime >= "2001-09-12 12:59:00"
AND DateTime <= "2001-09-12 13:00:00" ')
The following example retrieves data from a wide table:
SELECT * FROM OPENQUERY(INSQL, 'SELECT DateTime, SysTimeSec
FROM WideHistory
WHERE DateTime >= "2001-09-12 12:59:00"
AND DateTime <= "2001-09-12 13:00:00" ')
The OPENQUERY portion of the statement is treated as a table by SQL Server, and can also be
used in joins, views, and stored procedures. SQL Server sends the quoted statement, unchanged
and as a string, to the Historian OLE DB provider. Consequently, only the syntax that the Historian
OLE DB provider can parse is supported. Also, be sure that you do not exceed the 8000 character
limit for the statement. Consider the following example:
SELECT * FROM OpenQuery(INSQL, 'XYZ')
where "XYZ" is the statement to pass. You should be sure that the value of "XYZ" is not more than
8000 characters. This limit is most likely to cause a problem if you are querying many tags from a
wide table.
Also, you should supply the datetime in an OPENQUERY statement in the following format:
yyyy-mm-dd hh:mm:ss.fff
For example:
2001-01-01 09:00:00.000
You cannot use variables in an OPENQUERY statement. For more information, see the Online
Help topic: Using Variables with the Wide Table.
Using the OPENROWSET Function
The linked server name can be used as an input parameter to an OPENROWSET function. The
OPENROWSET function sends the OLE DB provider a command to execute. The returned rowset
can then be used as a table or view reference in a Transact-SQL statement. For example:
SELECT * FROM OPENROWSET('INSQL',' ', 'SELECT DateTime, Quality,
QualityDetail, Value
FROM History
WHERE TagName in ("SysTimeSec")
AND DateTime >= "2001-09-12 12:59:00"
AND DateTime <= "2001-09-12 13:00:00" ')
3-8 Module 3 History Data Storage and Retrieval
Wonderware Training
Intentionally left blank
Section 2 Historian Time Domain Extensions 3-9
Wonderware System Platform Course - Part 2
Section 2 Historian Time Domain Extensions
This section explains the Data Retrieval Subsystem and Features for the Historian.
Data Retrieval Methods
The SQL language is not always appropriate for handling time series data. The Historian adds
several extensions to the normal SQL language to make it possible to meaningfully query this type
of information. The methods of data retrieval can be grouped by function as follows:
Time interpolation
Wide Table Transformations
Storage Independent Retrieval Mode
Resolution Control
Edge Detection
Time Domain Extensions
Each of the above functions is described in the following pages. The various extensions can be
used together to achieve a wide range of effects. The extensions only apply to the live (real time)
and history tables.
Time Interpolation
This extension allows data to be retrieved at any point in time even if there is no row at that point in
time.
Why This is Needed
An unassisted database would return data from history for a specified point in time only if there
were an actual row with that time stamp. If there were no row data, complex SQL would be
required to determine the effective value.
How It Is Used
Nothing special is required to use Time Interpolation. This is inherent in the way the Historian
handles all queries to the extension data.
For example the queries:
SELECT Value
FROM InSQL.runtime.dbo.AnalogHistory
WHERE TagName = 'SysTimeHour'
AND DateTime = '20070218 17:45:55'
and
SELECT Value
FROM InSQL.runtime.dbo.AnalogHistory
WHERE TagName = 'SysTimeHour'
AND DateTime = '20070218 17:45:58'
both request data 3 seconds apart, and both return a value of 17, even though the tag
SysTimeHour is stored cyclically only once every 5 minutes.
Section Objective
Explain the Data Retrieval Subsystem and Features for the Historian
3-10 Module 3 History Data Storage and Retrieval
Wonderware Training
Wide Table Transformation
Wide Table Transformation is defined as the ability to provide the same historical data in two
different table formats: one in Narrow table format, and one in Wide table format, for each of the
basic data types.
For example, we can view the tables WideHistory and History. These two formats are
appropriate for very different uses.
Data for three tags from the wide table typically looks like this:
Dat eTi me SysTi meSec SysTi meMi n SysTi meHour
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2007- 02- 18 13: 56: 13. 153 13. 0 56. 0 13. 0
2007- 02- 18 13: 56: 49. 517 4 56. 0 13. 0
2007- 02- 18 13: 57: 25. 880 25. 0 57. 0 13. 0
2007- 02- 18 13: 58: 02. 243 2. 0 58. 0 13. 0
2007- 02- 18 13: 58: 38. 607 38. 0 58. 0 13. 0
2007- 02- 18 13: 59: 14. 970 14. 0 59. 0 13. 0
2007- 02- 18 13: 59: 51. 333 51. 0 59. 0 13. 0
The same data from the narrow table looks like this:
Dat eTi me TagName Val ue Qual i t y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2007- 02- 18 13: 52: 04. 277 SysTi meSec 4. 0 0
2007- 02- 18 13: 52: 04. 277 SysTi meMi n 52. 0 0
2007- 02- 18 13: 52: 04. 277 SysTi meHour 13. 0 0
2007- 02- 18 13: 52: 40. 640 SysTi meSec 40. 0 0
2007- 02- 18 13: 52: 40. 640 SysTi meMi n 52. 0 0
2007- 02- 18 13: 52: 40. 640 SysTi meHour 13. 0 0
2007- 02- 18 13: 53: 17. 003 SysTi meSec 17. 0 0
2007- 02- 18 13: 53: 17. 003 SysTi meMi n 53. 0 0
2007- 02- 18 13: 53: 17. 003 SysTi meHour 13. 0 0
2007- 02- 18 13: 53: 53. 367 SysTi meSec 53. 0 0
2007- 02- 18 13: 53: 53. 367 SysTi meMi n 53. 0 0
2007- 02- 18 13: 53: 53. 367 SysTi meHour 13. 0 0
2007- 02- 18 13: 54: 29. 730 SysTi meSec 2. 0 0
2007- 02- 18 13: 54: 29. 730 SysTi meMi n 54. 0 0
2007- 02- 18 13: 54: 29. 730 SysTi meHour 13. 0 0
The data is physically stored only once.
Section 2 Historian Time Domain Extensions 3-11
Wonderware System Platform Course - Part 2
Analysis
The narrow format is best for most relational query use.
The wide format is best for most Engineering uses.
The advantages and disadvantages to each type are as follows:
In a traditional database you would either have to select one of the above with the attendant
disadvantages, or store the data twice.
The Historian gives both formats while storing only once. The Historian provides the time domain
extensions on both formats.
Wide Table Format Narrow Table Format
Easy to visualize, especially for cyclically stored data
because one can see the values for each of the tags
in a single row for a point in time.
Hard to interpret visually.
Allows one to use the value of specified tags to
scope the retrieval of data for other tags. For
example Show me the level in the tank when the
pressure was greater than 50 and the temperature
was less than 32.
This type of query would require nested selects.
Well suited for import and export into non-relational
systems such as Excel or legacy historian systems.
This type of import/ export is not easily performed
with out some form of non-SQL processing.
Requires a column per tag. This limits the number of
Tags to the maximum allowed by the relational
database.
Supports an unlimited number of tags.
Very inefficient for the retrieval of delta stored data. Good for delta storage but not for cyclic.
Cannot query value qualifiers such as the fields
Quality and QualityDetail in the narrow table.
Easily supports any other columns.
Does not allow joins on TagName. Thus one cannot
select tags based on information in other tables.
Ideal relational format.
Table structure is determined by the tags making it
very cumbersome to add new tags.
Table structure does not change when tags are
added and deleted.
No joins to other tables are possible on Value so a
query for alarms conditions defined in another table
would be impossible.
Ideal relational format.
3-12 Module 3 History Data Storage and Retrieval
Wonderware Training
Here is a typical narrow table query:
SELECT DateTime,TagName,Value,Quality
FROM v_AnalogHistory
WHERE TagName IN ('SysTimeSec', 'SysTimeMin' , 'SysTimeHour')
This query returns the following rows:
Dat eTi me TagName Val ue Qual i t y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2007- 02- 18 13: 52: 04. 277 SysTi meSec 4. 0 0
2007- 02- 18 13: 52: 04. 277 SysTi meMi n 52. 0 0
2007- 02- 18 13: 52: 04. 277 SysTi meHour 13. 0 0
2007- 02- 18 13: 52: 40. 640 SysTi meSec 40. 0 0
2007- 02- 18 13: 52: 40. 640 SysTi meMi n 52. 0 0
2007- 02- 18 13: 52: 40. 640 SysTi meHour 13. 0 0
2007- 02- 18 13: 53: 17. 003 SysTi meSec 17. 0 0
2007- 02- 18 13: 53: 17. 003 SysTi meMi n 53. 0 0
2007- 02- 18 13: 53: 17. 003 SysTi meHour 13. 0 0
2007- 02- 18 13: 53: 53. 367 SysTi meSec 53. 0 0
2007- 02- 18 13: 53: 53. 367 SysTi meMi n 53. 0 0
2007- 02- 18 13: 53: 53. 367 SysTi meHour 13. 0 0
2007- 02- 18 13: 54: 29. 730 SysTi meSec 53. 0 0
2007- 02- 18 13: 54: 29. 730 SysTi meMi n 54. 0 0
2007- 02- 18 13: 54: 29. 730 SysTi meHour 13. 0 0
Here is a typical Wide Table query:
SELECT*
FROM OpenQuery(INSQL,"
SELECT DateTime, SysTimeSec, SysTimeMin, SysTimeHour
FROM runtime.dbo.WideHistory
WHERE wwRetrievalMode = 'Cyclic' ")
The query returns the following rows:
Dat eTi me SysTi meSec SysTi meMi n SysTi meHour
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2007- 02- 18 13: 56: 13. 153 13. 0 56. 0 13. 0
2007- 02- 18 13: 56: 49. 517 4 56. 0 13. 0
2007- 02- 18 13: 57: 25. 880 25. 0 57. 0 13. 0
2007- 02- 18 13: 58: 02. 243 2. 0 58. 0 13. 0
2007- 02- 18 13: 58: 38. 607 38. 0 58. 0 13. 0
2007- 02- 18 13: 59: 14. 970 14. 0 59. 0 13. 0
2007- 02- 18 13: 59: 51. 333 51. 0 59. 0 13. 0
Section 2 Historian Time Domain Extensions 3-13
Wonderware System Platform Course - Part 2
Storage Independent Retrieval Mode
This feature allows you to retrieve data using several different methods, regardless of how the
data was stored.
Normally the way that data is stored in a relational database determines exactly how it will be
retrieved. One must thus pre-determine what method will be used to store time series data.
The Historian enables you to specify how data is stored on a per-tag basis. The time domain
extensions in the Historian enable the choice of the retrieval mode at query time.
Storage type and retrieval type are independent choices.
At retrieval time one specifies the retrieval mode using a virtual column (see the following) called
wwRetrievalMode.
The Historian employs virtual columns to implement three of the time domain extensions it
provides. A virtual column is a column that is generated on the fly by the Historian. There is no
actual stored data for these columns. Specifying criteria with these columns in the WHERE clause
controls the behavior of the time domain extensions.
Each storage/retrieval method is described in detail in the following section:
wwRetrievalMode = Cyclic
wwRetrievalMode = Delta
Retrieval Type Normal Cyclic Retrieval
Usage Use as:
wwRetrievalMode =Cyclic
Use with:
wwCycleCount
wwTimeStampRule (Start,End)
wwResolution
Results Returns cyclic time stamps based on time boundaries. Cyclic mode sets the number of
rows per tag to be returned. The rows will be evenly spaced over the time period
specified by the start and end datetime.
QualityDetail Value N/A
Retrieval Type Normal Delta Retrieval
Usage Use as:
wwRetrievalMode ='Delta'
Use with:
wwCycleCount
Results Returns delta points. Values will be returned each time the value changes within the time
period specified by the start and end datetime.
QualityDetail Value N/A
3-14 Module 3 History Data Storage and Retrieval
Wonderware Training
wwRetrievalMode = Full
wwRetrievalMode = Interpolated
wwRetrievalMode = Integral
Retrieval Type Delta retrieval all points
Usage Use as:
wwRetrievalMode ='Full'
Use with:
wwCycleCount
Results A cyclic retrieval based on delta points where the actual points returned are Stairstep
(normal cyclic) or Interpolated values based on available delta points. The results can
contain positive and negatives values.
QualityDetail Value N/A
Retrieval Type Cyclic
Usage Use as:
wwRetrievalMode ='Interpolated'
wwInterpolationType ='Stairstep' or 'Linear' (default setting based on system or tag
parameter)
Use with:
wwCycleCount
wwResolution
wwTimeStampRule ('Start', 'End')
wwQualityRule ('Good','Extended')
Results A cyclic retrieval based on delta points where the actual points returned are Stairstep
(normal cyclic) or Interpolated values based on available delta points. The results can
contain positive and negatives values.
QualityDetail Value N/A
Retrieval Type Cyclic (uses Full retrieval points)
Usage Use as:
wwRetrievalMode ='Integral'
wwInterpolationType ='Stairstep' or 'Linear' [integral divisor].
Use with:
wwCycleCount
wwResolution
wwTimeStampRule ('Start', 'End')
wwQualityRule ('Good','Extended')
Results Returns cyclic slices equal to the integral or area of each slice. The area value is scaled
down based on the IntegralDivisor in the EngineeringUnit table ((average value * number
of seconds)/Integraldivisor).
QualityDetail Value N/A
Section 2 Historian Time Domain Extensions 3-15
Wonderware System Platform Course - Part 2
wwRetrievalMode = Average
wwRetrievalMode = BestFit
Retrieval Type Cyclic (uses Full retrieval points)
Usage Use as:
wwRetrievalMode ='Average'
wwInterpolationType ='Stairstep' or 'Linear'
Use with:
wwCycleCount
wwResolution
wwTimeStampRule ('Start', 'End')
wwQualityRule ('Good','Extended')
Results Returns a value which is the Integral value divided by the number of seconds (Integral/
seconds). A time-weighted average algorithm is used to calculate the values to be
returned for each retrieval cycle.
QualityDetail Value If all the points found are good (192) then Qualitydetail value will be 192. Otherwise if the
quality of any point is not 192 or can not calculate (NULL points found) qualitydetail value
will be 64 (undetermined) and will be sent to OPCQuality. Percent column show percent
of usable points that are not NULL.
Retrieval Type Delta retrieval with cycles
Usage Use as:
wwRetrievalMode ='bestfit'
Use with:
wwCycleCount
wwResolution
wwQualityRule ('Good','Extended')
Results Returns a max of 5 rows (delta point) per cycle where for each cycle contains distinct
values for the First time stamp, Last time stamp, Min value, Max value and First NULL
encountered. If for example First, Last, Min or Max are the same value will return only
one row for those values.
QualityDetail Value If the cycle was complete returns a 192, else 1216 or 4288 for an incomplete or partial
cycle, QD =1068 for incomplete cycle where a re-connect happened. Incomplete or
partial cycles are cycles that do not meet the resolution or contain NULLs.
3-16 Module 3 History Data Storage and Retrieval
Wonderware Training
wwRetrievalMode = Minimum
wwRetrievalMode = Maximum
wwRetrievalMode = Counter
Retrieval Type Delta retrieval with cycles (uses Full retrieval)
Usage Use as:
wwRetrievalMode ='minimum'
Use with:
wwCycleCount
wwResolution
wwQualityRule ('Good','Extended')
Results Returns one row (delta point) for each cycle identifies the minimum value with in each
cycle, except for the phantom cycle (first row) will return the time stamp of the value
found (delta point).
QualityDetail Value If the cycle was complete returns the 192, else 1216 for incomplete. Incomplete or partial
cycles do not meet the resolution or contain NULLs.
Retrieval Type Delta retrieval with cycles (uses Full retrieval)
Usage Use as:
wwRetrievalMode ='maximum'
Use with:
wwCycleCount
wwResolution
wwQualityRule ('Good','Extended')
Results Returns one row (delta point) for each cycle identifies the maximum value with in each
cycle, except for the phantom cycle (first row) will return the time stamp of the value
found (delta point).
QualityDetail Value If the cycle was complete returns the 192, else 1216 for incomplete. Incomplete or partial
cycles do not meet the resolution or contains NULL.
Retrieval Type Cyclic
Usage Use as:
wwRetrievalMode ='counter'
Use with:
wwCycleCount
wwResolution
wwTimeStampRule ('Start', 'End')
wwQualityRule ('Good','Extended')
Results Returns a total or accumulated value of the delta points with in each cycle or the
difference between the end value and start value of the cycle. Requires the 'Rollover
value' for the tag be set to 1 more then the max value of the tag. Only works with discrete
and Analog unsigned integer tags.
QualityDetail Value If a cycle results in a roll-over the QualityDetail of that cycle will identified with a 212.
Section 2 Historian Time Domain Extensions 3-17
Wonderware System Platform Course - Part 2
wwRetrievalMode = Slope
wwRetrievalMode = ValueState
Retrieval Type Delta (uses Full retrieval points)
Usage Use as:
wwRetrievalMode ='slope'
Use with:
wwCycleCount
wwQualityRule ('Good','Extended')
Results Returns (delta point) the +/- rate of change, which represents the magnitude change per
second. Results shown as +/- if going positive or negative.
QualityDetail Value
Retrieval Type Cyclic
Usage Use as:
wwRetrievalMode ='ValueState'
Use with:
wwCycleCount
wwResolution
wwQualityRule ('Good','Extended')
wwStateCalc ('Minimum' (Min), 'Maximum' (Max), 'Average' (Avg), 'Total' (Sum), 'Percent'
Results Returns the amount of Time (in StateTime column) of each distinct value found in each
cycle as indicated by wwCycleCount or wwResolution.
Note: Can use the History or the wide StateWideHistory table to obtain the same
information. History table uses StateTime column to show the percent or time (in
milliseconds) based on the wwStateCalc requested.
QualityDetail Value
3-18 Module 3 History Data Storage and Retrieval
Wonderware Training
A summary of each storage/retrieval method is shown in the following table:
Cycle
Count (X
Values
over
Equal
Time
Intervals)
Resolution
(Values
Spaced
Every X
ms)
Time
Deadband
Value
Deadband
History
Version
Interpolation
Type
Timestamp
Rule
Quality
Rule
Row Limit
Cyclic
Retrieval
*
Delta
Retrieval
Full Retrieval
Interpolated
Retrieval
Best Fit
Retrieval
Average
Retrieval
Minimum
Retrieval
Maximum
Retrieval
Section 2 Historian Time Domain Extensions 3-19
Wonderware System Platform Course - Part 2
Resolution Control
This set of extensions allows you to control the apparent resolution of the underlying data in the
analog and discrete history tables. Different control mechanisms are provided for the different
retrieval modes.
The data resolution requirement for a tag is often a function of the proposed usage of the data.
Examples:
A trend program does not require a higher resolution of data than can meaningfully be
displayed on the display device. In this case data reduction is typically required to prevent
millions of unneeded values being sent to the client.
When performing some aggregations data is required at a specific resolution for the
aggregation to have meaning. For example, a volume can be deduced from a flow (such
as Gallons per Minute) by summing the samples provided that the samples are at an
appropriate resolution (such as 1 second for this case).
Values of tags with widely differing time characteristics are being compared.
When the underlying data storage mode is delta but cyclic retrieval is being used.
At retrieval time one specifies time resolution using one or more of the virtual columns (see below)
called wwCycleCount, wwResolution, wwValueDeadband and wwTimeDeadband.
Historian uses virtual columns to implement four of the time domain extensions it provides.
wwCycleCount. In Cyclic mode this sets the number of rows per tag to be returned. The
rows will be evenly spaced over the time period specified by the start and end datetime of
the query. wwCycleCount and wwResolution are mutually exclusive.
wwResolution. This is an integer value in milliseconds. In Cyclic mode this sets the time
interval between samples to be returned over the time period specified by the start and
end datetime of the query. wwCycleCount and wwResolution are mutually exclusive.
wwValueDeadband. This a float value specifying a percentage of full scale. In Delta
mode it is used to control when a change in value is considered to occur. It can have any
value between 0 and 100. A change in value is only considered to have occurred when the
value changes by at least this percentage of the full scale of the tag.
wwTimeDeadband. This is an integer value in milliseconds. In Delta mode it is used to
control the number of rows returned. Values will not be returned more frequently than this
even if the underlying data changes many times within the interval.
3-20 Module 3 History Data Storage and Retrieval
Wonderware Training
Edge Detection
This extension enables detection of a value change using edge conditions. For example it can be
used to determine the point in time that a tag goes into (leading) or comes out of (trailing) alarm.
Normal SQL queries return all data that matches the applied criteria. With time series data one is
often only interested in the first or last point when criteria become valid or not. For example one
might want to find the time that an alarm limit is exceeded. The normal query:
SELECT Dat eTi me, Val ue FROM v_Anal ogHi st or y
WHERE TagName = ' SysTi meSec'
AND Val ue > 55
AND wwResol ut i on = 1000
Will return the following rows:
Dat eTi me Val ue
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2007- 02- 18 16: 37: 56. 730 56. 0 ?---- Limit Exceeded here
2007- 02- 18 16: 37: 57. 730 57. 0
2007- 02- 18 16: 37: 58. 730 58. 0
2007- 02- 18 16: 37: 59. 730 59. 0
2007- 02- 18 16: 38: 56. 730 56. 0 ?---- Limit Exceeded here
2007- 02- 18 16: 38: 57. 730 57. 0
2007- 02- 18 16: 38: 58. 730 58. 0
2007- 02- 18 16: 38: 59. 730 59. 0
2007- 02- 18 16: 39: 56. 730 56. 0 ?---- Limit Exceeded here
2007- 02- 18 16: 39: 57. 730 57. 0
2007- 02- 18 16: 39: 58. 730 58. 0
2007- 02- 18 16: 39: 59. 730 59. 0
2007- 02- 18 16: 40: 56. 730 56. 0 ?---- Limit Exceeded here
2007- 02- 18 16: 40: 57. 730 57. 0
2007- 02- 18 16: 40: 58. 730 58. 0
2007- 02- 18 16: 40: 59. 730 59. 0
<- - - About 190 r ows omi t t ed f or cl ar i t y
2007- 02- 18 17: 36: 56. 730 56. 0
2007- 02- 18 17: 36: 57. 730 57. 0
2007- 02- 18 17: 36: 58. 730 58. 0
2007- 02- 18 17: 36: 59. 730 59. 0
( 240 r ow( s) af f ect ed)
The problem is that we are not, in this case, interested in any of the values between the points that
the limit is exceeded. At first glance it appears that one could find these point using the TOP
argument of a SELECT statement but this is not the case.
At retrieval time one specifies that edge detection should be applied to the query using the virtual
column (see below) called wwEdgeDetection.
The virtual column wwEdgeDetection is a character column whose values can be None,
Leading, Trailing or Both. This column determines how rows are returned when the WHERE
criteria in the query evaluate to true.
Section 2 Historian Time Domain Extensions 3-21
Wonderware System Platform Course - Part 2
The effects are:
None: Returns all rows that successfully meet the criteria; no edge detection is
implemented at the specified resolution.
Leading: 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).
Trailing: Returns only rows that are the first to fail the criteria (return false) after a row
successfully met the criteria (returned true).
Both: All rows satisfying both the leading and trailing conditions are returned.
So to avoid the effect shown by the preceding example we use the following query:
SELECT DateTime, Value FROM v_AnalogHistory
WHERE TagName = 'SysTimeSec'
AND Value > 55
AND wwResolution = 1000
AND wwEdgeDetection = 'Leading'
It returns the following data:
Dat eTi me Val ue
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2007- 02- 18 17: 13: 56. 180 56. 0
2007- 02- 18 17: 14: 56. 180 56. 0
2007- 02- 18 17: 15: 56. 180 56. 0
2007- 02- 18 17: 16: 56. 180 56. 0
2007- 02- 18 17: 17: 56. 180 56. 0
<- - - About 50 r ows omi t t ed f or cl ar i t y
2007- 02- 18 18: 09: 56. 180 56. 0
2007- 02- 18 18: 10: 56. 180 56. 0
2007- 02- 18 18: 11: 56. 180 56. 0
2007- 02- 18 18: 12: 56. 180 56. 0
( 60 r ow( s) af f ect ed)
The results show the time at which the tag value exceeds 55
3-22 Module 3 History Data Storage and Retrieval
Wonderware Training
Time Domain Extensions
The following table provides information for the Historian Time Domain Extensions:
wwVersion
The wwVersion time domain extension allows you to specify which version of the stored data is to
be retrieved. The storage subsystem handles versioning by creating new tags to represent
updates and inserts. The tags containing the updates/inserts have a creation date, which is used
to version the data.
If a number of updates or inserts have been made, there will be a number of timestamped
versions. However, there will be two possible versioning types that you can use to access data:
ORIGINAL and LATEST.
Note: The values ORIGINAL and LATEST are not case-sensitive.
If you do not specify the version, the latest modified data value will be retrieved.
For example:
SELECT TagName, DateTime, Value, wwVersion
FROM INSQL.Runtime.dbo.History
WHERE TagName IN ('SysTimeHour', 'SysTimeMin')
AND DateTime >= '2007-12-20 0:00'
AND DateTime <= '2007-12-20 0:05'
AND wwRetrievalMode = 'delta'
AND wwVersion = 'original'
wwCycleCount Determines the number of rows to be retrieved.
wwEdgeDetection The moment at which a detection criterion is met. A string value of Leading,
Trailing, Both or None. Defaults to None.
wwInterpolationType Controls how retrieval will determine which analog value to return at a given cycle
boundary. Valid values are STAIRSTEP and LINEAR.
wwQualityRule Specify whether values with certain characteristics are explicitly excluded from
consideration by data retrieval. Valid values are GOOD or EXTENDED.
wwResolution Specify the time interval in milliseconds between samples to be returned.
wwRetrievalMode Determines the type of result set returned. A string value of Cyclic, Delta, Full,
Interpolated, Integral, Average, BestFit, Minimum, Maximum, Counter, Slope, or
ValueState may be used. Default depends on the table.
wwTimeStampRule Use to specify whether cyclic results are timestamped at the beginning of the
cycle or the end of the cycle. Valid values are START and END.
wwTimeDeadband The time deadband, in milliseconds, to apply to the result set. Only meaningful for
Delta queries. Ignored for Cyclic queries. Defaults to 0 (no deadband).
wwValueDeadband The value deadband, in percent of full scale, to apply to the result set. Only
meaningful for Delta queries. Ignored for Cyclic queries. Defaults to 0 (no
deadband). Not available for v_DiscreteHistory (only 0 & 1).
wwTimeZone Determines time zone format for returned data. Defaults to the time zone of the
Historian computer.
wwVersion Determines which version of data is returned. A string value of Original or
Latest. Defaults to Latest.
Section 2 Historian Time Domain Extensions 3-23
Wonderware System Platform Course - Part 2
The results are:
wwTimeZone
For the Historian 8.0 and later, all history data is stored in Universal Time Coordinated (UTC). The
wwTimeZone extension allows you to specify the time zone to be used for the timestamps of the
returned data values. The retrieval subsystem will convert the timestamps to local time in the
specified time zone.
The wwTimeZone extension may be assigned any of the values stored in the TimeZone column of
the TimeZone table in the Runtime database. In addition to specifying the name of the timezone in
the wwTimeZone parameter, you can also specify the TimeZoneID (as a string). For example, on a
typical US English system, specifying " wwTimeZone ='Mountain Standard Time' " and
"wwTimeZone ='64' " yields the same result.
The TimeZone table is repopulated at every system startup from Microsoft operating system
registry entries, and will therefore reflect the time zones available via the server operating system,
including any new or custom time zones that might be added by operating system service packs or
installed software.
The retrieval subsystem will automatically correct for daylight savings time in the requested time
zone. When computing daylight savings and time zone parameters, the settings of the server
operating system are used. The retrieval sub-system does not provide any means for using client-
side settings.
If wwTimeZone is not specified, the time zone for retrieval defaults to the time zone of the Historian
computer.
For example:
SELECT TagName, Dat eTi me, Val ue, wwTi meZone
FROM I NSQL. Runt i me. dbo. Hi st or y
WHERE TagName I N ( ' SysTi meHour ' , ' SysTi meMi n' )
AND Dat eTi me >= ' 2007- 12- 20 0: 00'
AND Dat eTi me <= ' 2007- 12- 20 0: 05'
AND wwRet r i eval Mode = ' del t a'
AND wwTi meZone = ' W. Eur ope St andar d Ti me'
TagName DateTime Value wwVersion
SysTi meMi n 2007- 12- 20 00: 00: 00. 000 0. 0 ORI GI NAL
SysTi meHour 2007- 12- 20 00: 00: 00. 000 0. 0 ORI GI NAL
SysTi meMi n 2007- 12- 20 00: 01: 00. 000 1. 0 ORI GI NAL
SysTi meMi n 2007- 12- 20 00: 02: 00. 000 2. 0 ORI GI NAL
SysTi meMi n 2007- 12- 20 00: 03: 00. 000 3. 0 ORI GI NAL
SysTi meMi n 2007- 12- 20 00: 04: 00. 000 4. 0 ORI GI NAL
SysTi meMi n 2007- 12- 20 00: 05: 00. 000 5. 0 ORI GI NAL
3-24 Module 3 History Data Storage and Retrieval
Wonderware Training
The results are:
TagName DateTime Value wwTimeZone
SysTi meMi n 2007- 12- 20 00: 00: 00. 000 0. 0 W. Eur ope St andar d Ti me
SysTi meHour 2007- 12- 20 00: 00: 00. 000 15. 0 W. Eur ope St andar d Ti me
SysTi meMi n 2007- 12- 20 00: 01: 00. 000 1. 0 W. Eur ope St andar d Ti me
SysTi meMi n 2007- 12- 20 00: 02: 00. 000 2. 0 W. Eur ope St andar d Ti me
SysTi meMi n 2007- 12- 20 00: 03: 00. 000 3. 0 W. Eur ope St andar d Ti me
SysTi meMi n 2007- 12- 20 00: 04: 00. 000 4. 0 W. Eur ope St andar d Ti me
SysTi meMi n 2007- 12- 20 00: 05: 00. 000 5. 0 W. Eur ope St andar d Ti me
Lab 3 Query Examples 3-25
Wonderware System Platform Course - Part 2
Lab 3 Query Examples
Introduction
This lab employs Microsoft SQL Server Management Studio, which is installed as a client utility
with Microsoft SQL Server 2005.
Objective
Upon completion of this lab, you will be able to:
Open SQL Server Management Studio and connect to the Historian
Execute SQL Queries against the Historian Runtime Database
3-26 Module 3 History Data Storage and Retrieval
Wonderware Training
Run a SQL Query
1. Double-click the QueryExamples.sql file located in the C:\Wonderware Training folder.
2. Configure the Connect to Database Engine window as follows, entering aaUser in the
Login: field and pwUser in the Password: field.
3. Click Connect to connect to Microsoft SQL Server.
4. Select the Runtime database in the drop-down menu.
5. Highlight the Example 1 query and click the Execute button.
The following queries are intended for use as a reference in order to build your own queries.
Each query includes an explanation of why it is used and how it works.
When using Microsoft SQL Server Management Studio, highlight only the query you plan to
run one at a time! If you click the Execute button with no queries highlighted, the system will
run all the queries in your current session. This could cause significant overload to your
system.
6. After highlighting the selected query, execute the query by using the Ctrl+E keys or click
Execute.
7. Change date/time in the query to retrieve current data where applicable.
Lab 3 Query Examples 3-27
Wonderware System Platform Course - Part 2
Query Examples
- - Exampl e 1
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- -
- - Per f or mi ng A Si mpl e Quer y:
SELECT *
FROM Tag
- - Exampl e 2
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- -
- - Sel ect i ng Mul t i pl e Col umns:
SELECT Tagname, Description, DateCreated
FROM Tag
- - Exampl e 3
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- -
- - I nt r oduci ng The ' WHERE' Cl ause:
SELECT Tagname, Description
FROM Tag
WHERE Tagname = 'SysTimeSec'
- - Exampl e 4
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- -
- - Usi ng t he I N St at ement I n A WHERE Cl ause:
3-28 Module 3 History Data Storage and Retrieval
Wonderware Training
SELECT TagName, MinEU, MaxEU
FROM AnalogTag
WHERE TagName IN ('LIT_001.PV', 'TT_001.PV', 'InletValve_001.PV')
- - Exampl e 5
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- -
- - Compl ex WHERE Cl ause wi t h LI KE st at ement :
SELECT TagName, MinEU, MaxEU
FROM AnalogTag
WHERE TagName LIKE 'sys%'
AND MaxEU<50
- - Exampl e 6
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- -
- - J OI NS - Sel ect i ng Dat a Fr omMul t i pl e Tabl es:
SELECT TagName, MinEU, MaxEU, Unit
FROM AnalogTag, EngineeringUnit
WHERE EngineeringUnit.EUKey = AnalogTag.EUKey
- - I f a col umn i s sel ect ed t hat i s pr esent i n mor e
- - t han one t abl e, you must speci f y Tabl eName. Col umnName:
SELECT AnalogTag.TagName, Description, MinEU, MaxEU
FROM AnalogTag, Tag
WHERE Tag.TagName = AnalogTag.TagName
Lab 3 Query Examples 3-29
Wonderware System Platform Course - Part 2
- - Exampl e 7
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- -
- - J OI NS wi t h Compl ex WHERE St at ement s:
SELECT TagName, MinEU, MaxEU, Unit
FROM AnalogTag, EngineeringUnit
WHERE EngineeringUnit.EUKey = AnalogTag.EUKey
AND Tagname LIKE 'sys%'
AND Unit = 'Day'
- - Exampl e 8
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- -
- - Accessi ng Dat a Fr omt he I nSQL Ext ensi on Tabl es
- - The " Li ve" t abl e pr ovi des l i ve val ues f or
- - al l t ag t ypes i n one t abl e:
SELECT Datetime, Tagname, Value
FROM Live
WHERE Tagname in ('LIT_001.PV', 'InletValve_001.PV.IsActive1',
'SysString')
- - NOTE: Not i ce t he " NULL" val ue gi ven f or t he st r i ng t ag
- - " SysSt r i ng". When accessi ng st r i ng t ags i n t he Li ve or Hi st or y
- - t abl es t he " vVal ue" col umn i s used. vVal ue col umn st or es t he
- - val ue as a sql _var i ant whi ch al l ows val ues wi t h mi xed dat at ypes
- - as a r esul t :
SELECT Datetime, Tagname, Value, vValue
FROM Live
WHERE Tagname in ('LIT_001.PV', 'InletValve_001.PV.IsActive1',
'SysString')
3-30 Module 3 History Data Storage and Retrieval
Wonderware Training
- - Exampl e 9
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Accessi ng Dat a f r omt he Hi st or y t abl e
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'TT_001.PV'
- - Not i ce t hat t hi s quer y r et ur ns hi st or y dat a f or t he l ast hour . Si nce
- - t he quer y doesn' t speci f y a t i me per i od expl i ci t l y, Hi st or i an
- - r et ur ns one hour wor t h of dat a. However , t her e ar e sever al ways t o
- - speci f y a t i me per i od.
- - Exampl e 10
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Accessi ng Hi st or y t abl es usi ng Dat e const ant s. Modi f y t he dat es i n t he
- - quer y as needed.
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'TT_001.PV'
AND Datetime > 'January 1, 1970 10:00'
AND Datetime <= 'January 1, 1970 10:30'
- - Exampl e 11
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Usi ng Get dat e( )
- - The Get dat e( ) f unct i on r et r i eves t he cur r ent dat et i mef r omt he comput er cl ock.
- - Modi f y t he dat es i n t he quer y as needed.
SELECT Datetime, Tagname, vValue
Lab 3 Query Examples 3-31
Wonderware System Platform Course - Part 2
FROM History
WHERE Tagname = 'TT_001.PV'
AND Datetime > 'January 1, 1970 10:00'
AND Datetime <= Getdate()
- - Exampl e 12
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Usi ng Dat eadd wi t h Get dat e( ) :
- - Usi ng Dat eadd i n conj unct i on wi t h t he Get dat e( ) f unct i on
- - al l ows t he user t o speci f y an st andar d of f set f r omt he
- - cur r ent t i me. The f ol l owi ng quer y wi l l al ways r et ur n
- - t he l ast hour of dat a f or t he t ags ' TT_001. PV and LI T_001. PV' :
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname IN ('TT_001.PV', 'LIT_001.PV')
AND Datetime > Dateadd(mi, -60, Getdate())
AND Datetime <= Getdate()
- - Exampl e 13
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Accessi ng Dat a Fr omWi deHi st or y
- - Wi de Tabl es:
- - I n t he pr ecedi ng exampl e t he dat a i s har d t o r ead. Thi s i s
- - because t he dat a f or a par t i cul ar t ag i s not gr ouped f or
- - easy vi ewi ng. A speci al set of t abl es ar e pr ovi ded whi ch
- - use t he t agname as a col umn name, t hus maki ng t he t abl e
- - easi er t o vi ew. To access t hese t abl es an OpenQuer y must
- - be used:
3-32 Module 3 History Data Storage and Retrieval
Wonderware Training
SELECT *
FROM OpenQuery (INSQL, '
SELECT Datetime, [LIT_001.PV], [InletValve_001.PV.IsPassive],
SysString
FROM WideHistory
WHERE Datetime > Dateadd(mi, -65, Getdate())
AND Datetime <= Getdate()')
- - Not i ce t he squar e br acket s ar ound LI T_001. PV and I nl et Val ve_001. PV. I sPassi ve
- - Thi s i s needed because t he dot i s a r eser ved char act er i n MS SQL Ser ver .
- - I n t he r esul t s of t he pr ecedi ng quer y, not i ce t hat a val ue i s gi ven f or
- - SysSt r i ng even t hough i t onl y changed at t he t op of t he hour , When usi ng
- - del t a quer i es on a wi de t abl e, a new r ow i s r et ur ned i f any of t he r equest ed
- - t ags change val ue.
- - Exampl e 14
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Usi ng ' wwRet r i eval Mode' , Cycl i c vs. Del t a Ret r i eval
- - Pr ocess dat a user s use dat a di f f er ent l y t han most ot her user s of dat abases
- - ( banks, sci ent i f i c communi t i es et c. ) . To al l ow our user s t o vi ew t he dat a i n
- - t he most advant agi ous way, a number of speci al f unct i ons wer e added t o t he
- - Tr ansact - SQL l anguage. We cal l t hese f unct i ons Real Ti me SQL. The f i r st we
- - wi l l expl or e i s t he wwRet r i eval Mode f unct i on. wwRet r i eval Mode al l ows t he user
- - t o over r i de t he def aul t r et r i eval mode f or t he hi st or y t abl es on a per quer y
- - basi s.
- - Fi r st i s t he concept of " Cycl i c" ver sus " Del t a" r et r i eval modes. The Hi st or y
- - t abl e r et ur ns dat a usi ng Del t a r et r i eval mode as def aul t . Thi s means t hat a
- - new r ow i s r et ur ned onl y i f t he val ue changes. Not i ce t hat t he i nt er val
- - bet ween each r ow i s di f f er ent f or t he f ol l owi ng quer i es:
SELECT Datetime, Tagname, vValue
FROM History
Lab 3 Query Examples 3-33
Wonderware System Platform Course - Part 2
WHERE Tagname = 'TT_001.PV'
AND Datetime > Dateadd(mi, -100, Getdate())
AND Datetime <= Getdate()
- - wwRet r i eval Mode al l ows you t o over r i de t he def aul t r et r i eval mode.
- - I n t he f ol l owi ng quer y t he r et r i eval mode i s f or ced t o cycl i c f or
- - t hi s one quer y onl y. Not i ce t he r et ur ned val ues ar e evenl y spaced ever y
- - mi nut e.
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'TT_001.PV'
AND wwRetrievalMode = 'cyclic'
AND Datetime > Dateadd(mi, -100, Getdate())
AND Datetime <= Getdate()
- - Del t a r et r i eval mode can al so be expl i ci t l y i ndi cat ed:
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'TT_001.PV'
AND wwRetrievalMode = 'delta'
AND Datetime > Dateadd(mi, -100, Getdate())
AND Datetime <= Getdate()
- - Cycl i c r et r i eval i s usef ul when l ooki ng f or pr of i l es and aver ages, whi l e
- - Del t a r et r i eval i s usef ul when l ooki ng f or al t er at i ons i n dat a, l i ke a
- - set poi nt change t hat occur ed once dur i ng a shi f t .
- - Exampl e 15
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3-34 Module 3 History Data Storage and Retrieval
Wonderware Training
- - Usi ng ' Ful l ' Ret r i eval Mode
- - For f ul l r et r i eval mode, al l st or ed val ues wi l l be r et ur ned, r egar dl ess
- - of whet her a val ue or qual i t y has changed si nce t he l ast val ue. I f used i n
- - conj unct i on wi t h st or age wi t hout f i l t er i ng ( no del t a or cycl i c st or age mode
- - appl i ed) , t he f ul l r et r i eval mode al l ows f or t he r et r i eval of al l val ues and
- - qual i t y t hat or i gi nat ed f r omt he pl ant f l oor dat a sour ce or f r omanot her
- - appl i cat i on.
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'LIT_001.PV'
AND wwRetrievalMode = 'full'
AND Datetime > Dateadd(mi, -50, Getdate())
AND Datetime <= Getdate()
- - Ful l r et r i eval mode i s especi al l y i mpor t ant when used t o r et r i eve dat a
- - st or ed by Wonder war e Appl i cat i on Ser ver , si nce i t wi l l di spl ay ever y si ngl e
- - val ue comi ng f r omt he Gal axy.
- - Exampl e 16
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Usi ng ' wwResol ut i on'
- - Let ' s exami ne a si mpl e cycl i c quer y:
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'TT_001.PV'
AND wwRetrievalMode = 'cyclic'
AND Datetime > Dateadd(mi, -100, Getdate())
AND Datetime <= Getdate()
Lab 3 Query Examples 3-35
Wonderware System Platform Course - Part 2
- - Not i ce t hat Hi st or i an r et ur ns 100 r ows evenl y spaced over t he
- - t i me per i od speci f i ed. Thi s i s t he def aul t behavi our , but t her e ar e
- - mechani sms t o speci f y ' how much' dat a you want .
- - wwResol ut i on t el l s Hi st or i an t o r et ur n dat a separ at ed by a f i xed
- - t i me i nt er val ( set i n mi l l i seconds) . Thi s wor ks best wi t h quer i es i n CYCLI C
- - r et r i eval mode. The f ol l owi ng quer y r et ur ns dat a ever y second f or t he l ast
- - 10 mi nut es.
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'TT_001.PV'
AND wwRetrievalMode = 'cyclic'
AND Datetime > Dateadd(mi, -10, Getdate())
AND Datetime <= Getdate()
AND wwResolution = 1000
- - By changi ng t he wwr esol ut i on t o 60000 we get a r ecor d ever y mi nut e:
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'TT_001.PV'
AND wwRetrievalMode = 'cyclic'
AND Datetime > Dateadd(mi, -10, Getdate())
AND Datetime <= Getdate()
AND wwResolution = 60000
- - Exampl e 17
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - The f ol l owi ng exampl e uses cycl i c r et r i eval mode and wwResol ut i on
- - t o cr eat e a wi de f or mat r epor t f or t he l ast hour :
3-36 Module 3 History Data Storage and Retrieval
Wonderware Training
SELECT *
FROM OpenQuery(InSQL, 'SELECT Datetime, [LIT_001.PV], [TT_001.PV],
[InletValve_001.PV.IsActive1]
FROM WideHistory
WHERE Datetime > Dateadd(hh, -1, Getdate())
AND Datetime <= Getdate()
AND wwRetrievalMode = "Cyclic"
AND wwResolution = 60000')
- - Exampl e 18
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Usi ng ' wwCycl eCount '
- - Anot her way t o cont r ol t he amount of dat a r et ur ned f r oma quer y i s
- - t he wwCycl eCount f unct i on. Usi ng wwCycl eCount , t he number of r ows t hat wi l l
- - be r et ur ned i s speci f i ed. When wwCycl eCount i s used i n conj unct i on wi t h
- - CYCLI C r et r i eval quer i es t he r ows r et ur ned ar e evenl y spaced t houghout
- - t he t i me per i od speci f i ed. However , when used i n a del t a quer y, wwCycl eCount
- - r et ur ns t he a r ow each t i me t he val ue changes, up t o t he number of r ows
- - speci f i ed.
- - Fi r st i n CYCLI C mode:
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'SysTimeSec'
AND wwRetrievalMode = 'cyclic'
AND Datetime > Dateadd(mi, -10, Getdate())
AND Datetime <= Getdate()
AND wwCycleCount = 25
- - Now l et ' s see what del t a does:
SELECT Datetime, Tagname, vValue
Lab 3 Query Examples 3-37
Wonderware System Platform Course - Part 2
FROM History
WHERE Tagname = 'SysTimeSec'
AND wwRetrievalMode = 'delta'
AND Datetime > Dateadd(mi, -10, Getdate())
AND Datetime <= Getdate()
AND wwCycleCount = 25
- - Set t i ng wwCycl eCount t o ' zer o' causes ALL val ues wi t hi n t he t i me
- - per i od t o be r et ur ned:
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'SysTimeSec'
AND wwRetrievalMode = 'delta'
AND Datetime > Dateadd(mi, -10, Getdate())
AND Datetime <= Getdate()
AND wwCycleCount = 0
- - Thi s i s usef ul when t r yi ng t o r et r i eve dat a when t he sampl e r at e
- - i s unknown.
- - Exampl e 19
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Usi ng Ti me- Wei ght ed Aver age Ret r i eval Mode
- - To get an aver age cal cul at i on f r omhi st or y dat a, we need t o deci de how much
- - dat a goes i nt o t he quer y, al l owi ng us t o deci de how much wor k t he I nSQL
- - Ser ver comput er per f or ms. The f ol l owi ng i s a r ough est i mat e of an hour l y
- - aver age usi ng one sampl e ever y mi nut e:
SELECT AVG(Value)
FROM History
WHERE Tagname = 'TT_001.PV'
AND Datetime > Dateadd(hh, -1, Getdate())
AND Datetime <= Getdate()
3-38 Module 3 History Data Storage and Retrieval
Wonderware Training
AND wwRetrievalMode = 'delta'
AND wwResolution = 60000
- - The SQL Ser ver AVG aggr egat e i s a si mpl e st at i st i cal aver age. The r esul t wi l l
- - depend on t he r esol ut i on of sampl es. Usi ng t he t i me wei ght ed aver age ( TWA)
- - r et r i eval mode wi l l use act ual val ues i n t he t abl e t o cal cul at e t he aver age.
- - Even i f t he SQL Ser ver AVG aggr egat e r et ur ns a si mi l ar val ue, t he dat a i s
- - r et ur ned much f ast er . The f ol l owi ng exampl e wi l l r et ur n t he aver age f or t he
- - l ast hour :
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'TT_001.PV'
AND Datetime > Dateadd(hh, -1, Getdate())
AND Datetime <= Getdate()
AND wwRetrievalMode = 'average'
AND wwCycleCount = 1
- - Exampl e 20
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Ti me Wei ght ed Aver age ( TWA) r et r i eval mode i s a t r ue cycl i c mode, so you can
- - di vi de t he ent i r e per i od of t i me i nt o sever al per i ods. The hi st or i an wi l l
- - r et ur n one r ow f or each t ag i n t he quer y f or each cycl e. To speci f y how many
- - cycl es you want , you can use wwResol ut i on or wwCycl eCount .
- - The f ol l owi ng quer y wi l l r et ur n an hour l y t i me wei ght ed aver age f or t he l ast
- - shi f t :
SELECT Datetime, Tagname, vValue, PercentGood
FROM History
WHERE Tagname = 'TT_001.PV'
AND Datetime > Dateadd(hh, -8, Getdate())
AND Datetime <= Getdate()
AND wwRetrievalMode = 'average'
AND wwResolution = 3600000
Lab 3 Query Examples 3-39
Wonderware System Platform Course - Part 2
- - Exampl e 21
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Ti me- i n- St at e Ret r i eval Mode
- - The t i me- i n- st at e r et r i eval mode r et ur ns t he amount of t i me t hat a t ag has
- - been i n a par t i cul ar st at e f or each r et r i eval cycl e. Thi s r et r i eval mode i s
- - usef ul f or det er mi ni ng how l ong a machi ne has been r unni ng or st opped, how
- - l ong a val ve has been opened or cl osed, and so on:
SELECT Datetime, Tagname, vValue, StateTime, wwStateCalc, qualitydetail
FROM History
WHERE Tagname = 'InletValve_001.PV.IsActive1'
AND Datetime > Dateadd(mi, -60, Getdate())
AND Datetime <= Getdate()
AND wwRetrievalMode = 'ValueState'
AND wwCycleCount = 2
- - The val ues can al so be r et r i eved as per cent age
SELECT Datetime, Tagname, vValue, StateTime, wwStateCalc
FROM History
WHERE Tagname = 'InletValve_001.PV.IsActive1'
AND Datetime > Dateadd(mi, -60, Getdate())
AND Datetime <= Getdate()
AND wwRetrievalMode = 'ValueState'
AND wwStateCalc = 'Percent'
AND wwCycleCount = 2
- - The wwSt at eCal c speci f i es t he t ype of st at e cal cul at i ons ( aggr egat i ons) t o be
- - per f or med on t he dat a. Val i d val ues ar e ' Tot al ' , ' Per cent ' , ' Mi ni mum' ,
- - ' Maxi mum' and ' Aver age' , ' Tot al ' bei ng t he cal cul at i on by def aul t .
- - The f ol l owi ng quer y wi l l r et ur n an hour l y r epor t of t he aver age t i me t he
- - St eamVal ve has r emai ned opened f or t he l ast shi f t :
3-40 Module 3 History Data Storage and Retrieval
Wonderware Training
SELECT Datetime, Tagname, vValue, StateTime, wwStateCalc
FROM History
WHERE Tagname = 'InletValve_001.PV.IsActive1'
AND Datetime > Dateadd(hh, -8, Getdate())
AND Datetime <= Getdate()
AND vValue = 1
AND wwRetrievalMode = 'ValueState'
AND wwResolution = 3600000
- - Exampl e 22
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Usi ng ' Best Fi t ' Ret r i eval Mode
- - For t he " best f i t " r et r i eval mode, t he t ot al t i me f or t he quer y i s di vi ded
- - i nt o even sub- per i ods, and t hen up t o f i ve val ues ar e r et ur ned f or each
- - sub- per i od: f i r st , l ast , mi ni mum, maxi mumand f i r st ' except i on' val ues. Thi s
- - mode al l ows f or a compr omi se bet ween del t a r et r i eval mode and cycl i c
- - r et r i eval mode:
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'LIT_001.PV'
AND Datetime > Dateadd(mi, -10, Getdate())
AND Datetime <= Getdate()
AND wwRetrievalMode = 'BestFit'
AND wwResolution = 30000
- - Obser ve t he amount of val ues r et ur ned f or t he above quer y, compar ed t o t he
- - val ues r et ur ned f or a del t a r et r i eval :
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'LIT_001.PV'
AND Datetime > Dateadd(mi, -10, Getdate())
AND Datetime <= Getdate()
Lab 3 Query Examples 3-41
Wonderware System Platform Course - Part 2
AND wwRetrievalMode = 'Delta'
- - I f you t r y t o gr aph t he r esul t s f or t hese t wo quer i es, you wi l l NOT
- - not i ce a susbst ant i al di f f er ence bet ween bot h cur ves.
- - You can al so use wwCycl eCount t o speci f y t he amount of sub- per i ods
- - f or t he t i me per i od r equest ed:
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'LIT_001.PV'
AND Datetime > Dateadd(mi, -10, Getdate())
AND Datetime <= Getdate()
AND wwRetrievalMode = 'BestFit'
AND wwCycleCount = 25
- - Exampl e 23
- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - Usi ng ' wwEdgeDet ect i on'
- - Thi s f unct i on al l ows a t r anst i on poi nt t o be
- - det ect ed. A common r equi r ement i s t o det ect ' WHEN'
- - somet hi ng st ar t ed t o happen and/ or st opped happeni ng.
- -
- - Fr omour ear l i er exampl es, we have seen t hat i t i s
- - qui t e st r ai ght f or war d t o use a WHERE cl ause i n or der t o
- - sel ect dat a when cer t ai n condi t i ons ar e t r ue. I n many
- - cases, you ar e onl y i nt er est ed i n WHEN t he condi t i on st ar t ed
- - t o happen - and WHEN i t st opped happeni ng.
- -
- - For exampl e, consi der when your pr ocess t emper at ur e goes
- - above a cer t ai n poi nt . You may onl y want t he r esul t set
- - f r omyour quer y t o r et ur n WHEN t hi s st ar t ed t o happen and
- - WHEN i t st opped - not r et ur n ever y val ue r ecor ded when
- - t he condi t i on was t r ue:
3-42 Module 3 History Data Storage and Retrieval
Wonderware Training
SELECT DateTime, Tagname, Value
FROM History
WHERE TagName = 'SYSTIMESEC'
AND wwEdgeDetection = 'Leading'
AND Value >= 30
AND DateTime > dateadd(Second, -60,GetDate())
AND DateTime <= GetDate()
- - +++++++++++++++++++++++++++++++++++++++++++
- - The f unct i on can be used i n a number of ways. I t can
- - det ect t he ' st ar t ' of a t r ansi t i on ( l eadi ng) , t he end of a
- - t r ansi t i on ( t r ai l i ng) , or bot h.
- - +++++++++++++++++++++++++++++++++++++++++++
- - Tr ai l i ng:
SELECT DateTime, Tagname, Value
FROM History
WHERE TagName = 'SYSTIMESEC'
AND wwEdgeDetection = 'Trailing'
AND Value >= 30
AND DateTime > dateadd(Second, -60,GetDate())
AND DateTime <= GetDate()
- - +++++++++++++++++++++++++++++++++++++++++++
- - Bot h:
SELECT DateTime, Tagname, Value
FROM History
WHERE TagName = 'SYSTIMESEC'
AND wwEdgeDetection = 'Both'
AND Value >= 30
AND DateTime > dateadd(Second, -60,GetDate())
AND DateTime <= GetDate()
Module 4
ActiveFactory Trend
Section 1 Introduction to ActiveFactory Software 4-3
Section 2 ActiveFactory Trend 4-7
Lab 4 Use ActiveFactory Trend Basic Functions 4-31
Lab 5 Configure Public Groups and Trend Sets 4-45
Lab 6 Configure Time Offsets and Target Regions 4-57
Lab 7 Advanced Properties: Retrieval Styles 4-65
4-2 Module 4 ActiveFactory Trend
Wonderware Training
Module Objectives
Introduce ActiveFactory Trend.
Use ActiveFactory Trend to display a variety of Historian data.
Configure ActiveFactory Trend Properties.
Section 1 Introduction to ActiveFactory Software 4-3
Wonderware System Platform Course - Part 2
Section 1 Introduction to ActiveFactory Software
This section describes the ActiveFactory system requirements, installation considerations, and
licensing features.
System Requirements
Minimum Hardware (Client)
CPU: 400 MHz Pentium or better
Available hard disk space: 45 MB
RAM: 256 MB
Software
Operating system: Windows Server 2003 Enterprise Edition (R2 or SP1), Windows Server
2003 Standard Edition (R2 or SP1), Windows XP Professional SP2, Windows XP Tablet
PC Edition Version 2002 SP1
The add-ins to Microsoft Office require Office 2000, Office XP, Office 2003 or Office 2007
Microsoft Internet Explorer 5.5 or later
ActiveFactory works with Historian version 8.0 SP3 or 9.0, and with MS SQL Server 7.0
and later versions
Installation Notes
Note: Before installing ActiveFactory, disable any Virus Scan applications running on the
machine. Doing so ensures that all ActiveFactory components and services install correctly.
Uninstall any ActiveFactory 8.5 or earlier software prior to installing ActiveFactory 9.2.
If you intend to use Report or Workbook, it is best to install Microsoft Office prior to ActiveFactory.
If you install Microsoft Office after ActiveFactory, please refer to the ReadMe.html file located on
the installation CD.
Active Factory is installed by running Setup.exe from the root of the disc or by inserting the disc
and letting auto-run start the setup program. Follow the simple instructions to complete the
installation. If you are prompted to reboot, please log in as the same user after the reboot for the
install to complete.
If you are installing on Terminal Services remember to start the installation using the Add /
Remove Programs control panel applet. You are now ready to begin using your ActiveFactory
applications from the Start menu under Wonderware / ActiveFactory.
The default installation location should reflect the standard FactorySuite location: ..\Program
Files\Wonderware\ActiveFactory.
Running any one of the ActiveFactory Client applications for the first time will start the Server List
Configuration tool when you first connect to a server. This tool needs to run only once per server.
The Server Setup installs essential server-side components as well as a promotional (45 day)
license if there is no license already installed.
Section Objective
Become familiar with ActiveFactory Software system requirements, installation
considerations, and licensing features.
4-4 Module 4 ActiveFactory Trend
Wonderware Training
When ActiveFactory is installed, it searches the system to determine whether the Historian has
been installed. Occasionally, you might be prompted by ActiveFactory to name the default server.
If so, enter InSQL9, or the appropriate version number.
Licensing
Active Factory 9.2 supports two kinds of licenses, unserved and served.
Unserved licenses, also known as local licenses, are installed on the same computer as the
applications using them. Unserved licenses do not run on a license server. Unserved license files
usually have the file names wwsuite.lic or ArchestrA.lic.
Served licenses are only installed on computers with an installed ArchestrA license server.
License servers can reside on local or remote computers. Served licenses files usually have the
file name ArchestrAserver.lic.
There are three types of served license:
Named device licenses, also known as host-based licenses, which are associated with
specific computers.
Named user licenses, also known as user-based licenses, which are associated with
specific users.
Concurrent licenses, which can be used with any devices or users.
Information about the license type appears in the license name and license components
when you view it in the ArchestrA License Manager.
When ActiveFactory 9.2 starts, it looks for an unserved license on the same computer in the
background. If no license is found locally, the application searches all license servers specified in
ArchestrA License Manager for the computer.
When a license file is found, the application checks that this version is licensed for use. If more
than one license is found, the order in which licenses are acquired by applications is:
Unserved licenses
Named device licenses
Named user licenses
Concurrent licenses
If ActiveFactory is not supported by the license or if the required license is not found, the software
component defaults to either a demonstration mode or an absent license mode.
License Files
The license server can be accessed by client applications for license information. When the
license server starts, it loads the served license files. Client computers running licensed
applications can access the served licenses on the license server using the license server search
paths entered in ArchestrA License Manager.
License servers have the advantage of establishing a single location for maintaining Wonderware
licenses rather than installing multiple local licenses across your network.
You can switch from one license type to another just by installing a different type of license without
having to install a different version of the application.
Section 1 Introduction to ActiveFactory Software 4-5
Wonderware System Platform Course - Part 2
Using Named Device and Named User Licenses
Device and user information for both types of licenses is stored in the license server options file,
Wonderware.opt. For detailed information on this file, click Start and point to All Programs /
Wonderware / ArchestrA License Server / Macrovision FLEXnet Licensing End User Guide.
You can change the devices or users associated with a named device or named user license by
repeating the named user setup procedure and entering new user names.
When you specify host names in the options file, you can use the NETBIOS names of the
computers or the static IP addresses.
The ArchestrA licensing infrastructure overrides the NETBIOS name of the computer running the
licensed application with the NETBIOS name of the computer used as a terminal session client.
For example, if a user logs into computer Host1 and starts a remote desktop session to computer
Host2, a licensed application started in the remote session is shown being run by Host1 rather
than Host 2. However, if you use static IP addresses instead of NETBIOS names in the options
file, the IP address always identifies the actual computer where the licensed application is running.
Please view the free ArchestrA License Manager online seminar at http://wonderware.com/
training for more information.
4-6 Module 4 ActiveFactory Trend
Wonderware Training
Intentionally left blank
Section 2 ActiveFactory Trend 4-7
Wonderware System Platform Course - Part 2
Section 2 ActiveFactory Trend
This section introduces the ActiveFactory Software system requirements, installation
considerations, and licensing features.
ActiveFactory Trend is an application that enables a graphical view of the historical data for
selected tags. ActiveFactory Trend also enables viewing of multiple Historians (and multiple
versions of the Historian) at the same time.
Once tags have been added to a trend graph, the tag data can be manipulated in a variety of
ways, including panning, zooming, and scaling. ActiveFactory Trend can be customized by
configuring display options and setting general options for use with all trends displayed on a
particular workstation (known as a Workspace).
The Trend graphs and their associated data information can be printed so that the data can be
analyzed away from the client machine.
Trend is typically the most frequently used Client Application.
Before this client application can be used to query tag information from the database, the server
must be running and you must have security access.
Section Objective
Become familiar with ActiveFactory Software system requirements, installation
considerations, and licensing features.
4-8 Module 4 ActiveFactory Trend
Wonderware Training
Start ActiveFactory Trend
Note: Running any of the ActiveFactory applications for the first time will start the Server List
Configuration utility in order to connect to a server. The Wizard needs to run only once per
server.
a. From the Start button on the Windows Taskbar, select All Programs / Wonderware /
ActiveFactory / Trend.
The main Trend Application window appears:
Connect to the Server
a. Select Tools / Servers from the Trend menu:
Section 2 ActiveFactory Trend 4-9
Wonderware System Platform Course - Part 2
The Server List Configuration dialog box appears:
The Server List Configuration dialog enables configuration of connection properties to
multiple Historians.
The following information is used to configure a connection to a Historian:
Server name
User Login ID
Password associated with the Login ID
An option to use the Integrated Security
Time-out parameters for connections and queries
An option to remember the password between instances of the application
An option to use HTTP as the Server Connection Protocol
Note: Application startup delays may occur if a connection to a stopped or disabled Historian is
configured and active.
4-10 Module 4 ActiveFactory Trend
Wonderware Training
b. Enter the Servers network node name in the Server field.
c. Enter the LoginID and Password.
d. Click Add.
The node name appears in the server list pane.
e. Click Close.
Section 2 ActiveFactory Trend 4-11
Wonderware System Platform Course - Part 2
Trend is now connected to the designated Historian node.
Note: Highlighting the server name in the Server list pane enables the LogOn and Remove
buttons. If the highlighted server connection is active, the LogOn button changes to LogOff and
enables disconnecting from that server.
Change Login information by highlighting the target Server in the Server list, make the change(s),
click Update, then LogOn.
Click Remove to eliminate the server from the Server list.
4-12 Module 4 ActiveFactory Trend
Wonderware Training
Tag Picker Control
The Tag Picker control is common to all ActiveFactory applications.
The Tag Picker Control assists a user when searching for tagnames to be used in their application
(this may be Trend, Query, Workbook or Report).
The Tag Pickers functionality duplicates Windows Explorer by displaying a hierarchical tree-view
of the Historian group.
Depending upon the application and user preferences it may consist of a Server Pane, a Tags
Pane, and a Filter pane.
Section 2 ActiveFactory Trend 4-13
Wonderware System Platform Course - Part 2
Servers Pane
The primary area within the Tag Picker Control is called Servers. This pane lists all of the
Historians that are currently connected. Each Servers folder contains the sub-folders associated
with the individual Historian Group.
Tag Folders
a. Right-click a tag folder to expose its sub-menu:
The sub-menu enables creation of new groups and showing/hiding elements of the TagPicker
control. New groups in the public groups area can only be created by wwadmin permissions
and above.
4-14 Module 4 ActiveFactory Trend
Wonderware Training
Tags Pane
The Tag Information Pane lists all of the tags from the selected folder in the Tree Pane along with
any filter conditions specified in the Filter Pane. Tagname, description, and IO address are
exposed using the scroll bar.
The pane contains tabs that filter tags in a Group by tag type. For example, in a Private Group
containing Analog, Discrete, String and Event Tags, selecting the Analog tab displays only the
Analog tags contained in that folder.
Trending tags is performed by dragging tags from this pane directly to the trend and tag list panes.
Tags may also be dragged to other tag group folders.
Section 2 ActiveFactory Trend 4-15
Wonderware System Platform Course - Part 2
Tag Filter pane
Filter tags using the criteria listed in the pane.
Using the filter conditions in the Filter Pane, you can search the selected folder for tags that match
a particular search pattern for a tagname, description, or address.
There is an important interaction between these panes. When the Servers Pane and the Filter
Pane are both visible, the filter conditions apply to the selected part of the name space. In other
words the filters are additive. When the server is selected the filter applies to all tags.
Tag Name: Enter the tagname search parameters for the query. The percentage character
(%) is used as a wildcard character when Exact match is checked.
Description: Enter a string for the tag description search parameters for the query. The
percentage character (%) is used as a wildcard character when Exact match is checked.
I/O Address: Enter the address search parameters for the query. The percentage
character (%) is used as a wildcard character when Exact match is checked.
Exact Match: Click the Exact Match checkbox to limit tags returned to the exact
character positions searched for. For example, searching for Rea will return all tags that
contain the letters Rea, no matter where within the tagname the letters appear. A search
of Rea% with the Exact Match checkbox enabled will return only tags beginning with Rea.
Apply: Click the Apply button to execute the query. Tags matching the query parameters
are listed in the Tagname Pane.
Clear: Click the Clear button to clear the filter criteria chosen. The filter conditions are
removed.
Wildcard Character Examples (only apply when Exact match is enabled)
% Any string of zero or more characters
_ Any single character
[ ] Any single character within the specified range
InSQL searches for all strings that contain the letters InSQL (SysPerfInSQLIOSCPU)
InSQL%, Exact match searches for all strings that begin with the letters InSQL
(InSQL_ProdLevel).
%X, Exact match searches for all strings that end with the letter X (HenonX, VectorX).
_ _ _ _1, Exact match searches for all five-letter tags ending with the number 1 (I2311,
R2511).
[R-S]_ _ _ 1, Exact match searches for all names ending with the number 1 that begin
with any single letter from R to S (R2511, Step1).
4-16 Module 4 ActiveFactory Trend
Wonderware Training
Create a Trend
Create a Trend by dragging and dropping tags directly onto the Trend pane.
The Toolbars become active. The information on the following pages describes the available
configuration options.
Time Picker
The time picker allows you to select a time range by specifying a start time, end time, and/or
duration. An error appears next to the start or end time controls if you specify an invalid time
period. For example, an end time before a start time.
To specify a time period
a. On the Time toolbar, specify the start time, end time, and/or duration. To select a date from a
calendar, click the down arrow on the start time or end time list. To select a predefined
duration, click the down arrow on the duration list.
When you change one of the options, one of the other options is recalculated automatically.
While you change the option, a blue frame appears around the option that will be recalculated
as a result of the change.
The relation between changed and updated options is as follows:
If you change multiple options in a row, which option is updated depends on which two other
options you changed last. For example, if you change the start time and then the end time, the
duration is calculated accordingly. If you change the start time and then the duration, the end
time is calculated, and so on.
b. Press ENTER.
To specify a time period relative to the current time
a. Do one of the following:
On the Chart menu, click Update to Current Time so that a check mark appears.
Click the Update to Current Time toolbar button so that it is highlighted.
b. In the duration list of the Time toolbar, click a duration or enter one manually.
The start time is automatically calculated as the current time minus the duration you selected,
and the trend display is updated with the new time period.
The Time picker allows you to specify the time range of data that will be displayed on the
Trend. Select a duration from the drop-down menu (1 minute, 5 minutes, etc.) or enter the
Start Time. The End Time will automatically update based on the time selected in the duration
field. Updating the Duration field will update the Start Time field based on the duration field,
and updating the End Time field will automatically update the Start time field based on the
duration field.
You change... The time picker updates...
Start time End time (based on duration)
End time Start time (based on duration)
Duration Start time (based on end time
Section 2 ActiveFactory Trend 4-17
Wonderware System Platform Course - Part 2
Tag List
a. Right-click the main tag details pane.
Properties configuration is enabled by the following sub-menu:
b. Highlight a tag and select Configure.
c. Individual Pen properties (including time offset) are set in the tag configuration dialog box.
4-18 Module 4 ActiveFactory Trend
Wonderware Training
Configure Trend Options for a Tag: Display Options
General tab
The Time Offset option in the tag Configure dialog box can be used to offset tag traces in a Trend
a specified length of time.
When a value is entered in the Time Offset field, the column takes a positive or negative offset in
the format: HH:MM:SS.
Any tags with time offsets are displayed using that offset, and the X-Axis cursors are adjusted
accordingly. The time span for the data retrieved to populate the trend graph is also adjusted
according to any offsets entered. So, for instance, if a 1 hour trend is displayed, and one of the
tags is given a 30 minute offset, then Trend retrieves 1:30 of data.
For example, 2 Historians are storing identical batch data, but are timesynched to a different time
master. The batch times should be identical, but since the two Historian Servers are synched to
different masters, the times always appear slightly different.
Trending the two batches and offsetting the time of one of the batch tags would be a way to directly
compare both sets of batch data.
Additionally, a single tag may be placed in the same Trend multiple times to allow for different
configuration of the displayed data.
Note: When offset values are changed, the trend graph is updated immediately, however no
query is made to Historian until the trend is refreshed either via the User Interface, or by calling the
Refresh method in the case of aaHistClientTrend.
Section 2 ActiveFactory Trend 4-19
Wonderware System Platform Course - Part 2
Target Region tab
A target region can be defined to provide a visual indicator that tag values are outside of the
specified region. Two or more points must be defined to utilize this feature.
To add region items manually:
a. Click Add. A new item appears in the list. Add the time, and low and high tag values to define
each point for the target region. The points will be connected to define the Target Region.
To load region items from a CSV file:
a. Click Load file. A standard Open dialog box appears.
b. Select the desired file and click Open. The list is populated with the entries from the CSV file.
The CSV file must be formatted as follows:
Each row must contain a region item composed of three values: the time offset, the low value, and
the high value. The format of the time offset is the same as for time offsets in relative time mode.
For more information, see the Online Help topic: Time Offset Formats.
The Trend application tries to determine the CSV delimiter and the decimal and time separators
automatically. If one of the values contains a delimiter or separator character, that value must be
enclosed in double quotation marks.
4-20 Module 4 ActiveFactory Trend
Wonderware Training
Retrieval tab
To have the tag use the same retrieval settings as specified in the trend options, click Style
selected at option level in the Retrieval style list. This is the default setting when you add a tag to
a trend.
To use a predefined retrieval style, click its name in the Retrieval style list.
To use custom retrieval settings, click Custom style in the Retrieval style list, and specify any
additional settings required.
If you are using custom retrieval settings, select a retrieval mode and specify all the settings that
are relevant to it. For more information, see the Online Help topic: Understanding Retrieval Modes.
If you are using one of the predefined styles, you can edit all settings that are not covered by the
style definition. For information on which settings are covered by style definitions, see the Online
Help topic: Working with Retrieval Styles. Because a style definition can contain multiple sets of
retrieval settings with different retrieval modes, some of the settings available for editing here may
turn out to be irrelevant for the retrieval mode that actually gets used for a given query. However,
because there is no way to know in advance which retrieval mode will be used, the settings are still
available for editing.
Live Mode
a. Click the Enable or disable live or replay mode button to view the tags in live mode.
Live data is data that is being retrieved continuously in real time.
Add an Annotation
An annotation can be added to any tags trend display and is associated with the selected tags
value where the mouse button is clicked.
a. Right-click near a tag on the Trend.
b. From the sub-menu, select Add Annotation.
Section 2 ActiveFactory Trend 4-21
Wonderware System Platform Course - Part 2
c. Enter an annotation in the Text: field of the Annotation dialog box and click OK.
An annotation can be Private (visible only to you) or Public (visible to all ActiveFactory users).
d. Click OK to add the annotation to the trend field.
The annotation appears on the trend graph as a blue dot.
e. Pass the cursor over the blue dot to view the annotation text:
f. Select View/Annotation List from the Trend menubar:
The annotations can be saved, deleted, and/or printed. The time, text, and visibility can
also be edited by clicking Annotations / Edit.
Annotations do not appear in the Annotation List unless they are included within the Trend
Graphs current time span.
Zooming
a. To zoom in or out or the trend graph, use the Zoom In or Zoom Out buttons in the
Scaling toolbar.
4-22 Module 4 ActiveFactory Trend
Wonderware Training
Scale the Tags
Scaling a tag up reduces the current scale range of the vertical axis (Y-axis) by half.
For example, a trend tag has a minimum Y-axis value of 0 and a maximum Y-axis value of 10, for a
total range of 10.
When the tag is scaled up, the range for the trend tag becomes 5, where 0 is the minimum Y-axis
value and 5 is the new maximum Y-axis value.
Scaling can be set for a single tag, or for all of the tags in a trend by using the appropriate Scaling
Toolbar button.
Scale a Single Tag
b. Select the tag to be scaled in the Tag List.
c. Select the Scale Type you wish to apply to the tag.
The Scale Tag buttons for individual tags are (in order):
Scale the current tag to its original scale
Auto scale the current tag
Scale the current tag up
Scale the current tag down
Scale All Tags
a. Select the Scale Type you wish to apply to the tag.
The Scale Tag buttons for all tags are (in order):
Scale all tags to their original scale
Auto scale all tags
Scale all tags up
Scale all tags down
Automatic Scaling When automatic scaling is applied on a selected tag or all tags in a trend
graph, the scale will be based on the tag having the smallest minimum Y-axis value and the tag
with the largest maximum Y-axis value. The Y-axis scale for a particular tag is always displayed
along the Y-axis. That is, when scrolling through tags, the Y-axis always displays the scale of the
selected tag.
a. Click the Auto scale all tags button.
Rubber Band Scaling
Rubber band scaling enables selection of an area of the trend graph using the mouse cursor and
automatically sets the scaling based on the area that you selected. Rubber band scaling can be
enabled for a single tag, or for all tags .
Section 2 ActiveFactory Trend 4-23
Wonderware System Platform Course - Part 2
Cursor
Red and blue cursors display at either end of the trend. Moving either cursor will cause the value
for the tag where the cursor and the tag curve meet to display.
a. Ensure View / Time Axis Cursors is checked.
b. Click a tagname in the Tag List.
c. Move a cursor (red line on left or blue line on right) to see the tag value change.
4-24 Module 4 ActiveFactory Trend
Wonderware Training
Trend Options
Several options can be configured for a Trend by clicking on Tools / Options menu within Trend:
Retrieval tab: set the retrieval options for the Trend
Retrieval style: automatically switches retrieval modes for trend tags based on the trend
duration and/or tag type
Main options tab within the Retrieval tab:
Query row limit: set the number of rows to retrieve in the query results
Cyclic attributes: Set the Interpolation type to Stairstep, Linear, or to the default Tag
setting
Delta retrieval deadbands: Set the time and Value % for delta retrieval deadbands
Section 2 ActiveFactory Trend 4-25
Wonderware System Platform Course - Part 2
Other tab within the Retrieval tab:
History Version: The Historian supports versioning on the data in its extension tables. It
supports 2 versions for each data point:
Latest: The Latest value is the most recent update made to that data point.
Original: The Original value is the first value entered for a given data point (typically
the value acquired from an I/O Server).
Rules: Set the Time stamp and Quality rules for retrieval
State retrieval: Set the state parameter for retrieval
Note: These settings do not apply when Trend is in Live Mode. In Live Mode, Trend always
uses Delta retrieval.
4-26 Module 4 ActiveFactory Trend
Wonderware Training
Colors tab:
Allows selection of default tag trace colors, and also allows you to enable or disable usage of
colors.
Time Zones tab:
Allows selection of the time zone on the computer running Trend, as well as the time zone of the
Historian Trend is connected to.
Section 2 ActiveFactory Trend 4-27
Wonderware System Platform Course - Part 2
Miscellaneous tab:
Always on top: The Trend application is always displayed in front of other applications that
are active on the Trend node.
Display all tag timestamps in all data logs: Displays all tag timestamps in all data logs.
Display actual numeric values: Displays the values of discrete tags in the discrete data log
in numerical format (0 or 1).
Display associated messages: Displays the messages associated with the values of
discrete tags in the discrete data log. For example, ON or OFF.
Decimal Places: Indicate how many decimal places should be displayed.
Format: Format of the tag values (decimal/scientific).
Open documents on start up: By default when you start Trend it automatically reopens the
Trend files that were open when it was last closed. Clear the checkbox to disable this
behavior.
4-28 Module 4 ActiveFactory Trend
Wonderware Training
Other tab:
In the Source area, specify the Historian tables from which data will be retrieved.
Manual history tables: Normal SQL Server tables that are used to store data. These are the
ManualAnalogHistory and ManualDiscreteHistory tables.
Extension tables: Logical tables that are populated from the Historian data files. These tables
support the Historian time domain extensions for handling data.
Both: Select this option to retrieve data from both the manual and extension
Legacy retrieval
In the Legacy retrieval area, specify the retrieval mode for data that is retrieved from a Historian
with a version earlier than 9.0.
Use Delta retrieval for less than specified intervals: Enables retrieval of only data that has
changed (delta retrieval mode). By checking this box, Trend will retrieve Analog and Discrete Tags
in Delta retrieval mode for periods less than entered. For periods greater, Cyclic retrieval is used.
Interval for Analogs: The time period, in minutes, for which delta values are retrieved for analog
tags. For greater time periods, cyclic retrieval is used instead. Valid values are 0 to 10,000. The
default is 15.
Interval for Discretes: The time period, in minutes, for which delta values are retrieved for analog
tags. For greater time periods, cyclic retrieval is used instead. Valid values are 0 to 10,000. The
default is 15.
Maximum values to retrieve per tag: Limits the number of tags retrieved in Delta mode for a
given period. The maximum number of values to return per tag. Valid values are 0 to 30,000. The
default is 10,000.
Section 2 ActiveFactory Trend 4-29
Wonderware System Platform Course - Part 2
Trend Properties
Several Trend properties are available to configure:
General: Live mode settings, and printing
Colors: Background color, plot area color, borders, grids, and highlighting
Axes: X and Y axes colors, number of values, width and style
Limits: tag limit configuration
Annotations: Set retrieval and display of annotations
XY Scatter Plot: Labeling and trace gradient configurations, full or delta retrieval
Target Regions: Colors for target region configuration
View Data From the Data Log
You can view data in a wide or narrow table by using the View / Data Log menu items.
Each view enables you to save or print the data file in its respective formats. Note that the
Rows Displayed value is different for each log format. The number of rows in the Narrow
versus Wide data log views will most likely be different
The Narrow log shows data in the following format: Time, TagName, Server, Value, Quality.
There is one row for each value returned by each tag
Each row shows the timestamp and value for one tag
The Wide log shows data in the following format: Time, TagName(1), TagName(2),
TagName(3)... and so on
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
4-30 Module 4 ActiveFactory Trend
Wonderware Training
Configure Public Namespace Groups and Trend Sets
Private and Public Groups
Changes made to the Public Groups are visible to all ActiveFactory clients from any workstation.
Changes to the Private Groups are visible only to the user who made them.
Many installations do not modify the Historian default users and groups. In this case changes
made to Private Groups as wwUser will be visible to any other user who logs in as wwUser. For
example, if you configure a user named "Ted" and add him to the wwUsers group, his groups will
only be visible to him.
By default, any user can edit their Private Groups, but only users with specific privileges can edit
the Public Groups.
The TagPicker retains the servers that were last connected to for each application. They are
shown in the Tree Pane. To prevent a server from reappearing in the tree, it must be manually
disconnected.
Note that the System Status Tags folder is displayed automatically.
Trend Sets
Trend sets can be created to group similar reports for ease of printing and distribution.
Create the individual Trends, save them, then click File / New Trend Set to add the desired
trends and name the Trend Set.
Lab 4 Use ActiveFactory Trend Basic Functions 4-31
Wonderware System Platform Course - Part 2
Lab 4 Use ActiveFactory Trend Basic
Functions
Introduction
Trend is an ActiveFactory client application that enables tag querying, plotting, and graphic display
from multiple Historians. Once tags have been added to a trend, the data can be manipulated in a
variety of ways, including panning, zooming, and scaling.
Trend graphs and their associated data can be printed so that the data can be analyzed away from
the client machine. Trends can be customized by configuring display options and setting general
options for all trend displays.
This lab focuses on using the interface toolbar buttons.
Objective
Upon completion of this lab, you will be able to:
Connect to the Server
Create a New Trend
Manipulate the Trend
Print the Trend
View Live Mode
4-32 Module 4 ActiveFactory Trend
Wonderware Training
Connect to the Server
1. Select All Programs / Wonderware / ActiveFactory / Trend from the Start button on the
taskbar.
If no connection to a Historian is present, the Server List Configuration window will display:
2. Configure a connection to the Historian as follows, substituting the Server name, Login ID,
and Password supplied by your instructor, and click Add.
Lab 4 Use ActiveFactory Trend Basic Functions 4-33
Wonderware System Platform Course - Part 2
3. Click Close.
Create a New Trend
4. Select the Analog tab at the bottom of the Tags pane. The analog tags appear within the Tags
Pane.
5. Holding down the Ctrl key on your keyboard, select the following tags:
LIT_001.PV
InletValve_001.PV
TransferPump_001.TempAvg
6. Drag the selected Tags and drop them on the Trend pane.
The selected tags appear as a new trend:
Congratulations, you have just created a basic trend!
4-34 Module 4 ActiveFactory Trend
Wonderware Training
7. Click the Auto scale all tags button in the Scaling toolbar to load the tag properties into
the trend and rescale the graph.
Note an important aspect of the ActiveFactory Trend functionality: The Minimum and
Maximum setpoints for each tag display on the left side of the trend.
Manipulate the Trend
Change the Time Range
Verify that the current time mode is enabled by clicking the button. This ensures that the time
span selected is relative to the current time.
8. Select a time span from the drop-down list.
The trend data pane changes to display the time span selected.
Notice a blue halo displays around the Start Time field, indicating the field is automatically updated
based on the time span selection.
Lab 4 Use ActiveFactory Trend Basic Functions 4-35
Wonderware System Platform Course - Part 2
Assign Exact Start and End Times
9. Click the drop-down button in the Start Date / Time field to display its Calendar drop-down
object.
10. Select a specific day to begin the trend range.
11. Change the time value if you wish.
12. Repeat the above steps to assign a specific End Date / Time.
13. Click the Refresh button to refresh the trend.
Notice a blue halo displays around the Duration field, indicating the field is automatically
updated based on the time span selection. Also notice that because you selected specific start
and end times, the current time mode is now disabled.
View Single Tags
14. Click the Enable or disable single tag mode button on the Main Toolbar.
15. To view the values for one of the other trended tags, click the tag name in the list pane.
16. Click the Enable or disable single tag mode button again to disable the single tag mode.
4-36 Module 4 ActiveFactory Trend
Wonderware Training
Stack the Traces
For clarity the previously configured Trend Properties are not displayed in the following examples.
17. Click the Stack the tag traces button in the Main Toolbar.
All traces appear as separate rows:
18. Restore the trend traces by clicking the Stack the tag traces button again.
Lab 4 Use ActiveFactory Trend Basic Functions 4-37
Wonderware System Platform Course - Part 2
Change the Pen Style
19. Right-click a tag in the Tag List pane.
20. Click Configure.
21. From the Type drop-down list, select Point, Line, or StepLine.
22. Click OK.
Notice the change in the Trend when a different line type is selected.
4-38 Module 4 ActiveFactory Trend
Wonderware Training
Change the Trace Color
23. Right-click a tag in the Tag List below the Trend pane.
24. Click Configure.
25. Click the Color box.
The Color window opens:
26. Select a color, or click Define Custom Colors to create a unique color.
27. Click OK.
View Data From the Data Log
28. From the Trend menubar, select View / Data Log / Narrow, or click the View the data log in
narrow format button .
Lab 4 Use ActiveFactory Trend Basic Functions 4-39
Wonderware System Platform Course - Part 2
29. Close the Data log window.
30. Select View / Data Log / Wide for the Wide format view of the data, or click the View the data
log in wide format button .
31. Close the Data log window.
View Trend Statistics
32. From the Main Toolbar, click the Statistics button.
The Trend Statistics are displayed. The statistics can be saved and/or printed.
33. Use the scroll bar at the bottom of the Statistics data pane to view all of the columns.
34. Close the window.
4-40 Module 4 ActiveFactory Trend
Wonderware Training
Add an Annotation
In the following figures, an annotation is added to the LIT_001.PV tag. The trend for this tag
displays a vertical spike approximately every 1.18 minutes.
35. Locate the level spike by using Trends Pan buttons .
36. From the tag list below the trend pane, highlight the LIT_001.PV tag.
37. Right-click at the peak of the level spike.
Ensure the LIT_001.PV tag is currently selected in the Tag List or the annotation will be
placed incorrectly on the Trend graph pane.
38. From the sub-menu, select Add Annotation.
39. Enter your annotation in the Text: field of the Annotation dialog box.
For this example, keep the annotation Private (default).
40. Click OK to add the annotation to the trend field.
The annotation appears on the trend graph as a blue dot.
Lab 4 Use ActiveFactory Trend Basic Functions 4-41
Wonderware System Platform Course - Part 2
41. Pass your cursor over the blue dot to view the annotation text:
42. Repeat the previous steps to add annotations to the InletValve_001.PV and
TransferPump_001.TempAvg tags.
43. Select View / Annotation List from the Trend menubar or click the View the annotation
list button .
The annotations you created will be used in a subsequent lab.
44. Close the Annotations window.
4-42 Module 4 ActiveFactory Trend
Wonderware Training
Rubber Band Scaling
The Rubber Band scaling buttons are (in left to right order):
Enable rubber band scaling
Apply rubber band to all tags
Rubber band scaling can be enabled for a single tag, or for all tags.
45. Click the Enable rubber band scaling button .
The cursor changes to a +.
46. While holding down the left mouse button, drag it across a trend field to create a rectangular
area.
In this figure, the LIT_001.PV tag is selected.
47. Release the mouse button.
The trend graph is refreshed using the new scaling values of the tag you selected:
Zooming in on data using the Rubber band scaling can be done as many times as is practical to
view granular data.
Lab 4 Use ActiveFactory Trend Basic Functions 4-43
Wonderware System Platform Course - Part 2
48. To return to the original scaling, click Undo button on the main Trend toolbar.
Click the Undo button as many times as necessary to return the original Trend chart view.
Note: Undo can be performed using the Ctrl+Z keys or from the main menu by selecting Edit
/ Undo.
View Live / Replay Mode
49. Click the Enable or disable live or replay mode button .
50. The chart will automatically update (refresh) at the specified interval.
Change the update interval
51. Click Chart / Properties from the main menu.
52. Change the Refresh interval to 5 seconds.
53. Click OK.
54. Click the Enable or Disable Live or Replay mode button again to return the Trend to History
mode.
55. Click File / Save As.
56. Save the Trend as Mixer1.aaTrend in the C:\Wonderware Training\Labs folder.
4-44 Module 4 ActiveFactory Trend
Wonderware Training
Create a XY Scatterplot
57. Click File / New.
58. In the Trend main menu, choose Chart / Chart Type / XY Scatter Plot.
59. Add the LIT_001.PV and TT_001.PV tags.
No data points display because the axes have not been configured.
60. Right-Click the TT_001.PV tag and choose Configure.
61. Select the LIT_001.PV tag in the X axis tag field.
62. Click OK.
63. Click the Auto scale all tags button .
64. Choose one minute for the duration.
The XY Scatterplot Trend should look similar to the following:
65. Click the live mode button.
You should see two data points moving to reflect the last minute of data.
66. Save the current trend as Lab4XYScatterplot.aatrend in the C:\Wonderware Training\Labs
folder.
67. Close all of the trends, leaving Trend open.
Lab 5 Configure Public Groups and Trend Sets 4-45
Wonderware System Platform Course - Part 2
Lab 5 Configure Public Groups and Trend
Sets
Introduction
Tags can be organized into logical groups allowing users to quickly identify those areas relevant to
their job. This lab will show you how to create groups visible to all users, and groups visible only to
select individuals.
Objective
Upon completion of this lab, you will be able to:
Create Public Tag Groups
Create a Trend Set
4-46 Module 4 ActiveFactory Trend
Wonderware Training
Create Public Tag Groups
Use ActiveFactory Trends TagPicker window to create new groups for members of the
Maintenance staff, the Quality Assurance staff, and an area within the Mixer facility.
Note: Public Groups can only be created by users with wwPower security privileges or higher.
Any user with any security level can create a Private name space; however, the folder will be
visible only to that user.
Note: You should be logged in as wwPower. If not, select Tools / Servers from the main Trend
menu and select the target server.
Change the login username and password to wwPower, click Update, click Close, and then
expand the target server icon.
1. Within the Tag Picker pane, expand your Historian server.
2. Right-click on the Public Groups folder.
3. From the Public Groups sub-menu, select New Group.
4. Name the new folder Mixer.
5. Press the Enter key to save the folder name.
Lab 5 Configure Public Groups and Trend Sets 4-47
Wonderware System Platform Course - Part 2
6. Navigate to the TransferPump_001.PV tag: Public Groups / WWGalaxy / Plant /
Production / Line1 / Mixer_XX0 / TransferPump_001, where the XX in Mixer_XX0 is your
student number.
7. Drag the TransferPump_001.PV tag into the new Mixer group to add it to the group.
8. Click the All Analog Tags folder to select it.
9. Show the Filter pane (right-click in the Servers or Tags pane and click Filter pane).
10. Use the tagname filter to select the remaining two tags:
LIT_001.PV
TT_001.PV
4-48 Module 4 ActiveFactory Trend
Wonderware Training
11. Highlight the correct tag name(s) and drag them into the new Mixer group.
The selected tags are added to the new Group:
Lab 5 Configure Public Groups and Trend Sets 4-49
Wonderware System Platform Course - Part 2
12. Select the Mixer folder and drag it on top of the graph, and release the mouse button to place
the tags in the graph.
13. If necessary, configure the Trend Duration (time span) for 5 Minutes.
14. Save the new Trend as Mixer.aaTrend in the C:\Wonderware Training\Labs folder.
4-50 Module 4 ActiveFactory Trend
Wonderware Training
15. From the main Trend menu, select File / New.
16. Create groups using the following table. Be sure to select the Historian in the Tag Picker to see
all tag data types.
17. Select File / New, and add each Group to a new trend.
18. Click the Auto scale all tags button after each group is added to its new trend.
19. Save each trend with its respective name in the C:\Wonderware Training\Labs folder.
Group Tagname Description
QA TransferPump_001.PV Pump
TT_001.PV Temperature Meter
InletValve_001.PV.IsActive1 Inlet Valve open
InletValve_001.PV.IsPassive Inlet Valve
SysTimeSec System Time: Seconds
Line1 LIT_001.PV Level Meter
TT_001.PV Temperature Meter
InletValve_001.PV Inlet Valve
SysTimeSec System Time: Seconds
IS SysString System Hourly String
SysPerfCPU0 % CPU load on processor
SysDataAcqOverallItemsPerSec Items per second received from SysDrv
SysStatusEvent Status Tag Snapshot Event
SysTimeMin System Time: Minutes
Lab 5 Configure Public Groups and Trend Sets 4-51
Wonderware System Platform Course - Part 2
20. For the IS Trend, configure the duration to 2 hours and stack the traces to create a better view
of the event and string tags. Note the string and event tag symbols:
21. Select the All Filter tab to view the tags in the new Group folders.
The following figure shows all tags in the IS Group, including String and Event tags:
SysTimeMin (Analog)
SysDataAcqOverallIte
msPerSec (Analog)
SysStatusEvent (Event)
SysString (String)
SysPerfCPU0 (Analog)
4-52 Module 4 ActiveFactory Trend
Wonderware Training
Create a Trend Set
A trend set is a saved grouping of trend files. You can specify a common trend duration (for
example, the last 24 hours) to apply to all of the files in the set. This allows you to easily print
information for the same duration from multiple trend files at the same time. This is useful for
reports such as shift or daily reports.
22. From Trends main menu, select File / New Trend Set.
The Trend set configuration dialog box appears.
23. Select File / Add.
Lab 5 Configure Public Groups and Trend Sets 4-53
Wonderware System Platform Course - Part 2
24. Browse to the .aaTrend files previously created for this lab.
25. Highlight each Trend you created by holding Ctrl and clicking each file.
26. Click Open.
The files appear in the Trend set configuration dialog box.
27. Select Last 5 minutes from the Duration drop-down list.
28. Select File / Save.
4-54 Module 4 ActiveFactory Trend
Wonderware Training
29. Name the new trend set and click Save, saving it in the C:\Wonderware Training\Labs
folder.
The trends are now configured to show the last 5 minutes of data when printed or distributed.
Note: Clicking on File / Print would send the trend set to the default printer. Each trend will be
sent as a separate print job.
30. Click File / Exit to exit the Trend set configuration window.
Lab 5 Configure Public Groups and Trend Sets 4-55
Wonderware System Platform Course - Part 2
Modify the Trend display
It is easy to adjust the display and layout of multiple trends.
31. Open two of the previously created trend files.
32. Select Window / Tile Horizontally from the main menu. The trend windows will resize
automatically to fit within the main window.
33. Select View / Tagpicker.
The Tagpicker pane disappears on both trends.
34. Widen each trend to the width of the entire Trend program window.
35. Right-click on each trend and select Properties.
36. Select the Colors tab and configure a different background display color for each trend. Click
OK when finished.
Your Trend application should now look similar to the following figure (minor changes have been
made to each trend):
37. Close the open Trends, leaving ActiveFactory Trend open. Do not save your changes.
4-56 Module 4 ActiveFactory Trend
Wonderware Training
Intentionally left blank
Lab 6 Configure Time Offsets and Target Regions 4-57
Wonderware System Platform Course - Part 2
Lab 6 Configure Time Offsets and Target
Regions
Introduction
This lab demonstrates the use of the Time Offsets option and the Target Region option in the tag
Properties dialog box.
Objective
Upon completion of this lab, you will be able to:
Start a New Trend
Configure a Time Offset
Trend one tag several times and configure Time Offset
Configure a Target Region for a tag
4-58 Module 4 ActiveFactory Trend
Wonderware Training
Configure Time Offset
Note: Use of this feature with large offset values will have a detrimental effect on performance
and query times.
1. Open a new Trend (File / New).
2. Click View / Tag Picker if the Tag Picker is not already displayed.
3. Add the SysTimeSec analog tags from two different Historians.
Your instructor will supply the node names. Use the Tools / Servers menu command to
configure a connection to a different Historian.
Both tags will display identical traces:
The tagname pane should appear similar to the following figure:
Lab 6 Configure Time Offsets and Target Regions 4-59
Wonderware System Platform Course - Part 2
4. Right-click the remote instance of the SysTimeSec tags and select Configure.
5. Change the Time Offset field to 10 seconds:
6. Click OK.
The traces appear with the configured offset:
7. Use the time value cursors to verify the offset (View / Time Axis Cursors).
Remove the remote SysTimeSec tag
Remove the instance of the remote SysTimeSec tag from the Trend, leaving the local
SysTimeSec tag in the Trend.
4-60 Module 4 ActiveFactory Trend
Wonderware Training
Trend a tag multiple times
8. Add SysTimeSec from your local Historian three more times.
9. Offset the second, third, and fourth instance of SysTimeSec by 10 seconds more than the one
before it. For example, the second SysTimeSec will be offset 10 seconds, the third 20
seconds, and the fourth 30 seconds.
The Trend should now look similar to the following:
This trend allow you to compare the behavior of the same signal in different moments in time.
In this example, the behavior of the same tag is shown 10, 20, and 30 seconds ago.
10. Close the Trend, saving it if you wish.
Analyze signals using relative time
11. Open a new Trend.
12. Add the LIT_001.PV tag to the trend two times.
13. Verify the current time mode button is disabled.
14. Click View / Relative Time.
15. Right-click on the first LIT_001.PV tag and select Configure.
16. Change the Start time: field to a time in the recent past. For example, today at 1:00 pm.
17. Click OK.
18. Configure the second instance of the tag with a start time that is 10 minutes later than the first
tag. In this example, 1:10 pm.
19. Click OK.
This will analyze the behavior of the level meter 10 minutes apart.
20. Click the enable or disable live or replay mode button to enable it.
Lab 6 Configure Time Offsets and Target Regions 4-61
Wonderware System Platform Course - Part 2
21. Click the drop-down menu to the right of the enable or disable live or replay mode button
and select 2x. Notice how the replay speed is affected.
22. Continue to alter the replay speed to see the effect on the Trend refresh rate.
4-62 Module 4 ActiveFactory Trend
Wonderware Training
Define a Target Region
23. Open a new Trend.
24. Add the SysDataAcqOverallItemsPerSec tag to the Trend.
25. Change the time span to ten minutes.
26. Click the Auto scale all tags button.
27. Click View / Relative Time.
Notice that the Trend axes now show relative time rather than absolute time. The time
displayed is relative to the Start Time displayed in the Tag List under the Trend.
28. Right-click the tag and select Configure.
29. Select the Target Region tab.
30. Click Load File...
31. Navigate to the TargetRegion.csv file in the C:\Wonderware Training folder.
32. Click OK.
Lab 6 Configure Time Offsets and Target Regions 4-63
Wonderware System Platform Course - Part 2
Notice the region is defined by a highlighted band.
33. Right-click the SysDataAcqOverallItemsPerSec tag and select Configure.
34. Click the Target Region tab.
35. You can adjust the Target region manually. Modify the last row of data to be:
Low: 68.5
High: 71.5
4-64 Module 4 ActiveFactory Trend
Wonderware Training
Intentionally left blank
Lab 7 Advanced Properties: Retrieval Styles 4-65
Wonderware System Platform Course - Part 2
Lab 7 Advanced Properties: Retrieval Styles
Introduction
This lab demonstrates the use of the Retrieval Styles in Trend and how to properly apply different
Retrieval styles to achieve the desired results.
Objective
Upon completion of this lab, you will be able to:
Apply the following retrieval styles:
Best Fit
Cyclic
Linear
Moving Average
Custom
Delta
Slope
4-66 Module 4 ActiveFactory Trend
Wonderware Training
Using Standard Retrieval Styles
1. Open a new Trend.
2. Add the LIT_001.PV tag to the Trend.
3. Enable the current time mode button.
4. Click Tools / Options.
5. Select BestFit-5 in the Retrieval style field of the Retrieval tab. ActiveFactory Trend will
query the data using the Best Fit retrieval mode, with one cycle every five pixels.
6. Click OK.
Lab 7 Advanced Properties: Retrieval Styles 4-67
Wonderware System Platform Course - Part 2
The Trend updates:
7. Using the previous steps, change the Retrieval style to BestFit-10.
Notice the difference in the tag trace. Now that the interval for the Best it retrieval mode is 10 pixels
instead of 5, fewer data points are retrieved, and the line is less smooth.
8. Change the Retrieval style to BestFit-15.
The data is queried using the Best Fit retrieval mode, with one cycle every 15 pixels, resulting in a
choppier, even less smooth line.
Override the Retrieval Style at the tag level
9. In Tools / Options, change the Retrieval style to BestFit-10.
10. Add another instance of the LIT_001.PV tag to the current Trend.
11. Right-click the first instance of LIT_001.PV and select Configure.
12. Select the Retrieval tab.
13. Select Cyclic (ActiveFactory 9.1).
14. Click OK.
You can now compare how the tag data looks when retrieved with full resolution (Cyclic) versus
Best Fit. The signals now look very similar, however the amount of data retrieved is substantially
different. The data log will show this difference.
4-68 Module 4 ActiveFactory Trend
Wonderware Training
15. Uncheck the second instance of LIT_001.PV in the tag list.
16. Click View / Data Log / Narrow.
Data displayed in the Data Log represents the history data retrieved by ActiveFactory Trend
used to plot the trend. Notice how many rows are returned in the Data Log.
17. Close the Data log.
18. Uncheck the first instance of LIT_001.PV and check the second instance of LIT_001.PV.
19. Click View / Data Log / Narrow.
Notice there are fewer rows retrieved than for the first instance of the tag.
20. Check the first instance of LIT_001.PV so that both tag traces display in Trend.
Lab 7 Advanced Properties: Retrieval Styles 4-69
Wonderware System Platform Course - Part 2
Use Other Retrieval Styles
21. Select Tools / Options.
22. Change the Retrieval style to MovingAverage(12-5 sec). This will show the Moving Average
(using 12 values and a resolution of 5 seconds) for the second instance of LIT_001.PV. The
first instance still has a Retrieval style of Cyclic (ActiveFactory 9.1) configured at the tag level,
so its tag trace does not change.
23. Select Tools / Options.
24. Change the Retrieval style to MovingAverage(30-1 sec).
Now, Trend displays a Moving Average calculation using more values and a higher resolution.
Notice how the second tag trace is affected.
25. Select Tools / Options.
26. Change the Retrieval style to Custom style.
27. Change the Retrieval mode in the Retrieval tab to Cyclic.
28. Select Use Manual Cycles.
29. Enter 10 in the Values over equal time intervals field.
30. Click OK.
Trend is displaying data retrieved as 10 evenly spaced intervals across the selected time span.
Notice how the tag traces in the Trend are affected.
4-70 Module 4 ActiveFactory Trend
Wonderware Training
31. Select Tools / Options.
32. Leave the Retrieval style as Custom style.
33. Change the Retrieval mode in the Main options tab of the Retrieval tab to Delta.
34. In the Delta retrieval deadbands pane, enter 10 in the Value % field.
35. Click OK.
Trend is displaying data retrieved delta with a 10% value deadband. Notice how the tag traces in
the Trend are affected.
36. Select Tools / Options.
37. Leave the Retrieval style as Custom style.
38. Change the Retrieval mode in the Main options tab of the Retrieval tab to Slope.
39. Click OK.
40. Click the Auto scale all tags button.
41. Change the Retrieval style back to BestFit-5.
Module 5
ActiveFactory Workbook
Section 1 Introduction 5-3
Lab 8 Using ActiveFactory Workbook Basic Functions 5-21
Lab 9 Use Other ActiveFactory Workbook Functions 5-31
Lab 10 Use the Tag Analysis Wizard 5-37
Lab 11 Create an Hourly-Average Shift Report 5-41
5-2 Module 5 ActiveFactory Workbook
Wonderware Training
Module Objectives
Explain Workbook GUI elements and functionality
Successfully use the Workbook application to create a variety of reports using the Excel
spreadsheet format
Section 1 Introduction 5-3
Wonderware System Platform Course - Part 2
Section 1 Introduction
This section explains the 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.
Start ActiveFactory Workbook
a. Click Start / All Programs / Wonderware / ActiveFactory / Workbook.
The ActiveFactory toolbar displays automatically in Office 2003, and is also available from the
ActiveFactory menubar. To access the ActiveFactory toolbar in Office 2007 click the Add-Ins tab in
the Ribbon.
b. Click ActiveFactory / Connection Management to establish a connection to a Historian.
c. Use the toolbar buttons to create your report.
The toolbar buttons are described in detail next.
Section Objective
Understand ActiveFactory Workbook uses and operation.
Tag Search: Search for tag(s) to place on the Sheet.
Live Values: Show live (current) values for a tag.
History Values: Return historical values for a tag or tag range.
Aggregate Values: Retrieve historical values and calculate aggregation for selected tags.
Direct Query: Insert a query.
Convert Function: Convert formula array to values. The formula will no longer update.
Convert Sheet: Convert entire worksheet to values. The values will no longer update.
Edit Function: Edit the function in the current cell using the wizard.
Refresh Function: Execute the function associated with the selected cells.
Refresh Sheet: Refresh the entire worksheet.
5-4 Module 5 ActiveFactory Workbook
Wonderware Training
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.
f. Click the button to close the cell range selector.
g. Click OK to place the selected tags in the report.
Section 1 Introduction 5-5
Wonderware System Platform Course - Part 2
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.
Tag name: The unique name of the tag within the IndustrialSQL Server system.
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).
Include milliseconds: Used to include milliseconds in the timestamp.
Quality: The basic data quality indicator associated with the data value.
Replace poor quality values: The text string of "poor" will replace the current value if
the value has a quality <>0 or 133.
Detect date time: Only applicable to event tags. The timestamp reflecting when the
event was detected by the event system.
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.
5-6 Module 5 ActiveFactory Workbook
Wonderware Training
The report displays:
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.
Section 1 Introduction 5-7
Wonderware System Platform Course - Part 2
k. Configure the criteria for the query:
Display Options Tab
Select the information to be displayed for each tag.
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
5-8 Module 5 ActiveFactory Workbook
Wonderware Training
Retrieval Tab, Main options sub-tab
Retrieval mode: Select the desired retrieval mode. Retrieval modes are discussed in
detail in Module 3, Storage Independent Retrieval Mode, page 3-13.
Query row limit: set the number of rows to retrieve in the query results
Cyclic attributes: Set the Interpolation type to Stairstep, Linear, or to the default Tag
setting
Delta retrieval deadbands: Set the time and Value % for delta retrieval deadbands
Section 1 Introduction 5-9
Wonderware System Platform Course - Part 2
Retrieval Tab, Other sub-tab
History Version: The Historian supports versioning on the data in its extension tables. It
supports 2 versions for each data point:
Latest: The Latest value is the most recent update made to that data point.
Original: The Original value is the first value entered for a given data point (typically
the value acquired from an I/O Server).
Rules: Set the Time stamp and Quality rules for retrieval
State retrieval: Set the state calculation to Min, Max, Average, Total or Percent. This
option becomes enabled if Retrieval mode is set to ValueState.
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.
5-10 Module 5 ActiveFactory Workbook
Wonderware Training
Criteria Tab
Limit the results based upon selection criteria in the Criteria tab.
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.
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.
(Optional) Select the second Value check box and set another criteria for the data
value. For example, the value must be less than ( <) 2000.
(Optional) Select the Value not null check box to filter out NULL values from the
results.
(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.
Section 1 Introduction 5-11
Wonderware System Platform Course - Part 2
The History Values - Step 4 of 4 dialog box appears.
m. Configure the time for the report.
n. Click Finish.
The report displays.
5-12 Module 5 ActiveFactory Workbook
Wonderware Training
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.
Narrow query format: In this format, there is one row for a single tag's value for a
particular timestamp.
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.
Section 1 Introduction 5-13
Wonderware System Platform Course - Part 2
k. (Optional) In the Criteria applicability list, select the moment at which the edge detection
criteria is met.
None: true: Returns all rows that successfully meet the criteria; no edge detection is
implemented at the specified resolution.
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.
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.
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.
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.
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.
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.
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.
5-14 Module 5 ActiveFactory Workbook
Wonderware Training
If you selected the delta retrieval mode, configure additional options in the Delta area.
Limit to: The total number of consecutive rows to be returned, starting from the first row in
the record set.
Time deadband: The minimum time, in milliseconds, between returned values for a single
tag. Applies only to delta retrieval.
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.
Manual history tables: Normal SQL Server tables that are used to store data. These are
the ManualAnalogHistory and ManualDiscreteHistory tables.
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.
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.
Original value: The original value as it was received from the data source (for example,
the I/O Server) to the IndustrialSQL Server.
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.
Section 1 Introduction 5-15
Wonderware System Platform Course - Part 2
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.
5-16 Module 5 ActiveFactory Workbook
Wonderware Training
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:
Analog Tag analysis: Analog Tag analysis (graph, statistics, etc.)
Batch analysis: Graph - analog tag over two time periods
Scatter analysis: Scatter plot - two analog tags
Discrete tag analysis: Discrete Tag analysis (graph, statistics, etc.)
Analog values at discrete transition analysis: Graph - analog tag values at discrete tag
transitions
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.
Section 1 Introduction 5-17
Wonderware System Platform Course - Part 2
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.
f. Click Next.
The Tag Analysis - Step 3 of 5 dialog box appears.
g. In the Starting time, enter the starting time for the query. Click the down arrow to select a date
from a calendar. The Batch Analysis and Scatter Analysis will also include a second starting
time for a second time period to perform a an analysis over two time periods.
h. In the Duration lists, specify the duration and the duration unit. For example, 10 minutes.
The duration is used to calculate the end date for the query.
i. Click Next.
5-18 Module 5 ActiveFactory Workbook
Wonderware Training
The Tag Analysis - Step 4 of 5 dialog box appears.
j. Configure the resolution for the data to be returned.
Number of rows: The number of rows to be returned for a specified time period using
cyclic retrieval. The rows are spaced evenly across the time period, and the default row
count is 50 rows. The row count is applied for each tag in a query.
Values spaced every: 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.
Number of rows: A second Number of rows field will display if the Analog-Discrete pair
analysis is selected.
k. Click Next. The Tag Analysis - Step 5 of 5 dialog box appears for the Analog Tag Analysis
and the Discrete tag Analysis only. If any of the remaining four analyses were selected, click
Finish.
l. Click Finish.
Section 1 Introduction 5-19
Wonderware System Platform Course - Part 2
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.
m. Click in the workbook to view the functions that are inserted to create the analysis report.
Analog Tag
analysis
Batch
Analysis
Scatter
Analysis
Discrete tag
Analysis
Analog values
at discrete
transition
Analysis
Analog/
Discrete
Server Server Server Server Server Server
Tag Tag Tag 1 Tag Discrete Tag Discrete Tag
Row or
Resolution
Start Time 1
Chart Legend
Tag 2 Row or
Resolution
Analog Tag Analog Tag
Start Time Row or
Resolution
Row or
Resolution
Start Time Row or
Resolution
Row or
Resolution
Duration Start Time Start Time 1 Duration Start Time Start Time
Low Limit Duration Duration Duration Duration
High Limit Start Time 2
Chart Legend
Start Time 2 Row or
resolution to
use for the
discrete tag
Start Time 2
5-20 Module 5 ActiveFactory Workbook
Wonderware Training
Intentionally left blank
Lab 8 Using ActiveFactory Workbook Basic Functions 5-21
Wonderware System Platform Course - Part 2
Lab 8 Using ActiveFactory Workbook Basic
Functions
Introduction
The following lab will demonstrate the basic functionality of ActiveFactory Workbook.
Objective
Upon completion of this lab you will be able to:
Connect to the Server
Insert a Live Value Function
Insert a History Value Function
Report Historian process data within the Excel spreadsheet environment
5-22 Module 5 ActiveFactory Workbook
Wonderware Training
Create a new ActiveFactory Workbook
1. From the Start button on the Windows Taskbar, select All Programs / Microsoft Office /
Microsoft Office Excel.
2. Enter a report heading in cell A1. For this lab, Meters is the heading.
3. Change the font face and size to Arial 14 Bold.
4. Enter =NOW() in cell A2. This cell will display the current date and time.
5. Press the Enter key.
6. Right-click cell A2 and select Format Cells from the submenu.
7. On the number tab, configure the format options as shown in the next figure.
8. Click OK.
The report should now look like the following figure:
Lab 8 Using ActiveFactory Workbook Basic Functions 5-23
Wonderware System Platform Course - Part 2
Insert a Live Value Function
9. Select cell A4.
10. Select ActiveFactory / Tag Selection / Tag Selection from the main menu.
The Tag Selection dialog box appears:
5-24 Module 5 ActiveFactory Workbook
Wonderware Training
11. Select the Historian icon.
12. In the Tag name: field of the Filter pane, enter %.PV.
13. Click the Exact match checkbox.
The Apply button becomes enabled.
14. Click Apply. All tags ending with .PV are displayed.
15. Pressing the Control key, select LIT_001.PV and TT_001.PV tags.
16. Ensure that the Select cell range to insert tags: field reads $A$4.
17. Click OK.
The tags appear from cells A4 through A5:
18. Select cell B3.
19. Select the Live Values button on the Workbook toolbar.
Lab 8 Using ActiveFactory Workbook Basic Functions 5-25
Wonderware System Platform Course - Part 2
Note: Binding Options (accessed using the Binding Options >> command button) are
explained in a subsequent lab. Do not click the Binding Options>>button.
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.
5-26 Module 5 ActiveFactory Workbook
Wonderware Training
26. Leave the default settings in the Live Values - Step 3 of 3 dialog box.
27. Click Finish.
The data is displayed in the spreadsheet:
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(" WWSYSPLATFORM2" ,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 in C:\Wonderware Training\Labs as MyReport.xls.
Lab 8 Using ActiveFactory Workbook Basic Functions 5-27
Wonderware System Platform Course - Part 2
Insert a History Value Function
30. Select the Sheet 2 tab.
31. Click the History Values button in the Workbook toolbar.
Step 1 of the History Values function wizard appears. The Tag reference field should
reference the two tags used in the previous task (if not, use the previous steps to reference
LIT_001.PV and TT_001.PV).
32. Click Next.
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.
5-28 Module 5 ActiveFactory Workbook
Wonderware Training
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.
Lab 8 Using ActiveFactory Workbook Basic Functions 5-29
Wonderware System Platform Course - Part 2
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.
5-30 Module 5 ActiveFactory Workbook
Wonderware Training
The query returns evenly spaced values for the specified time period.
46. Close MyReport.xls, leaving Excel running. Do not re-save the report; the version of the
report you saved earlier will be used in a subsequent lab.
Lab 9 Use Other ActiveFactory Workbook Functions 5-31
Wonderware System Platform Course - Part 2
Lab 9 Use Other ActiveFactory Workbook
Functions
Introduction
The following lab will demonstrate the functionality of the ActiveFactory Workbook Aggregate,
Named Ranges and Query Functions.
Objective
Upon completion of this lab you will be able to:
Insert an Aggregate Value Function
Configure Named Ranges
Report Historian process data within the Excel spreadsheet environment
5-32 Module 5 ActiveFactory Workbook
Wonderware Training
Insert an Aggregate Value Function
Aggregate values are calculated from Historical values of selected Analog or Discrete Tags.
In this section, we will return the average value of the SysTimeSec tag for the past 5 minutes. This
is useful because it is a known value that can easily be verified.
1. Press the Ctrl+N keys. This creates a new document.
2. Enter SysTimeSec in cell A1.
3. Enter the words Start Time and End Time in cells A3 and A4, respectively.
4. Insert a start time value in cell B3. An example of the format for the time value is 1/12/2007
12:00.
Your instructor will assist you with definition of a time range.
Be sure to press the Enter key after inputting the date value.
5. Place an End time value (5 minutes after the previous time value) in cell B4.
6. Press the Enter key.
The worksheet should now appear similar to the following figure:
7. 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.
Lab 9 Use Other ActiveFactory Workbook Functions 5-33
Wonderware System Platform Course - Part 2
8. Select cell A1 to define the SysTimeSec tag.
9. Click Next.
Ensure the output cell is Sheet1!$A$7.
10. Click Next.
5-34 Module 5 ActiveFactory Workbook
Wonderware Training
11. Select the Calculations tab in the Aggregate Values Step 3 of 4 dialog box.
12. Select Average Calculation Type.
13. Click Next.
14. Select the Absolute Time option.
15. Click the first radio button after Absolute Time (upper field).
16. Insert your cursor into the left-hand Absolute Time (start) field.
17. Select cell B3 in the Excel worksheet. The cell animates and its address should appear in the
field.
18. Repeat the above steps to insert the End Time value into the second field. The end time is
contained in cell B4.
19. Click Finish.
The aggregate value appears in the worksheet:
20. Alter the times in cells B3 and B4. The tag Average should change accordingly.
Lab 9 Use Other ActiveFactory Workbook Functions 5-35
Wonderware System Platform Course - Part 2
Configure Named Ranges
Excel includes a useful feature called Named Range. You can assign a name to a group of cells,
and then refer to the name rather than the cell addresses. In this task we will reference a named
range containing several tagnames.
21. Highlight cell A1 on Sheet 2 of the Workbook.
22. Select ActiveFactory / Tag Selection / Tag Selection from the main menu.
Notice that the filter information is still applied.
23. Select the following tags using the Ctrl key:
LIT_001.PV
TT_001.PV
InletValve_001.PV
24. Click OK.
5-36 Module 5 ActiveFactory Workbook
Wonderware Training
25. Select the first cell of the series (A1).
26. Press the Ctrl+Shift+Down Arrow keys. The entire column of tagnames will be selected.
27. Insert your cursor into the Excel name box and enter AnalogTags (no spaces).
28. Press the Enter key to ensure the entire range has been named.
29. Click Sheet 3 of the Workbook.
30. Highlight cell A1 on Sheet 3 of the Workbook.
31. Select ActiveFactory / Tag Values / Live Values from the main menu.
The Live Values - Step 1 of 3 dialog box appears.
32. Enter AnalogTags in the Select cell(s) containing tag name(s): field.
33. Click Next.
34. Ensure the output cell location is correct ($A$1) in the Live Values - Step 2 of 3 dialog box.
35. Click Next.
36. Accept the default display options in the Step 3 of 3 dialog box: Click Finish.
The tag range is inserted into the worksheet.
Note: You can also name cells containing the start and end times, and then reference them by
name in history and aggregate functions.
Lab 10 Use the Tag Analysis Wizard 5-37
Wonderware System Platform Course - Part 2
Lab 10 Use the Tag Analysis Wizard
Introduction
The following lab demonstrates the functionality of ActiveFactory Workbooks Tag Analysis Wizard
in order to display various chart analyses.
Objective
Upon completion of this lab you will be able to:
Use the Tag Analysis Wizard to add Process Data charts to an Excel report
Create applied data representations within Excel
5-38 Module 5 ActiveFactory Workbook
Wonderware Training
Use the Tag Analysis Wizard
This task demonstrates configuration of a Scatter Analysis.
1. Click File / New to create a new Workbook.
2. Select ActiveFactory / Tag Analysis from the Excel main menu.
3. Select Scatter Analysis from the list in the Wizard.
4. Click Next.
5. Ensure that the server name displays your Historian within the Select Tags area.
6. Select the LIT_001.PV and TT_001.PV tags using the Ellipsis buttons in the dialog box to
open the Tag Selection control.
7. Click Next.
8. Select the time range you would like to use for the analysis.
For this task, your instructor will guide you in selecting an appropriate time range.
9. Click Next.
From this dialog box you can specify the resolution (number of rows and spacing).
Lab 10 Use the Tag Analysis Wizard 5-39
Wonderware System Platform Course - Part 2
10. For this lab, accept the default settings in the wizard.
11. Click Finish.
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 LIT_001.PV to
SysTimeSec.
Notice that the data in column B changes as well as the scatter plot. Cell B1 continues to read
LIT_001.PV.
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 LIT_001.PV tag.
15. Accept all the defaults in steps 3 and 4.
5-40 Module 5 ActiveFactory Workbook
Wonderware Training
16. Change the Limit 1 value to 20 and Limit 2 value to 80 as shown.
17. Click Finish.
The Tag Analysis will appear similar to the following figure:
18. To preserve the results of this tag analysis, use the Convert Sheet button on the Workbook
toolbar.
19. Save the report in the C:\Wonderware Training\Labs folder as TagAnalysis.xls.
Lab 11 Create an Hourly-Average Shift Report 5-41
Wonderware System Platform Course - Part 2
Lab 11 Create an Hourly-Average Shift
Report
Introduction
The following lab demonstrates use of formatting, aggregate functions, and time ranges within
Excel.
Objective
Upon completion of this lab you will be able to:
Create and Format a New Report based on a specific time range
Create Shift Time Range
Insert Aggregate Value Function
Modify Cell Formulas
5-42 Module 5 ActiveFactory Workbook
Wonderware Training
Create and Format a New Report
1. From Excels main menu, select File / New.
2. Select Blank Workbook.
3. In the upper left-hand area or within cell A1, enter a report name of your choice and select a
large font size for legibility.
This example is titled Hourly Average Data Acquisition IPS.
4. Highlight all the cells in which the name appears.
5. Right-click the cells and select Format Cells from the sub-menu.
6. Select the Alignment tab.
7. Select the Merge cells option.
8. Click OK.
9. Select cell A3.
10. Select the ActiveFactory menu and click Tag Selection / Tag Selection.
11. Locate the SysDataAcqOverallItemsPerSec tag and click OK.
Create Shift Time Range
12. Locate cell A5 and enter a start date and time.
Ensure the server is logging data for the specified time.
In this example, the datetime string 1/15/07 14:00 is the date time value at which the shift
report begins.
13. Select a range that includes 8 rows. The range will end with cell A12 (incl. A5-A12).
14. Right-click the cell range and select Format Cells from the sub-menu.
15. Select the Number tab.
Lab 11 Create an Hourly-Average Shift Report 5-43
Wonderware System Platform Course - Part 2
16. Select Date from the Category: pane.
17. Select the 3/14/01 1:30 PM option string from the Type: pane.
18. Click OK.
The date and time now appear in cell A5.
The format will be the same in cells A6-A12.
19. Locate cell A6 and enter the formula =A5+1/24.
20. Press the Enter key. The cells should now appear similar to the following figure:
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.
5-44 Module 5 ActiveFactory Workbook
Wonderware Training
22. Drag the handle downwards to cell A12. This will increment each of the highlighted cells by
one hour.
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.
Insert Aggregate Value Function
23. Click the Aggregate Values button in the ActiveFactory toolbar.
The Aggregate Values Step 1 of 4 wizard appears.
24. Change the cell containing the Tag Name to Sheet1!$A$3.
25. Click Next.
Lab 11 Create an Hourly-Average Shift Report 5-45
Wonderware System Platform Course - Part 2
26. Change the Select cell for output field to Sheet1!$C$5.
27. Click Next.
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).
The Step 3 of 4 dialog box appears.
28. Select the Calculations tab.
29. Change the Calculation Type to Average.
30. Select the Resolution tab.
5-46 Module 5 ActiveFactory Workbook
Wonderware Training
31. Select the Values spaced every option (we want average values).
32. Set the number to 60000 ms. This value sets the data retrieval mode to Cyclic, at 1-minute
intervals.
33. Click Next.
34. Select the Absolute Time option.
35. Click the first radio button (not the checkbox) under Absolute time.
36. Insert your cursor into the top-left field just below the Single value checkbox.
37. In the main worksheet field, select cell A5. This is the cell containing the time at the beginning
of the aggregate time span.
38. Insert your cursor into the right-hand field below the Absolute Time option.
This is the cell that contains the ending time of the average period.
39. In the main worksheet field, select cell A6. This is the cell containing the time at the end of the
aggregate time span.
The dialog box should now look like the following figure:
40. 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.
Lab 11 Create an Hourly-Average Shift Report 5-47
Wonderware System Platform Course - Part 2
Modify Cell Formulas
41. Select cell C6.
The wwAggregate function string appears in the formula bar.
42. Modify the following time cell reference:
$A$5 to $A5
$A$6 to $A6
Changing the cell reference creates relative cell referencing and enables the average values
to be cascaded down the column.
43. Press the Enter key to save the changes.
44. 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.
45. Save the report in the C:\Wonderware Training\Labs folder as ShiftAvg_DataAcq.xls.
It will be used in Lab 26, Publishing Workbook Reports.
Change $A$5 to $A5
Change $A$6 to $A6
5-48 Module 5 ActiveFactory Workbook
Wonderware Training
Intentionally left blank
Module 6
ActiveFactory Query
Section 1 Introduction 6-3
Lab 12 Use ActiveFactory Query 6-9
Lab 13 Use ActiveFactory Query in Excel 6-23
6-2 Module 6 ActiveFactory Query
Wonderware Training
Module Objectives
Introduce ActiveFactory Query.
Introduce, explain, and use Query to retrieve specific tag information.
Section 1 Introduction 6-3
Wonderware System Platform Course - Part 2
Section 1 Introduction
This section explains the ActiveFactory Query uses and operations.
Introduction
ActiveFactory Query provides a point and click interface to construct and analyze the execution
of the queries specifically designed for the Historian.
Query provides an efficient and simple method to develop simple and complex queries for
reporting and custom application requirements. It is also an excellent way to learn the proper
syntax for developing queries for the Historian.
Query provides a point-and-click interface to build Structured Query Language (SQL) queries for
your reporting and custom application requirements. The query results are immediately available.
Query dynamically reconstructs and tests queries as the user makes changes. Query has easy
access to Historian data and thus provides easy construction of the SQL queries to perform tag
searches, obtain tag details, server information, and values (current, history, aggregate, summary,
and event snapshots).
This application supports construction of queries for use against the Historian version7.1 and later.
Query also utilizes and understands Historian custom extensions.
You can save queries to run at a later time, and you can also save results.
Query Operation
Numerous distinct query types can be selected from the query tool bar. These include custom
queries, and the Favorite Folder queries.
Each query selection results in a different workspace panel selection. The tag picker is present for
most query types. However, the selection panel for columns changes with the query type.
The Server dialog box contains all the servers that are configured in the Servers list configuration.
Changing the selected server in the server list will cause a corresponding change in the selected
server in the tag picker, and vice-versa.
The Database selection field is only enabled for the Custom query type. For all other queries, the
selected database is fixed to be the Runtime database.
Start Query
From the Start button on the Windows Taskbar, select All Programs / Wonderware /
ActiveFactory / Query. Before this client application can be used to query tag information from
the database, the server must be running and you must have access to the server.
Section Objective
Understand ActiveFactory Query uses and operation.
6-4 Module 6 ActiveFactory Query
Wonderware Training
Note: Running any of the ActiveFactory applications for the first time will start the Server Setup
Wizard in order to connect to a server. The Wizard needs to run only once per server. Enter your
sa password to connect to your selected Historian. The Server Setup routine installs essential
server-side components as well as a promotional (45 day) license if there is no license already
installed.
Query Interface
The Query application consists of the following:
The main Toolbar
Query Type panel
The TagPicker
Columns panel (dynamic)
Results panel
Section 1 Introduction 6-5
Wonderware System Platform Course - Part 2
Building Queries
The ActiveFactory Query Column Panel displays different tabs dependent upon the type of query
selected. Each tab provides various relevant configuration options to build your query.
The query is displayed in the SQL tab field. The query content is updated when each option is
selected.
The query results are displayed in the Data tab field. The results change dynamically whenever
the query itself is re-defined. To refresh your results use the Refresh button in the main toolbar.
The following table lists the available query types and the tag types available within the TagPicker
pane:
Query Types Description/Available Tags/Column/Tabs
Aggregate
Values
Use this to see aggregated (min, max, sum, average etc.) values of the tags that you
specify.
Tag Filter Options: Analog, Discrete.
Columns/Tabs: Format, Time, Criteria, Calculations, Retrieval, Source.
Alarm History For the query type Alarm History, there are two tag types: Analog and All.
Tag Filter Options:
Columns/Tabs: Columns, Time, Alarm limits, Retrieval, Source, Order
Alarm Limits Live Values:
Tag Filter Options: Analog.
Columns/Tabs: Alarm limits
Annotations Returns any annotations.
Tag Filter Options: Analog, Discrete, String, Event.
Columns/Tabs: Criteria, Time
Custom Construct your own query and view the results.
Tag Filter Options: N/A
Columns/Tabs: None (editor field)
Event history
values
Returns times of specified events (when they occurred).
Tag Filter Options: Event.
Columns/Tabs: Columns, Time, Order
Event
Snapshot
Return the values of snapshot tags associated with events at the time that the events
occur.
Tag Filter Options: Event. Select Analog, Discrete, String tag type.
Columns/Tabs: Tag set, Columns, Time, Order
Favorite Sample files containing advanced queries that leverage more complex SQL.
Tag Filter Options: N/A
Select from these queries to learn SQL that does not appear in the standard query
options. Modify the queries and re-save for future use in your environment.
Columns/Tabs: Favorites (Browser/ellipsis button)
History values Returns the history of the tag values over time for specified tags.
Includes format configuration, and all the Historian time domain extensions. Specify a
wide range of criteria under which data is returned.
Tag Filter Options: Analog, Discrete, String, All.
Columns/Tabs: Columns, Time, Format, Criteria, Retrieval, Source, Order
6-6 Module 6 ActiveFactory Query
Wonderware Training
IO Server Build queries to return list of tags, including summary tags.
Tag Filter Options: N/A
Columns/Tabs: IO Server
Live values Returns the real time value of specified tags.
Tag Filter Options: Analog, Discrete, and String, All.
Columns/Tabs: Columns, Time
Number of
tags
Returns the number of tags by type.
Tag Filter Options: Analog, Discrete, String, Event, All.
Columns/Tabs: Count
Server version Returns current server version of target server selected from the Server drop-down list.
Tag Filter Options: N/A
Columns/Tabs: None
Storage Returns statistics for Storage Type, Path, Max and Min size thresholds.
Tag Filter Options: N/A
Columns/Tabs: Storage
Storage size
available
Returns available storage space value on Alternate, Buffer, Main, and Permanent
storage locations.
Tag Filter Options: N/A
Columns/Tabs: None
Storage start
date
Returns earliest start date from v_HistoryBlock table.
Tag Filter Options: N/A
Columns/Tabs: None
Summary
values
Use this to see the values calculated by the summary system of the tags that you specify.
Tag Filter Options: All.
Columns/Tabs: Columns, Time, Calculations, Order
Tag details Obtains the configuration information about the tags that you specify. Configuration
information defines how a tag is acquired, stored and displayed by default.
Tag Filter Options: Analog, Discrete, String, Event.
Columns/Tabs: Columns
Tag search Returns TagName and Description for selected tag type.
Tag Filter Options: Analog, Discrete, String, Event, Summary.
Columns/Tabs: Search
Time running Returns the total time (in minutes) the system has been running.
Tag Filter Options: N/A
Columns/Tabs: None
Query Types Description/Available Tags/Column/Tabs
Section 1 Introduction 6-7
Wonderware System Platform Course - Part 2
Building Queries
The ActiveFactory Query interface displays different tabs dependent upon the type of query
chosen. Each tab provides various options from which to select in order to build your query.
As each of these options are chosen, the query being constructed can be viewed in the window
when the Query tab is selected. The query will change as each option is selected.
The query results are viewed in the Data tab. The results change dynamically whenever the query
itself is re-defined. To refresh your results use the Refresh button in the main toolbar.
You can also keep a record of all the queries constructed. Choose the Options / Show All
Queries selection from the main menu, and a third tab named All Queries appears. Once this
option is enabled, all queries constructed can be viewed in the window of this tab.
Configuration Options
You can refresh the query results by clicking the Data tab, then clicking the Refresh query button
on the main toolbar.
ActiveFactory Query includes an option that records all of the queries. To assist in creating a
report, any query can be saved and referred to at a later time.
Click Options / All Queries from the ActiveFactory main menu. The All Queries tab field will
display all subsequent queries and make them available to be copied/pasted into other
applications, or saved to a Queries folder. If you click the All Queries tab, the results may take a
long time to display.
6-8 Module 6 ActiveFactory Query
Wonderware Training
Intentionally left blank
Lab 12 Use ActiveFactory Query 6-9
Wonderware System Platform Course - Part 2
Lab 12 Use ActiveFactory Query
Introduction
In this lab, ActiveFactory Query is used to demonstrate the ease of constructing SQL queries to
return Historian process data.
Objective
To complete this lab, the following tasks must be completed successfully:
Start Query
Create SQL Queries and View the Results
6-10 Module 6 ActiveFactory Query
Wonderware Training
Start Query
Use ActiveFactory Query to create SQL Queries and View the Results
1. From the Start button on the Windows Taskbar, select All Programs / Wonderware /
ActiveFactory / Query.
Your Historian should use the last or current active Server connection. If not, select Options /
Servers from the main menu and reconfigure a connection to your Historian.
Query 1 Simple Query
2. Click your Historian in the Servers pane of the Tag Picker.
3. Select Custom from the Query type drop-down field.
4. Insert the cursor into the SQL pane.
5. Enter the following query:
SELECT * FROM Tag
6. Click the Data tab.
Lab 12 Use ActiveFactory Query 6-11
Wonderware System Platform Course - Part 2
Query executes the query against the selected server and returns the requested data:
The SQL pane can be used as a dynamic SQL editor, and the finished query can then be
saved for reuse.
6-12 Module 6 ActiveFactory Query
Wonderware Training
Query 2 Tag Details
This task creates a SQL query that returns the description, acquisition rate, engineering units and
range, and raw value range for a group of analog tags.
7. Select Tag Details from the Query Type drop-down list.
Selecting a different Query type re-runs the query and displays that query types results with
the previously selected tags and configuration options.
Note: Other Query Types will be used in subsequent queries.
8. Expand the local server folder within the Servers pane in the TagPicker Pane.
9. Expand the Public Groups folder.
10. Select the Mixer group created in a previous lab.
The contents of the Public Group appear in the lower pane.
Lab 12 Use ActiveFactory Query 6-13
Wonderware System Platform Course - Part 2
11. Using the Shift key on your keyboard, highlight all the tags in the Mixer folder (the query will
change dynamically).
Note: The Mixer Group contains only Analog tags. If other tag types exist in a particular group,
you must select another tag type using the tabs in the lower section of the Tags pane.
6-14 Module 6 ActiveFactory Query
Wonderware Training
12. Select the options shown in the following figure (the SQL pane will change dynamically when
the options are selected or de-selected):
13. Select the Data Tab:
Use the scrollbar to display other tag properties. The columns in the above figure have been
resized for clarity.
Lab 12 Use ActiveFactory Query 6-15
Wonderware System Platform Course - Part 2
Query 3 History Values
Using the previous steps, you will create a query that returns the description, quality, and
history values where the tag value exceeds the HiHi alarm limit.
14. Select History Values from the Query Type drop-down list.
15. Select the Analog tab in the Tags pane of the Tag Picker.
16. Select the TT_001.PV tag from the Mixer folder.
17. From within the Columns tab, select the Tag name, Description, Include milliseconds, and
Quality, Quality Detail, and Quality description options.
18. Leave the rest of the options at their default values.
19. Select the Time tab.
6-16 Module 6 ActiveFactory Query
Wonderware Training
20. Select 2 hours from the drop-down list.
21. Select the Format Tab.
22. Ensure that the Narrow format option is selected.
23. Select the Criteria tab.
24. Check the Value option.
25. Select the > sign in the operator field.
26. Enter 188.00 in the Value field.
27. Click the Value not null checkbox.
28. Select the Retrieval tab.
29. Select Delta in the Retrieval mode drop-down list.
30. Enter 100 in the Query row limit field.
31. Select the Order tab.
32. Highlight DateTime and click the > button.
Lab 12 Use ActiveFactory Query 6-17
Wonderware System Platform Course - Part 2
33. Select the Data tab to view the results of the query.
Query 4 Aggregate Values: Average
Return Multiple Aggregate Values from several tags, using cyclic retrieval.
ActiveFactory Query includes an Aggregate Values option that uses standard MS SQL Server
functions to execute the calculations.
34. Click the Criteria tab.
35. Uncheck the Value checkbox to remove the greater than 188.00 criteria.
36. Select Aggregate Values from the Query Type dropdown list.
37. Select the LIT_001.PV tag.
38. Select the Calculations tab.
39. Check the Average calculation checkbox, and uncheck all other options in the Calculations
tab.
40. Select the Retrieval tab.
41. Click the Values spaced every radio button. Enter 1000 Milliseconds.
42. Select the Data tab to view the results.
43. Select the SQL tab.
Notice that a full set of data is retrieved using cyclic retrieval mode, and then it is passed to MS
SQL Server for the Average calculation.
Instead, we can use the more efficient Time-weighted Average Retrieval Mode.
44. Select History Values from the Query Type list.
45. Select the Retrieval tab.
46. Change the Retrieval mode to Average.
47. In the Cyclic attributes pane, enter 1 in the Values over equal time intervals field.
48. Click the Data tab to view the query results.
6-18 Module 6 ActiveFactory Query
Wonderware Training
49. Click the SQL tab. Notice that the query uses the Average Retrieval mode, retrieving one
single value from the Historian and avoiding the extra work that the MS SQL Server
calculation generated.
Query 5 Custom Query
You can create a custom query and save it for later use by using the editing functionality of Query.
For example, suppose you want to run a query using the Best Fit retrieval mode.
50. Select Custom from the Query Type drop-down list:
51. Enter the following query into the SQL tab:
SELECT Datetime, Tagname, vValue
FROM History
WHERE Tagname = 'LIT_001.PV'
AND Datetime >= Dateadd(mi, -10, Getdate())
AND Datetime <= Getdate()
AND wwRetrievalMode = 'BestFit'
AND wwResolution = 30000
52. Execute the query (Select the Data tab).
Lab 12 Use ActiveFactory Query 6-19
Wonderware System Platform Course - Part 2
An example result set is shown next:
53. Re-select the SQL tab.
Note: If the SQL tab is not selected at this time, the query results will be saved instead.
54. Click the Save button in the main toolbar to save changes.
55. Enter BestFit.sql in the File name: field.
56. Click Save.
57. Select Favorites from the Query Type drop-down list.
The new query appears immediately within the Favorite Queries list:
58. Click the BestFit.sql query in the Favorite Queries list.
59. Click the SQL tab to review the query syntax.
6-20 Module 6 ActiveFactory Query
Wonderware Training
Query 6 - Annotations
Returns any annotations entered using Trend.
Recall that we added several annotations to the trend data we developed in a previous lab. The
annotations were added to the LIT_001.PV and TT_001.PV tags.
60. Select Annotations from the Query Type field.
61. Select the LIT_001.PV and TT_001.PV tags in the Tag Picker. They can be selected either
from the All Analog Tags tab, or by using the TagName filter as shown in the following figure:
62. Modify the time span to enclose the time of the annotation. For example, for one or more days
previously, enter (dd, -2, GetDate()) in the SQL pane or select the Time tab and choose 2
days in the Time field.
63. Select the Data tab for the Annotation information.
Lab 12 Use ActiveFactory Query 6-21
Wonderware System Platform Course - Part 2
Query 7 Reporting
The procedure presented here is useful for preparation of reports.
The queries prepared in this section will be saved and re-used in SQL Server Management Studio.
Consider the case where we want to create a report for the Mixer.
To get report information, we want to create the following query:
When did the mixer level exceed the Hi Alarm Limit for the LIT_001.PV tag during the Last
Hour?
For this example, you will assume the Hi Alarm Limit is 90.
64. Create a History Values query for the LIT_001.PV tag.
65. Using the tab fields for the History Values query type, assign the following attributes:
66. Select the Data tab (Execute the query).
Tab or Pane Tab Field/Area Set the following Options to:
Query Type History Values
Tag Picker Pane Tag Type Analog
TagName LIT_001.PV
Columns Tagname
Date and Time (default)
Include milliseconds
Time 1 Hour
Format Narrow
Criteria Value > 90
Retrieval Delta: rows are returned only when data
changes.
Limit to first 0 rows
Note: Setting the number of rows to '0' will result in
all stored values being used.
6-22 Module 6 ActiveFactory Query
Wonderware Training
67. Click the SQL tab.
68. Save the current Query in your Favorites Folder as MixerHiLevelAlarm.sql.
69. Open Windows Explorer.
70. Browse to: C:\Documents and Settings\[user]\Local Settings\Application
Data\Wonderware\ActiveFactory\Queries.
71. Double-click the MixerHiLevelAlarm.sql file to open it with SQL Server Management Studio.
72. Connect to the Server using a Login and Password of wwUser.
73. Change the database to Runtime.
74. Execute the query.
75. Compare the results in Microsoft SQL Server Management Studio to the results obtained in
ActiveFactory Query. They should be identical.
This enables you to build queries using ActiveFactory Query, and re-use them in any other SQL
Client.
Lab 13 Use ActiveFactory Query in Excel 6-23
Wonderware System Platform Course - Part 2
Lab 13 Use ActiveFactory Query in Excel
Introduction
In the previous Module, you learned how to use ActiveFactory Workbook to return Historian tag
values. ActiveFactory Workbook also contains a query building tool called Direct Query which
allows you to embed entire queries in a Microsoft Excel Workbook.
Objective
Upon completion of this lab you will be able to:
Create SQL Queries and View the Results in Workbook
6-24 Module 6 ActiveFactory Query
Wonderware Training
ActiveFactory Query in Excel
1. Start Microsoft Excel.
2. Select cell A1.
3. Select ActiveFactory / Direct Query from the ActiveFactory pull-down menu.
The Direct Query editor appears:
4. Click the Query Builder button. .
The Query Builder button launches a version of ActiveFactorys Query application.
Using Query, we can build a History Values query for display in Excel format.
5. Select History Values from the Query Type: drop-down list.
6. Select the Analog tab in the Tags pane of the Query builder.
7. Holding the Control key, select the following tags:
LIT_001.PV
TT_001.PV
TransferPump_001.SpeedAvg
TransferPump_001.TempAvg
8. Select 5 Minutes from the Time Tab.
9. Select Wide query format in the Format tab.
Lab 13 Use ActiveFactory Query in Excel 6-25
Wonderware System Platform Course - Part 2
This format ensures the tagname will be the column title, which is easier to read for some
types of queries.
Leave all other settings. The Default mode for this query is Cyclic, with a row count of 100.
6-26 Module 6 ActiveFactory Query
Wonderware Training
10. Select the Data tab to ensure that a valid result appears in the lower pane:
11. Click OK.
The Direct Query dialog re-appears. It now contains the query we just built:
12. Click OK.
Lab 13 Use ActiveFactory Query in Excel 6-27
Wonderware System Platform Course - Part 2
The results appear on the spreadsheet in the selected format.
Note the red triangle in cell A1.
13. Click the cell field with the red triangle to display the query that was just built (The query is
inserted into cell A1, and a wwQuery function has been inserted into cell A3, which references
cell A1).
14. Right-click the tab (Sheet1 in the previous figure), and select Rename.
15. Rename the sheet Direct Query and press the Enter key.
16. Click Save.
17. Name the file QueryBuilder.xls and save it in the C:\Wonderware Training\Labs folder.
6-28 Module 6 ActiveFactory Query
Wonderware Training
Intentionally left blank
Module 7
ActiveFactory Report
Section 1 Introduction 7-3
Lab 14 Using ActiveFactory Report 7-7
Lab 15 Wildcard Time Options and Report Editing 7-15
7-2 Module 7 ActiveFactory Report
Wonderware Training
Module Objectives
Show and explain Report GUI elements/functionality.
Successfully use the Report application to create a Historian data report using the MS
Word document format.
Section 1 Introduction 7-3
Wonderware System Platform Course - Part 2
Section 1 Introduction
This section introduces the ActiveFactory Report uses and operations.
Introduction
ActiveFactory Report is an add-in to Microsoft Word for Office 2000 and Office 2003 that facilitates
ActiveFactory Report is an add-in to Microsoft Office Word 2000 and above that facilitates
development of standard reports utilizing the Historian. ActiveFactory Report is compatible with
Office 2007.
Report inserts a field code into a Word document, or embeds a SQL query as a field code in the
document. This enables the user to produce an extremely sophisticated report.
When using Report, save a document as a .dot (document template) file. From there, your report
can be used as an e-mail or a web document by re-using the template.
The same query control you used to build and display a query in Excel is used to build a custom
query which is inserted into a Word document.
Add-In Installation
By default the document template add-in is installed during the ActiveFactory installation. You can
also load and unload add-ins via the Add-in Manager in Word.
The ActiveFactory toolbar displays automatically in Office 2003, and is also available from the
ActiveFactory menubar. To access the ActiveFactory toolbar in Office 2007 click the Add-Ins tab in
the Ribbon.
a. The Add-in Manager is accessed via the Tools / Templates and Add-Ins menu command in
Microsoft Word:
Section Objective
Understand ActiveFactory Report uses and operation.
7-4 Module 7 ActiveFactory Report
Wonderware Training
b. If the HistClient.dot add-in is not checked, check it and click the Add button.
c. Click OK to exit the dialog box.
Wildcards
When running an ActiveFactory Report, you can use wildcards to simplify reuse of a given report.
Using the #Time(xx:xx) Variable:
#time(xx:xx) variable: The #time variable is used in time functions to represent 'Today'. The date
portion of datetime is the current date. The time portion of datetime is the time specified in the
brackets.
For example:
WHERE datetime >= #time(07:00) - 24h
AND datetime < #time(07:00)
Valid duration units for all variables include:
In this case, the query would be done over the previous 24 hours starting at 7:00am (similar to the
previous lab section). This enables reports to be based on 'Today' for a specified time period.
Note: If part of your job function is to prepare a daily report (like a production report) which covers
the same period each day you can use the #Time wildcard to create a template report that can be
run each day.
s seconds
mi minutes
h hours
d days
w weeks
mm months
Section 1 Introduction 7-5
Wonderware System Platform Course - Part 2
Using the #Date(xx:xx) Variable:
#date(xx:xx) variable: The #date variable is used in time functions to represent a specific date.
This function is very similar to the #time function only it allows the date to be specified. The time
portion of datetime is the time specified in brackets.
For example:
WHERE datetime >= #date(07:00) - 2h
AND datetime < #date(07:00)
In this case, the query would be done 2 hours previous to 7:00am on the report date defined. This
allows reports to be based on the same time period.
Using the #ReportTime(xx:xx) Variable
This function is used in conjunction with #Time or #Date. When a report time is set, this wildcard is
replaced by the defined report time. A report time is set via the ActiveFactory / Options
command. This variable defaults to the current time if it is not specified.
For example:
WHERE datetime >= #time(#ReportTime) - 24h
AND datetime < #time(#ReportTime)
or:
WHERE datetime >= #date(#ReportTime) - 24h
AND datetime < #date(#ReportTime)
Note: The #Date and #ReportTime wildcards are ActiveFactory Report wildcards and are not
recognized by the Historian. Queries including these wildcards in ActiveFactory Query or MS
Query Analyzer will not work.
7-6 Module 7 ActiveFactory Report
Wonderware Training
Intentionally left blank
Lab 14 Using ActiveFactory Report 7-7
Wonderware System Platform Course - Part 2
Lab 14 Using ActiveFactory Report
Introduction
In this lab you will create a report that embeds SQL statements directly into a Microsoft Word
document. By saving the report as a template you can easily rerun the embedded queries in new
reports.
Objective
Upon completion of this lab you will be able to:
Present process data within a Microsoft Word document format
Construct a Live Query in Report
Embed Query Format Options in Report
Create a Template
Create a Report
Specify the Report Date
7-8 Module 7 ActiveFactory Report
Wonderware Training
Construct a Live Query in Report
1. Open Report (Start / All Programs / Wonderware / ActiveFactory / Report).
Note: A security warning may appear referring to trusted macros. Click the Always trust Macros
from this source checkbox and click Enable Macros.
Word opens a new document with a new ActiveFactory logo and menu command:
2. Select Tools / Options.
The Options dialog box appears.
3. Select the View tab, and check the Field codes option.
Setting the Field codes option enables viewing of the SQL queries that will be embedded
within the Word document at a later time.
The field codes are visible only on the active document.
4. Click OK to close the Options dialog box.
5. From the main Word menu, select ActiveFactory / Insert Query.
Note: If this is the first time running Report, you may be prompted that an ActiveX Control is about
to be run. Click OK to acknowledge the message.
Lab 14 Using ActiveFactory Report 7-9
Wonderware System Platform Course - Part 2
The Direct Query dialog box appears.
6. Click the Query Form button .
The Query window appears.
7. In the Query type drop-down list, choose Live values.
8. Use the Ctrl key to select the following tags from the tag picker window:
InletValve_001.PV
LIT_001.PV
OutletValve_001.PV
TransferPump_001.PV
TT_001.PV
The completed query should look like the following figure:
7-10 Module 7 ActiveFactory Report
Wonderware Training
9. Select the Data tab to verify the query result:
10. Click OK.
Your SQL query now appears in the Query field of the Direct Query dialog box.
11. Click the Format Table button.
Lab 14 Using ActiveFactory Report 7-11
Wonderware System Platform Course - Part 2
The Table AutoFormat dialog box appears. These options enable the user to define the look
of the table.
12. For this lab, select the options displayed in the next figure.
13. Click OK after selecting the format options.
The Direct Query dialog box reappears.
14. Click OK to embed the connection information, query, and format options into the report.
Create a Template
Storing the embedded queries as a Word template rather than a document file creates re-usable
reports. Any new Word file can be created based on the pre-defined query template.
15. Select ActiveFactory / Save Report from the menubar.
16. Enter SampleReport in the File name: field.
17. Select Document Template (*.dot) from the Save as type: dropdown list.
18. Click Save.
19. Close the template file, leaving Microsoft Word running.
7-12 Module 7 ActiveFactory Report
Wonderware Training
Create a Report
20. From the main Word menu, select ActiveFactory / Open Report.
21. Select the SampleReport.dot template icon in the General tab.
22. Click OK.
The query text appears.
23. Select ActiveFactory / Run Report from the main Word menu.
24. The report is now embedded in the Word document:
25. Close the file without saving it, leaving MS Word running.
Lab 14 Using ActiveFactory Report 7-13
Wonderware System Platform Course - Part 2
Specify the Report Date
26. From the Word menubar, select ActiveFactory / Open Report.
27. Select the SampleReport.dot template icon in the General tab.
28. Click OK.
29. Place a blank line before the result area.
30. Place your cursor on the first blank line of the report, above the SQL query area.
31. From Words main menu, select ActiveFactory / Insert Report Date.
The field { RPT\Date } is inserted into the report field at the cursors location.
32. Run the report using the previous steps. The current date appears in the location at which the
field was inserted.
33. Close Microsoft Word without saving the file.
7-14 Module 7 ActiveFactory Report
Wonderware Training
Intentionally left blank
Lab 15 Wildcard Time Options and Report Editing 7-15
Wonderware System Platform Course - Part 2
Lab 15 Wildcard Time Options and Report
Editing
Introduction
This lab demonstrates using Wildcard time options for report running, and editing a report
template.
Objective
Upon completion of this lab you will be able to:
Use Wildcard Time Options
Edit Report Queries
Save the Results as HTML
7-16 Module 7 ActiveFactory Report
Wonderware Training
Use Wildcard Time Options
Next you will build an aggregate report using date/time wildcards.
You must first set the option that will allow wildcards to be included in the query.
1. Open ActiveFactory Report (Start / All Programs / Wonderware / ActiveFactory / Report.
2. Select ActiveFactory / Options from the main menu.
3. Click the Use date/time wildcards checkbox.
4. Click OK.
Whenever a new query is inserted, the time wildcard options will now appear.
5. On the first line of the new Word document, enter a report name.
For this report, Shift Report: Averages is used.
6. Select ActiveFactory / Insert Query from the Word main menu.
7. The Direct Query window appears. Click the Query Form button.
Query Builder appears.
8. Construct a query that returns averages for the LIT_001.PV, TransferPump_001.TempAvg
and TT_001.PV tags over the past 8 hours.
Lab 15 Wildcard Time Options and Report Editing 7-17
Wonderware System Platform Course - Part 2
Build the report in the Wide Table format:
9. Select the Data tab to verify the results:
10. Click the OK button twice.
7-18 Module 7 ActiveFactory Report
Wonderware Training
The Additional Time Options dialog box appears.
11. Select Yes, insert wildcards for query execution relative to a fixed time.
12. Select Date as specified in Report Options.
13. Select the Time specified in Report Options.
14. Click OK. The query is now embedded into the document.
15. Put a blank line below the report title and place your cursor on it.
16. Click ActiveFactory / Insert Report Date.
17. Type a comma and a space (, ) after the {RPT/Date} field.
18. Click ActiveFactory / Insert Report Time.
The report should now look similar to the following:
19. Save as a template as SampleReport_Wildcards.dot.
20. Close the report template.
21. Select ActiveFactory / Open Report from the main Word menu.
22. Open the SampleReport_Wildcards.dot file.
23. Choose ActiveFactory / Options.
24. Enter yesterdays date in the Report date: field.
Lab 15 Wildcard Time Options and Report Editing 7-19
Wonderware System Platform Course - Part 2
25. Enter a report time that represents a moment in time when you know there is data in the
History Blocks. In this example 1:00 p.m. is used.
26. Click OK.
27. Click ActiveFactory / Run Report.
The report displays:
28. Close without saving.
Edit Report Queries
Next you will copy the query and modify it slightly to perform a different aggregation.
29. Select ActiveFactory / Open Report.
30. Highlight Sample Report_Wildcards.dot and click OK.
The query is now embedded into the document.
31. Copy the query to your clipboard.
32. Insert several blank lines beneath the original query.
33. Paste the new query into the document.
34. Insert the cursor into the body of the new query. The query field code will become shaded.
35. Select ActiveFactory / Edit Query.
7-20 Module 7 ActiveFactory Report
Wonderware Training
36. Change each instance of AVERAGE to MAXIMUM.
37. Change each instance of AVG to MAX.
38. The editor should now look like the following figure:
39. Click OK.
The report should now look like the following:
Lab 15 Wildcard Time Options and Report Editing 7-21
Wonderware System Platform Course - Part 2
40. Save the report template as ShiftReport_Avg_Max.dot and close it.
41. Open and Run the ShiftReport_Avg_Max template. The dates you selected for the last report
will apply to this report unless you change them in ActiveFactory / Options.
The two queries show in the report:
Create a Static Report to Present in a Browser
42. From the main menu, select ActiveFactory / Save Results as HTML.
43. Save the report as ShiftReport_Avg_Max.htm in the C:\Wonderware Training\Labs folder.
44. Select File / Web Page Preview to view the report in an Internet browser.
7-22 Module 7 ActiveFactory Report
Wonderware Training
Intentionally left blank
Module 8
Manual Data
Section 1 Manual Data Acquisition Service (MDAS) 8-3
Lab 16 Importing Original Data 8-7
Lab 17 Importing Versioned Data 8-11
8-2 Module 8 Manual Data
Wonderware Training
Module Objectives
Explain and define Old Data
Explain MDAS and how it acquires data
Acquire MDAS data
Section 1 Manual Data Acquisition Service (MDAS) 8-3
Wonderware System Platform Course - Part 2
Section 1 Manual Data Acquisition Service (MDAS)
This section explains the Manual Data Acquisition Service (MDAS) and how it acquires data.
Introduction
MDAS is designed for ArchestrA and Wonderware Application Server to define tags and store
within the Historian. MDAS provides access to data storage, data retrieval and tag configuration
functionality in the Historian.
MDAS is part of the low-level retrieval system that makes it possible to enter old or legacy data
and provide update capabilities. It provides this capability for all users.
The MDAS service provides rich set of functionality, useful not only to internal Historian clients like
the OLE-DB Provider, but also to Historian external clients.
MDAS Overview
MDAS is a thin client-side internal component that provides high-speed remote access to Historian
for storing data in history (real-time data as well as original or modified old data), retrieving data
from history and configuring the tag database.
The primary benefits for MDAS are:
Rich functionality
Performance
Remote-ability
Ease of use
The Historian OLE-DB provider is an internal MDAS client.
Data Categories
The Historian distinguishes between two main categories of data, based on the timestamp of the
data and the time it is presented for historization.
Real-time data: Real-time data is defined as data arriving at the server in time sequential
order, with a time stamp that is within +999 milliseconds/-30 seconds of current server
time.
Old data: The term "old data" is loosely used to describe all non-real time data. Old data
can arrive at the server at any time, in any order and with any time stamp relative to
current server time (The Historian does not support historization of data in the future, i.e.
when the time stamp is ahead of server time). Old data includes real-time data arriving late
from a store/forward cache.
The Historian allows modification of historized data by either inserting one or more new values into
history after the original data for that time period had been historized, or by updating a value or a
time region of values.
All modifications are versioned, and previous versions are preserved in all cases, allowing the user
to view the original data prior to the modifications.
The term "original data" refers to the original set of values historized for a tag.
Section Objective
Explain MDAS and how it acquires data.
8-4 Module 8 Manual Data
Wonderware Training
For example, a real-time stream of data from an I/O Server represents original data and is written
to disk as the original version. Inserts or updates performed on the original stream of data results
in a new version.
Data modification may be performed for any tag category (I/O Server, system or manual). For
manual tags, new data can be presented as either original data (non-versioned) or inserted data
(versioned).
Note: The Historian supports viewing of only the original version or the latest version of data.
Interim versions are preserved in history but are not exposed through the retrieval layer. Future
releases of the Historian may allow full access to all data versions.
MDAS has full store-and-forward support for real-time data.
MDAS supports storing real-time data for delta tags. Modifying data for both cyclic and delta tags is
supported, as well as cyclic and delta retrieval for all types of tags.
Importing History Data
History data can be imported into Historian extension tables in two ways:
Manually formatting it in a .csv file according to a specification and then copying the file
into a special folder on the Historian computer.
Existing InTouch history data can be imported using the InTouch History Importer utility.
.csv File Notes
The .csv file format should be used when small amounts of existing data need modification. The
insert of an entire .csv file results in a single new version of the data. If an inserted data point falls
exactly on an existing timestamp, the existing data value is updated.
For a normal import, the .csv file format and the format of the data contained within the file is very
flexible; however, this flexibility requires the system to perform a large amount of processing on the
data before it can be imported.
Thus, there is an inverse relationship between amount of data to process and import speed. The
time required to process a file is at least exponentially related to the number of values contained in
the file.
Additional considerations for a normal import are:
The total size of the .csv file is limited to less than 4 MB.
The .csv file may contain no more than 100,000 values.
The number of tags represented in the file may not exceed 1000.
Note: Formatting and importing a normal .csv file is demonstrated within the context of Lab 16,
Importing Original Data.
Section 1 Manual Data Acquisition Service (MDAS) 8-5
Wonderware System Platform Course - Part 2
Fast Load .csv
Using the Fast Load .csv import mechanism, original data can be imported very quickly, using
essentially the same .csv file format as a normal import.
The following information applies to a fast load import scenario:
A fast load import is much faster than a normal .csv import. For example, a .csv file that is
4 MB will import approximately 100 times faster. For larger files, the speed improvement
gets substantially better. There are no restrictions on the size of the file to import, or the
number of tags or data values in the file. However, the data that is contained in the .csv file
for a fast load import must be formatted in time-sequential order.
It is this ordering that enables the system to process a fast load .csv file more quickly than a
normal .csv file.
A .csv file formatted for a fast load import is copied into a special \FastLoad import folder.
The fast load import should be used only when it is not feasible to perform a normal .csv import.
Use the following guidelines when considering a fast import:
You need to import very large .csv files.
You want storage rules applied to the data you are importing. A normal .csv import does
not apply storage rules; everything is stored as delta.
Do not use the fast load import if you need to import a large number of small inserts for the
same block. (The fast load import will create a new data stream for each imported fast
load .csv file.)
Do not import fast load data for a tag if there is existing stored data for that tag in the same
time range.
The data points must be sorted in time sequential order for a successful fast load import.
Format Differences
The format for the fast load .csv file is essentially the same as the normal format, with the following
exceptions:
All data in the file is treated as original data.
The OperationType field in the file header is ignored.
The Missing Block Behavior field in the header is used for a different purpose. A value of
10 denotes that tags in the file are specified by name, whereas a value of 11 denotes that
the wwTagKey attribute is used to specify tags.
By default, missing blocks are created as necessary.
The actual data values in the file must be in time sequential order, starting at the top of the
file.
Values that have out-of-sequence timestamps are ignored.
In other words, if a data value in the file has a timestamp that is earlier than the timestamp
in the previous line in the file, the data value is discarded, regardless of whether it belongs
to the same tag or a different tag.
The file should contain only one data value per line.
8-6 Module 8 Manual Data
Wonderware Training
The following information explains the correct .csv format for use with MDAS:
If two multipoint update .csv files for the same tag are simultaneously copied to the
\DataImport directory, the update will span across the total time for the two files. A query
returning latest data will hide (mask) the original version of the data from the end of the first file
to the start of the second file.
For example, if the update in one file ranges from 00:00:00 to 00:05:00, and the other ranges
from 00:10:00 to 00:15:00, the result will be an update starting at 00:00:00 and ending at
00:15:00 ("latest"); the original data from 00:05:00 to 00:10:00 will be masked as "original"
data.
No data is lost. To view either data from a query, use the wwVersion column to specify either
"original" or "latest." By default, the latest data is displayed. To prevent the masking of the original
data, process the .CSV files one at a time.
Line Field Description
Header 1 0 Description of the .CSV file format, either UNICODE or ASCII.
2 0 Character that is used as a delimiter. This can be either a comma ( , ) or a pipe ( | ).
3 0 User name
3 1 Time format: 0 =UTC; 1 =Local.
3 2 Name of the time zone for the timestamps in the .CSV file.
3 If field 1 is set to 0, the value of this field is ignored. However, a value that is at least 1
character long must appear for this field.
3 If field 1 is set to 1, the value of this field should be the literal name of the time zone, as it
is specified in the TimeZone table.
3 To use the local time of the IndustrialSQL Server Historian, specify "Server Local" for this
field.
3 3 Default behavior if a missing history block is encountered: 0 =Do not create replacement
blocks; 1 =Create replacement blocks. If this field is set to 0, and data values in the .CSV
fall within a time period where no blocks are present, then no data will be inserted.
3 4 Time span for the replacement block(s): 0 =Recreate block from first data value to the
present time; 1 =Recreate block for the duration of the .CSV file data.
3 If field 3 is set to 0, then the value of this field is ignored.
3 If this field is set to 0, then history blocks will be recreated from the time of the first value to
the current time.
3 If this field is set to 1, only the history blocks necessary to import all data in file will be rec-
reated.
3 The start and end times for the history block is adjusted based on the current block dura-
tion setting or the start and end times of existing blocks.
Value 4n 0 Tagname
4n 1 Type of operation: 0 =Original value; 1 =Insert; 2 =Update; 3 =Multi-point update.
4n 2 Value start date, formatted as: YYYY/MM/DD
4n 3 Value start time, formatted as: HH:MM:SS.MSEC
4n 4 (This field is used only in the case of an update.) Value end date, formatted as: YYYY/MM/
DD
4n 5 (This field is used only in the case of an update.) Value end time, formatted as:
HH:MM:SS.MSEC
4n 6 Used to indicate whether the value is already in the proper format or whether you want to
scale the value after the import. Values are: 0 =Engineering units; 1 =Raw value.
4n 7 Value
4n 8n QualityDetail. Fields 2 through 8 can be repeated.
Lab 16 Importing Original Data 8-7
Wonderware System Platform Course - Part 2
Lab 16 Importing Original Data
Introduction
This lab demonstrates how the Historian MDAS Acquisition engine takes data from a .csv file and
"pushes" it (automatically inserts it) into a viewable Historian tag. It is then available for analysis by
Query Analyzer or ActiveFactory Trend.
Participants use the ArchestrA System Management Console, MS Explorer, ActiveFactory Query,
and ActiveFactory Trend applications.
Objective
Upon completion of this lab you will be able to:
Use a .csv File to insert data values into a Historian tag as original data
View the Results Using Microsoft SQL Server Management Studio
View the Results Using ActiveFactory Trend
8-8 Module 8 Manual Data
Wonderware Training
Prepare the Import .csv file.
In this section, you will insert original data for the LIT_001.PV tag into a time period where no data
was available.
1. Start Windows Explorer.
2. Browse to the MixerTemp-Original.csv file located in the C:\Wonderware Training folder.
Your instructor will update the file with a date from last week. The objective is to use a date
where there is no data in the LIT_001.PV tag.
3. Right-click the file and select Open With. The following figure shows the menu that appears
when the file has been opened previously (Notepad is in the submenu that appears).
4. If the file has not been opened before, scroll down to Notepad and highlight it.
5. Ensure the Always open using this program option is de-selected.
6. Click OK.
Note: Do not open this file with Excel!
Excel will change the datetime format and make the file unusable.
If the file is opened with Excel, close it without saving it.
This file contains values changing every second for the LIT_001.PV tag. There is no data available
for this tag in the history blocks within the period shown in the file, so this data will be inserted as
original data.
Lab 16 Importing Original Data 8-9
Wonderware System Platform Course - Part 2
7. Close the file.
8. Copy the file to C:\InSQL\Data\DataImport.
After a moment the file will disappear.
9. Start ActiveFactory Query.
10. Open the VersionedData.sql file in C:\Wonderware Training.
Your instructor will have updated the file with the same dates used in the MixerTemp-
Original.csv file.
In the SQL tab, notice that both versions of data are being queried: original and latest.
11. Click the Data tab.
Notice that the file uses 0 in
the second column of the data
rows, which means the data will
be inserted as original data.
8-10 Module 8 Manual Data
Wonderware Training
Both versions retrieved the same value for each instance in time.
View the results in ActiveFactory Trend.
12. Start ActiveFactory Trend (keep ActiveFactory Query open).
13. Add the LIT_001.PV tag to the Trend.
14. Select the time range that reflects the date used in the last few steps.
15. Select Tools / Options.
16. Change the Retrieval style to BestFit-5.
17. Change the Interpolation type to Linear.
The Latest data for the LIT_001.PV tag displays.
18. Leave ActiveFactory Trend and Query open for the next lab.
Lab 17 Importing Versioned Data 8-11
Wonderware System Platform Course - Part 2
Lab 17 Importing Versioned Data
Introduction
This lab demonstrates how the Historian MDAS Acquisition engine takes data from a .csv file and
"pushes" it (automatically inserts it) into a viewable Historian tag. It is then available for analysis by
Query Analyzer or ActiveFactory Trend.
Participants use the ArchestrA System Management Console, MS Explorer, ActiveFactory Query,
and ActiveFactory Trend applications.
Objective
Upon completion of this lab you will be able to:
Use a .csv File to insert data values into a Historian tag as updated data
View the Results Using Microsoft SQL Server Management Studio
View the Results Using ActiveFactory Trend
8-12 Module 8 Manual Data
Wonderware Training
Prepare the Import .csv file.
In this section, you will modify the manual data you inserted during the previous lab.
1. Start Windows Explorer.
2. Browse to the MixerTemp-Corrected.csv file found in C:\Wonderware Training.
3. Right-click the file and select Open With / Notepad.
This file contains new values for the LIT_001.PV tag, and uses the same time range as the csv file
used in Lab 16, Importing Original Data. This data will be inserted as Latest data.
Your instructor will update the file with the date range used in Lab 16, Importing Original Data.
4. Close the file.
5. Copy the file to C:\InSQL\Data\DataImport.
After a moment the file will disappear.
6. Maximize ActiveFactory Query. (If you closed it, reopen the VersionedData.sql file).
7. Click the Refresh query button.
Notice now that the Latest and Original values are different for some values (10:02:00 AM,
10:02:30 AM for example).
8. Maximize ActiveFactory Trend.
Notice that the file uses 1 in
the second column of the data
rows, which means the data will
be inserted as latest data.
Lab 17 Importing Versioned Data 8-13
Wonderware System Platform Course - Part 2
9. Add a second instance of LIT_001.PV to the Trend.
10. Right-click the second LIT_001.PV tag and select Configure.
11. Select the Retrieval tab.
12. Change the Retrieval style to BestFit-5.
13. Select the Other tab.
14. Click the Original radio button.
15. Click OK.
The Original and Latest data are easily compared:
8-14 Module 8 Manual Data
Wonderware Training
Intentionally left blank
Module 9
Historian Event System
Section 1 Introduction 9-3
Section 2 Defining Event Tags 9-9
Lab 18 Create Events 9-15
Section 3 ActiveEvent 9-33
Lab 19 Using ActiveEvent 9-37
9-2 Module 9 Historian Event System
Wonderware Training
Module Objectives
Introduce and explain the Historian Event System
Explain the Event Tables
Explain and define Historian Events
Section 1 Introduction 9-3
Wonderware System Platform Course - Part 2
Section 1 Introduction
This section introduces and explains the Historian Event System.
Introduction
The purpose of the Event System is to enable administrators to setup the detection of pre-defined
events and associate actions with those events.
At a basic level, when something that we think is significant happens within the system, we call it
an event.
The Historian Event System can be configured to periodically check to see if an event has
occurred. This is called event detection. A subsequent action can then be configured and triggered
whenever the system detects that the event has occurred.
Note: The Event System is not a real-time system; rather, it operates on historical data. For real-
time alarming, use an application such as InTouch.
Within the Historian, the storage of an event encapsulates more than just the fact that something
happened. An event can be explained as a moment when a set of pre-defined criteria (based on
historical tag values) becomes true.
Attributes of an event include the date and time that the event occurred, the date and time that it
was detected, and the criteria that were satisfied.
The event system performs the following basic functions:
Detects when events have occurred using pre-defined and configurable criteria.
Optionally logs when events occurred into history.
Triggers a designated configurable action each time the event's detection criteria
becomes true.
The Event System will handle the loss of connection to the Historian and will recover when the
server comes back online.
Section Objective
Introduce and explain the Historian Event System.
9-4 Module 9 Historian Event System
Wonderware Training
Event System Components
The following table describes the event system components:
The ArchestrA System Management Console is used to configure all aspects of the Event System.
Benefits
You can obtain a number of distinct operational benefits from properly using the features of the
Event System. A list of key benefits is as follows:
Unlike real-time alarming, the Event System determines events from stored historical data and is
not dependent on real-time detection. No events will be missed unless the machine is severely
overloaded for a long period of time.
The Event System is SQL-based, thus providing a means of managing database-related tasks
within the system. You can use custom SQL queries as detectors, as well as create custom SQL-
based actions.
A number of pre-configured detectors and actions are available.
Detections may be made by external sources. A COM mechanism is available for invoking the
detector in the Event System.
Time-based detection (based on the system clock time) enables scheduling of certain tasks, such
as data aggregations (summaries).
The system has been designed to manage overload situations. If the system is currently busy (due
to some other processing) for a period of time, the Event System will "catch up" during off-peak
periods. If the overall Historian is continuously overloaded, the Event System will degrade in
functionality gradually. In other words, the system will not fail catastrophically.
You can select which actions have priority and can assign certain actions (preferably only a few)
never to be compromised, even under overload conditions. System tags are available for
monitoring Event System conditions.
Component Description
Historian Configuration
Editor
Part of the ArchestrA System Management Console. Used to set up event
definitions and possible actions.
Runtime database Used to store event definition information and all data generated by the Event
System, such as records of event detections, data summaries, and data
snapshots.
Event System Service Internal process that coordinates the event detection and action functions. This
process runs as a Windows service.
Using the ArchestrA System Management Console, you can configure the event
service to automatically start and stop at the same time as the Historian.
The event service is responsible for:
Reading the event definition information from the Runtime
database.
Creating event detectors and actions, including allocating the
necessary processing threads and establishing database
connections.
Initiating the event detection cycle.
SQL variables Available for use in event queries.
Section 1 Introduction 9-5
Wonderware System Platform Course - Part 2
Event System Use
Generally, you should use the Event System for monitoring non-critical system conditions that
occur only occasionally. For example, possible event detections that you could set up include:
Detect all occurrences in history when the value of discrete tag was equal to 0.
Detect if the system clock is equal to a specified date and/or time.
Determine the state of information in the database via a SQL statement.
You can use event actions to perform tasks such as the following:
Send e-mail messages to remind managers about weekly maintenance checks.
Perform summaries to obtain statistical data for the plant over defined periods of time.
Take "snapshots" of system data.
Modify storage conditions (such as time and value deadbands).
Generally perform any database-related task.
The system is not designed for continually performing data transfer tasks and should not be used
in this manner. The only exception is for summary actions; the system can continually process
data aggregates so that they are available for reporting purposes.
In addition, the Historian Event System should not be used as an alarm system. An alarm system
such as provided within InTouch or Application Server can be used to alert operators to specific
conditions when they become true.
The InTouch alarm system is intended as a notification system to inform operators of process and
system conditions promptly upon their occurrence. The InTouch alarm system supports displaying,
logging, and printing capabilities for process alarms and system events. (Alarms represent
warnings of process conditions, while events represent normal system status messages.) For
more information on the InTouch alarm system, see your InTouch documentation.
In contrast, the Historian Event System is intended to initiate actions based upon historical event
detection. An alarm system presupposes an immediate message response will be propagated for
all configured alarms at the time the respective conditions are met.
In this sense, the Historian Event System is not an alarm system. The Event System queues up
detected events and processes them accordingly based upon pre-configured priorities.
Event System Resource Management
The Event System Service (InSQLEvtSys.Exe) manages all of the system resources required for
detecting events and processing actions. System resources are allocated for detectors and
actions via threads.
A thread is an operating system component that independently performs a particular function
within a larger process. Within the overall process of the Event System, event detectors and
actions are assigned different threads, so that they can execute independently of each other and
thus perform more efficiently.
The Event System uses two thread groups, or "pools." One thread pool is for detectors and the
other one is for actions. The Event Service automatically creates both of these thread pools if
there is at least one event tag defined.
9-6 Module 9 Historian Event System
Wonderware Training
Detector Thread Pooling
Other aspects of resource management include the number of database connections required by
event system components, and how the system handles event overloads and query failures.
The detector thread pool is made up of one or more threads allocated for SQL-based detectors
and a single thread for schedule detectors. Each thread maintains a connection to the database.
The detector thread pool is illustrated in the following diagram:
A SQL-based detector is assigned to a thread based on the time interval that is specified when the
event tag is defined.
Each time interval requires its own thread. For example, you define three event detectors and
assign them time intervals of 10, 15, and 20 seconds, respectively.
Each event detector will be running in its own thread, for a total of three threads.
As another example, you define three event detectors, assigning the first two a 10 second interval,
and the third a 15 second interval. The first two will be running under the same thread, while the
third will be running under its own thread, for a total of two threads.
For multiple detectors that are assigned to the same time interval, the SQL detection statement for
each event tag will be executed in sequential order. That is, the first SQL statement must return
results before the next statement can be executed. After each detection has taken place (results
are returned), the detection is logged into the EventHistory table and any associated action is
queued into the action thread pool.
All schedule detectors are assigned to a single thread.
The efficiency of the detector thread pool depends on how you have spread the load when
assigning time intervals to different event tags. Detections generally do not cause overloading on
the system -- the actions (especially snapshots and summaries) are where most processing and
resource loading occurs.
Section 1 Introduction 9-7
Wonderware System Platform Course - Part 2
Action Thread Pooling
The action thread pool is essentially a pool of four threads that execute actions from three different
action queues. Each thread in the pool maintains a database connection.
The three action queues are:
Critical queue
Normal queue
Post-detector delay queue
Note: For detailed information about each of these queues, see Event Action Priorities in the
Historian online help files.
As a processor thread completes its previous task, a new action will be fetched from one of the
queues. If there are any actions in the critical queue, these will be processed first. Actions in the
critical queue are executed in the order in which they were added to the queue; that is, the oldest
action sitting in the queue will be processed first.
If the critical queue is empty, actions will be fetched from the post-detector delay queue. Actions in
the post-detector delay queue are ordered by time. Actions assigned the shortest post-detector
delay will be executed first.
If both the critical and post-detector delay queues are empty, actions will be fetched from the
normal queue. Like critical actions, normal actions are processed in the order in which they were
added to the queue.
Event Tables
Event tables contain definitions for events, including tags associated with events, detectors for
events, and actions for events. The event system tables can also store "snapshots" of tag values
at the time of an event, as well as details about the event itself.
A special type of event action is a summarization of tag values. A subset of the event tables
provides the supporting framework for fully automated summary generation for analog, discrete
and string tags.
The event system tables are:
ActionType SQLTemplate
AnalogSnapshot StringSnapshot
CalcType SummaryData
DetectorType SummaryHistory
DiscreteSnapshot SummaryOperation
EventHistory SummaryTagList
EventTag Tag
EventTagPendingDelete TimeDetectorDetail
Frequency TimeDetectorDetailPendingDelete
SnapshotTag
9-8 Module 9 Historian Event System
Wonderware Training
Intentionally left blank
Section 2 Defining Event Tags 9-9
Wonderware System Platform Course - Part 2
Section 2 Defining Event Tags
This section explains and defines Historian Event Tags and their characteristics.
Event Tags
An event tag is a name for an event definition in the system. For example, if you wanted to log an
event when the temperature of a tank reached 100 degrees, you might define an event tag and
name it "TankAt100." Event tags differ from all of the other tag types in the Historian (analog,
discrete, and string). These tag types are the definitions of variables to be stored, but an event tag
is a named reference for the definition of the specific event you want to detect and what to do
when it occurs.
Event tags are created and maintained using the Historian. When you define an event tag, you
must specify:
A name, description, and other general configuration information
The event criteria, which describes the conditions that must exist for the event to occur
and how often the event system will check to see if the event has occurred.
Whether or not to log the event detection when it occurs.
Whether or not to enable/disable the event detection.
An optional action that to be triggered when the event is detected.
The following table describes the tables that are used for storing event tag definitions:
Section Objective
Explain and define Historian Event Tags and their characteristics.
Type of definition Table
Detection of a particular event and the possible
resulting action
EventTag, DetectorType, and ActionType
Time-based detections TimeDetectorDetail
Snapshots of analog, discrete, and string tags SnapshotTag
Summary actions SummaryOperation and SummaryTagList
9-10 Module 9 Historian Event System
Wonderware Training
Edge Detection
When detecting events, it is useful to pinpoint rows in a result set where criteria changed from true
to false, or vice-versa.
For example, you may want to know when the level of a tank goes above 5 feet. As the tank level
approaches 5 feet, the criteria does not return true. Only when the level crosses the line from not
satisfying the criteria to satisfying it, does the event actually occur. This imaginary "line" where the
change occurs is called the edge.
Over a period of time, there may be many instances where the criteria crosses the "edge" from
being satisfied to not satisfied, and vice-versa. The values on either side of this "edge" can be
detected if you configure your event tag to include this information. There are four possible options
for edge detection: none, leading, trailing, or both. You will get differing results based on which
option you use:
Edge detection only applies to analog and discrete value detectors. Also, edge detection is
handled slightly differently based on whether you are using analog tags or discrete tags.
Historical Logging of Events
The exact time at which a particular event actually occurred and the time at which it was detected
by the event system can be logged into a Historian table, called EventHistory. Each row in the
EventHistory table contains the name of a defined event tag, the date/time stamp for when all of
the detection criteria for that event tag were satisfied, the date/time stamp of when the event
detector detected the event, and an additional field that provides event detection information.
Note: You cannot disable event logging if analog and/or discrete snapshot actions are configured.
In addition to the conditions that must be met for an event, you must also have the event detection
process enabled for the event tag.
Tip: The EventHistory table can be used to determine if too many event tags have the same time
interval. If the latency between when the event actually occurs (stored in the DateTime column)
and when it was detected (stored in the DetectDateTime column) is constantly growing and/or
multiple event occurrences are being detected during the same detector time interval, you need to
move some of the event detectors to a different time interval.
Edge Detection Option Results
None Returns all rows that successfully meet the criteria; no edge detection is
implemented at the specified resolution.
Leading 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).
Trailing Returns only rows that are the first to fail the criteria (return false) after a row
successfully met the criteria (returned true).
Both All rows satisfying both the leading and trailing conditions are returned.
Section 2 Defining Event Tags 9-11
Wonderware System Platform Course - Part 2
System Thread Allocation for Events
A system thread is an object that independently performs a particular function within a process. In
the event system, threads are allocated for event detectors and actions.
Detector Thread Allocation
Two threads are allocated to handle event detections: one for all SQL-based detectors and one for
schedule detectors. Each of these threads uses a logon to the SQL Server.
Schedule detectors are processed in real-time and are executed at the scheduled time. Since
SQL-based detectors operate on historical data, they are ordered and then processed. The
detectors are first divided into groups, based on the time interval specified for the corresponding
event tags. The time interval is the rate at which the configured detector component will check to
see if an event occurred (this time interval is stored in the ScanRate column of the EventTag
table). The detectors are then sequentially ordered in the time interval group.
Note: Each detector thread maintains a database connection.
Action Thread Allocation
All actions are assigned to a thread pool. Within this pool are three different queues:
A "critical" queue, which contains any actions for event tags that have been assigned a
critical priority. You should categorize any events that are highly important as "critical"
events. All events that are given a critical priority will be processed first if a system
overload condition occurs. Use caution when assigning an event as critical. If all events
are assigned as critical, there is no protection in the system in the case of an overload.
Critical means that the system will always attempt to perform the action before any normal
actions.
A "normal" queue, which contains any actions for event tags that have been assigned a
normal priority. All non-critical events are labeled with a "normal" priority and will be
processed after the critical events if a system overload condition occurs.
A delayed action queue, which contains any actions for event tags that have been
assigned a post-detector delay. The post detector delay is the minimum amount of time
that must elapse after an event was detected before the associated action can be
executed.
Note: Each thread in the action thread pool maintains a database connection.
9-12 Module 9 Historian Event System
Wonderware Training
Latency
Latency is the amount of time between when an event actually occurred and when it is detected by
the event system. Latency is important when you want to quickly trigger an action after an event
occurs.
For example, if you created an event that detects when an instrument is starting to send non-
normal values, you would want an action to notify you to check the instrument as soon as possible.
You would create an event tag for this with a short time interval (scan rate) so that the event
system would frequently check to see if this event has occurred.
Other events (for example, when an operator ended a shift) are not as critical and latency is not as
important.
Use caution in assigning time intervals to event tags. Too many event tags assigned to the same
time interval may result in detector "overruns." While this should not have a negative impact on
actual detection of events, it may add to increased latency. Also, assigning short time intervals will
result in higher CPU loading and may lead to degraded performance.
Event Detectors
Each event tag has an associated event detector. An event detector is a mechanism for
determining when the set of event criteria for an event tag has been satisfied. An event detector
must be of a specified type listed in the DetectorType table. When you configure an event
detector, you must first configure its type and then configure the parameters associated with that
detector type.
The Historian is shipped with the following pre-configured event detectors.
For SQL-based detectors, the time that an event is detected may occur significantly after the
actual time that the event occurred, depending on event configuration parameters. For example,
you configure a detector to detect a particular event based on a time interval of 10,000 ms (10
sec). This means that every 10 seconds, the event detector will check to see if the event occurred.
If the event occurs 2,000 ms (2 sec) after the last check, the event detector will not detect that the
event occurred until the full 10 seconds has elapsed.
Schedule detectors, however, are real-time detectors; they run once every 1 second.
Detector Description
External Event detection is triggered via the ActiveEvent ActiveX control. For example, an
InTouch script can invoke necessary ActiveEvent methods to trigger a Historian
event. The external detector is not configurable.
Generic SQL Detects an event based on criteria that are outlined in a SQL statement. You can
use pre-configured SQL templates that are stored in the database as the basis
for your script, or you can create your own script from scratch.
Analog Specific Value Detects an event based on criteria applied to the value of a particular analog tag.
The value of an analog tag is compared (using operators) to a constant value.
Discrete Specific Value Detects an event based on criteria applied to the state of a particular discrete
tag. The state of a discrete tag is compared to a constant target state.
Schedule Detects an event based on the system clock being equal to or greater than a
specific time. For example, you could log an event every week on Monday at
2:00 p.m.
Section 2 Defining Event Tags 9-13
Wonderware System Platform Course - Part 2
Event Actions
An event may or may not be associated with an event action. An event action is the action that is
configured to take place when the event detector determines that the event occurred. Event
actions are not required; there are times when you may want to store only when events happened.
The Historian is shipped with the following pre-configured event actions:
Event Components and Programs
The event system consists of the following components and programs:
The Event System Data Model, which is the schema that supports the data configuration
and history logging requirements of the event system.
The Event System Service (ESS), which is a Windows NT Service that coordinates the
event detection and action functions. The ESS is automatically started and stopped when
you start and stop the Historian system using Historian Control program; however, the
ESS can be started and stopped independently from the rest of the system using the
Services program in Control Panel.
A set of system event tags for pertinent system internal variables; similar to pre-defined
system tags.
The System Management Console, a system-wide configuration application that provides
an intuitive user interface in which you can create or delete event tags, configure event
detectors and event actions, and manage the event system.
Event system COM components for enumerators, detectors and actions.
Action Description
None Will not perform any action as the result of an event detection.
Generic SQL Triggers an action that is outlined in a SQL statement. You can use pre-
configured SQL templates that are stored in the database as the basis for your
script, or you can create your own script entirely from scratch.
Snapshot Records the values of selected analog tags or the states of selected discrete
tags or the string values of selected string tags at the time that the event
occurred. Quality is also recorded.
E-mail Sends a pre-configured Microsoft Exchange e-mail message.
Deadband Changes the time and/or value storage deadband for one or more analog tags
that are using delta storage (storage by exception).
Summary Performs one or more aggregations for one or more analog tags.
9-14 Module 9 Historian Event System
Wonderware Training
Event System Variables
The Event System uses a set of internal variables called tokens to facilitate event detections and
actions. During the Event Detection and Action, the variables are replaced with the associated
values by the event components just prior to executing the query. The query received by the
Historian does not contain the variables.
The variables are as follows:
Detector Strings use only the @StartTime and @EndTime tokens.
Action Strings use all 4 tokens.
The following figure shows Detector and Action tokens used in several Event Tags (created in the
subsequent lab):
A detection query executed by a detector component is similar to the following:
SELECT Dat eTi me
FROM Hi st or y
WHERE Tagname = ' Boi l er Pr essur e' AND Val ue > 75
AND Dat eTi me > ' @St ar t Ti me'
AND Dat eTi me < ' @EndTi me'
@StartTime and @EndTime are simply placeholders for the detector component to coordinate
event detection over a moving time range.
The following action query illustrates how the event variables could be used:
SELECT * I NTO TEMPTABLE
FROM Hi st or y
WHERE Dat eTi me = ' @Event Ti me'
AND TagName I N (
SELECT TagName
FROM Snapshot Tag
WHERE Event TagName = ' @Event TagName'
AND TagType = 1)
Note: These tokens only function in the internal context of the Event System and do not function
in queries from external client tools such as SQL Server Query Analyzer.
Variable Description
@EventTime Time of the detected event of the current detector.
@EventTagName Tagname associated with the detected event.
@StartTime Start date/time for the detector query.
@EndTime End date/time for the detector query.
Lab 18 Create Events 9-15
Wonderware System Platform Course - Part 2
Lab 18 Create Events
Introduction
This Lab is designed to teach Event tag creation within the Historian, including how SQL queries
are used as event actions and event validations.
Objective
Upon completion of this lab you will be able to:
Utilize the Historian Event System capabilities
Create the HiLevelEvent Tag
Create the TransferEvent Tag
Create the MixerSummary Tag
Create the ExternalEvent Event Tag
9-16 Module 9 Historian Event System
Wonderware Training
Create the HiLevelEvent Tag
1. Maximize the ArchestrA System Management Console.
2. Expand the Configuration Editor icon under your Historian server.
3. Expand the System Configuration folder.
4. Expand the Tag Configuration folder.
5. Right-click the Event Tags icon.
6. Select New Tag. from the sub-menu
The New Event Tag Wizard appears.
7. Enter HiLevelEvent in the Unique Tag Name field.
8. Click Next.
Lab 18 Create Events 9-17
Wonderware System Platform Course - Part 2
The New Event Tag - General dialog appears.
9. Enter Event triggered by Mixer HI Level in the Description: field.
Do not change the other default option settings.
10. Click Next.
11. The New Event Tag Detector dialog box appears:
This dialog box enables assignment of a detection time interval and selection of the tag to
which the event is assigned.
12. Enter 60000 ms in the Time Interval field.
13. Click the Search button in the Tag Name: area.
9-18 Module 9 Historian Event System
Wonderware Training
The Tag Finder dialog appears.
This dialog box contains a tagname filter that enables easy location of tags by name,
description, or tag type.
14. Enter LIT in the Tagname area.
15. Click the Find Now button.
The Filter will return tagnames that match the description:
16. Highlight the LIT_001.PV Tag Name in the Found Tags: area.
17. Click the > button that becomes enabled after the LIT_001.PV Tag Name is selected.
This will move the Tag Name to the Target Tags: list.
The tag is now placed in the Target Tag pane and is the tag from which the Event tag will
derive its information.
18. Click OK.
Lab 18 Create Events 9-19
Wonderware System Platform Course - Part 2
The Tag Name will now appear within the main Detector dialog box.
19. Select > from the Operator drop-down list.
20. Enter 95 in the Detection Value field.
21. Click Next.
The New Event Tag Action dialog appears:
9-20 Module 9 Historian Event System
Wonderware Training
22. Change the Action Type: to None.
23. Click Finish.
Creation of the HiLevelEvent tag is complete.
The HiLevelEvent tag now displays within the Event Tags Tag Name pane:
Lab 18 Create Events 9-21
Wonderware System Platform Course - Part 2
Create the TransferEvent Tag
24. Create a new event tag using the previous steps (Use the Tag Configuration area of the
ArchestrA System Management Console).
25. Enter a Tag Name of TransferEvent.
26. Click Next.
27. Enter Event triggered by Production Transfer in the Description field.
28. Click Next.
29. Use the Search button to insert Inletvalve_001.PV.IsActive1 in the Tag Name field.
30. Set the State Value to TRUE.
31. Click Next.
9-22 Module 9 Historian Event System
Wonderware Training
32. Click the Add button on the New Event Tag - Action dialog box.
33. Enter 001 in the Tag Name field and click Find Now.
34. Highlight the following tags:
LIT_001.PV
TT_001.PV
TransferPump_001.SpeedAvg
35. Press the > button to move the selected tags to the Target Tags pane.
36. Click OK.
Lab 18 Create Events 9-23
Wonderware System Platform Course - Part 2
37. Click Finish.
38. The TransferEvent tag is now visible in the Tag Name pane within the All Event Tags group.
9-24 Module 9 Historian Event System
Wonderware Training
Create the MixerSummary Tag
39. Create a new Event Tag called MixerSummary using the previous steps.
This event tag will perform an hourly Average summary calculation of the Mixer tag values.
40. Click Next.
41. Enter Hourly summary of mixer tags in the description field.
42. Click Next.
The Detector dialog box appears.
43. Configure the following event tag Detector attributes.
44. Click Next.
Lab 18 Create Events 9-25
Wonderware System Platform Course - Part 2
45. Select Summary for Action Type.
Now we need to select the Operation type and its properties.
46. Click the Add button on the New Event Tag - Action dialog box.
The Summary Operation Properties dialog box appears.
47. Configure the Calculation Type, Time Stamp, Resolution, and Duration to match the
following figure.
48. Click OK.
9-26 Module 9 Historian Event System
Wonderware Training
Next, associate tags to the action.
49. Highlight the Action type you just defined.
The Tags button is now enabled. At this time, you can also access the Operation properties or
delete the Operation.
50. Click Tags.
The Summary Tag List: MixerSummary dialog box appears, containing the operation
properties just defined.
51. Click Add.
The Tag Finder appears.
52. Add the following tags to the Target Tags: list:
LIT_001.PV
TT_001.PV
53. Click OK.
Lab 18 Create Events 9-27
Wonderware System Platform Course - Part 2
The Summary Tag List Tag Name pane appears similar to the following figure.
54. Click OK, then Finish.
The new MixerSummary tag now appears within the Tag Name pane of the All Event Tags
group.
Create the ExternalEvent Event Tag
For this task you will create an event tag that is triggered by an External action using Wonderware
Application Server instead of from within Historian. The trigger mechanism will be configured in a
subsequent lab.
55. Create a new Event tag called ExternalEvent using the previous steps.
56. Click Next.
57. Enter Triggered by Application Server within the Description: field.
58. Click Next.
9-28 Module 9 Historian Event System
Wonderware Training
The New Event Tag Detector dialog box appears.
59. Select External from the Detection Type: drop-down list.
60. Click Next.
61. Select None for the Action Type.
62. Click Finish.
Review Event History
63. Start ActiveFactory Query
Event History is stored in the Event History table in the Runtime database. You will write a custom
query to view that data.
64. Select Custom in the Query type drop-down list.
65. Enter the following query:
SELECT Tagname, Dat et i me, Det ect dat et i me
FROM Event hi st or y
Lab 18 Create Events 9-29
Wonderware System Platform Course - Part 2
66. Click the Data tab. You will see all the events generated so far in the Historian.
Notice that several HiLevelEvent records and TransferEvent records display in the query results:
9-30 Module 9 Historian Event System
Wonderware Training
You can also use the predefined Event History query in ActiveFactory Query to display event
history data.
67. Change the Query type to Event history values.
68. Check the Tag name, Date and time, and Detect date time checkboxes in the Columns tab.
69. Select 1 hour in the Time tab.
70. Select the HiLevelEvent in the Tag Picker.
71. Click the Data tab.
The events for the HiLevelEvent tag display:
Lab 18 Create Events 9-31
Wonderware System Platform Course - Part 2
Review Event Snapshot Values
You will now query the Snapshot values generated by the SysStatusEvent tag.
72. Select Event Snapshot from the Query Type drop-down list.
73. In the Time tab, verify 2 hours is shown in the Time drop-down field.
74. Select the SysStatusEvent tag in the Tag Picker.
75. In the Tag set tab, from the Snapshot Tags list, select the tags shown in the following figure:
76. Select the Columns tab.
77. Select the DetectDateTime checkbox.
9-32 Module 9 Historian Event System
Wonderware Training
78. Review and analyze the SQL Query:
79. Select the Data tab again to view the query results.
Section 3 ActiveEvent 9-33
Wonderware System Platform Course - Part 2
Section 3 ActiveEvent
This section explains and defines Historian Event Tags and their characteristics.
Introduction
ActiveEvent is an ActiveX control that allows you to notify the Historian event system when an
event has occurred in another application, such as InTouch. ActiveEvent is script-based and can
be used in any application that supports a COM-enabled scripting language to detect an event for
that application. COM-enabled scripting languages include InTouch scripting and Visual Basic.
After the ActiveEvent control is installed, it does not automatically appear in the list of available
ActiveX objects for use within WindowMaker. It must be registered on the InTouch node.
Use ActiveEvent for external event detection in cases where you want to cut processing overhead
used by the Historian Event Detector engine.
To enable external event detection for the Historian:
Create an event tag in the Historian to store the event occurrence information. Make sure
that the detection type is set to External.
The event tag can then be defined so that the event is associated with an action that is
triggered from the Historian, such as executing a SQL script, sending an e-mail message,
or recording the values of a set of tags at the time the event occurred.
Register (install on the host application) the ActiveEvent control so that it can be used in
the ActiveX container application (for example, in InTouch).
Configure the DCOM security attributes for the external detector that will be used with
ActiveEvent. Security attributes must be set up on the Historian computer.
Write a script that will notify the Historian event system of the external event.
The system time for the ActiveEvent computer should be synchronized with the system
time for the Historian. If the ActiveEvent computer time is ahead, the event system may
generate NULL values for snapshot data.
Scripting ActiveEvent
Use ActiveEvent's methods in scripts to connect to a Historian and detect an external event. An
external detector is triggered using the Historian ActiveEvent control. The ActiveEvent control
(which resides on a client machine) interacts with the event detector (which resides on the server
machine) in order to trigger events externally. The ActiveEvent control facilitates the remote
triggering of events on the Historian system by first initializing with the Historian computer name
and event tag, and then calling the InvokeEventEx() method.
ActiveEvent can be scripted using any scripting language that supports COM. For example, an
InTouch script can trigger a Historian event if you use this control in an InTouch application. You
could also trigger an event from a Visual Basic script.
For details on ActiveEvent Properties and Methods, see the Historian ActiveX Controls Guide.
Section Objective
Explain and define Historian Event Tags and their characteristics.
9-34 Module 9 Historian Event System
Wonderware Training
ActiveEvent Methods
Use ActiveEvent's methods in scripts to connect to a Historian and trigger an event. The
ActiveEvent control facilitates the remote triggering of events on the Historian system by first
initializing with the Historian computer name and event tag, and then calling the InvokeEventEx()
method.
ActiveEvent can be scripted using any scripting language that supports COM. For example, an
Application Server script can trigger a Historian event if you use this control in a Galaxy. You could
also trigger an event from a Visual Basic script.
AddEventTag()
Adds an event tag to the active event tag list.
InitializeEx()
Creates a connection to the Historian.
Method AddEventTag(string EventTag)
Parameter EventTag
Name of the event tag with which the ActiveEvent event detector is associated.
ActiveEvent is used with an external type event detector.
Returns Value 0 =Success.
2 =Unable to execute method because ActiveEvent is not initialized.
7 =Remote function call failed.
Method InitializeEx(string ComputerName)
Parameter ComputerName
Name of the computer on which the Historian is running. If you are not
connecting to the Historian over a network, use a blank string ("") for the
computer name.
Note You cannot use a Historian alias for this parameter.
Returns Value 0 =Success.
1 =Unknown failure.
3 =Unable to initialize ActiveEvent.
4 =ActiveEvent is already initialized.
7 =Remote function call failed.
8 =Unable to determine local computer name.
Remarks Once you have initialized with a Historian, use the IsConnected property to
determine if the connection was successful. Also, you only need to initialize with
the server once; you can invoke an unlimited number of events after initialization
has occurred.
If you are using the InTouch, initialization will not occur unless the ActiveEvent
ActiveX control is part of an open window. This limits the use of the
InvokeEventEx method within InTouch Application Scripts, Condition Scripts,
Data Change Scripts, and so on. When you close an InTouch window, all
ActiveX controls are automatically uninstantiated.
Section 3 ActiveEvent 9-35
Wonderware System Platform Course - Part 2
InvokeEventAtTimeEx()
Triggers the event at a specified date/time.
InvokeEventEx()
Triggers the event at the time this method is called.
IsConnected
Determines whether a connection to the Historian exists.
RemoveEventTag()
Removes an event tag from the active event tag list.
Method InvokeEventAtTimeEx(string TagName, string EventDateTime)
Parameter TagName
Name of the event tag with which the ActiveEvent event detector is associated.
ActiveEvent is used with an external type event detector.
EventDateTime
Date/time that you want the event triggered. This date is in local time for the Historian.
This parameter must be formatted as:
YYYY-MM-DD hh:mi:ss.mmm
Returns Value 0 =Success.
1 =Unknown failure.
2 =Unable to execute method because ActiveEvent is not initialized.
5 =Unable to perform date/time conversion due to invalid format.
6 =Date/time cannot be a future date.
7 =Remote function call failed.
Remarks You can invoke an unlimited number of events after you have initialized with a Historian.
Method InvokeEventEx(string EventTag)
Parameter EventTag
Name of the event tag with which the ActiveEvent event detector is associated.
ActiveEvent is used with an external type event detector.
Returns Value 0 =Success.
1 =Unknown failure.
2 =Unable to execute method because ActiveEvent is not initialized.
7 =Remote function call failed.
Remarks You can invoke an unlimited number of events after you have initialized with a Historian.
Method IsConnected
Returns Value 1 =Connected to the Historian.
0 =Not connected.
Method RemoveEventTag(string EventTag)
Parameter EventTag
Name of the event tag to remove from the list of external events for the ActiveEvent
control.
Returns Value 0 =Success.
2 =Unable to execute method because ActiveEvent is not initialized.
7 =Remote DCOM call failed.
9-36 Module 9 Historian Event System
Wonderware Training
Intentionally left blank
Lab 19 Using ActiveEvent 9-37
Wonderware System Platform Course - Part 2
Lab 19 Using ActiveEvent
Introduction
This Lab is designed to demonstrate the use of the ActiveEvent ActiveX Control to trigger external
events in the Historian.
Objective
Upon completion of this lab you will be able to:
Import the ActiveEvent ActiveX Control into the Galaxy
Create a template and include a script to trigger an external event
Trigger the event from ObjectViewer
Use the ActiveEvent ActiveX Control to trigger External events in the Historian
9-38 Module 9 Historian Event System
Wonderware Training
Import the ActiveEvent ActiveX Control into the Galaxy
1. Start the ArchestrA IDE.
2. Connect to WWGalaxy on your local GR node.
3. Click Galaxy / Import / Script Function Library
4. Locate the file aahActiveEvent.dll, in C:\Program Files\Wonderware\InSQL\Server\.
5. Click Open.
An information dialog box displays:
6. Click OK.
The ActiveEvent ActiveX Control is ready to be used.
Lab 19 Using ActiveEvent 9-39
Wonderware System Platform Course - Part 2
Modify the Mixer Template
7. Edit the Mixer template in the Training Objects Toolset.
8. Select the UDAs tab, and create a UDA with the following configuration:
Name: Trigger
Data Type: Boolean
Category: User Writeable
Initial Value: False (unchecked)
9. Click the Scripts tab, and create a new script called Trigger.
10. In the Declarations section, write the following:
di mHi st Event as AAHACTI VEEVENTLi b. aahEvent Cl ass; ' I nst ance of t he
Act i veEvent Cont r ol
11. Select Startup for Execution Type.
9-40 Module 9 Historian Event System
Wonderware Training
12. Add the following to the scripts area:
Hi st Event = new AAHACTI VEEVENTLi b. aahEvent Cl ass;
Hi st Event . I ni t i al i zeEx( " l ocal host " ) ; ' Connect s t o Wonder war e Hi st or i an
Hi st Event . AddEvent Tag( " Ext er nal Event " ) ; ' Regi st er s Event Tag
Lab 19 Using ActiveEvent 9-41
Wonderware System Platform Course - Part 2
13. Select Execute for Execution Type.
14. In the Expression field, enter Me.Trigger.
15. Select OnTrue as Trigger Type.
16. Write the following in the script area:
I f Hi st Event . I sConnect ed( ) t hen
Hi st Event . I nvokeEvent Ex( " Ext er nal Event " ) ;
Endi f ;
Me. Tr i gger = f al se;
17. Lock all fields.
18. Save and Close the Editor.
9-42 Module 9 Historian Event System
Wonderware Training
19. Deploy the Mixer_XX0 and Mixer_XX1 instances.
Lab 19 Using ActiveEvent 9-43
Wonderware System Platform Course - Part 2
Trigger and Monitor the Event
20. Right-click the Mixer_XX0 instance and launch ObjectViewer.
21. Locate the Trigger attribute and add it to the watch window.
22. Set the Trigger attribute to True. This will trigger the external event in the Historian.
23. Start ActiveFactory Query.
24. Change the Query type to Event history values.
25. Select ExternalEvent in the Tag Picker.
26. Click the Time tab.
27. Select a time period of 1 hour.
28. Click the Data tab.
The event generated by Application Server displays:
9-44 Module 9 Historian Event System
Wonderware Training
Intentionally left blank
Module 10
Introduction to Information Server
Section 1 Hardware and Software Requirements 10-3
Section 2 Information Server License Management 10-5
Lab 20 Licensing Management 10-9
10-2 Module 10 Introduction to Information Server
Wonderware Training
Intentionally left blank
Section 1 Hardware and Software Requirements 10-3
Wonderware System Platform Course - Part 2
Section 1 Hardware and Software Requirements
This section introduces you to the hardware and software required to install and operate a
Information Server.
Note: Information Server clients all access the server using Microsoft Internet Explorer 6.0 or
higher and require no other installations. The following sections will focus on setting up and
maintaining the server.
Server Hardware Requirements
Remember, you are building a Web Server and should plan accordingly. When using Information
Server, more memory is better.
Software Requirements
The following software components must be present to install Information Server 3.0. Before you
install Information Server, install any missing components according to their installation
instructions and the information below, and verify that they are working correctly.
The Information Server installation program scans for these components. If the MSXML and
Capicom components are not installed, the installation program silently installs them to the target
machine.
Section Objectives
Introduce Information Server hardware and software requirements
Minimum Suggested
2.5 GHz Pentium IV 3 GHz Pentium IV
1 GB RAM 2GB or more
5 GB Disk Space (NTFS required) 10 GB Disk Space (NTFS required) or more, depending on
the number of InTouch windows published
SVGA Monitor 800x600 with 256 Colors XVGA Monitor 1024x768 with 24-Bit Color
File system NTFS
Operating System Microsoft Windows Server 2003 R2 SP1
Module or
Component
Details Required Version
WSS/SPS 2.0 Windows SharePoint Services (to use MultiView feature) 2.0 SP2
SSRS 2005 SP1 SQL Server Reporting Services (to use ArchestrA Reporting
feature)
2005 SP1
MS Excel Microsoft Excel (to use ActiveFactory Reporting Website
feature)
2000, XP, 2003, or
2007
MSXML 4.0 SP2 Microsoft XML Parser / SDK 4.20.9818.0
Capicom Microsoft Capicom module 2.0.0.3
Microsoft ASP.NET Microsoft ASP.NET 2.0
IIS 6.0 Internet Information Services 6.0
IE Internet Explorer 6.0 SP1 or later
10-4 Module 10 Introduction to Information Server
Wonderware Training
Note the following important information regarding individual components:
Windows SharePoint Services: To use the MultiView feature, you must install and configure
Windows SharePoint Services 2.0 SP2 before installing Information Server. Also install any WSS
Language Pack for languages you want Information Server to support. Using Windows SharePoint
Services 3.0 is not supported.
The Microsoft Windows SharePoint Services 2.0 and associated Service Pack 2 can be
downloaded from the Microsoft Download site http://www.microsoft.com/downloads. Follow the
instructions for downloading and installing Windows SharePoint Services. During the installation,
select Server Farm and manually configure the installation.
SQL Server Reporting Services: To use the ArchestrA Reporting feature, you must install and
configure SQL Server Reporting Services and set up a reporting database before installing
Information Server.
FrontPage Server Extensions: Windows SharePoint Services 2.0 is not compatible with FrontPage
Server Extensions. Before installing SharePoint, disable or remove FrontPage Server Extensions
as described in Microsoft Knowledge Base article 823378 (http://support.microsoft.com/
default.aspx?kbid=823378&product=winsps). While Information Server can be installed on a
system that has FrontPage Server Extensions enabled, this is not a supported configuration.
IMPORTANT! To use the MultiView feature, you may also need to install a Microsoft hotfix that
resolves an incompatibility issue between Windows SharePoint Services 2.0 SP2 and ASP.NET
2.0. For more information, see CR L00055978 in the Known Issues Found in Information Server
3.0 section.
The following table describes the minimum required software to provide particular functionality
within the Information Server:
Localization
The initial Information Server product supports English, German, French, and J apanese (with
additional character set installation). Other languages can be added using the Developer Edition.
Information Server detects what language the browser client is running and dynamically adjusts
the language of the Information Server Portal to match.
The Information Server components that are localized include:
Server Install
Converter Install
Factory built pages and framework
Popup dialog box
Show window dialog box
Product documentation
Help
License agreement
Release notes
Function Required Software
Provide data for browser-based windows InTouch 9.0 or later
Provide history data Historian 9.0
Provide alarm data InTouch 9.0 or later
Section 2 Information Server License Management 10-5
Wonderware System Platform Course - Part 2
Section 2 Information Server License Management
This section introduces you to the details of Information Server licensing, including viewing,
querying and configuring active and historical license data.
Licensing
Using the License Manager area of the Information Server, you can view and configure license
details of Server, Tag Server Write back and Client licenses, and monitor who is currently using a
license.
The Information Server supports concurrent, named user, and named device licensing. The
licensing policy located on the server determines how many browsers can access Information
Server at any given time. All of the license information is managed by a dedicated license
management component. When a client attempts to access Information Server through Internet
Explorer, Information Server checks to see if a license is available and grants or denies access to
the client depending on license availability.
You need enough client licenses for the number of users concurrently accessing the licensable
areas of the Information Server. Client access to these areas is on a first-come, first-served basis.
For example, if the Information Server is licensed for ten concurrent clients and an eleventh client
attempts to access the server, a message appears to the client stating that there are no additional
licenses available. However, if the eleventh client is an administrator, then he/she can access the
administrative areas only.
A session is created when a client user accesses the Information Server home page, and a license
is issued for the use of the core Information Server applications, such as Process Graphics,
Factory Alarms, and Historical Data. A user can access these and all custom areas and still only
use one license. All licenses are released for the user's session when the user clicks Log Off on
the main menu bar. If a user closes the browser without logging off, the current license session
times out after a certain length of time. By default, this is set to 20 minutes and can be changed by
the web server administrator for the Information Server application using the Internet Information
Services console application.
The license management feature lets you monitor activity and usage on the Information Server.
Licensing information is displayed in text format to allow analysis of peak usage times and
personnel.
Section Objectives
Introduce Information Server Licensing
View Active Licenses
View License History
Configure License Usage Logging
Query License History data
10-6 Module 10 Introduction to Information Server
Wonderware Training
Viewing Active Licenses
You can view both the active licenses for the Information Server and for any applications that have
been integrated with the site. Active licenses indicate the license usage at the current time for
each application.
Different categories of license use are available:
Server Licenses - Shows various server licenses used by the Information Server and
their details including their status, Date/Time of issue, Type, License Server and Expiration
Date
Tag Server Writeback - Shows the availability of a Tag Server Writeback license
Client Licenses - Shows the Information Server client licenses and ActiveFactory web
client licenses in use with details including the User, Host, License, Date/Time of Issue,
Type and Expiration
To change the maximum number of records displayed in the Active Licenses panel, type the
new value in the Max records box and then click Refresh.
Configuring License Usage Logging
License usage can be recorded and logged into the Information Server administration database for
historical viewing.
a. Do one of the following:
Click the Log License usage to database checkbox to turn logging on
Uncheck the Log License usage to database checkbox to turn logging off
Section 2 Information Server License Management 10-7
Wonderware System Platform Course - Part 2
TIP: Though an administrator can control the maximum records that are displayed from the
database, the database will grow larger over time. You can improve performance by having a SQL
Server administrator trim the licensing history table by deleting older records.
Querying License History
The license history page provides prior license usage information. This information includes
whether a user was allowed or denied access to an application, what time this occurred, the type
of application used, and the login name of the user. This information enables the administrator to
correctly configure the Information Server with the appropriate number and type of licenses for the
users.
To query license history:
a. Select the start and end dates by using one of the following methods:
Select the month and year by using the drop down menus; select the day by clicking a
calendar day
Enter the dates by typing into the entry boxes using the format: YYYY-MM-DD. To specify
exact times, type into the entry boxes using the 24-hour format HH:MM or use the arrow
buttons
b. Type the number of records to display in the Max records box.
10-8 Module 10 Introduction to Information Server
Wonderware Training
c. Click the Show License History button.
The License History page appears with the query results:
Lab 20 Licensing Management 10-9
Wonderware System Platform Course - Part 2
Lab 20 Licensing Management
Introduction
This lab will illustrate the steps necessary to review Information Server license usage information,
and configure some general parameters.
Objectives
Upon completion of this lab, you will be able to:
Review License usage and history
Configure Session Time-outs for Information Server
10-10 Module 10 Introduction to Information Server
Wonderware Training
Review License Information
1. Start Internet Explorer.
Start / All Programs / Internet Explorer
2. In the address line enter http://<node name>/wonderware, where <node name>is the name
of the Information Server.
The Information Server home page appears:
3. Expand Administration in the left navigation tree.
Lab 20 Licensing Management 10-11
Wonderware System Platform Course - Part 2
4. Click License Manager.
The License Manager page appears.
5. Click Active Licenses.
The following information is displayed:
Server Licenses: Shows various server licenses used by the Information Server, and
their details.
Tag Server Writeback: Shows the status (availability) of Tag Server Writeback licenses.
Client Licenses: Shows the Information Server client licenses and ActiveFactory Web
clients in use with other details.
6. Verify that the Log License usage to database option is enabled. This option enables the
Information Server to log the license usage in the Information Server administration database.
7. Enter 200 for Max records to change the maximum number of records displayed on the page.
10-12 Module 10 Introduction to Information Server
Wonderware Training
8. Click the Refresh button to update the current Licensing information.
9. Click Query License History.
The Query License History panel appears.
10. Select one month ago as the Start Date.
11. Select todays date as the End Date.
12. Click the Show License History button.
Enter 200
Lab 20 Licensing Management 10-13
Wonderware System Platform Course - Part 2
The License History panel appears.
The following information is displayed:
Start time: Access date and time
User name: Name of User who logged in
Denied: Indication if access was denied because maximum number of concurrent user
log ins were exceeded (refer to your license agreement)
Application: Indicates application that accessed the database
13. Click the Log off link in the right corner of the Information Server window.
Note: If you exit your browser without Logging Off, the license will remain in use until it times
out. The default timeout is 20 minutes. Be sure to log off to release the license. You will modify
the timeout in the following section of this lab.
10-14 Module 10 Introduction to Information Server
Wonderware Training
Change the Session Timeout Values
To change session timeout values:
14. Start Internet Information Services (IIS) Manager:
Start / Control Panel / Administrative Tools / Internet Information Services (IIS) Manager
The Internet Information Services console appears.
15. Expand your server icon next to your machine name.
16. Expand the Web Sites folder.
17. Expand the Default Web Site folder.
18. Right-click the Wonderware virtual directory (created during installation) and click Properties
from the context menu.
Lab 20 Licensing Management 10-15
Wonderware System Platform Course - Part 2
The Wonderware Properties dialog box appears with the Virtual Directory tab selected.
19. Click the Configuration button.
The Application Configuration window appears.
20. Click the Options tab.
10-16 Module 10 Introduction to Information Server
Wonderware Training
21. In the Session timeout box, type 30 (timeout limit in minutes for client connection).
22. In the ASP script timeout box, type 180 (timeout limit in seconds for scripts).
23. Click OK.
24. If the following Inheritance Overrides window appears, click Select All and click OK.
25. Click OK again.
26. Click File / Exit to quit Internet Information Services. The timeout values you just configured
will apply next time you access the Information Server portal.
Module 11
Process Graphics
Section 1 Convert & View InTouch Windows Over the Web 11-3
Lab 21 Convert and View InTouch Windows Over the Web 11-25
Section 2 Configuring Write-Back for Factory Data Sources 11-37
Lab 22 Configuring Write-Back Access 11-39
11-2 Module 11 Process Graphics
Wonderware Training
Module Objectives
Prepare to convert InTouch windows to XML by installing the Win-XML Exporter
Introduce the technologies used to convert InTouch windows to XML
Convert InTouch windows to XML
Publish the converted windows to the Information Server and view the windows over the
Internet using Internet Explorer 6.0 or higher
Introduce the technologies used to assign write-back privileges
Enable write-back for factory data sources
Section 1 Convert & View InTouch Windows Over the Web 11-3
Wonderware System Platform Course - Part 2
Section 1 Convert & View InTouch Windows Over the Web
This section introduces and walks you through the tools and steps necessary to publish your
InTouch windows onto a Information Server web portal for Internet viewing.
Converting and Publishing InTouch Windows
InTouch windows will likely be a foundation of your Information Server portal information. The
process you will go through to make these windows accessible from your portal is actually quite
simple. The process behind-the-scenes is where the complexity lies.
Note: Plan the complexity of your InTouch windows for viewing over the Internet. Three hints:
Do not use navigation the user will have to click on.
Do not include excessive animations.
Do not convert InTouch windows that contain ArchestrA graphics; ArchestrA Graphics
within InTouch windows do not convert to XML format and will display an error message.
Converting and publishing InTouch application windows can be accomplished by using the Win-
XML Exporter application. The Win-XML Exporter can be installed from the Information Server
portal.
XML: Behind-the-Scenes Technology
XML is a mark-up language used to transmit code over the Internet and have it interpreted by a
browser. Using XML saves bandwidth and allows for interpretation of graphics to be quick and
consistent across many platforms.
The Win-XML Exporter is a converter tool used to convert InTouch windows to an XML format so
they can be viewed over the Internet. It is available as a free download from the Information Server
home page to the local machine.
The program is authenticated and signed by Wonderware. This provides the user with assurances
that they are not downloading a virus to their machine. Once the download is complete, it begins a
normal install process.
Before You Begin Converting and Publishing InTouch Windows
Once you have windows that have been optimized and you are in the administrator role on the
Information Server web portal; you download the Win-XML Exporter tool, convert the windows to
the XML format, and publish them to the portal site.
This requires knowledge of where the InTouch windows are located and which web server is
hosting the information.
If the InTouch windows need to be optimized, use InTouch WindowMaker to modify the existing
windows. Refer to the Using WindowMaker section of the latest version of the Wonderware
Section Objectives
Prepare to convert InTouch windows to XML by installing the Win-XML Exporter
Convert InTouch windows to XML
Publish the converted windows to the Information Server and view the windows over the
Internet using Internet Explorer 6.0 or higher
11-4 Module 11 Process Graphics
Wonderware Training
InTouch Users Guide for information about optimizing existing windows and designing new
windows for the browser environment.
Note: If you are using InTouch 10.0 and your InTouch windows contain ArchestrA Graphics, an
error message will display when the windows are converted to display in Information Server.
ArchestrA Graphics within InTouch windows do not convert to XML format.
Installing the Win-XML Exporter
The Win-XML Exporter can be installed from a link on the Information Server portal home page.
The Win-XML Exporter does not require a license.
The Win-XML Exporter setup program will:
Install the application to your local computer
Note: You can install the Win-XML Exporter on the Information Server portal.
We suggest that you install it on your local InTouch development node.
There is a Destination Location choice during the install process.
Add a shortcut to the Win-XML Exporter on your Windows Start menu.
(For example, Start / All Programs / Wonderware / InTouch/Win-XML Exporter.)
You must install the Win-XML Exporter on the same computer as InTouch WindowMaker if the
windows you want to convert contain ActiveX controls.
If a previous version of the Win-XML Exporter is currently installed, uninstall it prior to installing the
newer version.
To install the Win-XML Exporter:
Follow the steps to install the Win-XML Exporter with your instructor. The Win-XML is required for
a later lab.
a. Access the Information Server portal home page.
b. In the System access panel, expand Administration.
c. Click Win-XML Exporter.
The Win-XML Exporter page appears.
d. Click the Download Win-XML Exporter Now button.
Section 1 Convert & View InTouch Windows Over the Web 11-5
Wonderware System Platform Course - Part 2
The File Download-Security Warning dialog box opens.
e. Click the Run button.
The Internet Explorer-Security Warning dialog box opens.
11-6 Module 11 Process Graphics
Wonderware Training
f. Click the Run button.
The Information Server Win-XML Exporter Setup - Welcome dialog box opens.
g. Click the Next button.
The Information Server Win-XML Exporter Setup - License Agreement dialog box opens.
h. Select I accept the license agreement.
i. Click the Next button.
The Information Server Win-XML Exporter Setup - Destination Folder dialog box opens.
Section 1 Convert & View InTouch Windows Over the Web 11-7
Wonderware System Platform Course - Part 2
j. Click the Next button.
The Information Server Win-XML Exporter Setup - Ready to Install dialog box opens.
k. Click the Next button.
11-8 Module 11 Process Graphics
Wonderware Training
l. Click the Finish button.
Uninstalling the Win-XML Exporter
To uninstall the Win-XML Exporter:
a. Select Start / Control Panel/Add or Remove Programs.
The Add/Remove Programs dialog box appears.
b. Select Information Server Win-XML Exporter in the Currently installed programs pane.
c. Click the Remove button.
d. Follow the prompts to complete the uninstall.
Section 1 Convert & View InTouch Windows Over the Web 11-9
Wonderware System Platform Course - Part 2
Starting the Win-XML Exporter
To start the Win-XML Exporter:
a. Select Start / All Programs / Wonderware / InTouch / Win-XML Exporter.
The Win-XML Exporter opens:
The Win-XML Exporter has three panes:
The Project Browser: displays all of the associated WindowSets and windows
The InTouch Window Pane: lists InTouch windows available for conversion
The Results Pane: displays information regarding the success of a window
conversion (Information View) or a preview of the converted window that is selected in
the project browser (Preview)
This pane also displays any errors or cautions if the Win-XML Exporter detects a
problem with the conversion.
Project Browser
InTouch Window Pane
Results Pane
11-10 Module 11 Process Graphics
Wonderware Training
Win-XML Exporter Toolbar Buttons
The following table describes the toolbar buttons:
:
General Steps for Using the Win-XML Exporter
Some general steps for using the Win-XML Exporter are:
a. Create a new project file. The project file is used to store information such as the URL to the
Information Server portal where you will be publishing and the path to local project files. Local
project files also include converted windows, WindowSets, and default data source
information.
b. Rename the default WindowSet for the project to something meaningful to the project and
your naming conventions.
c. Open an InTouch application that contains the windows you want to convert.
d. Convert the InTouch application windows and view the status of the conversion.
e. (Optional) Create additional WindowSets to contain the converted windows from a single
InTouch application.
f. Publish the entire project to the Information Server portal. You may also publish incrementally.
There are a few WindowMaker elements that are not compatible with Internet technology,
however, all other elements, including text, graphics, action scripts and animation are
automatically converted for you.
Button Description
Create a new project file
Opens an existing project file
Switches the project to Online or Offline mode
Selects an InTouch application to convert
Opens the Help file
Section 1 Convert & View InTouch Windows Over the Web 11-11
Wonderware System Platform Course - Part 2
Working with Projects
Before you can publish windows, you will need to create a project. The project file will be used to
store all the configuration information for the InTouch windows you want to publish.
Creating a New Project
To create a new project:
a. Select New Project on the File menu.
The Project Properties dialog box appears:
b. Type a name for the project (up to 256 characters) in the Project Name box.
A new folder will be created using this name.
c. To change the default working folder for the project:
Click the ellipsis button to the right of the Local Project Path box.
This project path can browse to any folder on your computer.
d. Click the Next button.
Note: When accessing ArchestrA data via Information Server:
You must deploy a Wonderware Application Server Platform on the Information Server node to
allow Information Server access to the ArchestrA data source.
11-12 Module 11 Process Graphics
Wonderware Training
The Publishing Properties dialog box appears.
e. Type the URL where the Information Server portal is located in the Information Server URL
box. Converted windows will be published to this server. For example, http://MyWebServer/
Wonderware. You must include the /Wonderware virtual directory as part of the URL.
f. Click the Verify button.
g. Click the Next button once the connection is successful.
Section 1 Convert & View InTouch Windows Over the Web 11-13
Wonderware System Platform Course - Part 2
The Data Source Properties dialog box appears.
h. Select Change default data source if your application will not be receiving data from a
running WindowViewer application on the data node.
Configure the data source options:
Web Server URL
The URL for the web server that will serve as the data source. This server can be a different
web server than the one you will publish the converted windows to, allowing converted
windows to be hosted on one portal and retrieve data from another. If you are using secure
socket layers (SSL), remember to type "https:" instead of "http:"
Data Node Name
The name of the computer that provides the data. This can be either the computer on the plant
floor that is running the InTouch application, an I/O Server, Historian, and so on. This node will
supply the data for the converted window.
Application
The executable name of the application on the data node from which you want to receive data.
For example, for WindowViewer, you would specify VIEW.
Topic
The specific subgroup of data elements for the specified application. Examples of topics are
Tagname for InTouch, or the name of an Excel spreadsheet.
Note: If you choose to retrieve data from an I/O Server, you must select the Use Tagname as
Item Name option in the WindowMaker Tagname Dictionary when defining the tags for the
window that will be converted.
i. Click the Next button.
11-14 Module 11 Process Graphics
Wonderware Training
The New Project Information dialog box appears.
j. Verify the information is correct.
If it is incorrect, click the Back button and edit the information.
k. Click the Finish button if the information is correct.
The project you created now appears in the left pane of the Win-XML Exporter with the default
name of "WindowSet001."
Opening an Existing Project
To open an existing project:
a. Select Open Project on the File menu.
The Open dialog box appears.
b. Browse to the project file (.wxe) to open and then click Open.
c. Click the OK button.
Section 1 Convert & View InTouch Windows Over the Web 11-15
Wonderware System Platform Course - Part 2
Deleting a Project
You cannot delete a project from within the Win-XML Exporter. You will need to delete the project
files manually from your computer using Windows Explorer.
Working With WindowSets
WindowSets are used to group together converted InTouch windows so that you can operate on
them as a unit.
Creating a WindowSet
When creating a WindowSet, use the data source information of either a project or another
WindowSet by default.
To create a new WindowSet:
a. Right-click on either an existing WindowSet or project on which to base the new WindowSet in
the project browser.
b. Click New WindowSet. A new WindowSet is created in the project.
c. Change the WindowSet name, if desired.
d. Edit the default WindowSet properties, if desired.
Editing Properties for a WindowSet
To edit WindowSet properties:
a. Right-click an existing WindowSet in the project browser.
b. Click Properties.
The WindowSet Properties dialog box opens.
c. Check the Different than Project option to change the data source information. When you
change the data source for a WindowSet, all windows in that WindowSet will use the new data
source. Options are as follows:
Web Server URL
Used to specify the URL for the web server that will serve as the data source. This server can
be a different web server than the one you will publish the converted windows to, allowing
converted windows to be hosted on one portal and retrieve data from another. If you are using
secure socket layers (SSL), remember to type "https:" instead of "http:"
Data Node Name
The name of the computer to provide the data. This can be either the computer on the plant
floor that is running the InTouch application, an I/O Server, the Historian, and so on. This node
will supply the data for the converted window.
Application
The executable name of the application on the data node from which you want to receive data.
Topic
The specific subgroup of data elements for the specified application. Examples of topics are
Tagname for InTouch, or the name of an Excel spreadsheet.
11-16 Module 11 Process Graphics
Wonderware Training
d. Click the OK button.
Section 1 Convert & View InTouch Windows Over the Web 11-17
Wonderware System Platform Course - Part 2
Deleting a WindowSet
To delete a WindowSet:
a. Right-click on the WindowSet in the project browser.
b. Click Delete.
Working with InTouch Windows
Most InTouch windows can be converted into a viewable web page in Internet Explorer. However,
not all InTouch functionality is compatible with web technology.
Note: For best results use InTouch 9.0 or greater.
To open an InTouch application:
a. Select Open InTouch Application on the File menu.
The Browse for Folder dialog box appears.
b. Navigate to the InTouch application folder containing the window(s) to convert.
c. Click the OK button.
11-18 Module 11 Process Graphics
Wonderware Training
The available InTouch windows from the folder you selected now appear in the top right pane
of Win-XML Exporter:
For each window, the pane displays the caption name you assign it, the path, file name, and
the file size of the window.
Converting InTouch Windows
To convert an InTouch window:
a. Select the window to convert in the pane of available InTouch windows.
Tip: To select multiple consecutive windows, hold down the SHIFT key, select the first window,
and then select the last window. To select multiple windows: Hold down the CTRL key while
making your selections.
b. Drag-and-drop the window from the upper right pane onto the WindowSet name in the project
browser (left pane).
The conversion to XML is performed automatically during the drag-and-drop operation. The
converter will rename the window file.
By default, the bottom right pane of the Win-XML Exporter only shows the status of the LAST
window converted. Therefore, if you convert twelve windows at one time, and the first eleven
have errors, you will see a successful conversion message if the twelfth window converts with
no errors.
Note: If you are using InTouch 10.0 and your InTouch windows contain ArchestrA Graphics, an
error message will display when the windows are converted to display in Information Server.
ArchestrA Graphics within InTouch windows do not convert to XML format.
Section 1 Convert & View InTouch Windows Over the Web 11-19
Wonderware System Platform Course - Part 2
Viewing the Window Conversion Status
To view the conversion status for a particular window:
a. Select the desired window in the project browser.
b. Right-click on the window and select Information View.
c. Click the Information tab in the bottom right pane of the exporter.
d. Expand the Information item. If all elements successfully converted in the last window you
selected, you will see "Successful Conversion!!!
11-20 Module 11 Process Graphics
Wonderware Training
You will see other details if it is not successful. In this instance an InTouch 10.0 window containing
ArchestrA Graphics was converted to display in Information Server. ArchestrA Graphics within
InTouch windows do not convert to XMl format.
You may edit the window and convert it again.
e. Expand the different sections to see information about warnings or errors.
f. Click Report to view a list of items that were not converted.
Section 1 Convert & View InTouch Windows Over the Web 11-21
Wonderware System Platform Course - Part 2
ActiveX Controls in an Application
Win-XML Exporter will search for ActiveX Controls in your application. Win-XML receives data
from Windowmaker by reading the OCX.ini file.
When using ActiveX Controls in your application over the Internet, the ActiveX Control will be
converted and published to the web server using a compressed CAB file.
When the User tries to view a window that uses that ActiveX Control, the Control downloads to the
Users machine and registers itself without user intervention. If browser security is configured high,
the user will be given an option to accept or deny the ActiveX control installation. Wonderware
does not verify the authenticity of Third Party Controls.
The user will need a license to run a Third Party ActiveX Control.
Note: The default installation of IE 6.0 does not allow for unsigned controls to download to the
client side automatically. This may be a potential issue for a user because they may try to view a
certain Windowset that requires one of these ActiveX Controls. If they havent configured their
browser to accept unsigned Controls, they wont be able to perform that process and nothing will
happen.
There are ways to troubleshoot this issue if you are on the Internet. You can change the Internet
security level in IE to prompt you when an unsigned ActiveX Control is being downloaded or you
can obtain a signed version from the Third Party vender as well.
If you do not have this Control running with the application, you will see a window with an X
in the top left corner of the screen indicating that there is a missing control on that page.
Note: The most common error seen is: Error Publishing to the Server.
What causes this error?
Wonderware uses Microsoft Web Post .dlls to move information across the Internet while
Microsoft Front Page Server Extensions control the publishing process. Wonderware installs the
Web Post dlls if not already present on the Server. If they are installed, they are configured to work
with Information Server. The Installing User automatically becomes an Administrator by default
and is placed into the administrative group.
When a request is made to publish to a web server, the server confirms the protocol: FTP, HTTP,
or Front Page Server Extensions. Typically, if the Installing User is developing the project, this will
be done automatically.
After you have chosen a Control, a new screen opens with the InTouch applications listed in the
top of the window frame. This is a list of the windows that are in the application that are available
for publishing.
To convert the applications, drag them from the right pane and drop them on the Windowset of
your choice in the left pane.
11-22 Module 11 Process Graphics
Wonderware Training
Publishing Windows to the Information Server Portal
To publish a project or individual WindowSet:
Right-click on the project or WindowSet in the project browser and click Publish.
Previewing a Converted Window
The preview window has two modes: Online and Offline. The default mode is Offline. In Offline
mode, the preview window shows you how your converted window will look; however, you cannot
preview animations because the window is not currently receiving any data.
Popup windows will only be listed when you are in Offline mode. Popup windows are converted
and can be accessed by the user at runtime (in the browser). However, popup windows will not
display in the list of windows that the user sees in the browser. Therefore, no user can directly
access a popup window.
You must be assigned to the Administrator Role by your Information Server administrator in order
to use the Online mode. Even then, the preview pane only provides Read Only access; you will not
be able to test TouchLink input dialog boxes or any features that require write-back permissions.
In order to preview a runtime version of the window, you must first publish the window. After that, if
you specify the Online mode, an attempt will be made to establish a connection to the Information
Server Portal that you have specified for the window. If the portal has access to the data source,
animations will function as if you were viewing the window in a browser over the Internet/intranet. If
the animations are not working, the data source may not be operating, the data source
specifications may be incorrect, or the scripting that drives the animation may need to be modified.
Section 1 Convert & View InTouch Windows Over the Web 11-23
Wonderware System Platform Course - Part 2
Enabling Automatic Window Resizing
By default, the converted window is displayed full size as it was drawn in InTouch and is not scaled
to fit the Information Server portal window. Scroll bars appear, if necessary, to provide the user
access to the non-displayed areas of the screen. Enabling automatic window resizing in Win-XML
Exporter causes the application window to be scaled to fit the users browser.
Deleting a Window
If you are in Online mode, you can delete windows from the portal site with the proper security
clearance from the portal administrator. If you are offline, you can delete windows from the project
workspace.
Using Multiple Web Servers for WindowSets
Corporate portals usually have different requirements, and you may want to display only the
information that is important to the corporate casual users. Standard corporate InTouch windows
can be created and exported to multiple plants to publish on their web servers, allowing the
corporate casual user to view the same information from multiple plants without having to know the
names for all the different WindowSets at each company. This will save the corporate user a lot of
time when trying to access pertinent information about individual plants, as well as combining
information company wide.
When a casual user accesses the Information Server Portal for information, they are first
authenticated on the domain controller. After authentication, the web server will automatically
connect the user to the information they want, even if it is being hosted on another web server.
This is a good way to design a corporate portal. It still has all the security features built into
Windows and the portal, and the data retrieval is transparent to the casual user.
In the following example, the corporate computer is retrieving data from a web server in Texas, but
it only had to contact the Information Server web server in California. This computer could also
access information from Brazil during the same session, without any additional steps,
configuration, or security logons.
The client user never needs to worry about changing the connection to the data source, because
the portal administrator will have this configured before the client attempts to access the
Wonderware
Information
Server
(California)
11-24 Module 11 Process Graphics
Wonderware Training
information. The Win-XML Exporter is used to easily configure the data to come from different web
servers, as well as different nodes.
You can configure the data source for a WindowSet by modifying the properties in the WindowSet
Properties dialog box.
For example, a WindowSet titled "France Web Server" is configured to retrieve information from
Information Server web server titled "France," which has a computer name (node name) of
"Demo." The windows listed under the France Web Server name are all receiving information from
the Information Server web server France and node Demo.
Likewise, the windows listed under the WindowSet name "Brazil Web Server" are receiving their
information from the Information Server web server Brazil, which has a node name of Demo 2.
Tip: You can also use MultiViews to simulate the multiple window effect used in InTouch
applications or to view information from different sources in the same screen.
Lab 21 Convert and View InTouch Windows Over the Web 11-25
Wonderware System Platform Course - Part 2
Lab 21 Convert and View InTouch Windows
Over the Web
Introduction
In this part of the lab, you will convert windows in an existing InTouch application to XML, and
publish these windows to your Information Server web portal. Using your Information Server
portal, view these windows over the Internet.
Objectives
Upon completion of this lab you will be able to:
Convert InTouch Windows to XML using the Win-XML Exporter conversion tool
Publish InTouch Windows to your Information Server Web Portal
View InTouch Windows over the Internet using your Information Server Web Portal
11-26 Module 11 Process Graphics
Wonderware Training
Start the Win-XML Exporter
1. Select Start / All Programs / Wonderware / InTouch / Win-XML Exporter.
2. Select File / New Project...
The Project Properties dialog box opens.
3. Enter the new Project Name: Mixer Windows.
4. The project will be saved in the default project path: C:\Wonderware\Mixer Windows.
5. Click the Next button.
Lab 21 Convert and View InTouch Windows Over the Web 11-27
Wonderware System Platform Course - Part 2
The Publishing Properties dialog box opens.
6. Enter the Information Server URL.
The typical path is http://<your server name>/Wonderware
Note: Enter your computer name rather than localhost.
7. Click the Verify button.
The Success dialog box displays.
8. Click the OK button.
11-28 Module 11 Process Graphics
Wonderware Training
The Publishing Properties dialog box is active.
9. Click the Next button.
The Data Source Properties dialog box opens.
Notice that the Web Server URL and Data Mode Name parameters already point to your
local computer, so there is no need to make modifications at this point.
10. Click the Next button.
Lab 21 Convert and View InTouch Windows Over the Web 11-29
Wonderware System Platform Course - Part 2
The New Project Information dialog box opens.
11. Click the Finish button.
A new windowset is created automatically with a default name of WindowSet001.
12. Name the new windowset Mixer Windows to contain the Windows for the new project and
press Enter.
11-30 Module 11 Process Graphics
Wonderware Training
Publish InTouch Windows Using the Win-XML Exporter
13. Select File / Open InTouch Application... in the Win-XML Exporter.
14. Browse to the C:\Wonderware Training\InTouch - Mixer Application folder. This folder
contains the InTouch application containing the windows we want to publish.
15. Click the OK button.
Lab 21 Convert and View InTouch Windows Over the Web 11-31
Wonderware System Platform Course - Part 2
The Cab Dialog appears.
For this lab you will not need any of the listed ActiveX Controls.
16. Click the OK button.
The windows contained in the InTouch Application will now appear in the right pane.
17. Click and Drag the Mixer and Gauge windows to the Mixer Windows folder in the left pane.
11-32 Module 11 Process Graphics
Wonderware Training
18. The windows you dragged over are now converted and appear in the left pane.
19. Individually select each converted window to check the message in the Information View tab.
It should display Status: Successful conversion!!!
20. Right-Click each window.
21. Select Publish.
Note: To publish multiple windows in one step, Right-click on the Application or the
WindowSet folder name, then publish as above. You will not receive the same kind of detail
regarding errors and successes in the lower right pane when publishing multiple windows.
Lab 21 Convert and View InTouch Windows Over the Web 11-33
Wonderware System Platform Course - Part 2
After each window has been published, the Success dialog box opens.
22. Click the OK button.
23. Repeat this process for each converted window.
Your windows are now published to the Information Server Web Portal and are ready to view
over the Internet.
View Your Published Window(s) on the Web Server
24. Return to the Information Server portal home page using Internet Explorer.
25. Expand the Process Graphics option in the left menu tree view.
26. If prompted, click the Download/Upgrade button.
Note: The Client-Side software download dialog box appears on the initial conversion only
11-34 Module 11 Process Graphics
Wonderware Training
27. Click Yes, I see it when you see the orange box.
28. Expand Mixer Windows.
29. Select the Mixer window.
Lab 21 Convert and View InTouch Windows Over the Web 11-35
Wonderware System Platform Course - Part 2
The Mixer window appears.
After a few seconds, you should now see a fully animated window in your browser!
11-36 Module 11 Process Graphics
Wonderware Training
Intentionally left blank
Section 2 Configuring Write-Back for Factory Data Sources 11-37
Wonderware System Platform Course - Part 2
Section 2 Configuring Write-Back for Factory Data Sources
This section introduces you to the tools and steps necessary to enable write-back capabilities for
factory data sources using the Information Server portal.
Enabling Write-Back Privileges
Information Server allows you to give users write-back privileges, such as a running
WindowViewer application or an I/O Server, when running InTouch browser-based windows. This
allows you to put control of the factory floor onto the Internet by allowing authorized administrators
and engineers to modify certain plant devices through a browser. By default, write-back privileges
are disabled.
Write-back privileges are only available if:
The Information Server site and the default web site of the web server that supply the data
are set to use integrated Windows authentication
You have a separate license that gives you write-back capabilities
The user is in either the Administrator or Engineer roles
WARNING: Enabling write-back allows users to change the state of Plant-floor devices with
potentially LIFE-THREATENING consequences. Use caution when choosing these options.
Configuring Write-Back Options
You can enable write-back for all nodes or just for selected nodes. Know the name of the node
(computer name) before you start. Also, verify that you can connect to the node from the
Information Server portal.
Existing client sessions are not affected by writeback changes until they are terminated and
restarted. The browser must be closed and restarted.
In order to enable write-back, you must complete two important steps as the administrator:
Assign user-privileges (Roles) via the User Manager in the Administration area of
Information Server
Configure write-back options via the License Manager in the Administration area of
Information Server
Note: Only the administrator can configure write-back options and assign user-privileges.
For detailed steps on assigning user-privileges, refer to Securing and Customizing Your Portal
later in this course.
Section Objectives
Introduce the technologies used to assign write-back privileges
Enable write-back for single and multiple factory data sources (Nodes)
11-38 Module 11 Process Graphics
Wonderware Training
Intentionally left blank
Lab 22 Configuring Write-Back Access 11-39
Wonderware System Platform Course - Part 2
Lab 22 Configuring Write-Back Access
Introduction
In this part of the lab, you will use the License Manager to enable Tag-Server Write-Back for single
and multiple factory data sources (Nodes).
Objectives
Upon completion of this lab you will be able to:
Enable Tag-Server Write-Back
Disable Tag-Server Write-Back
11-40 Module 11 Process Graphics
Wonderware Training
Enable Write-Back in Information Server
1. In the System access panel, expand Administration.
2. Click on License Manager.
The License Manager page appears.
3. Click Tag Server Writeback.
Note: You must have a separate license to enable write-back. Confirmation of this license can
be seen in the Active Licenses panel of the License Manager window.
The Tag Server Writeback Configuration panel appears.
Note: Disabled is the default setting. If already set to this mode, the Save button will be
inactive.
Lab 22 Configuring Write-Back Access 11-41
Wonderware System Platform Course - Part 2
4. Click Enabled for ALL tag server nodes.
5. Click the Save button.
A confirmation dialog box appears.
6. Click the OK button.
An alert dialog box appears.
7. Click the OK button.
Existing client sessions are not affected by writeback changes until they are terminated and
restarted. The browser must be closed and restarted.
8. Click the Logoff link at the top right corner of the page.
9. A confirmation dialog box appears. Click OK. This will close Internet Explorer and terminate
the Information Services client session properly.
10. Open the Windows Services panel from: Start / Control Panel / Administrative Tools /
Services.
11-42 Module 11 Process Graphics
Wonderware Training
11. Locate the Wonderware Runtime Database Handler service. Right-click and select Restart.
12. Connect to the Information Server using Internet Explorer.
13. Click on Process Graphics in the left navigation tree.
14. Browse for and display the Mixer window published previously.
15. Click the Open and Close buttons to change the Valve status. Since Writeback is enabled,
you will see the status of the valves change accordingly.
Module 12
Information Server Data Sources
Section 1 Configuring Data Sources 12-3
Section 2 Alarm Database Logger Utility 12-7
Lab 23 Configuring Data Sources 12-11
12-2 Module 12 Information Server Data Sources
Wonderware Training
Intentionally left blank
Section 1 Configuring Data Sources 12-3
Wonderware System Platform Course - Part 2
Section 1 Configuring Data Sources
This section walks you through the tools and steps necessary to add and configure a variety of
data sources.
Configuring Data Sources
Using the Data Source Manager area of Information Server, you can add, modify, and delete the
different data sources used by the Information Server.
About Information Server Data Sources
All external data sources configured for Information Server use a common definition and
configuration, called a shared data source, regardless of the component accessing the database.
Shared data sources are shared by Information Server components such as ActiveFactory reports,
TableWeaver, Factory Alarms, and ArchestrA reporting. This lets you have a single data source
and use it in multiple components.
Modifying Data Sources
Shared data sources are named and configured by the administrator and can then be referred to
by name within Information Server applications. Shared data source names must be unique within
an Information Server installation.
The Data Source Manager includes five predefined data source types:
Alarm
Historian
Production
OLEDB
Other
Each data source type can have multiple named data source instances. However, only one of
each data source instance can be defined as the default. The default data source is used by
ArchestrA Reporting.
Note: The ArchestrA Reporting Services use the default data source for reporting. If the data
source used for reporting is not the default, the report fails. Be careful when changing the Default
Data Source setting.
Section Objectives
Introduce Data Sources available to connect with the Information Server
Introduce steps necessary to add, modify and delete Data Sources
12-4 Module 12 Information Server Data Sources
Wonderware Training
The specifics of connecting to data sources will be discussed in detail later in this course. At this
stage of the installation, please keep the following information in mind:
The administrator connecting to data source information needs to know database, user
and server names as well as required passwords
The administrator will be assigning alias names to the data sources. They should be
familiar with the company naming convention(s). The alias name is the name that will be
displayed to the users of the Information Server portal. This is advantageous for security
purposes, since the end user will not see the computer name on the data source
Each data source must be properly configured with the correct connection information in order to
communicate with Information Server. Detailed steps for connecting to each data source type will
be provided in the following lab exercises.
To modify a shared data source:
a. In the System access panel, expand Administration and then click Data Source Manager.
Section 1 Configuring Data Sources 12-5
Wonderware System Platform Course - Part 2
The Data Source Manager window appears.
b. Select the data source that you want to modify in the List Of Data Sources list.
c. Click the Modify button.
The Modify Shared Data Source window appears:
12-6 Module 12 Information Server Data Sources
Wonderware Training
d. Configure data source options as required:
Data Source Name: A unique name identifying the data source. The data source name
may be any name you wish (such as PrimaryAlarms or AlarmsTank3) and is not
necessarily the actual database name. No spaces are permitted in the name.
Description: A unique description that helps identify the purpose or function of the data
source.
Server: The server name (such as WWSYSTEMPLATFORM2). The server name is not
preceded by backslashes and no spaces are allowed.
Database: The name of the database as it appears on the server (such as WWALMDB).
No spaces are allowed.
Security Settings:
Select one of the following security settings:
Check the Integrated Security box to enable integrated Windows security for the
data source.
Type the SQL User Name and Password to access the database.
Default for this Data Source Type: A check in this box makes this data source the
default for this data source type. The Default shared data source is the data source used
by the ArchestrA Reports component.
Connection Timeout (in Sec): A value for the connection timeout. 0=No timeout.
Query Timeout (in Sec): A value for the query timeout. 0=No timeout.
e. Click the Test Connection button to verify your new settings.
A confirmation message appears at the bottom of your screen.
f. Click the Save button in the Modify Shared Data Source window of the Data Source
Manager.
The confirmation window appears:
g. Click OK.
Section 2 Alarm Database Logger Utility 12-7
Wonderware System Platform Course - Part 2
Section 2 Alarm Database Logger Utility
This section describes the steps necessary to configure and start the Alarm Database Logger
utility in order to capture historical alarm data for viewing in Information Server.
The InTouch HMI Distributed Alarm Subsystem includes the Alarm DB Logger utility that logs
alarms and events to Microsoft
Toolkit Guide.
Updating the Windows Login for Information Server Components
Since Information Server is designed to run without anyone logged on locally to the server, its
COM+components must run under the authority of a valid Windows account. These components
use the Windows login that was specified during the Information Server installation, obtained from
the installing user at the time of the Information Server installation. If the password for this account
expires, must be changed, or if the login account itself is deleted, then you must set the COM+
package to run under the new identity. For security reasons, this login is not automatically
updated. For example, in some organizations, Windows passwords are set to automatically expire.
Also, you may want to manually change the Windows password from time to time for security
purposes.
If the Windows login information has changed, you will need to reconfigure it for Information Server
using the Windows Component Services utility.
Section 1 Managing Security 18-13
Wonderware System Platform Course - Part 2
To update the login:
a. Open the Windows Start menu, point to All Programs.
b. Select Administrative Tools.
c. Click Component Services.
The Component Services window appears.
d. Expand Component Services and then expand Computers.
e. Expand My Computer, and then expand COM+ Applications.
f. Right-click Wonderware SuiteVoyager and then click Properties.
18-14 Module 18 Information Server Security and Customization
Wonderware Training
The Wonderware SuiteVoyager Properties dialog box appears.
g. Click the Identity tab.
h. Type the updated password in the Password and Confirm Password boxes.
i. Click OK.
For more information, see your Microsoft Windows documentation.
Lab 35 User Manager 18-15
Wonderware System Platform Course - Part 2
Lab 35 User Manager
Introduction
In this lab, we will use the User Manager to secure access to our Information Server Information
Portal. We will add and remove pre-configured domain users from the four default roles in the
Information Server portal.
Objectives
Upon completion of this lab you will be able to:
Add valid Domain Users to each of the four existing User Roles
Remove valid Domain Users from at least one of the four existing User Roles
Review how Domain Users affects the license history log
18-16 Module 18 Information Server Security and Customization
Wonderware Training
Configure User Roles
1. Expand Administration in the main Navigation Tree.
2. Click User Manager.
The User Manager appears.
The list of all valid Domain Users will be visible, along with pre-defined Roles, available
Domains, and previously selected Role Users.
3. Verify that Training is selected in the Domain drop-down list.
4. Select Administrator from the Role drop-down list.
Lab 35 User Manager 18-17
Wonderware System Platform Course - Part 2
5. Click on isAdmin in the Domain Users list.
6. Click Add.
Training\ISADMIN appears in the Role Users list.
7. Select Engineer from the Role drop-down list.
8. Click on [isEngineers] in the Domain Users list.
6. Click Add.
Training\ISENGINEERS appears in the Role Users list. Notice that Training\ISENGINEERS
is a Windows group, therefore, all users belonging to that group have been assigned to the
Engineer role.
18-18 Module 18 Information Server Security and Customization
Wonderware Training
9. Select Read Only User from the Role drop-down list.
10. Type isReadOnly in the User / Group Names text entry box.
11. Click Add.
Training\ISREADONLY appears in the Role Users list.
12. Select No Access User from the Role drop-down list.
Select 3 users from the Domain Users list by doing the following:
13. Press and hold the CTRL key on your keyboard.
14. Click on isNoAccess, isNoAccess2, and isNoAccess3 in the Domain Users list so that all
three names are highlighted.
15. Click Add.
16. training\ISNOACCESS, training\ISNOACCESS2, and training\ISNOACCESS3 appears
in the Role Users list.
Lab 35 User Manager 18-19
Wonderware System Platform Course - Part 2
Verifying User Access
17. Click the Log off link in the upper right corner of the Information Server Home Page.
A Close Window dialog box appears.
18. Click Yes to end your Information Server session and close Internet Explorer.
Note: Make certain to properly log off Information Server by clicking the Log off link. If you
simply close Internet Explorer without logging off, you may exceed your concurrent user logins
the next time you or another isAdmin user tries to login (refer to your license agreement).
18-20 Module 18 Information Server Security and Customization
Wonderware Training
19. Select Start/ All Programs and right-click on Internet Explorer.
20. Click on Run as... in the context menu.
The Run As authentication dialog box appears.
21. Type into the User name drop-down list: training\isAdmin.
22. Enter the Password provided by your instructor.
23. Click OK.
Lab 35 User Manager 18-21
Wonderware System Platform Course - Part 2
Internet Explorer appears.
24. Type http://localhost/wonderware into the address bar.
25. Press the Enter key on your keyboard.
The Information Server Home Page appears.
Notice that the Administration link in the left-navigation tree is available as well as access to
the entire portal. This is because you are logged in with the Administrator role using the
isAdmin privileges you assigned in the previous steps.
26. Repeat steps 17 through 20 to logoff Information Server and reopen Internet Explorer as a
different user.
The Run As authentication dialog box appears.
27. Type into the User name drop-down list: training\isEngineer.
28. Enter the Password provided by your instructor.
29. Click OK.
Internet Explorer appears.
30. Type http://localhost/wonderware into the address bar.
31. Press the Enter key on your keyboard.
18-22 Module 18 Information Server Security and Customization
Wonderware Training
The Information Server Home Page appears.
Since you are logged in as training/engineer which is assigned to the Engineer role, the
Administration link and the Administration sub-category links are not visible in the left-
navigation tree.
Although the Engineer role does not have Administrators privileges, in this case, he/she does
have Write-back privileges as can be seen in the following steps.
32. Expand the Process Graphics link.
33. Expand the MixerWindows that you published in an earlier lab.
34. Click on Mixer.
35. Click on any of the interactive control buttons in the Mixer window.
You should be able to control these devices since you are in the Engineer role and the devices
are configured for write-back access.
Lab 35 User Manager 18-23
Wonderware System Platform Course - Part 2
36. Repeat steps 17 through 20 to logoff Information Server and reopen Internet Explorer as a
different user.
The Run As authentication dialog box appears.
37. Type into the User name drop-down list: training\isReadOnly.
38. Enter the Password provided by your instructor.
39. Click OK.
Internet Explorer appears.
40. Type http://localhost/wonderware into the address bar.
41. Press the Enter key on your keyboard.
The Information Server Home Page appears.
Since you are logged in as training/isReadOnly which is assigned to the Read Only role, the
Administration link and the Administration sub-category links are not visible in the left-
navigation tree.
Additionally, in the Read Only role, you cannot access the write-back controls in the Mixer
window as can be seen in the following steps.
42. Expand the Process Graphics link in the left-navigation tree.
43. Expand the MixerWindows that you published in an earlier lab.
44. Click on Mixer.
45. Click on any of the interactive button controls in the Mixer window.
Write-back access is denied to ReadOnly users. You cannot control the device.
46. Repeat steps 17 through 20 to logoff Information Server and reopen Internet Explorer as a
different user.
The Run As authentication dialog box appears.
47. Type into the User name drop-down list: training\isNoAccess.
48. Enter the Password provided by your instructor.
49. Click OK.
18-24 Module 18 Information Server Security and Customization
Wonderware Training
Internet Explorer appears.
50. Type http://localhost/wonderware into the address bar.
51. Press the Enter key on your keyboard.
Since you are logged in as training/isNoAccess which is assigned to the No Access role,
you are denied access to the entire portal.
Reviewing License Usage
Log off your current Information Server session.
52. Click the Log off link in the upper right corner of the Information Server Home Page.
A Close Window dialog box appears.
53. Click Yes to end your Information Server session and close Internet Explorer.
54. Select Start / All Programs / Wonderware / Information Server / Home Page.
Information Server Home Page appears.
55. In the left-navigation tree expand Administration / License Manager
56. Click on License History in the License Manager window pane.
Lab 35 User Manager 18-25
Wonderware System Platform Course - Part 2
Notice the license history is sorted by time, with current licenses displayed at the top of the list.
Domain Users are shown that have accessed the portal during this lab, including an entry for
the session which is currently open in your browser
Removing a User
57. Expand the Administration in the left-navigation tree.
58. Click on User Manager.
The User Manager window pane appears.
59. Select No Access User from the Role drop-down list.
60. Click on Training\ISNOACCESS.
61. Click Remove.
Current session
18-26 Module 18 Information Server Security and Customization
Wonderware Training
The training\isNoAcess user has been removed from the No Access role.
We will confirm the privilege changes you just made in the following steps:
Log off your current Information Server session.
62. Click the Log off link in the upper right corner of the Information Server Home Page.
Lab 35 User Manager 18-27
Wonderware System Platform Course - Part 2
A Close Window dialog box appears.
63. Click Yes to end your Information Server session and close Internet Explorer.
Start Internet Explorer.
64. Select Start / All Programs and right-click on Internet Explorer.
65. Click on Run as... in the context menu.
The Run As authentication dialog box appears.
66. Type into the User name drop-down list: training\isNoAccess.
67. Enter the Password provided by your instructor.
68. Click OK.
18-28 Module 18 Information Server Security and Customization
Wonderware Training
Internet Explorer appears.
69. Type http://localhost/wonderware into the address bar.
70. Press the Enter key on your keyboard.
The Information Server Home Page appears.
Notice that you now have Read Only access to the portal. This is because you removed
isNoAccess from the No Access Role. Information Server automatically assigns everyone
Read Only access unless specified otherwise.
Since you are logged in with Read Only access, the Administration link and the
Administration sub-category links are not visible in the left-navigation tree.
71. You may further verify your Read Only status by opening the Mixer window you published
earlier and clicking on the interactive write-back buttons. Information Server will deny write-
back access to anyone with Read Only access.
Section 2 Panel Manager 18-29
Wonderware System Platform Course - Part 2
Section 2 Panel Manager
This section introduces the Information Server Panel Manager and walks you through the steps
necessary to configure Access Panels.
Configuring Access Panels
An access panel is a logical grouping of navigation nodes (folders) and links that is only accessible
to particular users assigned to it. Access panels allow you to segregate portal objects (for
example, converted InTouch windows, alarm displays, and history reports) into groups of related
information. Then, each access panel can be configured to allow access by specific Windows
users and user groups (for example, plant maintenance personnel, operators, or managers), so
that each user or group will see only the portal objects that are pertinent to their area of the plant or
their user group.
For example, an Operators access panel might show InTouch graphics and charts for a particular
portion of the plant floor to just the plant operators assigned to that panel. A Maintenance access
panel might show only historical trends of plant equipment tags to plant maintenance personnel.
An access panel is accessible via a wide button-like tab that appears in the Launch Pad. By
default, Information Server includes a System access panel. You can add additional access
panels and populate them with nodes and links from the System access panel and include
additional customized links. By creating these additional access panels and dropping relevant
application and custom link nodes into them, you can easily establish access panels for different
limited access groups of users throughout the company.
Each access panel consists of three parts:
Display Name
Navigation Tree
User Access List
Section Objectives
Create and configure Access Panels for different users or groups.
18-30 Module 18 Information Server Security and Customization
Wonderware Training
About the System Access Panel
By default, Information Server includes the System access panel. The System access panel
shows all of the configuration and application folders and links that are available on the portal. The
System access panel can be visible to all users or just to administrators, but the links within it to
administration functions are only accessible to users assigned to the Administrators security role.
Since administrators have access to everything in the portal, the entire hierarchy of configured
folders and links will be visible to them within the System access panel.
This access panel can be considered the "master" list of folders and links. The organization of the
folders and links in the System access panel is fixed, except for the links pertaining to the
applications installed on the Information Server portal.
One of the first things an administrator will do is limit the access to the System Access Panel. By
default, every user has access to it.
Section 2 Panel Manager 18-31
Wonderware System Platform Course - Part 2
About Custom Access Panels
Custom access panels cannot contain nodes from under the main administration node in the
System access panel, but may contain administrative nodes from other applications.
All role assignments still apply within the custom access panels. That is, even if a user has access
to a particular access panel, he or she may not be able to see all of the navigation tree nodes
within the access panel if those particular nodes require a certain role access that the user is not
in. For example, if a particular Data Table has been given the "Engineer" role assignment, then
only "Engineers" can see the node or execute it.
Each access panel contains one navigation tree, which consists of a hierarchy of nodes pertaining
to links and portal objects. However, all other access panels can have any number or arrangement
of custom nodes and links. For example:
Creating a Custom Access Panel
Theoretically there is no limit to the number of custom access panels you can create. However, it is
highly recommended that you not give any one user access to more than four panels, for
performance reasons.
To create a custom access panel:
a. Expand Administration in the System access panel.
b. Click Panel Manager.
The Configured Panels page appears.
c. Click New Panel in the Configured Panels area.
d. Type the access panel name in the box that appears.
This will appear on the tab (button) in the Launch Pad.
e. Press Enter on your keyboard. The new access panel will appear in the list.
18-32 Module 18 Information Server Security and Customization
Wonderware Training
Configuring the Navigation Tree for a Custom Access Panel
You must have already created a custom access panel in order to configure the navigation tree for
it.
To configure the navigation tree:
a. Select the panel in the Panel Manager page for which you want to configure the navigation
tree.
b. Click Edit in the Action column.
The Panel Content page appears.
Note: The System access panel cannot be edited.
Section 2 Panel Manager 18-33
Wonderware System Platform Course - Part 2
c. Drag-and-drop the desired navigation node(s) from the System access panel node to the
node in the user access panel that you want it to appear under.
Note: Once you drag them to the new access panel, they will still be visible on the System
Panel. The System Panel is for the Portal Administrator. All configured nodes are always
available on the System Panel. This allows the System Administrator the option of configuring
the view to include any node for any user or group of users.
d. Right-click on a folder in the tree to create a new folder in the user access panel.
Click Add Folder.
e. Type a name for the folder in the dialog box that appears
Click OK.
Note: To delete a folder, right-click on the folder to delete and click Delete.
This will also delete all folders under it.
f. Click Save Panel Content when you are finished configuring the tree.
18-34 Module 18 Information Server Security and Customization
Wonderware Training
Configuring User Access for a Custom Access Panel
Due to bandwidth restraints and/or performance issues, it is highly recommended that you not give
any one user access to more than four panels.
To configure user access for a panel:
a. Click Panel Manager for a specific custom access panel if you are not already in the Panel
Manager, in Launch Pad.
b. Locate the name of the panel for which you want to configure access in the list of configured
access panels.
c. Click Edit in the Action column.
d. Click Users in the Panel Manager page.
The Panel User Access page appears.
e. Select the domain in the Domain list.
This list contains the user(s) or Windows security group(s) to add.
A list of all users in that domain will appear in the Domain Users window.
f. Select the user(s) or group(s) you want to give access.
g. Click Add to grant access to the panel.
Section 2 Panel Manager 18-35
Wonderware System Platform Course - Part 2
Renaming a Custom Access Panel
To rename an access panel:
a. Expand Administration in the System access panel.
b. Click Panel Manager.
The Panel Manager page appears.
c. Select the access panel to rename in the list of configured panels.
d. Click Rename in the Action column.
e. Type the new name for the access panel in the box that appears.
f. Press Enter on your keyboard.
Deleting a Custom Access Panel
Panel navigation trees are made up of custom folders, logical references to System access panel
nodes, or copies of dynamically created System access panel nodes, so deleting a panel will not
delete any application nodes, static or dynamic, in the System access panel.
To delete an access panel:
a. Expand Administration in the System access panel.
b. Click Panel Manager.
The Panel Manager page appears.
c. Select the access panel in the list of configured panels.
d. Click Delete in the Action column.
Hiding the System Access Panel from Non-Administrators
You can configure the System access panel so that it is hidden from all users except for those who
are members of the Administrators security role. If you do not hide the System access panel,
any casual user might click on an administration link, only to receive a message that he/she has no
access.
If you have hidden the System access panel, non-administrative users can only see the
administrative pages if they have been granted access through a custom access panel, which you
must create.
To hide the System access panel:
a. Expand Administration in the System access panel
b. Click Panel Manager.
The Panel Manager page appears.
c. Click to select Show to administrator only for the System access panel.
18-36 Module 18 Information Server Security and Customization
Wonderware Training
Intentionally left blank
Lab 36 Configuring Panel Manager 18-37
Wonderware System Platform Course - Part 2
Lab 36 Configuring Panel Manager
Introduction
In this lab, we will use the Panel Manager to add a navigation panel and populate it with nodes
from the System panel and/or add custom links. We will also define user access to this panel. This
is a useful tool for securing your website as well as adding convenience to individual or groups of
users.
Objectives
Upon completion of this lab you will be able to:
Create and Configure a Custom Access Panel
Verify Access to the Custom Access Panel
Restrict Access to the System Panel
18-38 Module 18 Information Server Security and Customization
Wonderware Training
Create an Access Panel & Configure the Navigation Tree
1. Expand Administration in the Navigation Tree.
2. Click Panel Manager.
The Panel manager appears.
3. Click New Panel.
Lab 36 Configuring Panel Manager 18-39
Wonderware System Platform Course - Part 2
4. A text entry box appears.
5. Type Plant Operator in the text entry box for the name of the new panel.
6. Press the Enter key on your keyboard.
Your new Plant Operator panel appears in the list of Configured Panels.
7. Click Edit for the Plant Operator Panel.
18-40 Module 18 Information Server Security and Customization
Wonderware Training
Panel content for the new panel appears. The System Panel appears in the left column
displaying all available portal content. The right column displays the ROOT level of the new
Plant Operator panel.
8. Expand Process Graphics from the System Panel in the left column and expand Mixer
Windows.
9. Drag Mixer Windows to the ROOT of the Plant Operator panel in the right column.
Notice that the window(s) have been added to the your new panel.
Note: Be sure to drag from the System Panel in the Panel Manager window pane and not
from the Navigation Tree.
Lab 36 Configuring Panel Manager 18-41
Wonderware System Platform Course - Part 2
10. Right-click on ROOT and select Add Folder from the context menu.
11. Type Plant Data for the Folder Name.
12. Click OK.
13. Expand Factory Alarms in the System Panel pane in the left column.
14. Click on Mixer Alarms in the left column and drag it to the Plant Data folder in the right
column.
Notice that the window(s) have been added to the folder.
18-42 Module 18 Information Server Security and Customization
Wonderware Training
15. Expand MultiViews in the left column.
16. Click on Plant Operator in the System Panel pane in the left column and drag it to the Plant
Data folder in the right column.
Notice that the window(s) have been added to the folder.
17. Click Save Panel Content.
A confirmation dialog box appears.
18. Click OK.
Lab 36 Configuring Panel Manager 18-43
Wonderware System Platform Course - Part 2
19. Click Users in the panel content pane.
The Panel User Access configuration pane appears.
20. Verify that Training is selected from the drop-down Domain list.
21. Select isOperator from the Domain Users list.
22. Click <<Add.
The Plant Operator panel is now available for the isOperator user.
23. Repeat steps 21 through 23 to add isAdmin user to the Plant Operator Panel Users.
18-44 Module 18 Information Server Security and Customization
Wonderware Training
Verify User Access to the Custom Access Panel
24. Logoff your current session of Information Server.
Login as a different user by doing the following:
25. Select Start / All Programs and Right-click on Internet Explorer.
26. The Run As dialog box appears.
27. Type into the User name entry box: Training\isoperator.
28. Type the Password provided by your instructor.
29. Click OK.
Internet Explorer appears.
30. Type into the address bar the following: http://localhost/wonderware
Lab 36 Configuring Panel Manager 18-45
Wonderware System Platform Course - Part 2
The Information Server home page appears.
Notice that the Plant Operator panel appears at the bottom of the navigation tree. Although
IsOperator was not assigned a specific Role, Information Server automatically assigns
everyone with Read Only access. Notice also that the Administration link is not available for
users with Read Only access.
31. Click on the Plant Operator panel at the bottom of the navigation tree.
The Plant Operator windows that you configured are available to this user.
32. Open these windows to confirm their read only status.
18-46 Module 18 Information Server Security and Customization
Wonderware Training
Restricting Access to the System Panel
In the previous steps, the System panel was available/visible to the Plant Operator user. In the
following steps you will hide the System panel so that the isOperator user will only have access
to the windows you configured for the Plant Operator.
33. Logoff your current session of Information Server.
34. Select Start / All Programs / Wonderware / Information Server / Home Page.
35. Expand Administration in the navigation tree.
36. Click Panel Manager in the navigation tree.
37. The Panel Manager appears displaying the currently configured Access Panels.
38. Check the Show to Administrators only option.
39. Logoff your current session of Information Server.
Login as a different user by doing the following:
40. Select Start / All Programs and right-click on Internet Explorer.
Lab 36 Configuring Panel Manager 18-47
Wonderware System Platform Course - Part 2
41. The Run As dialog box appears.
42. Type into the User name entry box: Training\isoperator.
Note: Do not use the drop-down arrow. Training\isoperator is not in the list.
43. Type the Password provided by your instructor.
44. Click OK.
Internet Explorer appears.
45. Type into the address bar the following: http://localhost/wonderware
The Information Server home page appears.
Notice that the Plant Operator panel appears at the top of the navigation tree. Below it are the
windows that you configured for the Plant Operator. Also notice that there is no System panel
available/visible to the Plant Operator.
46. Repeat steps 40 trough 45 and login as Training/isAdmin.
47. Enter the password provided by your instructor.
Since this user has Administrator privileges, both the System panel and the Plant Operator
panels are visible in the navigation tree.
18-48 Module 18 Information Server Security and Customization
Wonderware Training
Intentionally left blank
Section 3 Portal Configuration 18-49
Wonderware System Platform Course - Part 2
Section 3 Portal Configuration
This section walks you through the steps necessary to customize the Home Page of your
Information Server Web Portal.
Customizing the Portal
The portal administrator can completely customize the look and feel of the Information Server
Portal home page, such as:
Adding a custom logo or replacing the portal banner.
Replacing the default home page content.
Creating links to published reports, documents, other web sites, or resources.
All of this is accomplished through a series of easy-to-use menus, without leaving the Information
Server Portal. Users will see the changes when they refresh the current portal page.
Customizing the Home Page
You can customize three areas of the home page:
Custom Logo
You can specify a custom logo image to be placed in the banner area. The height of the image
should be 64 pixels -- anything smaller will be stretched to 64 pixels and anything larger will be
cut off. The width is resolution dependent.
Banner Pane
The portal banner is located at the top of the home page and is constantly displayed. You can
customize the banner by specifying a custom HTML or ASP page to appear in the banner
area. If you replace the banner with an HTML page, then the page will be resolution
dependent on the width only. If you replace it with an ASP page, the page will scale down to
the banner pane. The height of the banner page content should be 66 pixels, to avoid
distortion.
Tip: You will want to use a banner that coordinates with the color scheme you pick for the
portal.
Content Pane
You can change the default content that appears in the portal home page. You can specify an
ASP or HTML file for the content.
Section Objectives
Customize your portal Home Page.
Change your portal color scheme.
18-50 Module 18 Information Server Security and Customization
Wonderware Training
To customize the home page:
a. Expand Administration in the System access panel.
b. Click Portal Configuration.
The Portal Configuration page appears.
c. Click Home Page.
The Home Page customization page appears.
d. Click Custom Logo to change the logo.
e. Type the path to the file to upload in the File box or click Browse to locate the file.
f. Click Custom Banner URL to change the entire top banner.
g. Type the path to a configured banner .asp page in the Banner URL box.
Note: This can be a graphic file or a pre-configured .asp page.
h. Type the path to a configured content .asp page in the Home Page URL box to change the
content pane for the home page.
i. Click Save.
Important: Save the Logo or the Banner BEFORE changing them if you would like to restore
them without using the Information Server CD. Directions are included on the next page.
Section 3 Portal Configuration 18-51
Wonderware System Platform Course - Part 2
Reset Default Home Page Banner
To reset the Home Page to the installed default:
a. Expand Administration in the System access panel.
b. Click Portal Configuration.
The Portal Configuration page appears.
c. Click Home Page.
The Home Page customization page appears.
d. Select Custom Logo.
e. Click Browse.
The graphic file is stored in the following location:
c:\\InetPub\wwwRoot\Wonderware\HomePage\NamePlate.gif
f. Click Upload.
g. Click Save.
You can also reference the Banner page with the following instructions:
h. Select Custom Banner.
i. Type HomePage/Banner.asp in the Banner URL field.
j. Click Save in the upper right corner.
Note: The Home Page file is stored in the following location:
/Inet Pub/WWRoot/Wonderware/Home Page
18-52 Module 18 Information Server Security and Customization
Wonderware Training
Changing the Portal Color Scheme
You can change the portal color scheme to one of ten pre-configured, aesthetically pleasing
schemes. The scheme controls the background colors for the menu bar, Launch Pad background,
heading bars, and so on. You can view how a sample page will look with the new scheme before
you implement your changes.
In order to apply the new portal color scheme, you must have administrative privileges on the
computer on which the portal is installed.
To change the portal color scheme:
a. Expand Administration in the System access panel.
b. Click Portal Configuration.
The Portal Configuration page appears.
c. Click Color Scheme.
The Color Scheme page appears.
d. Click the desired color scheme.
The sample page will change to reflect your choice.
e. Click Save.
Section 3 Portal Configuration 18-53
Wonderware System Platform Course - Part 2
Creating Custom Links for Users
You can create a customized hierarchy of hyperlinks that will appear in the access panel of the
portal. These links can point to other web pages, send e-mail to a specified account, or open a
document file. For example, you might want to add a link to a legal disclaimer page, also called a
"terms of use" page.
Valid document file formats include: .html, .asp, .doc, .xls, .bmp, and .dwg. When a user clicks a
document link, the file will be opened in the appropriate editor, if installed on the client computer.
You should verify that your users will have the appropriate editors on their client computers in
order to open the document links that you post on the portal.
Client users must have a default e-mail application (for example, Microsoft Outlook) configured for
Internet Explorer in order to use a mailto link. If a user clicks on a mailto link in the navigation tree,
the client e-mail application will start up and display a blank e-mail message with the sender
address already configured.
a. Expand Administration in the System access panel.
b. Click Portal Configuration.
The Portal Configuration page appears.
c. Click Custom Links.
The Custom Links page appears.
d. Right-click on the tree and click Add Node to add a new node to the hierarchy.
For example:
18-54 Module 18 Information Server Security and Customization
Wonderware Training
The Node Name box appears.
e. Type the name of the node as you want it to appear in the navigation tree in the Node Name
box. For example, "Projects."
f. Click LEAF if this node will be the bottom node in the branch in the Node Type box. If you are
planning on adding additional levels under this node in the hierarchy (that is, one or more
"child" nodes), click NODE.
Note: A leaf node cannot have a child node.
g. To create a web page link:
Select HTTP in the Link Type area.
Type the address of the web page in the URL box. When the user clicks the link, the web
page will appear in the portal contents pane; a new browser window will not be opened.
You can specify HTTPS in the URL.
h. To create an e-mail link:
Select MAILTO in the Link Type area.
Type the e-mail address in the URL box.
i. To create a document link:
Select Upload Document.
Type the path to the file to upload in the File box or click Browse to locate the file.
Click Upload. The file will be copied to the correct location on the portal web server and
the URL box will be configured for you.
j. Click Update Node.
The new link appears under the selected category in the sample navigation tree to the right.
k. Verify that the new link is correct.
l. To delete a link, right-click on the link in the sample navigation tree and click Delete.
m. Click Save when you are finished creating all of your custom links.
Lab 37 Portal Configuration 18-55
Wonderware System Platform Course - Part 2
Lab 37 Portal Configuration
Introduction
In this lab, we will use Portal Configuration to add custom links to information outside the
Information Server. We will quickly and easily change the color scheme of the entire portal. We will
quickly and easily change the look of the portal Home Page by changing the banner and logo.
Objectives
Upon completion of this lab you will be able to:
Add custom links
Change the color scheme of the portal
Change the Home Page banner and logo
18-56 Module 18 Information Server Security and Customization
Wonderware Training
Add Custom Links
1. Expand Administration in the main Navigation Tree.
2. Click Portal Configuration.
The Portal Configuration page appears in the right pane.
3. Right-click on Custom Links.
Lab 37 Portal Configuration 18-57
Wonderware System Platform Course - Part 2
4. Click Add Node to add a new node.
5. Enter the information as displayed below in the configuration area in the right pane.
6. Click Update Node.
18-58 Module 18 Information Server Security and Customization
Wonderware Training
7. Right-click on Custom Links.
8. Click Add Node to add a new node.
9. Enter the information as displayed below in the configuration area in the right pane.
10. Click Update Node. You have just added a new node to the custom link hierarchy.
Lab 37 Portal Configuration 18-59
Wonderware System Platform Course - Part 2
11. Right-click on Historian Links.
12. Click Add Node to add a new node.
13. Enter the information as displayed next in the configuration area in the right pane.
The complete file path for the Upload Document/File field is: C:\Program
Files\Wonderware\InSQL\Server\ReadMe.html.
14. Click Upload.
15. Click Update Node. You have just created a document link.
16. Click Save in the upper right hand corner to retain any changes made.
17. Click OK in the Save Completed dialog box.
18-60 Module 18 Information Server Security and Customization
Wonderware Training
18. Go to Custom Links in the left navigation tree and verify all the links are working properly.
Change the Color Scheme
19. Expand Administration in the main Navigation Tree.
20. Click Portal Configuration. The Portal Configuration page appears in the right pane.
21. Click on Color Scheme. The Color Scheme page appears, showing a preview of the different
available schemes.
22. Select the Olive color scheme.
23. Click Save in the upper right hand corner to save changes.
24. Click OK. You should now see the new color scheme in the Information Server portal.
Lab 37 Portal Configuration 18-61
Wonderware System Platform Course - Part 2
Change the Home Page Appearance
25. Expand Administration in the main Navigation Tree.
26. Click Portal Configuration. The Portal Configuration page appears in the right pane.
27. Click on Home Page. The Home Page configuration page appears.
28. Select Custom Logo.
29. Browse for the Wonderware Logo.jpg file in the C:\Wonderware Training folder.
30. Click Upload.
The new logo is uploaded to your Information Server.
31. In the Home Page URL field enter http://www.wonderware.com. This will become the new
homepage for your Information Server.
32. Click Save in the upper right hand corner to save changes.
18-62 Module 18 Information Server Security and Customization
Wonderware Training
33. Click OK. Now you should see the new banner and home page in your Information Server
portal.
Section 4 Backup and Restore Utility 18-63
Wonderware System Platform Course - Part 2
Section 4 Backup and Restore Utility
This section walks you through the steps necessary to backup and restore your Information Server
portal configuration.
Creating and Restoring Backups
The Backup/Restore Manager lets you create backups of the Wonderware Information Server
configuration. You can use a backup to restore the original site. This section will cover the
following topics:
Requirements
About Restoring Backups
Creating a Backup
Restoring a Backup
Troubleshooting Backup Failures
Troubleshooting Restoration Problems
Requirements
The Backup/Restore Manager for Wonderware Information Server 3.0 is not compatible with
previous versions of the software.
You can host the Wonderware Information Server configuration database on a remote SQL server
node. The SQL server must be running under a network account with the correct permissions.
These permissions are network share privileges that allow the Backup/Restore Manager to access
the remote nodes file system.
You must also be a local administrator of the Wonderware Information Server computer. In
addition, the user credentials must also have SQL Server system administrator privileges.
You must install the SQL Server client connectivity components on the Wonderware Information
Server computer.
About Restoring Backups
You can only restore a backup to the Wonderware Information Server with the same virtual
directory name for both the Wonderware Information Server and the ActiveFactory Reporting
Website from which it was created.
Section Objectives
Provide an overview of the steps required for backing up and restoring the configuration
for an Information Server portal.
18-64 Module 18 Information Server Security and Customization
Wonderware Training
The restoration process is as follows:
The existing Wonderware Information Server database is deleted. If the database is
corrupt, you must reinstall Wonderware Information Server to fix the database corruption
before restoring the backup.
A new Wonderware Information Server database is created.
Information in the database is restored with information from the backup.
All site customizations that are contained in the backup are restored. For more
information, see the Online Help topic: What Is Contained in a Backup.
You must first disconnect all clients from Wonderware Information Server, then start the
restoration process. The Internet Information Services (IIS) is stopped during the restoration
process. Also, the Wonderware Information Server database is inaccessible until restoration is
complete. However, all other databases in the same SQL Server continues to function and provide
data to clients. Typically, a system reboot is not required after the restoration process.
Note: You cannot create a backup from a Wonderware Information Server site on an operating
system in one language and restore it to a Wonderware Information Server site on an operating
system of a different language.
Creating a Backup
The Wonderware Information Server is accessible by clients during the backup process.
Note: If a backup already exists with the same name, it is overwritten automatically.
To create a backup
a. On the Start menu on the Windows Taskbar, point to All Programs, Wonderware, then to
Information Server, and then select Backup and Restore. The Backup/Restore dialog box
appears.
b. In the Backup File box, type or browse to the CAB backup file.
c. Select either Windows Authentication or SQL Server Authentication.
d. Click Backup/Restore. The status of each phase of the backup process appears in the
Backup Status box. For more information on error messages, see Troubleshooting Backup
Failures.
e. When the backup is complete, a log file is created in the backup destination directory. The log
file is named using the following convention: <backupname>_Backup.log. You can open the
log file with any text editor.
Restoring a Backup
Before you restore, make sure all open connections to the database are closed.
To restore a backup
f. On the Start menu on the Windows Taskbar, point to All Programs, Wonderware, then to
Information Server, and then select Backup and Restore. The Backup/Restore dialog box
appears.
g. Select Restore.
h. Specify the complete path to the backup file or click the button next to the Backup File box to
browse for the backup file. Select the .Cab file and click Open.
Section 4 Backup and Restore Utility 18-65
Wonderware System Platform Course - Part 2
i. Select either Windows Authentication or SQL Server Authentication.
j. Click Backup/Restore.
k. When the restoration process begins, the Restoration Status dialog box appears.
l. If the restoration program could not restore an item, a message appears in the dialog box.
m. When the Restore is complete, click Close.
18-66 Module 18 Information Server Security and Customization
Wonderware Training
Intentionally left blank
Appendix A
Supported Animations & Scripts
A-2 Appendix A Supported Animations & Scripts
Wonderware Training
Supported and Non-Supported Animations
Below is a list of conversions from InTouch to the Information Server. Please check for recent
updates.
Object Works
Basic Shapes Yes
Real Time Trend Yes
Cells Yes
Symbols Yes
Wizards
Alarm Displays No
Lights Yes
Switches Yes
Clocks
- Digital Time/Date W/ frame Yes
- Analog Clock Square Yes
- Analog Clock Round Yes
- Digital Time/Date Yes
- Digital Time Yes
Buttons
- Button w/ light Yes
- Set/Reset Display Yes
- Inc/Decr Buttons up/down Yes
- Inc/Decr Value Buttons Yes
- Inc/Decr Buttons Left/Right Yes
- Button w/ LED Yes
- Buttons w/ 3d & Light Yes
- Momentary Button Yes
- Inc/Dec Up /down Blue Yes
- Inc/Decr left/right blue Yes
- Round Panel Pushbutton Yes
- Inc/dec plus minus Yes
- Detent Button Yes
- Command Button Yes
- Inc/Decr +/- 2 Yes
- Windows Left Right Yes
- Windows Up/down Yes
- Color Pushbutton Yes
- Checkbox Yes
- Radio Button Yes
Frames
- Single embossed Yes
- Single Raised Yes
- Single Routed Yes
- Single Inset Yes
- Double Raised Frame Yes
Object Works
- Outer inset, Inner Raised Yes
- Outer Raised, Inner Inset Yes
Meters
- Speedometer Dial Yes
- Panel Meter Yes
- LED Meter Yes
- Thermometer Meter Yes
Panels
- Inset Yes
- Raised Yes
- Double Raised Yes
- Double Inset Yes
- Outer inset, Inner Raised Yes
- Outer Raised, Inner Inset Yes
Runtime Tools
- Alarm Point Monitor Yes
Sliders
- Vertical Slider
SPC Charts No
SPC Limits Wizard No
Text Displays
- Static 3d Text Yes
- Message Tag Display Yes
- I/O Message Display Yes
- Password Input Yes
- Message Expression Display Yes
History Wizards No
Value Displays
- I/O Analog Display Yes
- Analog Tagname Display Yes
- Analog Expression Display
- Analog Tagname Display
w/ tag text
Yes
Windows Controls
- Text Box Yes
- List Box Yes
- Check Box Yes
- Combo Box Yes
- Radio Button Group Yes
Appendix A Supported Animations & Scripts A-3
Wonderware System Platform Course - Part 2
- Double Inset Yes
Scripts
Window Scripts
On Show Yes
On Hide No
While Showing No
*ShowAt
* Note: The horizontal and vertical pixel
location specified in ShowAt and
ShowTopLeftAt functions are ignored
during conversion to XML.
*Yes
*ShowTopLeftAt *Yes
Simple Button Scripts Yes
Condition Scripts No
Data Change Scripts No
ActiveX Event Scripts Yes
ActiveX Yes
SuperTags Yes
Bitmaps Yes
SQL Access No
Animation
Touch Links
User Inputs
- Discrete Yes
- Analog Yes
- String
Sliders
- Vertical Yes
- Horizontal Yes
Touch Push Buttons
- Discrete Value Yes
- Action Yes
- Show Window Yes
- Hide Window No
Line Color
Discrete Yes
Analog Yes
Discrete Alarm Yes
Analog Alarm Yes
Object Size
Height Yes
Width Yes
Miscellaneous
Object Works
Animation
Orientation Yes
Disable Yes
Fill Color
Discrete Yes
Analog Yes
Discrete Alarm Yes
Analog Alarm Yes
Location
Vertical Yes
Horizontal Yes
Value Display
Discrete Yes
Analog Yes
String Yes
Text Color
Discrete Yes
Analog Yes
Discrete Alarm Yes
Analog Alarm Yes
Percent Fill
Vertical Yes
Horizontal Yes
Tool Tips No
A-4 Appendix A Supported Animations & Scripts
Wonderware Training
Visibility Yes
Blink Yes
Supported Functions
Abs( Number);
ArcCos( Number);
ArcSin( Number);
ArcTan( Number);
Cos( Number);
DText( Discrete_Tag,OnMsg,OffMsg);
Exp( Number);
HideSelf;
Int( Number);
Log( Number);
IOSetRemoteReferences(BaseAccess, NewAccess, MatchString, SubstituteString, Mode);
LogN( Number,Base);
Pi();
PrintWindow ("Window", Left, Top, Width, Height, Options);
Note: This will only print the current window/web page.
Round( Number,Precision);
Sgn( Number);
Show " Window";
Sin( AngleNumber);
ShowAt("Window", Horiz, Vert);
ShowTopLeftAt("Window", Horiz, Vert);
Sqrt( Number);
StringASCII(" Char"); Note: returns UNICODE value
StringChar(ASCII); Note: returns UNICODE character
StringFromIntg( Number,Base);
StringFromReal( Number,Precision,"Type");
Note: The Type parameter is not supported. All numbers come out as decimal values.
StringLeft("Text",Chars);
StringLen("Text");
StringLower("Text");
StringMid(" Text",StartChar,Chars);
StringRight(" Text",Chars);
StringSpace(NumSpaces);
StringToIntg(" Text");
StringToReal(" Text");
StringUpper("Text");
Tan( AngleNumber);
Trunc( Number);
wcDeleteItem( "ControlName",ItemIndex);
wcDeleteSelection( "ControlName");
wcAddItem( "ControlName","MessageTag");
Animation (continued)
Appendix A Supported Animations & Scripts A-5
Wonderware System Platform Course - Part 2
wcClear( "ControlName");
GetPropertyD("ControlName.Property",Tagname);
GetPropertyI("ControlName.Property",Tagname);
GetPropertyM("ControlName.Property",Tagname);
SetPropertyD("ControlName.Property",DiscreteTag);
SetPropertyI("ControlName.Property", Integer);
SetPropertyM("ControlName.Property", "MessageTag");
wcFindItem( "ControlName", "MessageTag", DiscreteTag, Tagname);
wcGetItem("ControlName",ItemIndex,Tagname);
wcGetItemData( "ControlName",ItemIndex,Tagname);
wcSetItemData("ControlName",ItemIndex,Number);
wcErrorMessage(ErrorNumber);
wcInsertItem( "ControlName", ItemIndex, "MessageTag");
Supported Functions (continued)
A-6 Appendix A Supported Animations & Scripts
Wonderware Training
Appendix B
Using Web Parts in MS SharePoint
B-2 Appendix B Using Web Parts in MS SharePoint
Wonderware Training
Using Wonderware Information Server Web Parts in Windows
SharePoint
You can use Wonderware Information Server Web Parts directly in Windows SharePoint, without
using the MultiView Manager and Editor. You can create customized web pages with Windows
SharePoint that include Wonderware Information Server Content. Wonderware Information Server
provides three web parts for use in Windows SharePoint.
Content Viewer: Displays Process Views, FactoryAlarms, and Table Weaver Content.
InTouch: For Process Views that have Industrial Application Server References. Use this
web part to allow configuring or real-time Application Object Reference switching through
web part connections. This web part uses InTouch applications that have been published
to Wonderware Information Server.
Trend: Displays ActiveFactory Trends, and published trends. You can also configure a
trend. The Trend web part allows real-time switching of published trends or configuring the
trend through web part connections.
Note: The Wonderware Information Server Web Parts provide the standard SharePoint Web part
Appearance, Layout, and Advanced options for configuration. For more Information see To
Change Web part properties in the Multiview Editor.
Appendix B Using Web Parts in MS SharePoint B-3
Wonderware System Platform Course - Part 2
To add Wonderware Information Server Web Parts to Windows SharePoint web
pages
1. Open Internet Explorer and type the URL for your configured Windows SharePoint Site.
2. Click Modify Shared Page in the top-right corner and select Add Web Parts, then Browse.
The Add Web Parts pane appears on the right.
c. Select the Virtual Server Gallery and drag the Wonderware Information Server Web part you
want into a target zone on the Shared Page.
d. Click the menu arrow on the Wonderware Information Server Web Part you just added and
select Modify Shared Web Part. The right side of the screen shows the ToolPart Tool pane.
To configure the Wonderware Information Server Content Viewer Web Part
a. In the Web part ToolPart Pane, select a category such as Table Weaver Content and an
available Item.
b. Click OK to save the Web part configuration.
B-4 Appendix B Using Web Parts in MS SharePoint
Wonderware Training
To configure the Wonderware Information Server InTouch Web Part
a. In the Web parts ToolPart Pane, select an InTouch Window that has Industrial Application
Server References. The Tool pane shows a list of existing References and a Text field for
configuring new references.
b. Configure the ApplicationObject references.
c. Click OK to save the WebPart configuration.
To configure the Wonderware Information Server Trend Web Part
a. To configure the web part to use a Published
ActiveFactory Trend, click the Use Published Trend option and select an available Trend.
b. Click OK to save the Trend configuration.
To configure a new trend
a. Click the Configure Tags option and configure the following:
Select a Historian data source.
Type the tag name.
Select a Pen Color, Width, and Style.
Configure a time offset and a Retrieval mode.
Add the Tag to the configuration list.
b. Repeat steps a - e until all tags are configured for the trend.
c. Configure the Trend Date mode by selecting Absolute or Relative time.
d. Configure the Start Time and Duration for the Trend.
e. Configure the Update mode to be enabled or disabled.
If Update mode is Enabled, configure the trend to be in Live or Replay mode.
For Replay mode, select a replay speed.
f. Configure the Trend Chart appearance by enabling or disabling the Tag Picker, Tool Bar, Time
Bar, Axis Label, and Grid visibility options.
g. Click OK to save the Trend configuration.
Using Web Part Connections with the Wonderware Information
Server Web Parts
SharePoint technology supports communications between web parts. This is achieved using web
part connections. In this context, one web part becomes a provider and one a consumer.
Connecting the InTouch WebPart
The InTouch web part supports InTouch Windows published to Wonderware Information Server
using the Win-XML Exporter. When you connect the InTouch WebPart, the first three tags shown
in the InTouch Toolpart are available for connections. The following graphic shows an existing
Connection for Parameter 1 of the InTouch WebPart. Detailed configuration steps are included in
the following section.
Appendix B Using Web Parts in MS SharePoint B-5
Wonderware System Platform Course - Part 2
You can use SharePoint connection configuration to provide communication between web parts.
This is done by adding a SharePoint web part that connects with the InTouch WebPart provider.
This example shows you how.
Note: The following steps are an example of how to connect web parts. For more information
about web part connections, see Microsoft documentation.
To add a SharePoint web part
a. Open the default SharePoint Team Site where the InTouch WebPart is located and click
Documents and Lists on the main navigation bar.
b. Click Create.
c. Click Custom List.
d. Type any name and click the Create button. The new list appears as a blank panel.
e. Click Modify settings and columns in the left panel.
f. In the Columns area, click Add a new column. When the Add Column panel appears, do
the following:
Type InstanceName in the Column name field and ensure the Single line of text option
is selected.
Scroll down and ensure the Add to default view option is selected.
Click OK.
g. Click Documents and Lists and open your new list.
h. Click New Item and do the following:
Type any title.
Type the tag value in the InstanceName field. In this example, the instance name is
Tank_001.
i. Repeat the previous step and add more new items.
j. Click Save and Close.
B-6 Appendix B Using Web Parts in MS SharePoint
Wonderware Training
To configure connections between web parts
a. Click Home in the main Team Web Site navigation bar.
b. Click Modify Shared Page and add the list you just created to the site. It is located in the
Team Web Site Gallery. The following graphic shows the List web part added to the Right
zone, with two InstanceNames.
c. Click the InTouch Web Part Menu arrow and click Modify Shared Web Part.
d. When the InTouch Toolpart appears, click the Web Part Menu arrow on the InTouch WebPart.
e. Click Connections and do the following:
Click Consumes Parameter 1 and select your web part from the menu. In the following
graphic, Test List is the web part we want to connect.
The Edit Connection dialog box appears.
Select the correct column from the Column list. In the following figure, the column is
called InstanceName.
Click Finish. The List appears with the updated Instance Names you entered in the List
web part.
Appendix B Using Web Parts in MS SharePoint B-7
Wonderware System Platform Course - Part 2
f. Close the Add Web Parts panel. The following graphic shows the List web part after
completing the configuration.
g. When you want to switch tags, click an available InstanceName option.
B-8 Appendix B Using Web Parts in MS SharePoint
Wonderware Training
Connecting the Trend Web Part
Use the ActiveFactory Trend WebPart from SharePoint to select and configure a published trend.
The published trend resides on the ActiveFactory Reporting Website of the Wonderware
Information Server. When published trends are not available, you can select a Historian node from
the Shared Data Source, and create your own trend using standard Trend functionality. The Trend
WebPart connects by using a published Trend, or by Configuring Tags. The ActiveFactory
functionality in Wonderware Information Server uses SharePoint technologies. The SharePoint
Team Site and the Wonderware Information Server are installed on the same server, and provide
integrated connection through the Trend WebPart.
To configure Trend WebPart connection options
a. On the Trend WebPart, click the Web Part Menu arrow and select Modify Shared Web Part.
b. With the Trend Tool Part open, click the Web Part Menu arrow on the Trend WebPart and
select Connections.
Use Published Trend
When you connect to a published trend, the following connections are supported:
Provides Published Trend: Provides the Trend WebParts URL as text to any other web
parts within the SharePoint site.
Consumes Published Trend: Consumes a published Trend URL as text from other web
parts within the SharePoint site.
Appendix B Using Web Parts in MS SharePoint B-9
Wonderware System Platform Course - Part 2
Configure Tags
When you configure tags, you can select any Administrator from the top list. This list contains
Named Data Sources of the Historian type. The data source is configured in the Shared Data
Source Manager. For more information about trend properties, see the ActiveFactory Users
Manual.
The following connections are supported:
Provides InSQL Server: Provides the Historian node name to any other web part.
Provides Current Tag Name: Provides a tag name from a Historian node to any other
web part.
Consumes InSQL Server: Uses a Historian Shared Data Source provided by another
web part.
Consumes Current Tag Name: Uses a valid tag name from the Shared Data Source as
provided by another web part.
Consumes Retrieval Style: Uses a valid retrieval style value such as Cyclic, Averages,
Time In State, and so on as provided by another web part.
Consumes Start Date and End Date: Uses a start and end date provided by another web
part.
Consumes Trend Duration: Uses a duration value as provided by another web part.
Consumes Date Mode: Uses the Relative or Absolute time settings.
B-10 Appendix B Using Web Parts in MS SharePoint
Wonderware Training
Intentionally left blank