HistorianClient 2014 R2 - RevB

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 368

W O N D E R W A R E T R A I N I N G

Training Manual
Revision B
February 2015
Part Number 11-GM-10056

Historian Client 2014 R2


INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT NOTICE.

© 2015 by Schneider Electric Software, LLC. 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 Schneider Electric Software, LLC. 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.

Schneider Electric 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 Schneider
Electric software described in this document is subject to the terms of the applicable Schneider Electric/
Wonderware license. These terms include provisions that limit your rights such as use restrictions,
disclaimers of warranties and limitations of Wonderware/Schneider Electric liability. By installing or using the
Schneider Electric software, you agree to accept all of the terms of the applicable Schneider Electric/
Wonderware license. 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 Schneider Electric Wonderware business unit by calling 1.949.727.3200 or by sending an e-mail to
wwsupport@wonderware.com.

Schneider Electric, Wonderware, ArchestrA, Factelligence, IntelaTrac, InBatch, InControl, IndustrialSQL


Server, InSQL, InTouch, InTrack, QI Analyst, SCADAlarm, SuiteLink, SuiteVoyager, WindowMaker,
WindowViewer are trademarks and registered trademarks of Schneider Electric Software, LLC, its
subsidiaries and affiliated companies. All other brands and product names may be the trademarks or service
marks of their respective owners.
Table of Contents 1

Table of Contents
Module 1 Introduction .................................................................................1-1
Section 1 – Course Introduction......................................................................... 1-3
Section 2 – Introduction to Wonderware Historian Client ................................ 1-17
Section 3 – Introduction to Wonderware Historian Server ............................... 1-19
Section 4 – System Requirements, Licensing, and Support............................ 1-23

Module 2 Wonderware Historian Client Trend ..........................................2-1


Section 1 – Introduction to Wonderware Historian Client Trend ........................ 2-3
Lab 1 – Using Wonderware Historian Client Trend Basic Functions ............... 2-31
Section 2 – Public and Private Groups ............................................................ 2-59
Lab 2 – Configuring Public Groups and Trend Sets ........................................ 2-61
Section 3 – Time Offset and Target Regions................................................... 2-73
Lab 3 – Configuring Time Offsets and Target Regions.................................... 2-77
Section 4 – Retrieval Styles and Data Transformations in Trend .................... 2-89
Lab 4 – Using Retrieval Styles and Data Transformations .............................. 2-97
Lab 5 – Creating Retrieval Styles .................................................................. 2-125

Module 3 Wonderware Historian Client Workbook ..................................3-1


Section 1 – Introduction to Wonderware Historian Client Workbook ................. 3-3
Lab 6 – Using Historian Client Workbook Basic Functions.............................. 3-23
Lab 7 – Using the Tag Analysis Wizard ........................................................... 3-37
Section 2 – Historian Event Retrieval .............................................................. 3-47
Lab 8 – Working with Event Data..................................................................... 3-59
Section 3 – Enhanced Workbook with Excel Functionality .............................. 3-73
Lab 9 – Using Excel References with Workbook ............................................. 3-75
Lab 10 – Creating an Hourly Average Shift Report.......................................... 3-85

Module 4 Wonderware Historian Client Query..........................................4-1


Section 1 – Introduction to Wonderware Historian Client Query........................ 4-3
Lab 11 – Using Wonderware Historian Client Query ....................................... 4-11
Lab 12 – Using Wonderware Historian Client Query in Workbook .................. 4-29

Module 5 Wonderware Historian Client Report ........................................5-1


Section 1 – Introduction to Wonderware Historian Client Report....................... 5-3
Lab 13 – Using Wonderware Historian Client Report ........................................ 5-5
Section 2 – Use of Wildcards in Reports ......................................................... 5-15
Lab 14 – Using Wildcard Time Options and Editing a Report.......................... 5-19

Module 6 Wonderware Historian Client ActiveX Controls .......................6-1


Section 1 – Wonderware Historian Client Controls............................................ 6-3
Lab 15 – Using the aaHistClientTrend Control ................................................ 6-13
Lab 16 – Using Active Data Grid...................................................................... 6-31

Historian Client 2014 R2


2 Historian Client 2014 R2

Wonderware Training
Module 1 – Introduction
Section 1 – Course Introduction 1-3
Section 2 – Introduction to Wonderware Historian Client 1-17
Section 3 – Introduction to Wonderware Historian Server 1-19
Section 4 – System Requirements, Licensing, and Support 1-23
1-2 Introduction

Module Objectives
 Describe the objectives of the course
 Summarize the Wonderware Software Solutions product offerings
 Discuss Wonderware Historian Client applications, main features, recommended
hardware and software requirements, and installation and licensing
 Discuss Wonderware Historian Server main features and requirements

Wonderware Training
Section 1 – Course Introduction 1-3

Section 1 – Course Introduction


This section describes the fundamentals of the Wonderware Historian Client 2014 Software
course, the objectives of the course, intended audience, prerequisites, and course agenda. It also
includes a description of the Wonderware products.

Course Description
The Wonderware Historian Client 2014 R2 course is a 2-day, instructor-led class designed to
provide a fundamental understanding of the features and functionality of the Wonderware
Historian Client software. The course provides lectures and hands-on labs to supply and reinforce
the knowledge necessary to use Wonderware Historian Client.
The Wonderware Historian Client trending, analysis, and reporting software offers a suite of data
analysis and reporting clients that maximize the value of data stored on Wonderware Historian.
Wonderware Historian Client enables individuals at all levels of an organization to easily access
plant- and process-related data through simple point-and-click dialog boxes.
The new training materials and lab instructions for the Wonderware Historian Client software will
be validated during this BETA course. Your input is greatly appreciated.

Objectives
Upon completion of this course, you will be able to:
 Retrieve Wonderware Historian data with the help of Wonderware Historian Client
 Use the data in its appropriate context, including historical and real-time trend
manipulation, and production-related reporting within Microsoft Excel and Word

Audience
Audience for this course includes Plant floor operators, managers, and other individuals whose
jobs include using Wonderware Historian data for assessment and reporting within production or
administrative environments.

Prerequisites
 Knowledge of InTouch
 Knowledge of Wonderware Historian
 Knowledge of Microsoft Office Excel and Microsoft Word
 Experience in manufacturing industry

Historian Client 2014 R2


1-4 Introduction

Course Outline

Module 1 – Introduction
Section 1 – Course Introduction
This section describes the fundamentals of the Wonderware Historian Client 2014 R2
Software course, the objectives of the course, intended audience, prerequisites, and course
agenda. It also includes a description of the Wonderware products.
Section 2 – Introduction to Wonderware Historian Client
This section introduces the Wonderware Historian Client applications, the main features,
hardware requirements, and licensing.
Section 3 – Introduction to Wonderware Historian Server
This section introduces the main features of Wonderware Historian Server, network
considerations, hardware and software requirements, and licensing strategies.
Section 4 – System Requirements, Licensing, and Support
This section explains the recommended system requirements and licensing information.

Module 2 – Wonderware Historian Client Trend


Section 1 – Introduction to Wonderware Historian Client Trend
This section describes the features of Wonderware Historian Client Trend and how to create
and configure trends using Wonderware Historian Client Trend.
Section 2 – Public and Private Groups
This section describes the function of the Public and Private Groups folders that are used in
Wonderware Historian Trend Client to store and share tags.
Section 3 – Time Offset and Target Regions
This section describes how to configure time offset and target region in a trend for tag
configuration.
Section 4 – Retrieval Styles and Data Transformations in Trend
This section takes you through the steps necessary to configure Retrieval styles and create
Custom Retrieval styles in Wonderware Historian Client Trend.

Module 3 – Wonderware Historian Client Workbook


Section 1 – Introduction to Wonderware Historian Client Workbook
This section explains the basic functionality of Wonderware Historian Client Workbook.
Section 2 – Historian Event Retrieval
This section explains the various event tag selection methods and the Historian event retrieval
functionality.
Section 3 – Enhanced Workbook with Excel Functionality
This section explains how to use the features of the enhanced workbook with Excel
functionality to create reports to get data for a specified shift.

Wonderware Training
Section 1 – Course Introduction 1-5

Module 4 – Wonderware Historian Client Query


Section 1 – Introduction to Wonderware Historian Client Query
This section introduces Wonderware Historian Client Query uses and operation.

Module 5 – Wonderware Historian Client Report


Section 1 – Introduction to Wonderware Historian Client Report
This section introduces the uses and operation of Wonderware Historian Client Report.
Section 2 – Use of Wildcards in Reports
This section explains the use of wildcards for time options and report editing.

Module 6 – Wonderware Historian Client ActiveX Controls


Section 1 – Wonderware Historian Client Controls
This section explains the use, properties, methods, and events of the ActiveX controls. In
particular, this section discusses the aaHistClientTrend and aaHistClientActiveDataGrid
controls and their common configuration needs.

Historian Client 2014 R2


1-6 Introduction

Wonderware Software Solutions


Wonderware is the market leader in real-time operations management software, including
Supervisory Human Machine Interface (HMI), Supervisory Control and Data Acquisition
(GeoSCADA), Mobile Operations, Production Management, Manufacturing Execution Systems
(MES), Performance Management, and Enterprise Manufacturing Intelligence (EMI) workflow. It is
also the leader in integration with asset management, supply and demand chain, and Enterprise
Resource Planning (ERP) applications. Wonderware is a brand offering of the Schneider Electric
Global Solutions Software division.
Wonderware software products deliver significant cost reductions associated with designing,
building, deploying, and maintaining secure and standardized applications for manufacturing and
infrastructure operations. Wonderware solutions enable companies to synchronize their
production and industrial operations with business objectives, obtaining the speed and flexibility to
attain sustained profitability.
More than one-third of the world’s plants and facilities run Wonderware software solutions in
dozens of industries worldwide, such as:
 Automotive
 Chemical and Pharmaceutical
 Consumer Packaged Goods
 Discrete Manufacturing
 Electrical Power
 Facilities Management
 Food and Beverage
 Hydrocarbon Processing
 Life Sciences
 Mining and Metals
 Oil and Gas
 Process Manufacturing
 Pulp and Paper
 Transportation
 Water and Wastewater
Wonderware software solutions deliver manufacturing and operational performance improvements
that help reduce the amount of project-specific work that is required to develop integrated
information and automation applications across entire operational enterprises. Wonderware
software solutions can be implemented in the context of existing systems, at a company’s own
pace, and to the extent that the company chooses.
These solutions leverage a powerful, layered software architecture that enables a variety of
features and capabilities, such as visualization, optimization and control of plant floor data
collection, data storage, and analysis.
Wonderware offers the following software solutions:
 Manufacturing Execution Systems (MES) – Wonderware MES software helps
customers track the transformation of products from raw materials through finished goods.
The software gathers in-process data, such as yields, throughput, equipment efficiencies,
material consumption, and product quality. It also provides functionality, such as inventory
management, work order/Bill of Material management, real-time reporting, and analysis,
for a full view into operational efficiencies.

Wonderware Training
Section 1 – Course Introduction 1-7

Leveraging the ArchestrA software architecture (see page 1-8), Wonderware MES
solutions are completely scalable and configurable. This enables a unique, incremental
approach to operational improvements, where low-risk deployment of increased
application functionality can be realized one step at a time.
Wonderware MES solutions help to substantially reduce lead time and manufacturing
costs, increase production throughput and product quality, and reduce efforts involved in
compliance and governance.
 Enterprise Manufacturing Intelligence (EMI) – EMI software solutions empower
companies to analyze their overall operational Key Performance Indicators (KPIs), using
simple, yet powerful, data analysis, reporting, and visualization tools.
KPIs such as production, costs, process capability, equipment downtime, and quality and
variance data can be collected, aggregated, and displayed using Wonderware EMI
software solutions. A powerful, yet secure, web interface, with intuitive, drill-down
dashboards, helps deliver this information to the full range of plant workers, tailored to
their specific information requirements.
 Supervisory Human Machine Interface (HMI)/Supervisory Control and Data
Acquisition (GeoSCADA) – HMI/SCADA solutions often impose complex demands on
software architecture. Wonderware InTouch visualization software, coupled with the
award-winning ArchestrA technology-based Wonderware System Platform, is uniquely
positioned to meet these challenges.
The HMI/SCADA software solutions are easy to use, implement, and configure, and offer
simplified maintenance, high security and availability, and virtually unlimited scalability.
 Data Historian – Wonderware Historian Server software leverages the state-of-the-art
Wonderware System Platform, industry-leading historian technology, web-based reporting
capabilities, and renowned open data source connectivity from Wonderware. The resulting
Historian solution is unlike any other data archiving and reporting solution found in the
market today. With blazing speed, broad scalability, highly efficient data storage and
retrieval, high availability, and simple one-click historization setup, the Wonderware
Historian Server software has an industry reputation for low total cost of ownership.
Preconfigured web-based reports and data analysis capabilities derive immediate value
from data captured by the Wonderware Historian Server.
 Batch Management – Wonderware batch management solutions perform repeatable and
consistent execution of batching processes across all hybrid industries, whether it is
Electronic Batch Records (EBR) systems in regulated industries, Paper-On-Glass
capabilities in paperless production environments, or automated recipe management for
supervisory systems.
From simple batch processes, where only the formula changes for different products, to
the most complex batch processes requiring dynamic allocation of shared equipment,
Wonderware has a solution. Each of these solutions ensures reduced lifecycle costs and
investment protection by leveraging the ArchestrA architecture.
 Product Quality Management and Statistical Process Control (SPC) – Delivering
products with high “quality”—defined as “meeting specifications at the lowest possible
cost”—is a top priority for manufacturers and industrial operations. Quality has many
aspects, and Wonderware applications provide valued, integrated Quality Management
functionality to tens of thousands of companies worldwide.
Starting with Wonderware MES, which provides the most sophisticated, integrated quality
management and enterprise-wide SPC, to Historian Server, which provides incremental
solutions to store volumes of process data for quality analysis, Wonderware applications
consistently meet quality needs. The Wonderware InTouch software offers real-time data

Historian Client 2014 R2


1-8 Introduction

monitoring and alarming. Historian Client trends data. MES software provides
specification management, genealogy, BOM enforcement, OEE, downtime monitoring,
and quality data documentation and monitoring. System Platform monitors data levels,
and application templates can deliver nearly any quality capability. InBatch software
collects information on batch quality and recipe settings. The capability list goes on.
 Mobile Solutions – Wonderware Mobile Solutions enable manufacturers and producers
to manage the processes and procedures used to ensure all field tasks required to
achieve reliable operations are executed consistently.
Software running on rugged hand-held computers enables field operators to collect data
on noninstrumented machinery and to receive contextual information and guidance based
on conditions encountered in the field. This helps ensure the consistent execution of best
operating practices.
Collected data can also be used for process analysis and production reporting, as well as
integrated into existing back-end systems and plant data historians.
 Skelta BPM – Wonderware Skelta BPM solutions allow customers to take their standard
operating procedures, in-house knowledge base, and standard practices and make them
part of everyday operations. Skelta BPM can overlay any Wonderware product to provide
visibility, collaboration, enforcement of procedures, and documentation of results.
For more information on Wonderware software solutions and products, visit the Wonderware
website at http://www.wonderware.com.

ArchestrA Technology
ArchestrA is a comprehensive automation and information software architecture designed to
integrate and extend the life of legacy systems by leveraging the latest, open industry standards
and software technologies. It also unifies the Invensys Operations Management products that
make up the InFusion ECS. ArchestrA “industrializes” Microsoft .NET and other Microsoft
technologies to provide an even more productive toolset for building critical operations
management software solutions for manufacturing, production, and facilities operations. The result
exposes services needed by manufacturing and industrial infrastructure, such as common name
space, object management, industrial security, high availability and redundancy, plant connection,
enterprise connection, client interface, web portal, and systems management.
Using ArchestrA technology, applications can be rapidly assembled using software objects rather
than being programmed. Templates can be created for almost any purpose, and then used to build
new applications, simply through reassembly and slight modifications, saving time and lowering
development costs. Offerings built on ArchestrA empower decision makers to achieve their
business goals without abandoning prior investments in systems or intellectual property.
ArchestrA technology helps reduce application engineering effort and deployment, increase
efficiency, provide optimization and standardization, and enable integration of distributed
automation systems and applications from virtually any vendor. Geographically dispersed
applications (from a few hundred to one million I/O, and from a single node to hundreds of
stations) can be rapidly and securely implemented.
The ArchestrA architecture leverages advanced software technologies to fill the gap between ERP
systems and control systems. This architecture provides the following:
 Framework, which supports common services and a core set of system objects
 Domain Objects, which are industry-specific objects
 Object Development Toolkit, which enables third parties to create new domain objects
customized for specific needs

Wonderware Training
Section 1 – Course Introduction 1-9

The supervisory control and manufacturing information environment is served by a variety of


systems, including HMI, Distributed Control Systems (DCS), SCADA, Process Information
Management systems (PIM), MES, batch and recipe management systems, and advanced
control/simulation systems. The ArchestrA Framework supports core services that are required by
most of these different types of supervisory control and manufacturing information systems.
These core services include the following:
 Integrated Development Environment (IDE)
 Version management
 License management and centralized deployment
 System diagnostics and system administration
 Internationalization
 Data visualization and monitoring
 Event-based processing, scripting, and calculation capabilities
 Alarm and event management, historization, and security
 Data acquisition and field device integration
 Interobject communications and name service
 Reporting and ad-hoc query capability
 Support for industry standards, such as OPC and SQL
The ArchestrA architecture consists of the following:
 Configuration and Deployment-Related Components that are required for centralized
deployment of the runtime components. These components are installed like any
Windows application and include the following:
 Centralized object repository (called Galaxy Repository)
 Integrated Development Environment (IDE)
 Object deployment services (called Bootstrap)
 Runtime Components that are centrally deployed and administered. These components
include the following:
 PCs with core infrastructure (called Platforms)
 Key software applications (Engines)
 Objects (Framework Objects) that expose framework-related functionality

Wonderware Individual Software Products


Wonderware software solutions offer robust, best-of-breed software components that empower
customers to effectively develop and manage their automation and information applications in
continuous, discrete, process, hybrid, and batch manufacturing environments. All the latest
Wonderware software offerings leverage the latest ArchestrA technology and offer increased
functionality and flexibility, as well as extensive connectivity.

Wonderware System Platform


Wonderware System Platform provides a single and scalable platform for all the SCADA,
Supervisory HMI, MES, and EMI software-solutions needs of industrial automation and information
personnel. At the center of System Platform is the “plant model,” which is the logical
representation of the physical processes being controlled and supervised. ArchestrA object
technology makes configuration, logging, delivery, and maintenance of real-time and historical
information point-and-click simple.

Historian Client 2014 R2


1-10 Introduction

Within the System Platform is a high-performance process historian with production history
archiving, efficient data compression, and autoconfiguration of historical archiving that eliminates
duplicate effort. The platform also contains an industrial web information server that dramatically
simplifies the organization and delivery of operations information for use across all functions in an
organization.

Wonderware InTouch
Wonderware InTouch software provides graphic visualization that takes operations management,
control, and optimization to a new level. What the industry now knows as HMI all began with
InTouch software more than 20 years ago. InTouch software provides innovation, architectural
integrity, device integration and connectivity, uninterrupted software version migration path, and
ease of use. This leads to well-designed, standards-driven systems that maximize productivity and
optimize user effectiveness. These systems also increase quality and lower development,
maintenance, and operational costs.

Wonderware InTouch Access Anywhere


Wonderware InTouch Access Anywhere is an addition to InTouch software that allows casual and
remote web HMI and Mobile SCADA users to view and control real-time plant floor operations data
using a secure web browser. This functionality helps improve real-time decisions, maximize the
value of plant data, reduce maintenance costs, and lower travel costs in a simple and secure way.

Wonderware InTouch Machine Edition


Wonderware InTouch Machine Edition allows users to quickly create powerful and maintainable
applications on a variety of small footprint devices. Users can visualize data from any place at any
time and connect to any controller. InTouch Machine Edition delivers powerful functionality,
engineering simplicity, and easy integration of small footprint devices with other Wonderware
products, such as System Platform, Historian, and standard InTouch.

Wonderware Development Studio


Wonderware Development Studio consists of a suite of cooperative tools designed to enable the
rapid construction and maintenance of Wonderware applications. The heart of the Development
Studio is the ArchestrA IDE. Within the ArchestrA IDE, engineers can design, develop, test, and
maintain any industrial application. Without leaving the ArchestrA IDE, users can develop vibrant
and sophisticated graphics and incorporate those into effective HMI, SCADA, MES, or Operations
Intelligence applications. Once development is ready for delivery, a single click deploys
applications, objects, and associated logic to anywhere in the enterprise namespace.

Wonderware Skelta BPM (formerly known as ArchestrA Workflow)


Wonderware Skelta BPM is an advanced workflow application that enables companies to digitize
manual and automated processes that include people or systems, or both. This sophisticated
Business Process Management (BPM) application enables companies to model, execute,
analyze, and improve processes inside and outside their organization to drive higher levels of
collaboration, productivity, and innovation.
The software documents all workflow, including task sequencing, dependencies, and outcomes,
and measures process performance for analyses and process optimization. With Skelta BPM,
companies can institutionalize work processes that manage normal, unscheduled, or disruptive
events within their operations environment.

Wonderware Training
Section 1 – Course Introduction 1-11

Wonderware Historian Server


Wonderware Historian Server is a high-performance, real-time database for historical information.
It combines the power and flexibility of a relational database with the speed and compression of a
true process historian, integrating the office with the factory floor or any industrial operation.
Historian Server is designed to collect a wide variety of plant data, at full resolution and very high
data rates, ensuring that decision makers at all levels will have the historical information they need
to drive vital productivity improvement initiatives. Historian Server offers unparalleled scalability
and can be configured as a single data collection and aggregation system or as part of a larger,
tiered architecture offering the ability to implement sophisticated summary and replication
systems.

Wonderware Historian Client


Wonderware Historian Client provides rich data analysis and reporting capabilities to maximize the
value of information stored in the Historian Server. The software is integrated with Microsoft Office
components to deliver data-trend and numerical data analysis using Microsoft Excel,
comprehensive data reporting using Microsoft Word, and the capability to publish real-time and
historical plant information to the web or company intranet site using Wonderware Information
Server.
Plant knowledge workers using information derived from the Historian Server can quickly
troubleshoot problems, study potential process inefficiencies, and eliminate the time-consuming
process of locating the data. Historian Client makes the delivery and visualization of this
information easy to implement and deploy.

Wonderware Information Server


Wonderware Information Server offers an easy solution for aggregating and presenting plant
production and performance data over the web or company intranet. Plant personnel, with a
minimum of training, can install, configure, and implement a highly effective plant information
website without the need for custom web programming.
Using Information Server, large amounts of process data can be aggregated into highly informative
production reports tailored to the information needs of plant personnel. Content from Information
Server can be incorporated into other web portals, making existing corporate IT portals more
informative and valuable.

Wonderware Intelligence
Wonderware Intelligence enables companies to gather, store, and report on both historical and
real-time operational data, using a dashboard to present KPIs that are used to visualize, tune, and
maximize their operations.
The Intelligence Data Model is the foundation for transforming data into actionable information by
adding context (equipment, product, work orders, material, personnel, and so on). This data in
context helps to answer operational questions related to information, such as how much product is
available per site each day and how many work orders contained a specific raw material ingredient
the previous week.

Wonderware MES/Operations
Wonderware MES/Operations provides a scalable and configurable MES designed to help
manufacturers across a wide range of industries improve their operational efficiency,
manufacturing responsiveness, and brand integrity. The incremental, low-risk approach to building
MES from Wonderware allows MES to be implemented in steps, from basic functionality, including

Historian Client 2014 R2


1-12 Introduction

work order management, bill of materials, specifications, data collection, and traceability (track/
trace/genealogy), to enhanced capabilities, such as inventory management, certifications, labor,
and production steps.
Wonderware MES software fully leverages System Platform and Invensys InFusion Enterprise
Control System (ECS) for integration, development, and reporting, as a result of the underlying
ArchestrA technology. This approach reduces deployment and maintenance costs, while
facilitating rapid development and scaling of the application throughout the enterprise.

Wonderware MES/Performance
Wonderware MES/Performance provides a software solution for collecting, tracking, and
communicating real-time equipment performance and efficiency information, scalable from
machine/equipment level information to line/plant enterprise KPIs. MES/Performance delivers
critical equipment downtime and efficiency information to operators and decision makers who can
then take immediate action to improve plant performance and productivity, equipped with the most
up-to-date operational results.
Wonderware MES software is highly configurable, fully leveraging System Platform and Invensys
InFusion ECS for integration, development, and reporting, as a result of the underlying ArchestrA
technology. This approach reduces deployment and maintenance costs, while also facilitating
rapid development and scaling of the application throughout the enterprise.

Wonderware MES/Quality
Wonderware MES/Quality provides historical documentation of quality sample data and SPC
monitoring of the sample data collected. MES/Quality helps manufacturing companies configure,
manage, and implement quality specifications that reduce the cost and increase the efficiency and
accuracy of capturing and monitoring critical quality information on the plant floor. Information is
captured and monitored either directly from process equipment or by operators using sample plan
procedures.
MES/Quality incorporates electronic records of operational performance and quality sampling
procedures for compliance with internal, governmental, or safety regulations that require tighter
quality control and improved quality procedure management in many manufacturing industries.

Wonderware QI Analyst
Wonderware QI Analyst SPC software is an important part of any quality management program.
Performing both online and historical SPC, QI Analyst supports real-time process monitoring and
alarms, as well as historical reports to view process “health” over any period of time. Real-time
SPC, analysis, and reporting are equally easy. By storing process data in the QI Analyst database
and linking to external data sources, users can leverage enterprise-wide SPC to reduce variation,
reduce costs of manufacturing, and increase productivity.

Wonderware InBatch
Wonderware InBatch flexible batch management software optimizes the management of any
batch process. InBatch software automates recipe management using a graphical procedure
environment featuring Sequential Function Charts (SFC). Consistent with the ISA S88 flexible
batching standard, InBatch software offers comprehensive batch execution and equipment history,
material genealogy, stringent security, web-based reporting, and the ability to facilitate the design
and implementation of systems that are compliant with FDA 21 CFR Part 11 regulations.

Wonderware Training
Section 1 – Course Introduction 1-13

Wonderware SCADAlarm
Wonderware SCADAlarm alarm and event-notification software provides a telecommunications
link to industrial automation software systems. It seamlessly integrates with the comprehensive
Wonderware product family and has built-in browsers to enable fast configuration of information
from Wonderware System Platform and InTouch software.

Wonderware Toolkits
Wonderware Toolkits provide powerful extensibility to InTouch and System Platform applications
by enabling developers to extend the capabilities of Wonderware products to meet specific system
integration needs. The Toolkits promote adherence to industry standards, provide additional
customization and intellectual property protection, and enhance the ability to interface
Wonderware products with other software and hardware.
Wonderware offers the following Toolkits:

Toolkit Enables developers to:


ArchestrA Object Toolkit Extend the ArchestrA architecture with objects that provide specific application
or device integration functionality.
GRAccess Toolkit Create programmatic access to and interaction with System Platform Galaxy
configuration data.
MXAccess Toolkit Create programmatic access to runtime data in a System Platform Galaxy.
DAServer Toolkit Build custom device integration servers more easily.
Historian Toolkit Create high-value industrial applications that integrate with data sources from
System Platform and other data sources.
Alarm Toolkit Produce custom-distributed alarm providers and consumers.
Wizard Toolkit Produce their own Wizards for inclusion in InTouch.
Script Toolkit Develop custom InTouch scripts.

Wonderware Device Integration Servers


Connectivity to plant/facility devices is key to real-time information management. Wonderware
maximizes choices with the broadest possible communication options for industrial automation
and information devices. In collaboration with more than 100 third-party interface developers,
Wonderware provides the largest selection of connectivity options to hundreds of control systems,
such as PLCs, RTUs, DCSs, flow controllers, loop controllers, scales, gauges, bar code readers,
and other hardware devices. Wonderware has also fully embraced the openness of OPC
technology, exposing data via OPC from Wonderware products as an OPC Client, as well as
providing the means to connect to any third-party OPC Server.
Device integration can be maintained more easily using Device Integration Objects (DI Objects)
within System Platform for seamless connectivity to any data source. Wonderware also offers the
DAServer Toolkit, which empowers companies to create their own connectivity server.

Wonderware Enterprise Integrator


Wonderware Enterprise Integrator enables fast and reliable information exchange between MES
software, System Platform, and enterprise systems. Typical integration scenarios include
connecting business systems with MES, InBatch, or Intelligence and other shop floor applications.
The Enterprise Integrator modular design allows any application to be integrated, so that one
consistent approach to enterprise integration is adopted, eliminating isolated silos of information
and high-maintenance point-to-point integration scenarios.

Historian Client 2014 R2


1-14 Introduction

Wonderware IntelaTrac
Wonderware IntelaTrac is a mobile workforce and decision support system. IntelaTrac includes
configurable software and ruggedized mobile hardware solutions that enable workflow, data
collection, and general task management for plant operations, maintenance management,
production tracking, and compliance applications. IntelaTrac is capable of exploiting integrated
barcode and RFID reader technology found in many of today’s leading mobile devices. This
enables precise location verification of critical field tasks supporting regulatory compliance and
continuous improvement initiatives.
IntelaTrac is also a key component of a complete plant-intelligence solution that connects all wired
and stranded assets. This enables an even broader visibility into the performance of assets. The
IntelaTrac asset-centric approach makes tracking asset performance straightforward, which
supports Reliability Centered Maintenance initiatives.

Wonderware Industrial Computers


Wonderware Industrial Computers are computers designed for harsh environments, which come
preinstalled with the operating system, drivers, and Wonderware product software needed for fast
and easy implementation. These computers enable standardization on one common powerful
visualization interface for machine-level applications and supervisory HMI.

Wonderware Corporate Energy Management


Wonderware Corporate Energy Management software helps to manage energy usage by
transforming raw energy data from main meters and submeters. The energy data is transformed
into information on energy demand, consumption history, patterns, and costs for power, water,
chill, gas, air, and steam energy types.

Wonderware Remote Response Objects


Wonderware Remote Response Objects are fully functional ArchestrA Objects that can be easily
integrated with System Platform and customized to deliver alarm notification via e-mail or text
message to the cell phones of remote users. These users can view alarm information,
acknowledge alarms, and enter comments from a remote device. Remote Response Objects are
extremely beneficial to SCADA systems, where users are often in the field, away from the office or
plant.

Wonderware Well Field Application


Wonderware Well Field Application is built on System Platform and uses a Galaxy database to
provide a scalable solution for a small number of wells or a large distributed well field for on-shore
oil and gas well fields or upstream oil and gas operations. The Well Field Application is a real-time
operations management product that produces on-demand reports that show if wells are
underperforming or meeting production targets, and identify assets that need intervention.

Wonderware Recipe Manager Plus


Wonderware Recipe Manager Plus is a secure client/server web application, with a central data
repository for standardizing recipe management, that simplifies the process of taking new product
recipes to market. All user interface functionality is securely provided through web pages in a
browser on workstations, HMI Panels, or mobile devices. HMI and control-system independent,
Wonderware Recipe Manager Plus connects to all automation systems. This approach to recipe
management reduces the number of recipe systems and formats. The software’s flexible
integration and connectivity enables formula parameter download to any automation system. It

Wonderware Training
Section 1 – Course Introduction 1-15

also reduces the effort to manage product formulations and set up specifications on automated
production equipment and machines in manufacturing. Wonderware Recipe Manager Plus offers
role-based security, change management with item versioning and approval, and electronic history
records.

Wonderware SmartGlance
Wonderware SmartGlance enables the viewing of plant data on mobile smart phones and tablets.
Users can view, analyze, and collaborate around their facilities’ process or operational data,
metrics, KPIs, and reports at any time from any device. With SmartGlance, users can navigate
data from Wonderware Historian (or any other historian) and any SQL database.
The SmartGlance MyAlerts feature provides personalized alert notifications based on configurable
thresholds for Tag Reports. With the cloud-hosted solution, even if users temporarily lose a wi-fi or
cellular connection to the SmartGlance server, the SmartGlance application continues to work in
offline mode.

Wonderware Alarm Adviser


Wonderware Alarm Adviser is web-based tool that gathers and presents alarm and event data.
Alarm Adviser provides a simple means of identifying frequent, standing, fleeting, and
consequential alarms. Dashboards make it possible to benchmark and maintain alarm
performance in line with industry standards.

Wonderware Online
Wonderware Online offers a Tier 1 managed Historian and integrated information client, available
across devices and form factors (anytime, anywhere, and any device). Online includes a Tier 1
managed Historian, the Trend desktop client, and the SmartGlance mobile reporting application.
The Tier 1 Historian is a multi-tenet managed application with the new Historian Publisher Utility,
which auto-discovers InTouch historized tags and automatically publishes them to Wonderware
Online (Historian and Clients).

Historian Client 2014 R2


1-16 Introduction

Wonderware Training
Section 2 – Introduction to Wonderware Historian Client 1-17

Section 2 – Introduction to Wonderware Historian Client


This section introduces the Wonderware Historian Client applications, the main features,
hardware requirements, and licensing.

Introduction
Whether you are an Operator, Process Engineer, or Manager, Wonderware Historian Client tools
help you to organize, explore, analyze, present, and disseminate your process data in a wide
variety of formats. All of this can be done from your desktop.
Wonderware Historian Client tools integrate tightly with the most popular Microsoft Office tools.
Wonderware Historian Client tools are also integrated with Wonderware Historian Server as a full-
featured suite of client applications that maximize the value of the data displayed in Wonderware
Historian Client. With Wonderware Historian Client tools, you can:
 Explore your data graphically to find important information
 Analyze the data to produce relevant information
 Develop and execute the ad-hoc queries against any Historian Server data
 Visualize the current process state
 Disseminate information on an intranet
 Produce clear and rich automated reports

Analyzing Process Data


Process data is any type of information that is relevant to the execution of a process. The following
types of information are considered a part of process data:

 Real-time data: What is the current value of this tag?


 Historical data: What was the value of this tag every second last Monday?
 Summary data: What is the average of each of these five tags?
 Business data: How much does this particular material cost?
 Event data: When did that boiler trip? What was the internal pressure and
temperature when it tripped?
 Configuration data: How many DA Servers am I using and what are their types?

To improve performance and quality while reducing cost, we need to be able to analyze all of this
acquired information. Plant data is typically analyzed to determine:
 Process analysis, diagnostics, and optimization
 Materials management, such as raw materials usage
 Predictive and preventive maintenance of equipment
 Product and process quality (SPC/SQC)
 Health and safety, and environmental impact (FDA/EPA)
 Production reporting
 Failure analysis

Historian Client 2014 R2


1-18 Introduction

Desktop Applications
Wonderware Historian Client tools include the following standalone applications:
 Trend – Enables trending of historical and real-time data over time. Powerful features
allow data to be compared with other data from different periods. Alarms and limit
excursions are readily visible. It is also possible to add and view annotations in your trends
 Query – This point-and-click application enables complex queries to be built to return any
Historian Server data without any knowledge of the database structure or TSQL. Query
can be extended to view InTrack and InBatch data tables

Microsoft Office Add-ins


 Workbook – An add-in to Microsoft Excel that enables almost any type of analysis and
display of data from the Historian Server, using the Microsoft Excel spreadsheet format
 Report – An add-in to Microsoft Word that allows sophisticated reporting from
Wonderware Historian Server using the Microsoft Word document format

Other Controls
In addition to these applications, aaHistClientTrend and aaHistClientQuery are ActiveX controls
that provide the essential functionality of trend and query for use in container applications, such as
InTouch and Internet Explorer. Use of Wonderware Historian Client tools constituent controls, such
as the Tag Picker and Time Bar, in any application is possible with a server license.

Wonderware Training
Section 3 – Introduction to Wonderware Historian Server 1-19

Section 3 – Introduction to Wonderware Historian Server


This section introduces the main features of Wonderware Historian Server, network
considerations, hardware and software requirements, and licensing strategies.

Introduction
Wonderware Historian Server bridges the gap between the real-time high-volume plant monitoring
and control environment, and the open and flexible business information environment.
Wonderware Historian Server, which contains an embedded Microsoft SQL Server, acquires the
plant data through high-speed Wonderware DA Servers and I/O Servers, compresses and stores
the data, and then responds to the SQL requests for the plant data. Wonderware Historian Server
also contains event, summary, configuration, security, backup, and system monitoring information.

Wonderware Historian Server as a Real-Time Relational Database


As a real-time relational database, Wonderware Historian Server is an extension of Microsoft SQL
Server, providing more than an order of magnitude increase in the acquisition speeds, a
corresponding reduction in the storage volume, and elegant extensions to SQL for querying the
time series data.

Data Retrieval
Wonderware Historian Server appears to the client applications as a Microsoft SQL Server.
Wonderware Historian Server receives SQL queries, and then locates, processes, and returns the
data. Since Wonderware Historian Server is a relational database, queries can join data across
multiple tables to retrieve it efficiently. Some examples of database queries possible with
Wonderware Historian Server are:
 Average vibration of a motor each day over the last month when the load is greater than x
 Annotation for a Discrete tag that was archived to a backup drive 6 months ago
 The limit of an Analog tag in the context of a normal production mode. The limit of the
same Analog tag in the context of an accelerated production mode
 The values for 50 specified Analog tags at a time when the value of x was greater than 10
 Twenty evenly distributed data values from the total values stored for an Analog tag
between 8:00 a.m. and 8:30 a.m. on March 12, 2007
 All data values at 20-minute intervals from the total values stored for an Analog tag
between 8:00 a.m. and 8:30 a.m. on March 12, 2007
 All values of an Analog tag stored on January 8, 2007, where the value of the Analog tag
changed by 10 engineering units. The data for this Analog tag was stored if the value
changed by five engineering units
 All values for tags associated with a boiler event trip on January 8, 2007

Events
The event system allows you to define events and associate actions with the detection of those
events. Plant events range from startups and shutdowns, through trips and shift changes, to batch
events and Operator actions. Detecting and recording these events put continuous data into
meaningful context.

Historian Client 2014 R2


1-20 Introduction

Events are identified in the system by an Event tag. An Event tag is a name for an event definition
in the system. Wonderware Historian Server detects events by executing event detectors against
the historical data. Actions can then be taken based on the event detection.

For example, the detection of a boiler trip could result in the generation of a shift report; the
detection of a shift change could result in the updating of a production web page or the detection of
a plant failure could result in an e-mail to maintenance.
The event system is also capable of generating and storing the following data:
 Snapshot – Records the values of the selected Analog tags, the states of selected
Discrete tags, or the string values of selected String tags at the time of the occurrence of
the event. Quality is also recorded
 Summary – Performs one or more aggregations for one or more Analog tags

Data Retrieval Methods


The SQL language is not always appropriate for handling the time series data. Wonderware
Historian Server adds several extensions to the normal SQL language to make a meaningful query
possible for this type of information. The methods of data retrieval can be grouped by the following
functions:
 Time Interpolation
 Wide Table Transformations
 Storage Independent Retrieval Mode
 Resolution Control
 Edge Detection
 Time Zone

Time Interpolation
This extension allows data to be retrieved at any time even if there is no row at that point in time.

Wide Table Transformation


Wide Table Transformation is defined as the ability to provide the same historical data in two
different table formats for each basic data type: one in a narrow table format and the other in a
wide table format.
For example, we can view the tables WideHistory and History. These two formats are
appropriate for very different uses.

Wonderware Training
Section 3 – Introduction to Wonderware Historian Server 1-21

Data for three tags from the wide table typically looks like this:
DateTime SysTimeSec SysTimeMin SysTimeHour
------- ----- -----------------------------------------------------
2007-02-18 13:56:13.153 13.0 56.0 13.0
2007-02-18 13:56:49.517 49.0 56.0 13.0
2007-02-18 13:57:25.880 25.0 57.0 13.0
2007-02-18 13:58:02.243 24.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:
DateTime TagName Value Quality
------- ----------------------------------------------------- -------
2007-02-18 13:52:04.277 SysTimeSec 4.0 0
2007-02-18 13:52:04.277 SysTimeMin 52.0 0
2007-02-18 13:52:04.277 SysTimeHour 13.0 0
2007-02-18 13:52:40.640 SysTimeSec 40.0 0
2007-02-18 13:52:40.640 SysTimeMin 52.0 0
2007-02-18 13:52:40.640 SysTimeHour 13.0 0
2007-02-18 13:53:17.003 SysTimeSec 17.0 0
2007-02-18 13:53:17.003 SysTimeMin 53.0 0
2007-02-18 13:53:17.003 SysTimeHour 13.0 0
2007-02-18 13:53:53.367 SysTimeSec 53.0 0
2007-02-18 13:53:53.367 SysTimeMin 53.0 0
2007-02-18 13:53:53.367 SysTimeHour 13.0 0
2007-02-18 13:54:29.730 SysTimeSec 29.0 0
2007-02-18 13:54:29.730 SysTimeMin 54.0 0
2007-02-18 13:54:29.730 SysTimeHour 13.0 0

Storage Independent Retrieval Mode


This feature allows you to retrieve data using several methods, regardless of how the data was
stored, as shown below:

Cyclic Returns the cyclic time stamps based on the 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 date time.
Delta Returns the delta points. Values will be returned each time the value changes
within the time period specified by the start and end date time.
Full Returns all stored values, regardless of whether a value or quality has changed
since the last value. This retrieval mode is best described as delta retrieval,
without deadband checking.
Interpolated Returns one row for each tag in the query for each cycle. Linear interpolation
will be used to calculate the value to be returned for each cycle boundary. For a
trend, the interpolated retrieval mode will result in a smoother curve instead of
a stair-stepped curve. Interpolated retrieval mode is a true cyclic mode.
Interpolation is only applied to the Analog tags.
Integral Returns the cyclic slices equal to the integral or area of each slice. The area
value is scaled down based on the integral divisor in the engineering unit
table—(average value * number of seconds)/integral divisor.

Historian Client 2014 R2


1-22 Introduction

Average Returns a value that 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.
BestFit Returns a maximum of five rows (delta point) per cycle, where each cycle
contains distinct values for the first time stamp, last time stamp, min value, max
value, and first NULL encountered.
Minimum Returns one row (delta point) for each cycle. Identifies the minimum value
within each cycle except for the phantom cycle (first row). Will return the time
stamp of the value found (delta point).
Maximum Returns one row (delta point) for each cycle. Identifies the maximum value
within each cycle except for the phantom cycle (first row). Will return the time
stamp of the value found (delta point).
Counter Returns a total or accumulated value of the delta points within 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 a value that is one more than the maximum
value of the tag. Only works with Discrete and Analog unsigned integer tags.
Slope Returns (delta point) the +/- rate of change, which represents the magnitude
change per second. Results shown as +/-, when going positive or negative.
ValueState Returns the amount of time (in StateTime column) of each distinct value found
in each cycle as indicated by wwCycleCount or wwResolution.

Edge Detection
This extension enables detection of a value change using the edge conditions. For example, it can
be used to determine the time when a tag goes into (leading) or comes out of (trailing) an alarm.
The effects are:

 None: Returns all rows that successfully meet the criteria. No edge detection is
true implemented at the specified resolution
 Leading: Returns only those rows that are the first to successfully meet the
first true criteria (return true) after a row did not successfully meet the criteria
(returned false). This is also known as the “leading” edge detection
 Trailing: Returns only those rows that are the first to fail the criteria (return false)
no after a row had successfully met the criteria (returned true). This is also
longer known as the “trailing” edge detection
true
 Both: Returns all rows satisfying both the leading and trailing conditions
first true
or no
longer
true

Time Zone
For the Historian 8.0 and later, all history data is stored in Universal Time (UT). The Historian
Server 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.

Wonderware Training
Section 4 – System Requirements, Licensing, and Support 1-23

Section 4 – System Requirements, Licensing, and Support


This section explains the recommended system requirements and licensing information.

System Requirements and Compatibility


The hardware and software requirements of Wonderware Historian Client 2014 R2 are as follows:

Hardware Requirements
The hardware requirements for installing Wonderware Historian Client 2014 R2 are listed in the
following table:
Minimum Required Recommended
Hardware
Configuration Configuration
Processor 1.2-GHz Pentium III Single CPU - 2 GHz or more
Memory, RAM 512 MB 1 GB or more
Disk space (For Wonderware 55 MB 55 MB or more
Historian Client software)

Software Requirements
The Wonderware Historian Client is supported on the following operating systems:
 Windows Workstation
 Windows Server

Note: Wonderware Historian Client supports Windows 2008 Server, and Windows 7 operating
systems only when User Access Control is enabled and it is running as non-administrator.

Compatibility
Wonderware Historian Client 2014 R2 is compatible with the following Wonderware products:
 Wonderware InTouch HMI 10.5 and 10.6
 Wonderware Application Server 3.5 and 3.6
 Wonderware Historian Server 10.0 SP1 and 11.0
 Wonderware Information Server 4.5 and 5.0
 Wonderware Manufacturing Execution System 4.5
 Wonderware Manufacturing Execution Module 1.0
 Wonderware InBatch 9.6
 ArchestrA Workflow 1.9

Historian Client 2014 R2


1-24 Introduction

Other Software Requirements


Wonderware Historian Client 2014 R2 software requires the following software:
 Microsoft.NET Framework

Note: If this version of the Microsoft.NET Framework is not installed on your computer,
Wonderware Historian Client automatically installs the 3.5 version with SP1.

 Microsoft Office

Note: Microsoft Office is an optional prerequisite. If you intend to use Report or Workbook, it
is best to install Microsoft Office prior to installing Wonderware Historian Client. If you install
Microsoft Office after installing Wonderware Historian Client, the Wonderware Historian Client
add-ins do not appear in the list of available add-ins in Microsoft Office applications. In this
case, you need to run the Wonderware Historian Client installation program again and repair
the installation to get the add-ins loaded.

Note: When you install Microsoft Office as a custom install and select only the Microsoft
Office and Excel features, you also must select Office Shared Features and Office Tools so
that the Wonderware Historian Server add-ins for Wonderware Historian Client Workbook or
Wonderware Historian Client Report can be loaded.

Installation Notes
Uninstall any Historian Client software prior to installing Wonderware Historian Client 2014 R2.

Note: Before installing Wonderware Historian Client, disable any virus scan applications running
on the machine. This helps ensure that all Wonderware Historian Client components and services
install correctly.

Wonderware Historian Client is installed by running Setup.exe from the root of the disc or by
inserting the disc and letting the 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 installation to complete.
If you are installing on Terminal Services, remember to start the setup using the Add/Remove
Programs control panel applet. Now, you are ready to begin using Wonderware Historian Client
applications. On the Start menu, click Wonderware | Historian Client.
The default installation location should reflect the standard Wonderware software
location:...\Program Files\Wonderware\Historian Client.
Running any Wonderware Historian 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 for each
server.
The Server Setup installs essential server-side components, as well as a promotional (45 day)
license if there is no license already installed.

Wonderware Training
Section 4 – System Requirements, Licensing, and Support 1-25

Licenses
Wonderware Historian Client 2014 Historian 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 licensed server. Unserved license files
usually have the file names as wwsuite.lic or ArchestrA.lic.
Served licenses are only installed on those computers that have an installed ArchestrA licensed
server. Licensed servers can reside on the local or remote computers. Served licenses files
usually have the file name ArchestrAserver.lic.
There are three types of served licenses:
 Named device licenses, also known as host-based licenses, are associated with specific
computers
 Named user licenses, also known as user-based licenses, are associated with specific
users
 Concurrent licenses 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 Wonderware Historian Client 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 if the stated version is licensed for use. If more
than one license is found, the applications get the licenses in the following order:
 Unserved licenses
 Named device licenses
 Named user licenses
 Concurrent licenses
If Wonderware Historian Client is not supported by a license or if the required license is not found,
the software component has either demonstration mode or absent license mode as the default.

License Files
The license server can be accessed by the client applications for license information. When the
license server starts, it loads the served license files. Client computers that run the licensed
applications can access the served licenses on the license server using the license server search
paths entered in the ArchestrA License Manager.
License servers have the advantage of establishing a single location for maintaining the
Wonderware licenses rather than installing multiple local licenses across your network.
You can switch from one license type to another by installing a different type of license; you do not
have to install a different version of the application.

Named Device and Named User Licenses


Device and user information for both types of licenses is stored in the Wonderware.opt license
server options file. For detailed information on this file, from the Start menu, click 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.

Historian Client 2014 R2


1-26 Introduction

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 host 1 and starts a remote desktop session to computer
host 2, a licensed application started in the remote session is shown being run by host 1 rather
than by 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.

Named Device or Named User License Setup


When you add a named device or named user license, the Configure Named User/Device
Licenses dialog box appears.
1. Click Copy to Clipboard to copy the template for the commands to the Windows Clipboard.
2. Click Edit Options file. The Wonderware.opt file appears in the Windows Notepad.
3. Paste the command template in the Wonderware.opt file and modify the INCLUDE
statements for each of the named device or named user license component. Device names
and user names must all be in lowercase. Do not precede user names with domains.

Note: To use a named device license in a TSE session, the name of the Terminal Server
client must be specified in the Options file.

4. Save the Wonderware.opt file and exit Windows Notepad.


5. Click Close.
6. Restart the license server to propagate the information in the license.

License Servers
ArchestrA License Manager lets you perform a variety of basic license server management tasks
from a menu in the browser. For more advanced tasks, you need to use Macrovision LMTOOLS,
which is only installed on the license server computer.
License Server Management Tasks
1. In the browser, expand License Files.
2. Right-click Server.
3. Select one of the following tasks from the right-click menu:
 Start License Server – Starts the license server; if this menu item is disabled, the license
server is already running
 Stop License Server – Stops the license server; if this menu item is disabled, the license
server has already stopped
 Test License Server – Tests availability of the license server and displays the license
features available on that server

Wonderware Training
Module 2 – Wonderware Historian Client
Trend
Section 1 – Introduction to Wonderware Historian Client Trend 2-3
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-31
Section 2 – Public and Private Groups 2-59
Lab 2 – Configuring Public Groups and Trend Sets 2-61
Section 3 – Time Offset and Target Regions 2-73
Lab 3 – Configuring Time Offsets and Target Regions 2-77
Section 4 – Retrieval Styles and Data Transformations in Trend 2-89
Lab 4 – Using Retrieval Styles and Data Transformations 2-97
Lab 5 – Creating Retrieval Styles 2-125
2-2 Wonderware Historian Client Trend

Module Objectives
 Describe the features of Wonderware Historian Client Trend
 Use Wonderware Historian Client Trend to create and configure trends and public and
private groups
 Discuss trend sets and configure time offset, target region, retrieval styles, and custom
retrieval styles

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-3

Section 1 – Introduction to Wonderware Historian Client Trend


This section describes the features of Wonderware Historian Client Trend and how to create and
configure trends using Wonderware Historian Client Trend.

Wonderware Historian Client Trend is an application that provides a graphic view of the historical
data for selected tags. It also allows you to view multiple Historians and multiple versions of the
Historian Server at the same time.
Once tags have been added to a trend chart, the tag data can be manipulated in a variety of ways,
including panning, zooming, and scaling. Wonderware Historian Client 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 charts and their associated data information can be printed, so that they may be
analyzed away from the client machine.
Trend is the most frequently used Wonderware Historian Client application.
Before using Wonderware Historian Client to query tag information from the database, the server
must be running and you must have security access.

Historian Client 2014 R2


2-4 Wonderware Historian Client Trend

Wonderware Historian Client Trend Interface


Scaling Main Time
Toolbar Toolbar Toolbar
Tag Picker

Tag List Trend Chart

Trend Operation
To determine the number of data points retrieved from the Wonderware Historian Server,
Wonderware Historian Client Trend first computes the number of data points to request for data
retrieval. This is done by determining the number of pixels for which data is needed.
When adding a trend item to a chart, this number corresponds to the entire width of the plotting
area.
When the trend already has data plotted, the number of pixels from the farthest right edge to the
farthest left edge of the plot area is computed. The number of pixels represents the number of
rows of data to be retrieved.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-5

The data received the last time for a trend is noted, so that data requests in the future do not
request more data than needed. One data point per pixel (maximum) is enforced to conserve
network bandwidth. If the minimum and maximum values encountered during a given time period
are needed, you run a delta retrieval rather than referring to the minimum and maximum values in
the trend statistics.

Start Wonderware Historian Client Trend


1. Open Wonderware Historian Client Trend.
The Trend window appears.

Note: Running any Wonderware Historian Client applications for the first time will start the
Server List Configuration utility to connect to a server. The wizard needs to run only once for
each server.

Historian Client 2014 R2


2-6 Wonderware Historian Client Trend

Connect to the Server


2. On the Tools menu, click Servers.

The Server List Configuration dialog box appears.

The Server List Configuration dialog box enables you to configure connection properties to
multiple Historians.
The following information is used to configure a connection to Historian Server:
 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

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-7

Note: Application startup delays may occur if a connection to a stopped or disabled Historian
Server is configured and active.

3. Configure the Server List Configuration dialog box with the information provided by your
instructor.

When connecting to the Historian Server for the first time, you may see the following message:

4. Click OK to return to the Server List Configuration dialog box.

Historian Client 2014 R2


2-8 Wonderware Historian Client Trend

5. Click Add.
The name of the Historian Server appears in the Server list pane.

Wonderware Historian Client Trend is now connected to the designated Historian Server.
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 to allow
disconnecting from that server.
You might need to change the login information in the Server List Configuration dialog box. For
example, you might need to log in with a different login ID and password. To change the login
information, highlight the server name in the Server list pane, make the change(s), and then click
Update and LogOn. You can click Remove to eliminate the server from the Server list pane, if
required.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-9

Tag Picker
The Tag Picker control is common to all Wonderware Historian Client applications.

The Tag Picker control helps a user searching for tag names for use in a particular application,
such as Trend, Query, Workbook, or Report.
The functionality of Tag Picker duplicates the Windows File Explorer by displaying a hierarchical
tree view of the Historian group.
Depending upon the application and user preferences, Tag Picker may consist of a Servers pane,
Tags pane, and Filter pane.

Historian Client 2014 R2


2-10 Wonderware Historian Client Trend

Servers Pane
The primary area within the Tag Picker control is called the Servers pane. This pane lists all the
Historian Servers that are currently connected. Each folder contains the subfolders associated
with the individual Historian group.

Tag Folders
The tag folders submenu allows you to create new groups and show/hide elements of the Tag
Picker control. New groups in the Public Groups area only can be created by wwadmin
permissions and above.
1. Right-click a tag folder to display its submenu.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-11

Tags Pane
The Tags pane lists all the tags from the selected folder in the tree folder structure along with any
filter conditions specified in the Filter pane. Tag Name, Description, and I/O 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 chart or Tag list
panes. Tags also may be dragged to other tag group folders.

Historian Client 2014 R2


2-12 Wonderware Historian Client Trend

Filter Pane
The Filter pane filters tags using the criteria listed in the pane. To display the Filter pane, right-
click anywhere on the Tag Picker control, and then select the Filter 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 tag name, description, or address.
There is an important interaction between these panes. When the Servers and Filter panes 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 tag name 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 – Check the Exact match check box to limit tags returned to the exact
character positions for which you searched. For example, searching for Rea will return all
tags that contain the letters Rea, no matter where within the tag name the letters appear. A
search of Rea% with the Exact match check box selected will return only tags beginning
with Rea
 Apply – Click Apply to execute the query. Tags matching the query parameters are listed
in the Tags pane
 Clear – Click Clear to clear the filter criteria chosen. The filter conditions will be removed

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-13

Wildcard Characters (Apply Only When Exact Match Is Selected)


% Any string of zero or more characters
_ Any single character
[] Any single character within the specified range

Examples
 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)
 [^sys]%, Searches for all tags excluding those starting with sys

Create a Trend
Create a trend by dragging and dropping tags directly onto the trend chart pane.
The Main toolbar becomes active. The information on the following pages describes the available
configuration options.

Time Toolbar
The Time toolbar allows you to select a time range by specifying a start time, end time, and
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.

Specify a Time Period


1. In the Duration drop-down list, select a predefined duration.
2. In the Start Date | Time field, click the drop-down arrow to display the calendar.
3. Select a date to begin the trend range.
4. In the End Date | Time field, select a date to end the trend range.
5. Press Enter.
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 the changed and updated options is as follows:
You change... The Time toolbar updates...
Start time End time (based on duration)
End time Start time (based on duration)
Duration Start time (based on end time)

Historian Client 2014 R2


2-14 Wonderware Historian Client Trend

If you change multiple options in a row, the option that 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.
Specify a Time Period Relative to the Current Time
6. Do one of the following:
 On the Chart menu, click Update to Current Time
 In the Time toolbar, click Update to Current Time
7. In the Time toolbar Duration drop-down list, select a predefined 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 toolbar allows you to specify the time range of data that will be displayed on the trend
chart. Select the duration from the drop-down list or enter the start time. The end time will
automatically update based on the start time selected in the Duration drop-down list. Updating the
Duration drop-down list will update the start time based, and updating the end time will
automatically update the start time based on the Duration drop-down list.

Tag List
Use the Tag list to view information for the tags that have been added to the trend chart.

Tag Configuration
1. Right-click a tag name and select Configure.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-15

2. Set individual Pen configuration properties and Time offset.

Live Mode
Click Enable or disable live or replay mode to view the tags in live mode. Live data is the data
that is being retrieved continuously in real time.

Historian Client 2014 R2


2-16 Wonderware Historian Client Trend

Add an Annotation
An annotation can be added to the trend display of any tag and is associated with the selected
value of the tag.
1. Right-click near a tag on the trend, and click Add Annotation.
The Add Annotation dialog box appears.
2. In the Text field, enter an annotation.

An annotation can be Private, visible only to you, or Public, visible to all Wonderware
Historian Client users.
3. Click OK.
4. The annotation appears on the trend chart as a blue dot.
5. Roll the cursor over the blue dot to view the annotation text.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-17

6. On the View menu, click Annotation List.


The Annotations dialog box appears. It displays the annotation that has been added.

The annotations can be saved, deleted, and printed. The time, text, and visibility can also be
edited. To do this, on the Annotations menu, click Edit.
Annotations do not appear in the Annotation List unless they are included within the trend
chart’s current time span.

Annotations on Tablet PCs


Wonderware Historian Client Trend has additional features for Pen Annotations when installed on
a Tablet PC. These features are similar to those offered by InTouch, and are only available on
Tablet PCs. Two types are available: Annotate Chart and Annotate Application.
Annotate Chart

Historian Client 2014 R2


2-18 Wonderware Historian Client Trend

Zoom-in and Zoom-out


The Zoom in or Zoom Out buttons on the Scaling toolbar are used to zoom in or out the trend
chart.

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 buttons
on the Scaling toolbar.
Scale a Single Tag
1. Select the tag to scale.
2. On the Scaling toolbar, click the required scale tag button.
The scale tag buttons for individual tags are (in order):

 Move the current tag up


 Move the current tag down
 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
1. Select the scale type that you want to apply to the tag.
The scale tag buttons for all tags are (in order):

 Move all tags up


 Move all tags down
 Scale all tags to their original scale
 Auto scale all tags
 Scale all tags up
 Scale all tags down
2. Select the tag to be scaled in the tag list.
3. Select the scale type that you want to apply to the tag.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-19

Automatic Scaling
When automatic scaling is applied on a selected tag or all tags in a trend chart, 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. Automatic
scaling is done by clicking the Auto scale all tags button.

Rubber Band Scaling


Rubber band scaling enables selection of an area of the trend chart using the mouse cursor and
automatically sets the scaling based on the area that you have selected.
The rubber band scaling buttons are (in 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.

Show Hierarchical Name


Wonderware Historian Client Trend shows the hierarchical name in the Tags list pane, Data Log
window, and trend chart area. A hierarchical name represents the fully qualified name of a
contained object within ArchestrA applications.

View Hierarchical Name


To view the hierarchical name in a trend, do one of the following:
 On the View menu, click Use Hierarchical Name
 On the Main toolbar, click Use hierarchical name

 Inside Tag Picker, right-click the empty space and select Use hierarchical name

Historian Client 2014 R2


2-20 Wonderware Historian Client Trend

Axis Cursors
Each trend chart has two value cursors and two time cursors. These cursors pinpoint tag values in
the chart. The values shown for the axis cursors are updated continuously as the cursors are
moved or as the trend curve moves in live mode.

Time Axis
The Time axis cursors appear by default as red and blue vertical lines that you can drag to the left
and right. The cursor values will display at the top left corner of the trend chart.
Tag cursor values can be changed by moving the red line on the left or the blue line on the right.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-21

Value Axis
The Value axis cursors appear as horizontal green lines that you can drag up and down. The
cursor values (1 and 2) will display at the top right corner of the trend chart.

Historian Client 2014 R2


2-22 Wonderware Historian Client Trend

Trend Options
Right-click inside the trend chart and select Options to configure the trend chart.

Several options can be configured for a trend through various tabs, which are as follows:
 Retrieval
 Color
 Time Zone
 Miscellaneous
 Other

Retrieval Tab
The Retrieval tab sets the retrieval options for the trend.
 Retrieval style: Automatically switches the retrieval modes for trend tags based on the
trend duration and tag type
 Main options tab within the Retrieval tab:

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-23

 Query row limit – Sets the number of rows to retrieve in the query results
 Cyclic attributes – Sets the Interpolation type to Stairstep, Linear, or to the default
Tag setting
 Delta retrieval deadbands – Sets the Time and Value % for Delta retrieval
deadbands
Other Tab (Within the Retrieval Tab)
The Other tab within the Retrieval tab consists of the following options:
 History Version – Wonderware Historian Server supports versioning of the data in its
extension tables. It supports two versions for each data point: Latest value and Original
value. The Latest value is the most recent update made to that data point. The Original
value is the first value entered for a given data point, which is typically the value acquired
from an I/O Server
 Rules – This sets the time stamp and quality rules for retrieval
 State retrieval – This sets the state parameter for retrieval
 Transformation – This sets the transformations to be applied to the result of a query. You
can apply the following transformation options:
 No Transformation – If no filter criteria is set for a query
 Remove outliers – To remove outliers from a set of analog points
 Convert analog values to discrete – To convert the result of a value stream from
analog to digital
 Snap to base value – To force values in a well-defined range to snap to a base value

Note: These settings do not apply when a trend chart is configured to be in the live mode. In
the live mode, a trend chart always uses Delta retrieval.

Historian Client 2014 R2


2-24 Wonderware Historian Client Trend

Colors Tab
The Colors tab allows you to select default tag trace colors and also to enable or disable usage of
colors.

Time Zones Tab


You can configure Wonderware Historian Client Trend so that data appears with time stamps that
reflect any time zone. For example, you may want to configure Wonderware Historian Client Trend
so that it reflects the same time as the server.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-25

Miscellaneous Tab
 Always on top – Always displays Trend in front of all the 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 a numerical format (0 or 1)
 Display associated messages – Displays the messages associated with the values of
the Discrete tags in the discrete data log. For example: ON or OFF
 Decimal Places – Indicates how many decimal places should be displayed
 Format – Displays the format of the tag values (decimal/scientific)
 Open documents on start up – Displays the Trend files that were previously opened
when you start Trend. Clear the check box to disable this behavior

Historian Client 2014 R2


2-26 Wonderware Historian Client Trend

Other Tab
In the Other tab Source area, you can specify the Historian Server tables from where 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 Server data files.
These tables support the Historian Server 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 the data
that is retrieved from an Historian Server with a version earlier than 9.0
 Use Delta retrieval for less than specified intervals – Enables retrieval of only that data
which has changed (Delta retrieval mode). By checking this box, Trend will retrieve Analog
and Discrete tags in Delta retrieval mode for periods less than those entered. For longer
periods, Cyclic retrieval is used
 Interval for Analogs – The time period, in minutes, for which delta values are retrieved
for Analog tags. For longer time periods, Cyclic retrieval is used. Valid values are from 0 to
10,000, while the default is 15
 Interval for Discretes – The time period, in minutes, for which delta values are retrieved
for Analog tags. For longer time periods, Cyclic retrieval is used. Valid values are from 0 to
10,000, while the default is 15
 Maximum values to retrieve per tag – Limits the number of tags retrieved in the Delta
retrieval mode for a given period. It indicates the maximum number of values to return per
tag. Valid values are from 0 to 30,000, while the default value is 10,000

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-27

Trend Properties
The trend properties allow you to configure the trend file. Trend file properties are saved with the
trend file. Several trend properties that can be configured are as follows:
 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
1. On the Chart menu, click Properties.
The Trend Properties dialog box appears.

Historian Client 2014 R2


2-28 Wonderware Historian Client Trend

View Data from the Data Log


You can view data in a wide or narrow table. 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.

Data Log in Narrow Format


The narrow data log shows data in the following format: Time, TagName, Server, Value, and
Quality. There is one row for each value returned by each tag. Each row shows the timestamp and
value for one tag.
1. On the Main toolbar, click View the data log in narrow format.

The Data log (narrow format) dialog box appears.

Data Log in Wide Format


The wide data 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.
1. On the Main toolbar, click View the data log in wide format.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Trend 2-29

The Data log (wide format) window appears.

Historian Client 2014 R2


2-30 Wonderware Historian Client Trend

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-31

Lab 1 – Using Wonderware Historian Client


Trend Basic Functions
Introduction
Trend is a Wonderware Historian Client application that allows tag querying, plotting, and graphic
display from one or more Historians. This lab focuses on using the interface of Wonderware
Historian Client Trend.

Objective
Upon completion of this lab, you will be able to:
 Create and configure trends using Wonderware Historian Client Trend

Historian Client 2014 R2


2-32 Wonderware Historian Client Trend

Connect to the Historian Server


The Wonderware Historian Client maintains an active connection with the Wonderware Historian
Server. When the Historian Client Trend is opened it automatically uses this connection, if
possible.
1. Open Wonderware Historian Client Trend.
If there is no connection to an Historian Server, the Server List Configuration dialog box
appears. If you have an active connection, you will not see the Server List Configuration
dialog box, but will see the Wonderware Historian Client Trend window shown on page 2-34
instead.

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-33

2. In the Server field, enter the name of the Historian Server assigned to you.
3. Click the SQL Login option, enter the Login name and password provided by your instructor,
and check the Remember password checkbox.

4. Click Add.
The server appears in the Server list pane. If needed, you can add additional servers.

5. Click Close.

Historian Client 2014 R2


2-34 Wonderware Historian Client Trend

You are now connected to the Historian Server and the Wonderware Historian Client Trend
window appears.

Create a New Trend


You will now create a new Trend to view historical data.
6. In the Tag Picker, Servers pane, click the Historian Server.

The tags appear within the Tags pane.

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-35

7. In the Tags pane, select the ProdLevel, ReactLevel, and ReactTemp tags.

Note: Hold down the Ctrl key to select multiple tags.

8. Drag the selected tags to the Tag list.

The selected tags appear on the trend and the selected tag names appear in the Tag list under
the trend chart.

Historian Client 2014 R2


2-36 Wonderware Historian Client Trend

9. On the Scaling toolbar, click Auto scale all tags to rescale the trend chart.

Notice several important aspects of Wonderware Historian Client Trend functionality:


 The top of the ReactTemp trace appears in red above its alarm setpoint
 The minimum and maximum scaled range for each tag is displayed on the left side of the
trend chart

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-37

Manipulate a Trend
Now you will manipulate the Trend by changing the Duration, Start Time and End Time of the
data displayed in your Trend.

Change the Time Range


10. On the Time toolbar, in the Duration drop-down list, click 10 minutes.

The trend chart changes to display the time span selected.

Note: A blue halo displays around the Start Date field indicating the field is automatically
updated based on the time span selection.

Assign Exact Start and End Times


11. On the Time toolbar, in the Start Date field, click the drop-down arrow to display the calendar.
12. Select a date to begin the trend range.

13. Press Enter.

Historian Client 2014 R2


2-38 Wonderware Historian Client Trend

14. In the End Date field, select a date.


Notice that because you selected specific start and end times, the current time mode is now

disabled .

15. Press Enter.


16. In the Duration drop-down list, set the chart duration back to 10 minutes.

17. Click Enable or disable current time mode to bring the chart back to the current time.

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-39

View Single Tags


In this task, you will isolate a single tag for better analysis.

18. On the Main toolbar, click Enable or disable single tag mode .

19. In the Tag List at the bottom of the trend, click a tag name to view its values.
The trend chart displays the value of the selected tag.

20. Click Enable or disable single tag mode again to disable the single tag mode.

Historian Client 2014 R2


2-40 Wonderware Historian Client Trend

Stack the Traces


Now you will stack the tag traces for better analysis.

21. On the Scaling toolbar, click Auto scale all tags .

22. On the Main toolbar, click Stack the tag traces .

All traces appear as separate rows.

23. Click Stack the tag traces again to restore the trend traces.

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-41

24. On the File menu, click Save.

The Save As dialog box appears.


25. Navigate to the C:\Training folder, and then save the trend as Reactor Variables.aaTrend.

Historian Client 2014 R2


2-42 Wonderware Historian Client Trend

Change the Pen Style


In this section, you will configure the pen style for a tag.
26. In the Tag List, right-click the ReactLevel tag and click Configure.

The ReactLevel configuration dialog box appears.


The General tab is selected by default.

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-43

27. In the Width drop-down list, click 3.

28. In the Type drop-down list, click Point.

29. Click OK.

Historian Client 2014 R2


2-44 Wonderware Historian Client Trend

The ReactLevel tag is shown in the trend chart reflecting the Point value selected in the Type
field.

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-45

View Data from the Data Log


Now you will view the trend data using a wide data format.

30. On the Main toolbar, click View the data log in wide format .

A table (in wide format) showing all data points for the tags currently used in the trend chart
appears.

31. On the File menu, click Save As.

The Save As dialog box appears.

Historian Client 2014 R2


2-46 Wonderware Historian Client Trend

32. Save the file as Reactor Report.CSV in the C:\Training folder.

33. Close the Data log (wide format) window.

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-47

View Trend Statistics


In this task, you will access statistics for all tags in your trend.

34. On the Main toolbar, click View the trend statistics .

The trend statistics appears. The statistics can be saved and printed.

Note: Use the scroll bar at the bottom of the Statistics dialog box to view all of the columns.

35. On the File menu, click Save As.

The Save As dialog box appears.

Historian Client 2014 R2


2-48 Wonderware Historian Client Trend

36. Save the file as Reactor Statistics.CSV in the C:\Training folder.

37. Close the Statistics dialog box.

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-49

Add an Annotation
In this section, you will add annotations to your tags to help capture and historize comments
regarding the tag’s data at specific points of time.
38. Right-click at the peak of the temperature spike and click Add Annotation.

Note: The annotation will be automatically associated with the tag and value that was
closest when you right-clicked.

Historian Client 2014 R2


2-50 Wonderware Historian Client Trend

39. In the Text field, type Overlimit Here-XX, where XX is the student number provided by your
instructor.

40. Click OK.


The annotation appears on the trend chart as a blue dot.
41. Move the mouse pointer over the blue dot to view the annotation text.

42. Repeat the previous steps to add annotations to the ReactLevel and ProdLevel tags.

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-51

43. On the View menu, click Annotation List.

The Annotations dialog box appears. It displays a detailed list of all annotations that have
been added.

44. Close the Annotations dialog box.

Historian Client 2014 R2


2-52 Wonderware Historian Client Trend

Scale a Tag
Now you will change the scale of a tag in the trend.
45. In the Tag List, select the ReactLevel tag.

46. On the Scaling toolbar, click Scale the current tag to its original scale .

Rubber Band Scaling

47. On the Scaling toolbar, click Enable rubber band scaling .

The cursor changes to a “+” sign when hovering over the trend.
48. While holding down the left mouse button, drag it across a trend field to create a rectangular
area, and then release the mouse button.

The trend chart shows the new scaling values.

Note: Zooming in on data using the Rubber band scaling button can be done as many
times as is practical to view granular data.

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-53

49. On the Main toolbar, click Undo to return to the original scaling.

View Live/Replay Mode

50. On the Scaling toolbar, click Enable or disable live or replay mode .

The trend is now updating at a predefined rate of update.

Historian Client 2014 R2


2-54 Wonderware Historian Client Trend

Change the Update Interval


51. On the Chart menu, click Properties.

The Trend Properties dialog box appears.

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-55

52. On the General tab, Live Mode area, change the Refresh interval to 5.000 seconds.

53. Click OK.

Note: The chart will refresh at the specified interval.

54. On the Scaling toolbar, click Enable or disable live or replay mode to return to the
History mode.

Historian Client 2014 R2


2-56 Wonderware Historian Client Trend

Create an XY Scatter Plot Graph


55. On the File menu, click New.
56. On the Chart menu, click Chart Type, and then click XY Scatter Plot.

57. In the Tags pane, select the ReactLevel and ReactTemp tags.
58. Drag the selected ReactLevel and ReactTemp tags to the Tag List.

59. In the Tag List, right-click ReactLevel, and then click Configure.

Wonderware Training
Lab 1 – Using Wonderware Historian Client Trend Basic Functions 2-57

60. In the X axis tag drop-down list, click ReactTemp.

61. Click OK.

62. On the Scaling toolbar, click Auto scale all tags .


The XY Scatter Plot trend should look similar to the following:

Historian Client 2014 R2


2-58 Wonderware Historian Client Trend

63. On the Scaling toolbar, click Enable or disable live or replay mode .
The XY Scatter Plot trend should look similar to what is shown below. You should see two
data points moving to reflect the live update rate.

64. On the File menu, click Save As.


The Save As dialog box appears.
65. Save the trend as XYScatterplot.aaTrend in the C:\Training folder.

66. Close all opened trend files, saving each one as appropriate, if prompted.

Wonderware Training
Section 2 – Public and Private Groups 2-59

Section 2 – Public and Private Groups


This section describes the function of the Public and Private Groups folders that are used in
Wonderware Historian Trend Client to store and share tags.

The Servers pane shows the configured Historian Server. This configured Historian Server folder
contains all objects that make up the basic Historian system, such as tags, I/O servers, defined
engineering units, storage locations, and so on. Historian Server has two main folders: Public
Groups and Private Groups.

Public Groups
This folder contains all objects that are visible from any workstation to all users of the Wonderware
Historian Client. Many installations do not modify the Historian Server default users and groups.

Private Groups
This folder contains all objects that are visible to the user currently logged on. Users can create,
rename, and delete groups in the Private Groups folder.
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 wwUser 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.

Historian Client 2014 R2


2-60 Wonderware Historian Client Trend

Trend Sets
A trend set is a group of trend files that are saved together. Trend sets are used only for printing
trend data. Using trend sets, you can print trend data for the same duration for multiple trend files
at a time. For example, you can print trend data of last 48 hours for all the trend files in a trend set
at the same time.

Create Trend Sets


To create a trend set:
1. On the File menu, select New Trend Set.
The Trend set configuration dialog box appears.
2. On the File menu, select Add to add the trend files to the trend set.

3. On the File menu, select Save As to save the trend set.


The standard Windows Save As dialog box appears. Specify a name for the trend set while
saving it.

Wonderware Training
Lab 2 – Configuring Public Groups and Trend Sets 2-61

Lab 2 – Configuring Public Groups and Trend


Sets
Introduction
Tags can be organized into logical groups allowing you to quickly identify those tags relevant to
your job. This lab will demonstrate the usage of tag groups and trend sets.

Objectives
Upon completion of this lab, you will be able to:
 Create Public Tag Groups
 Create a Trend Set

Historian Client 2014 R2


2-62 Wonderware Historian Client Trend

Create Public Groups Tags


Public Groups can only be created by individuals with specific security permissions. You will now
change your login to Integrated Security, which was discussed in the last Lab. That user has the
correct permissions.
1. On the Tools menu, select Servers.
2. In the Login area, select Windows Integrated.
3. Click Update.
4. Click Close.
5. In the Servers pane, expand Historian Server tree, right-click the Public Groups folder, and
then click New Group.

6. Name the new group Reactor-XX, where XX is the student number assigned to you.

Wonderware Training
Lab 2 – Configuring Public Groups and Trend Sets 2-63

7. Right-click the Historian Server name and then click Filter pane.

The Filter pane appears at the bottom of the Tag Picker.


8. In the Tag Name field, enter React.
9. Click Apply.
Tag names containing “React” are displayed in the Tags pane.

Historian Client 2014 R2


2-64 Wonderware Historian Client Trend

10. Select and drag the tags ReactLevel and ReactTemp into the Reactor-XX group.

11. In the Filter pane, search for the ProdLevel tag.


12. Select and drag the ProdLevel tag into the Reactor-XX group.
13. In the Filter pane, click Clear.

Wonderware Training
Lab 2 – Configuring Public Groups and Trend Sets 2-65

14. Click the Reactor-XX group to see the tags that are in the new group.
The selected tags display in the new group.

15. Create a new trend, and drag the Reactor-XX group on the trend chart.

Historian Client 2014 R2


2-66 Wonderware Historian Client Trend

16. Save the trend as Reactor-XX.aaTrend in the C:\Training folder.

17. Using the following table, create additional public groups and their respective trends, and then
save the trend files in the C:\Training folder.

Note: When adding tags to your new groups, ensure that you select your Historian Server
name rather than a Public Group folder name in the Servers pane, otherwise all required tags
will not display.

Public Group Name Tag Name Save as Trend File


QA-XX Counter QA-XX.aaTrend
ReactTemp
Step1
SysTimeSec
Line1-XX BatchNumber Line1-XX.aaTrend
ReactTemp
SysTimeSec
IS-XX SysDataAcqOverallItemsPerSec IS-XX.aaTrend
SysPerfCPUTotal
SysStatusRxItemsPerSec
SysTimeMin
System Platform-XX Reactor_001.ReactLevel SystemPlatform-XX.aaTrend
Reactor_001.ReactTemp
StorageTank_001.OutletValve
StorageTank_001.ProdLevel
SteamValve

Wonderware Training
Lab 2 – Configuring Public Groups and Trend Sets 2-67

18. On the Window menu, click IS-XX.aaTrend.

19. In the Duration drop-down list, click 2 hours.

20. On the Main toolbar, click Stack the tag traces to create a better view of the event and string
tags.

Historian Client 2014 R2


2-68 Wonderware Historian Client Trend

Notice the string and event tag symbols.

21. On the File menu, click Save.

Wonderware Training
Lab 2 – Configuring Public Groups and Trend Sets 2-69

Create a Trend Set


The Trend Set function of Wonderware Historian Client Trend is a batch printing utility. Several
trends can be grouped together and then printed using a common duration.
22. On the File menu, click New Trend Set.

The Trend set configuration dialog box appears.


23. On the File menu, click Add.

The Open dialog box appears.

Historian Client 2014 R2


2-70 Wonderware Historian Client Trend

24. Browse to the C:\Training folder and select the following trends by holding down the Ctrl key:
 IS-XX
 Line1-XX
 QA-XX
 Reactor-XX
 System Platform-XX

25. Click Open.


The files appear in the Trend set configuration dialog box.

Wonderware Training
Lab 2 – Configuring Public Groups and Trend Sets 2-71

26. In the Duration drop-down list, click Last 5 minutes.

27. On the File menu, click Save.

The Save As dialog box appears.

Historian Client 2014 R2


2-72 Wonderware Historian Client Trend

28. Save the trend as FiveTrends.aaTrendSet in the C:\Training folder.

The Trend Set is now configured to show the last five minutes of data when printed.
29. If you have printer capabilities, follow your instructor’s instructions for printing the Trend Set.
30. Click X to close the Trend set configuration dialog box.
31. Close all open trend files, saving each one as appropriate, if prompted.

Wonderware Training
Section 3 – Time Offset and Target Regions 2-73

Section 3 – Time Offset and Target Regions


This section describes how to configure time offset and target region in a trend for tag
configuration.

Time Offset
You can configure trend options for one or more tags in the Tag list pane. Trend options enable
you to define display options, time offset, and target region for one or more tags that are added to
the trend chart.
Time offset is the amount of time in which the trend curve of the currently selected tag will be
shifted from the actual time. Time offset is shown for trend chart for which date mode selection is
set to Absolute Time while saving it. The following date modes are available for a trend chart:
 Absolute date mode
 Relative date mode

Absolute Date Mode


For the absolute date mode, the start and end dates used in the query are used as start and end
times in the trend chart, respectively.
To enable the absolute date mode, from the View menu, you select the Absolute Time option.

Relative Date Mode


For the relative time mode, a base value, such as 0:00:0.0, is used as the start time of the trend
chart, and end time is calculated based on the time span for the query.
To enable the relative date mode, from the View menu, you select the Relative Time option.
Switching to the relative date mode does not affect the data on the trend chart or the actual start
and end time of the query, only the time axis of the trend chart is updated.

Configure Time Offset


You can configure time offset for each tag in the trend chart using the tag configuration options.
To use the tag configuration option, do one of the following:
 In the Tag list pane, right-click a tag and click Configure
 In the Tag list pane, double-click the tag

Historian Client 2014 R2


2-74 Wonderware Historian Client Trend

General Tab
The Time offset field in the tag configure dialog box can be used to offset tag traces in a trend for
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 HH:MM:SS format.
Any tags with time offsets are displayed using that offset, and the X-axis cursors are adjusted
accordingly.
For example, two Historian Servers are storing identical batch data, but are time-synched to a
different time master. The batch times should be identical, but since the two Historian Servers are
synched to different masters, the time will always appear slightly different in both the batches.
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 the offset values are changed, the trend chart is updated immediately. However, no
query is made to Historian Server until the trend chart is refreshed either via the User Interface, or
by calling the Refresh method in the case of aaHistClientTrend.

Wonderware Training
Section 3 – Time Offset and Target Regions 2-75

Target Region
A target region can be defined to provide a visual indicator that tag values are outside the specified
region. Two or more points must be defined to utilize this feature.
The target region is a highlighted area of the chart into which tag values should fall during normal
operation. Values that fall outside these normal limits can be highlighted in a special color, making
it easy to detect them. To determine the target region, a boundary is drawn that connects all high
values, and another boundary that connects all low values. The area between these two
boundaries constitutes the target region.
You can define and save target regions separately for each tag. Target regions are saved in the
trend file. If you delete a tag from the trend, its target region is deleted as well. To use the same
target region for multiple tags or in different trends, either copy and paste it or create a .CSV file
with the target region data that you can load for each tag.

Note: The target region shown above is specific to a XY Scatter Plot.

For a regular trend, you can define target region only in relative time mode. In the relative time
mode, a target region is defined by region items that include pairs of high and low values at
specific time offset. To determine the target region, one boundary is drawn connecting all high
values and another connecting all low values. The area between these two boundaries constitutes
the target region.

To Configure a Target Region in Relative Mode


1. In the Tag list pane, do one of the following:
 Right-click a tag name and select Configure
 Double-click a tag name

Historian Client 2014 R2


2-76 Wonderware Historian Client Trend

2. Click the Target Region tab.

3. Edit region items by using one of the following procedures:


 Editing region items manually
 Loading region items from a .CSV file
 Copying region items to .CSV format from another application
 Copying region items from another tag
 Enabling or disabling a tag’s target region

4. Click OK so that the target region appears in the trend.

Wonderware Training
Lab 3 – Configuring Time Offsets and Target Regions 2-77

Lab 3 – Configuring Time Offsets and Target


Regions
Introduction
This lab demonstrates the use of the Time offsets option and the Target Region tab. In this lab, you
will learn how to configure the Time offsets option for two analog tags.

Objectives
Upon completion of this lab, you will be able to:
 Configure a Time Offset
 Analyze values using Relative Time
 Configure the Target Region for a tag

Historian Client 2014 R2


2-78 Wonderware Historian Client Trend

Configure Time Offset


In this task, you will compare data for the same tag during two different time periods.
1. Create a new trend.
2. In the Tags pane, select the Reactor_001.ReactLevel tag.
3. Drag the selected Reactor_001.ReactLevel tag to the Tag List twice to add two instances of
the Reactor_001.ReactLevel tag to the trend chart.
Both of the tags will display identical traces.

Wonderware Training
Lab 3 – Configuring Time Offsets and Target Regions 2-79

4. In the Tag list, right-click the first instance of the Reactor_001.ReactLevel tag, and click
Configure.

5. In the Time offset field, change the value to –0:00:10.000 seconds.

6. Click OK.

Historian Client 2014 R2


2-80 Wonderware Historian Client Trend

The traces appear with the configured offset.

Wonderware Training
Lab 3 – Configuring Time Offsets and Target Regions 2-81

Analyze Signals Using Relative Time


In this task, you will view data that is based on a time relative to an assigned start time.
7. On the View menu, click Relative Time.

Historian Client 2014 R2


2-82 Wonderware Historian Client Trend

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 chart.

8. In the Tag list, right-click the first instance of Reactor_001.ReactLevel tag, and click
Configure.

Wonderware Training
Lab 3 – Configuring Time Offsets and Target Regions 2-83

9. Change the value in the Start time field to a time in the recent past relative to class time.
For example: today at 9:15 AM.

10. Click OK.


In the Tag list, the first instance of the Reactor_001.ReactLevel tag displays the manually set
Start time.

Historian Client 2014 R2


2-84 Wonderware Historian Client Trend

11. Configure the second instance of the tag with a start time that is 10 minutes earlier than the
first tag.
For example: today at 9:05 AM.

12. Save the trend as Relative Time.aaTrend to the C:\Training folder and close the trend file.

Wonderware Training
Lab 3 – Configuring Time Offsets and Target Regions 2-85

Define a Target Region


For each analog, discrete, or summary tag in a trend, you can define a target region. The target
region is a highlighted area of the chart into which tag values should fall during normal operation.
Values that fall outside of these normal limits can be highlighted in a special color, making it easy
to detect them.
13. Open the XYScatterplot.aaTrend file created in Lab 1.
14. In the Tag list, right-click the ReactLevel tag, and click Configure.
15. Click the Target Region tab.

16. Click Add.

Historian Client 2014 R2


2-86 Wonderware Historian Client Trend

17. In the X and Y fields, double-click the cells and enter the coordinates provided in the table
below. After each coordinate pair is entered, click Add to enter a new pair.
X Y
10 2050
10 950
55 0
95 –55
180 1600
180 2050

18. Click OK.

Wonderware Training
Lab 3 – Configuring Time Offsets and Target Regions 2-87

The trend chart displays the highlighted defined target region.

19. Save and close the trend file.

Historian Client 2014 R2


2-88 Wonderware Historian Client Trend

Wonderware Training
Section 4 – Retrieval Styles and Data Transformations in Trend 2-89

Section 4 – Retrieval Styles and Data Transformations in Trend


This section takes you through the steps necessary to configure Retrieval styles and create
Custom Retrieval styles in Wonderware Historian Client Trend.

Retrieval Styles
You can configure retrieval options generically for all tags in a trend, or separately for each tag in a
trend. Tags can either use the retrieval style specified in the trend options, a different predefined
retrieval style, or custom retrieval settings.
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 drop-down 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 drop-down list.
To use custom retrieval settings, click Custom style in the Retrieval style drop-down 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.
If you are using one of the predefined styles, you can edit all the settings that are not covered by
the style definition. A style definition can contain multiple sets of retrieval settings with different
retrieval modes. Therefore, 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, since there is
no way to know in advance which retrieval mode will be used, the settings are still available for
editing.

Historian Client 2014 R2


2-90 Wonderware Historian Client Trend

Create and Configure Custom Styles in Wonderware Historian Client Trend


It is beneficial to create custom styles when custom trend settings are used repeatedly. Instead of
requiring the user to configure each style in each new trend, the user can select the defined
custom style to save time and obtain consistent results.

Create and Edit Retrieval Styles

Location and Structure of Retrieval Styles


Retrieval styles are stored at the application level in the C:\Documents and Settings\All
Users\ApplicationData\ArchestrA\HistorianClient\Trend\RetrievalStyles.xml file.
Once you add or edit a style in this file, it is available to all users of Wonderware Historian Client
Trend in the system. You can edit the file in any text or in XML editor. Note the following
requirements:
 You must save the file in UTF-8 encoding
 Names and values are case-sensitive. If any name or value is misspelled, Wonderware
Historian Client Trend may stop responding on startup
Structure of the Retrieval Styles File
The retrieval styles file has the following structure:
XML header
Style collection
Retrieval style 1
Style names for different locales
Duration range 1
Retrieval type 1
...
Retrieval type n
Duration range 2
...
Duration range n
Retrieval style 2
...
Retrieval style n
End of style collection
The file contains exactly one style collection, represented by the styleCollection XML element.
The style collection contains one or more retrieval styles, represented by the retrievalStyle XML
element. Each of these represents a style that is available for use in Wonderware Historian Client
Trend.
Each retrieval style contains one or more duration ranges, represented by the duration XML
element. A duration range defines the retrieval types that are to be used for trend queries, whose
duration is within a specified range. Duration ranges should be arranged in descending length.
Each duration range contains one or more retrieval types, represented by the retrieval XML
element. The retrieval type defines the retrieval options that are to be used for tags of a certain
type.

Wonderware Training
Section 4 – Retrieval Styles and Data Transformations in Trend 2-91

The retrieval type that gets used for a given tag is determined as follows:
 Select a retrieval style in Wonderware Historian Client Trend
 Wonderware Historian Client Trend searches the retrieval style for a duration range that
covers the duration of your trend. This would be the first duration range with a time period
that is shorter than the trend duration
 When it has found a suitable duration range, it searches that duration range for a retrieval
type that suits the type of the tag
A simple example file might look like this:
<?xml version="1.0" encoding="utf-8" ?>
<styleCollection version="9.2" xmlns="urn:retrievalstyle-schema">
<retrievalStyle server="InSQL" minVersion="8.0" maxVersion="9.0"
enabled="true">
<styleName locale="en">My style</styleName>
<styleName locale="ja">My style in Japanese</styleName>
<styleName locale="zh-CN">My style in Chinese</styleName>
<styleName locale="de">My style in German</styleName>
<styleName locale="fr">My style in French</styleName>
<duration minSpan="P0Y0M1DT0H0M0S">
<retrieval tagType="Discrete" source="History"
retrievalMode="Delta" stateCalc="*" resolution="0" pixels="0"
movingAverageValues="0" />
<retrieval tagType="All" source="History"
retrievalMode="Cyclic" stateCalc="*" resolution="0" pixels="5"
movingAverageValues="0" />
</duration>
<duration minSpan="P0Y0M0DT0H0M0S">
<retrieval tagType="All" source="History" retrievalMode="Delta"
stateCalc="*" resolution="0" pixels="0" movingAverageValues="0" />
</duration>
</retrievalStyle>
</styleCollection>
In this case, the file only defines one style named My style. When querying 2 days of data for a
Discrete tag using this style, Delta retrieval is used (the first retrieval element in the first duration
element). For an Analog tag, Cyclic retrieval with one cycle for every 5 pixels of the trend width is
used instead (the second retrieval element in the first duration element). For queries that are
shorter than 1 day, Delta retrieval is used regardless of the tag type (the only retrieval element in
the second duration element).

styleCollection XML Element


The styleCollection XML element represents a collection of retrieval styles. It is the container for
multiple retrieval styles represented by the retrievalStyle XML elements. The retrieval styles file
can only contain a single styleCollection XML element. The styleCollection XML element has
two required attributes: version and xmlns.

version
Specifies the format version of the style collection. Note that the only valid value is 9.2.

xmlns
Specifies the XML namespace to be used. Set this attribute to urn:retrievalstyle-schema.

Historian Client 2014 R2


2-92 Wonderware Historian Client Trend

retrievalStyle XML Element


The retrievalStyle XML element represents a single retrieval style. The retrievalStyle XML
element is the container for two other elements: styleName and duration. It has three required
attributes: server, minVersion, and enabled. It has one optional attribute, which is maxVersion.

styleName
Specifies the name of the style for the locale specified by the locale attribute. This is the name by
which you can access the style when Wonderware Historian Client Trend runs under the specified
locale.
You can specify the locale a two-character ISO language code or a four-character combination of
language code and country code. If you specify a name for a two-character locale, it is used for all
sublocales that do not have a separate name defined. For example, if you specify a name for the
de locale, it is used for the de-DE, de-AT, and de-CH locales unless you specify separate names
for these locales.
You must specify a styleName element for all styles that you want to use in a given locale. If a
style does not have a name defined for a locale, Wonderware Historian Client Trend does not
show it when running under that locale. The only exception is when you run Wonderware Historian
Client Trend under a locale for which no style names are defined at all. In that case, the styles are
shown with their names for the English locale.

duration
Specifies a duration range.

server
Specifies the server type for which the style can be used. Always set this attribute to InSQL.

minVersion
The minimum IndustrialSQL Server version that the retrieval style can work with, either 8.0 or 9.0.
If Wonderware Historian Client Trend is connected to a Wonderware Historian Server whose
version is lower than the version specified here, the style is not used.
Specify 9.0 if your style uses functionality that is not supported in the IndustrialSQL Server 8.0.

enabled
Specifies whether the style is active. To temporarily disable the style, set this attribute to false.

maxVersion
The maximum Wonderware Historian Server version against which the retrieval style can be used.
This attribute is not currently used.

duration XML Element


The duration XML element represents a duration range. It contains the retrieval types that are
used when the trend period is longer than the time period it specifies.
A retrieval style can contain any number of duration XML elements. However, you should arrange
these elements in descending length. This is because Wonderware Historian Client Trend uses

Wonderware Training
Section 4 – Retrieval Styles and Data Transformations in Trend 2-93

the first suitable duration range that it finds, that is, the first duration range with a time period
shorter than the current trend period.
For example, assume you have three duration ranges defined in the following order:
 1 day
 4 hours
 0 seconds
For a query with duration of 2 days, Wonderware Historian Client Trend uses the retrieval types
defined for the 1-day duration range because it is the first range whose time period is shorter than
2 days. Now assume the same duration ranges are ordered like this:
 4 hours
 1 day
 0 seconds
In this case, Wonderware Historian Client Trend uses the retrieval types defined for the 4 hours
duration range as it is the first range whose time period is shorter than 2 days. The more suitable
1-day duration range is ignored.

Note: Always define a duration range with a time period of 0 seconds. This serves as a catch-all
for trend periods that are not covered by any other duration range.

The duration XML element has one required attribute, which is minSpan. The duration XML
contains one other element, which is retrieval.
minSpan
Specifies the time period as a standard XML duration value. For example, P0Y0M1DT0H0M0S.
The number to the left of Y represents the number of years and the number to the left of M
represents the number of months (D = days, H = hours, M = minutes, and S = seconds). P and T
are separator characters.
retrieval
Specifies a retrieval type. For more information, see the Online Help topic: retrieval XML
Element.

retrieval XML Element


The retrieval XML element represents a retrieval type; that is, a set of retrieval options for a
certain type of tag.
You can have multiple retrieval XML elements in a duration range. However, you should order
them from the most specific to the least specific. This is because Wonderware Historian Client
Trend uses the first suitable retrieval type it finds; that is, the first retrieval type with a matching tag
type and available history source.
For example, assume that you have three retrieval types defined in the following order:
 Analog tags, Summary data
 Analog tags, History data
 All tags, History data

Historian Client 2014 R2


2-94 Wonderware Historian Client Trend

For an Analog tag, Wonderware Historian Client Trend first tries to retrieve summary data
according to the first retrieval type. If no summary data is available, it retrieves the history data
according to the second retrieval type. Now assume the retrieval types are ordered like this:
 Analog tags, History data
 Analog tags, Summary data
 All tags, History data
In this case, Wonderware Historian Client Trend never tries to retrieve the summary data for an
Analog tag; it never considers the second retrieval type because it has already found a suitable
retrieval type in the first one.

Note: You should always define a retrieval type with a tag type of All and a history source of
History. This serves as a catch-all for tags that are not covered by any other retrieval style.

The retrieval XML element has seven required attributes: tagType, source, retrievalMode,
stateCalc, resolution, pixels, and movingAverageValues
tagType
Specifies the tag type for which the retrieval type should be used. Valid values are All, Analog,
Discrete, and String.
source
Specifies the history source from where the data will be retrieved. Valid values are History to
retrieve data from history tables and Summary to retrieve data from summary tables. When using
Summary, you must specify the summary frequency in the resolution attribute.
retrievalMode
Specifies which retrieval mode to use. Valid values are Cyclic, Delta, Full, Interpolated, BestFit,
Average, Min, Max, Integral, Slope, Counter, ValueState, and RoundTrip. Make sure that you
specify a retrieval mode that is supported for the specified tag type. For example, Counter retrieval
does not work with String tags. Therefore, if you try to retrieve data for a String tag in the Counter
mode, Wonderware Historian Server does not return any data.
For information on each mode, see the Online Help topic: Understanding Retrieval Modes.
stateCalc
Specifies the state calculation to be used in the ValueState retrieval. Valid values are Min, Max,
Average, Total, and Percent. For more information, see the Online Help topic: State Calculation.
If you are not using the ValueState retrieval, specify it with an asterisk (*).
resolution
Specifies the retrieval resolution in milliseconds when retrieving history data in cycle-based
retrieval modes, or the summary frequency in seconds when retrieving the summary data. For
more information, see the Online Help topic: Resolution (Values Spaced Every X ms).
Alternatively, you can set this attribute to 0 and specify a retrieval resolution using the pixels
attribute.
pixels
Specifies the retrieval resolution for cycle-based retrieval modes as the number of pixels per cycle.
The number of cycles is the width of the trend chart divided by the value of this attribute. For
example, if the chart is 500 pixels wide and the pixels attribute is set to 5, then 100 cycles are
used.

Wonderware Training
Section 4 – Retrieval Styles and Data Transformations in Trend 2-95

Alternatively, you can set this attribute to 0 and specify a retrieval resolution using the resolution
attribute. If you specify non-zero values for both the pixels and the resolution attributes, resolution
takes precedence.
movingAverageValues
Specifies whether to calculate moving averages when retrieving the history data. If set to 0, no
moving averages are calculated. Otherwise, moving averages are calculated using the number of
values specified in this attribute.

Create and Edit Retrieval Styles


To create or edit retrieval styles, you edit the retrieval styles file in a text or XML editor. Read
Location and Structure of Retrieval Styles (page 2-90) first to get an overview of how this file is
structured.
The following procedure gives you the basic steps to add a new style. For details on each XML
element, refer to the corresponding subsection.

To Create a New Style


1. Under the styleCollection element, add a retrievalStyle element.
2. Under the retrievalStyle element, add a styleName elements for each locale in which you
want to use that style. For more information, see the retrievalStyle XML Element.
3. Decide at which trend durations you want to switch the retrieval options. Under your
retrievalStyle element, add duration elements for each of these “switching points.” For more
information, see the duration XML Element.
4. For each duration element, add retrieval elements, as needed, to define retrieval types. For
more information, see retrieval XML Element.

Note: When creating a new style, always add the following to the end of the style to cover the tags
that are not covered by any other retrieval style:
<duration minSpan="P0Y0M1DT0H0M0S">
<retrieval tagType="All" source="History"

Data Transformation
While constructing query for data retrieval, along with retrieval styles, you can also define
Transformation options that can be applied to the result. You can include the following
transformations:
 No Transformation – Select this option If the query does not specify the filter element or
if the value is not overridden for the filter element
 Remove outliers – Select this option to remove outliers from a set of analog points
 Convert analog values to discrete – Select this option to convert value streams for any
analog tag to discrete value streams
 Snap to base value – Select this option to force values in a well-defined range around
one or more base values

Historian Client 2014 R2


2-96 Wonderware Historian Client Trend

Configure Transformation Option


1. In the Tag list pane, do one of the following:
 Right-click the tag name and select the Configure option
 Double-click the tag name
2. Access the Retrieval tab and select the Other tab.

3. From the Transformation drop-down list, select one of the following:


 No Transformation
 Remove outliers
 Convert analog values to discrete
 Snap to base value
4. Click OK to apply the selected Transformation option.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-97

Lab 4 – Using Retrieval Styles and Data


Transformations
Introduction
In this lab, you will apply the various retrieval styles and data transformations that are available in
Wonderware Historian Client Trend.

Objectives
Upon completion of this lab, you will be able to:
 Apply the following retrieval styles:
 Best Fit
 Cyclic
 Moving Average
 Custom
 Delta
 Slope
 Apply the following data transformations in data retrieval:
 Remove outliers
 Snap to

Historian Client 2014 R2


2-98 Wonderware Historian Client Trend

Use Standard Retrieval Styles


1. Create a new trend.
2. In the Tags pane, select the ReactLevel tag and drag it to the Tag List.

3. Right-click the ReactLevel tag, and select Configure.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-99

4. In the Width drop-down list, click 4.


5. In the Type drop-down list, click Point.

6. Click OK.
The trend should look similar to the following:

Historian Client 2014 R2


2-100 Wonderware Historian Client Trend

7. On the Tools menu, click Options.

The Options dialog box appears.

The Retrieval tab appears by default. Notice that the Retrieval style is BestFit-5. This means
that Wonderware Historian Client Trend queried the data using the BestFit-5 retrieval mode,
that is, with one cycle every 5 pixels.
8. In the Retrieval style drop-down list, click BestFit-10.

9. Click OK.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-101

Notice the difference in the tag trace. The interval for the BestFit-10 retrieval mode is 10
pixels instead of 5. Therefore, fewer data points are retrieved.

10. On the Tools menu, click Options.


11. In the Options dialog box Retrieval style drop-down list, click BestFit-15.

12. Click OK.

Historian Client 2014 R2


2-102 Wonderware Historian Client Trend

The data is queried using the BestFit-15 retrieval mode, with one cycle every 15 pixels,
resulting in even fewer data points being retrieved.

13. Right-click the ReactLevel tag, and click Configure.


14. In the Width drop-down list, click 1.
15. In the Type drop-down list, click Auto.

16. Click OK.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-103

The trend chart displays the Type Auto based on the tag’s effective interpolation setting,
which is specified in the retrieval settings of Wonderware Historian Client Trend.

Historian Client 2014 R2


2-104 Wonderware Historian Client Trend

Override the Retrieval Style at the Tag Level


You will now add a second instance of the ReactLevel tag and override the Retrieval Style.
17. In the Tags pane, select the ReactLevel tag and drag it to the Tag List.
This will add another instance of the ReactLevel tag to the current trend chart.
18. Right-click the first instance of ReactLevel, and click Configure.
19. Click the Retrieval tab.

20. In the Retrieval style drop-down list, click Cyclic (ActiveFactory 9.1).

21. Click OK.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-105

The signals still look very similar, however the amount of data being retrieved is substantially
different. The data log will show this difference.
22. In the Tag list, uncheck the second instance of the ReactLevel tag.

23. On the Main toolbar, click View the data log in narrow format.

Data displayed in the Data log window represents the history data retrieved by Historian Client
in order to plot the trend. Notice how many rows are returned in the Data log window.
24. Close the Data log window.
25. In the Tag List, uncheck the first instance of the ReactLevel tag, and check the second
instance of the ReactLevel tag.

Historian Client 2014 R2


2-106 Wonderware Historian Client Trend

26. On the Main toolbar, click View the data log in narrow format.

Notice that fewer rows are retrieved here, than for the first instance of the tag.
27. Close the Data log window.
28. In the Tag list, check the first instance of ReactLevel so that both of the tag traces display in
the trend chart.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-107

Use Other Retrieval Styles


29. On the Tools menu, click Options.
30. In the Retrieval style drop-down list, click MovingAverage (12-5 sec).

31. Click OK.


This will show the Moving Average using 12 cycles per 5 seconds for the second instance of
ReactLevel. 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.

Historian Client 2014 R2


2-108 Wonderware Historian Client Trend

32. On the Tools menu, click Options.


33. In the Options dialog box Retrieval style drop-down list, click MovingAverage (30-1 sec).

34. Click OK.


Now, the trend chart displays a Moving Average calculation using more values and a higher
resolution. Notice how the second tag trace is affected; it resembles the first tag trace more
closely.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-109

35. On the Tools menu, click Options.


36. In the Retrieval style drop-down list, click Custom style.
37. On the Main options tab, in the Retrieval style drop-down list, click Cyclic.
38. Check the Use manual cycles check box.
39. In the Values over equal time intervals field, enter 10.

40. Click OK.


The trend chart displays data retrieved as 10 evenly spaced intervals across the selected time
span. Notice how the tag traces in the trend chart are affected.

Historian Client 2014 R2


2-110 Wonderware Historian Client Trend

41. On the Tools menu, click Options.


42. Retain the default Retrieval style as Custom style.
43. In the Retrieval mode drop-down list, click Delta.
44. In the Delta retrieval deadbands area Value field, enter 10.00.

45. Click OK.


The trend chart displays data with the Delta retrieval that has a 10% value deadband. Notice
how the tag traces in the trend chart are affected.

46. On the Tools menu, click Options.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-111

47. In the Retrieval mode drop-down list, click Slope.

48. Click OK.


49. On the Scaling toolbar, click Auto scale all tags.
The trend chart displays data with the Slope retrieval.

50. Save the file as Retrieval.aaTrend to the C:\Training folder and close the trend file.

Historian Client 2014 R2


2-112 Wonderware Historian Client Trend

Use Data Transformations: Remove Outliers


The Remove outliers data transformation or data filter removes the outlying data points from a set
of analog data points based on the assumption that the distributions of point values is a normal
distribution. This option works by specifying a filter called the sigma limit. When this filter is
specified in the data retrieval mode, any point outside of the user-defined sigma limit is removed
from calculations.
51. Create a new trend.
52. On the Tools menu, click Options.
53. In the Options dialog box Retrieval style drop-down list, click BestFit-5.
54. In the Delta Retrieval deadbands area, change the Value field to 0.00.

55. Click OK.


56. In the Tags pane, select the Reactor_001.ReactLevel tag.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-113

57. Drag the selected Reactor_001.ReactLevel tag to the Tag List.

58. In the Tag List, right-click the Reactor_001.ReactLevel tag, and click Configure.

Historian Client 2014 R2


2-114 Wonderware Historian Client Trend

59. Click the Retrieval tab.


60. Configure the Reactor_001.ReactLevel tag as follows:
Retrieval style: Custom style
Retrieval mode: Average
Use manual cycles: Checked
Values spaced every: Selected, 30 seconds

61. Click OK.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-115

The trend is displayed.

62. Add a second instance of the Reactor_001.ReactLevel tag to the Tag list.
63. On the Main toolbar, click Stack the tag traces.
64. Right-click the second instance of the Reactor_001.ReactLevel tag, and click Configure.
65. Click the Retrieval tab.
66. Configure the second instance of the Reactor_001.ReactLevel tag, as follows:
Retrieval style: Custom style
Retrieval mode: Average
Use manual cycles: Checked
Values spaced every: Selected, 30 seconds

Historian Client 2014 R2


2-116 Wonderware Historian Client Trend

67. Click the Other tab.

68. In the Transformation drop-down list, click Remove outliers.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-117

69. In the Standard Deviations field, retain the default value of 2.0.

70. Click OK.

Historian Client 2014 R2


2-118 Wonderware Historian Client Trend

71. Add a third instance of the Reactor_001.ReactLevel tag to the Tag List.
72. Right-click the third instance of the Reactor_001.ReactLevel tag, and click Configure.
73. Click the Retrieval tab.
74. Configure the third instance of the Reactor_001.ReactLevel tag as follows:
Retrieval style: Custom style
Retrieval mode: Average
Use manual cycles: Checked
Value spaced every: Selected, 30 seconds

75. Click the Other tab.


76. In the Transformation drop-down list, click Remove outliers.
77. In the Standard Deviations field, change the value to 1.0.

78. Click OK.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-119

79. On the Main toolbar, click View the data log in wide format.

You will see a table of average values for all the three tags. The first, second, and third
columns represent the first, second, and third instances of the tag, respectively. The second
tag has the 2 sigma limit applied, which means that there are no values outside the 2 sigma
limit calculation. In the third column, the average values are calculated differently from point-
to-point. There are no values outside the 1 sigma limit.
80. Close the Data log window.
81. Save the file as RemoveOutliers.aaTrend to the C:\Training folder and close the trend file.

Historian Client 2014 R2


2-120 Wonderware Historian Client Trend

Use Data Transformations: Snap to


This analog filter forces values within a specified range of the base value. When this filter is
applied, point values falling inside of the specified range will be forced into the specified base
value before the point goes further in the retrieval process. This filter can be used with all retrieval
modes, but its main benefits are in the Average, Integral, Min, and Max modes.
82. Create a new trend.
83. In the Tags pane, select the ReactTemp tag.
84. Drag the selected ReactTemp tag to the Tag List twice to add two instances of the
ReactTemp tag.

85. Right-click the first instance of the ReactTemp tag, and click Configure.
86. Click the Retrieval tab.
87. In the Retrieval style drop-down list, click Custom style.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-121

88. In the Retrieval mode drop-down list, click Delta and confirm the Delta retrieval deadbands
area shows a Value field with 0%.

89. Click OK.

90. Right-click the second instance of the ReactTemp tag, and click Configure.
91. Click the Retrieval tab.

Historian Client 2014 R2


2-122 Wonderware Historian Client Trend

92. In the Retrieval style drop-down list, click Custom style.


93. In the Retrieval mode drop-down list, click Delta.
94. Click the Other tab.
95. In the Transformation drop-down list, click Snap to base value.

96. In the Tolerance field, enter 5.


97. In the Base value(s) field, enter 16.

98. Click OK.

Wonderware Training
Lab 4 – Using Retrieval Styles and Data Transformations 2-123

99. On the Main toolbar, click Stack the tag traces.


Notice the difference between the two instances of the tag. In the first instance, there is a
sawtooth variation of the tag for the lower values of the tag. In the second instance of the tag,
those values have been filtered out to a level value of 16.

This can be verified by viewing the data in the View the data log in wide format. You will see
that all values within the defined tolerance have been filtered out.
100.On the Main toolbar, click View the data log in wide format.

Historian Client 2014 R2


2-124 Wonderware Historian Client Trend

101.In the Data log window, scroll down until you locate the value 16 in the second ReactTemp
column and compare this value with the corresponding value in the first ReactTemp column.

102.Close the Data log window.


103.Save the file as Snap to Filter.aaTrend to the C:\Training folder and close the trend file.

Wonderware Training
Lab 5 – Creating Retrieval Styles 2-125

Lab 5 – Creating Retrieval Styles


Introduction
This lab demonstrates the use of custom retrieval styles in Wonderware Historian Client Trend.
Custom retrieval styles allow you to define a retrieval style that you can select in a menu, rather
than having to select all the individual retrieval options each time you want to use that method.

Objectives
Upon completion of this lab, you will be able to:
 Create custom retrieval styles
 Apply different custom retrieval styles

Historian Client 2014 R2


2-126 Wonderware Historian Client Trend

Create Custom Styles


1. Close the Wonderware Historian Client Trend application.
2. Open Windows File Explorer.
3. Navigate to:
C:\ProgramData\ArchestrA\ActiveFactory\Trend

Note: The ProgramData directory is a hidden directory. You can either enter the Path directly or
unhide it and browse to it.

4. Right-click RetrievalStyles.xml and open with Notepad.

Wonderware Training
Lab 5 – Creating Retrieval Styles 2-127

The RetrievalStyles.xml file appears.

5. Make a backup copy.


6. At the end of the RetrievalStyles.xml file, insert a blank line before the </stylecollection>
line.

7. Right-click the C:\Training\CyclicStyles.xml file and open with Notepad.


8. Copy all of the contents.

Historian Client 2014 R2


2-128 Wonderware Historian Client Trend

9. Close the CyclicStyles.xml file.


10. In the RetrievalStyles.xml file, paste the content of the CyclicStyles.xml file in the blank line
before the </stylecollection> line.

11. Save and close the RetrievalStyles.xml file.

Note: In the retrieval style you just created, you added a new option named Cyclic-Auto.
When trending analog tags, the tag will be retrieved using a cyclic method. The cyclic
resolution will be used for retrieval changes depending on the trend duration.

12. Open Wonderware Historian Client Trend and create a new trend, if necessary.
13. In the Tags pane, select the ReactTemp tag.
14. Drag the selected ReactTemp tag to the Tag List.
15. In the Duration drop-down list, click 1 hour.

Wonderware Training
Lab 5 – Creating Retrieval Styles 2-129

16. On the Tools menu, click Options.


The Options dialog box appears.
17. In the Retrieval style drop-down list, click Cyclic-Auto.

Note: The Cyclic-Auto retrieval style was not available prior to editing the
RetrievalStyles.xml file.

18. Click OK.

Historian Client 2014 R2


2-130 Wonderware Historian Client Trend

19. On the Scaling toolbar, click Auto scale all tags.


The trend updates. This information is reflected at the bottom of the Trend.

Wonderware Training
Lab 5 – Creating Retrieval Styles 2-131

20. On the Main toolbar, click the View the data log in narrow format button .

Notice that the data is being retrieved every 5 seconds. The sections copied to the XML file
that determine this retrieval are:
 minSpan="P0Y0M0DT01H0M0S". This is a time code indicating a duration of at least
1 hour
 retrievalMode="Cyclic" stateCalc="*" resolution="5000". This is a code indicating a
cyclic sample rate of 5 seconds
21. Close the Data log window.

Historian Client 2014 R2


2-132 Wonderware Historian Client Trend

22. In the Duration drop-down list, click 30 minutes.


The trend chart updates.

Wonderware Training
Lab 5 – Creating Retrieval Styles 2-133

23. On the Main toolbar, click the View the data log in narrow format button .

Notice that the data is now being retrieved every 2 seconds. The sections copied to the XML
file that determines this retrieval are:
 minSpan="P0Y0M0DT0H30M0S". This is a time code indicating a duration of at least 30
minutes
 retrievalMode="Cyclic" stateCalc="*" resolution="2000". This is a code indicating a
cyclic sample rate of 2 seconds
24. Close the Data log window.

Historian Client 2014 R2


2-134 Wonderware Historian Client Trend

25. In the Duration drop-down field, click 10 minutes.


The trend chart updates.

Wonderware Training
Lab 5 – Creating Retrieval Styles 2-135

26. On the Main toolbar, click the View the data log in narrow format button .

Notice that the data is now being retrieved every second. The sections copied to the XML file
that determines this retrieval are:
 minSpan="P0Y0M0DT0H0M0S". This is a time code indicating a duration less than the
previous duration
 retrievalMode="Cyclic" stateCalc="*" resolution="1000". This is a code indicating a
cyclic sample rate of one second
27. Close the Data log window.
28. In the Tag list, right-click ReactTemp and click Delete.

Historian Client 2014 R2


2-136 Wonderware Historian Client Trend

29. In the Tags pane, select the SteamValve tag.


30. Drag the selected SteamValve tag to the Tag List.

31. Click View the data log in narrow format .

Notice that values are no longer evenly spaced. The added retrieval options indicate that
Discrete data is to be retrieved as Delta.
 retrievaltagType="Discrete”. This is a code indicating the tag type as discrete
 retrievalMode="Delta". This is a code indicating the retrieval mode as Delta
32. Exit Wonderware Historian Client Trend and save all open trend files as appropriate.

Wonderware Training
Module 3 – Wonderware Historian Client
Workbook
Section 1 – Introduction to Wonderware Historian Client Workbook 3-3
Lab 6 – Using Historian Client Workbook Basic Functions 3-23
Lab 7 – Using the Tag Analysis Wizard 3-37
Section 2 – Historian Event Retrieval 3-47
Lab 8 – Working with Event Data 3-59
Section 3 – Enhanced Workbook with Excel Functionality 3-73
Lab 9 – Using Excel References with Workbook 3-75
Lab 10 – Creating an Hourly Average Shift Report 3-85
3-2 Wonderware Historian Client Workbook

Module Objectives
 Describe the basic functionality of Wonderware Historian Client Workbook
 Use the functions of Wonderware Historian Client Workbook and Microsoft Excel
spreadsheet to create various types of reports
 Use the Tag Analysis wizard and Summary Tag Selection, Event Snapshot Tag Selection,
Historian event retrieval, and hourly average shift reports functions

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Workbook 3-3

Section 1 – Introduction to Wonderware Historian Client


Workbook
This section explains the basic functionality of Wonderware Historian Client Workbook.

Introduction
Wonderware Historian Client Workbook is an add-in to Microsoft Excel that allows you to query
one or more Wonderware Historian Server or SQL Server databases and return results to a
spreadsheet. Using Wonderware Historian Client Workbook, you can easily create reports using
the Wonderware Historian Server data, without needing an in-depth knowledge of SQL scripting.
You can save the reports you create with Wonderware Historian Client Workbook, allowing you to
run a report again at any time.
Workbook is used to embed the SQL statements directly into the Microsoft Excel worksheets to
allow you to repeatedly retrieve data from Wonderware Historian Client.
When the add-in is loaded, the Wonderware Historian Client menu and toolbar appear. You can
use the 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.
If Wonderware Historian Client Workbook is installed, an additional menu called Historian is added
in Microsoft Excel. The Historian menu contains all the commands that you use to create a report
using the Wonderware Historian data.
The appearance of the Historian menu in Wonderware Historian Client Workbook differs based on
the version of Microsoft Office being used. For Microsoft Office 2007 and later, the Historian menu
is a part of the ribbon.

Historian Client 2014 R2


3-4 Wonderware Historian Client Workbook

Start Wonderware Historian Client Workbook


1. Open Wonderware Historian Client Workbook.
A new workbook opens.

2. Click the Historian menu to view the Historian menu options.

Wonderware Historian Client toolbar is divided into five groups:


 Connection
 Tag Management
 Controls
 Publish
 Status
The toolbar buttons within each of the groups can be used to create reports.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Workbook 3-5

Connection
The Connection group consists of the Connection Management button. To use Wonderware
Historian Client, you must first connect to a Wonderware Historian Server using a valid user
account that has the right to retrieve data. The Connection Management button helps you to log
in to the server.

Tag Management
The Tag Management group consists of various buttons that enable you to perform different tag
functions like searching for tags, retrieving tag configuration information, retrieving different types
of values for tags, creating analysis sheets, and building a query. The Tag Management group
consists of the following buttons:
 Tag Selection
 Tag Configuration
 Tag Values
 Tag Analysis
 Direct Query

Tag Selection
The Tag Selection button enables you to quickly search the database for tags of a certain type
and for tags that match a particular search pattern. The Tag Selection button consists of three
submenu items.

Historian Client 2014 R2


3-6 Wonderware Historian Client Workbook

These three submenu items are as follows:


Tag Selection
The Tag Selection option enables you to search for tags of a certain type.
Summary Tag Selection
The Summary Tag Selection option enables you to select specific Summary tags. A Summary
tag is a tag for which an aggregation calculation (minimum, maximum, average, or sum) is
configured on the server. Summary tags consist of summarized data of tags from an Historian
Server.
Event Snapshot Tag Selection
The Event Snapshot Tag Selection option enables you to select specific event snapshot tags.
Using the Event Snapshot tags you can view the data values for selected Analog, Discrete, or
String tags that have the same time stamp as a detected event. This provides you with a snapshot
of selected data values at the time of an event.

Tag Configuration
The Tag Configuration button can retrieve configuration information for Analog, Discrete, String,
Summary, and Event tags. You can also retrieve the alarm limit information for Analog tags. It
consists of two submenu items.

These two submenu items are as follows:

Tag Details
The Tag Details option enables you to view the configuration details for a specified tag.

Analog Tag Alarm Limits


If an Analog tag is configured to have alarm limits, you can retrieve that information using the
Analog Tag Alarm Limits option.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Workbook 3-7

Tag Values
The Tag Values button can retrieve different types of values for tags. These values are as follows:
 Live Values
 History Values
 Aggregate Values
 Summary System Values
 Event Snapshot Values

Live Values
The Live Values button starts a function that brings the latest values of the selected tags from the
Wonderware Historian Server and inserts them into the selected cells.

Note: Once the values are inserted, Microsoft Excel does not automatically refresh the data in the
sheet. The function will not execute again until the sheet is refreshed.

The Live Values function lets you configure the criteria for the query based on the following
parameters:
 Tag name – The name of the tag within the Wonderware Historian Server. If the data
values are coming from ArchestrA, the attribute reference is shown as the tag name. For
ArchestrA attributes, you can also choose to show the hierarchical name along with the
attribute reference

Historian Client 2014 R2


3-8 Wonderware Historian Client Workbook

 Date time – The time stamp for the returned value. For Delta retrieval, this is the time at
which the value was acquired by the Wonderware Historian Server. For Cyclic retrieval,
this is the specific time requested or calculated using an 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 – The timestamp reflecting when the event was detected by the event
system. It is applicable only to the Event tags
 OPC Quality – The quality value received from the data source. It is only available if you
selected the Support multiple data types check box in the Live Values - Step 1 of 3
dialog box
 Source Tag – The source tag of the tag
 Source Server – The source server of the tag

History Values
The History Values button starts a function that brings the historical values of selected tags from
the Wonderware Historian Server and inserts them into the selected cells. The method of retrieval
can be configured through the interface of the function.
Because Microsoft Excel does not automatically refresh data in the sheet, once the values are
inserted, the function will not execute again until the sheet is refreshed. You can retrieve the
history data for specified Analog, Discrete, String, Summary, and Event tags. However, you cannot
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.

The History Values function lets you configure the criteria for the query based on the following
parameters:
Display Options Tab
Check the check boxes for the information to be displayed for each tag.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Workbook 3-9

Format Tab
 Value based criteria (narrow tables) – Click this option if you want one row for each
value returned by each tag, and each row shows the timestamp and value for one tag
 Tag based criteria (wide tables) – Click this option if you want one row for each
timestamp in the combined result sets of all the tags, and each row shows the values for
all the tags at that time

Historian Client 2014 R2


3-10 Wonderware Historian Client Workbook

Retrieval Tab, Main Options Subtab


 Retrieval mode – Select the desired retrieval mode
 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

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Workbook 3-11

Retrieval Tab, Other Subtab


 History version – Historian Client supports versioning of data in its extension tables. It
supports two 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 – Sets the time stamp and quality rules for retrieval
 State retrieval – Sets the state calculation to Min, Max, Average, Total or Percent. This
option becomes enabled if retrieval mode is set to ValueState
 Transformation – Sets the data transformations to be applied to the result of a query. You
can apply the following transformation options:
 No Transformation – Sets no filter criteria for a query
 Remove outliers – Removes outliers from a set of analog points
 Convert analog values to discrete – Converts the result of a value stream from
analog to digital
 Snap to base value – Forces values in a well-defined range to snap to a base value

Historian Client 2014 R2


3-12 Wonderware Historian Client Workbook

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.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Workbook 3-13

Criteria Tab
The Criteria tab specifies the filtering criteria for the data values to be returned. The filtering
criteria options are determined by what you selected for the display format for the returned data,
either narrow or wide.

For tag-based criteria (wide tables), data values are returned if they match certain criteria applied
to the column for a tag name. For example, if Tag Name1 > 5000.

A NULL value indicates that a column entry has no assigned value. A NULL value is not the same
as a numeric value of 0 or an empty string.

For value-based criteria (narrow tables), data values are returned if they match certain criteria
applied to the Value or vValue column; for example, if any possible value > 5000. You also can
specify quality criteria for the value; for example, if the data quality for any possible value = Good.

The value-based criteria options that are available in the Criteria tab depend on the types of tags
you selected for the query, either Analog, Discrete, String, or a mix of these types.

Summary System Values


You can retrieve summary values for tags that have been configured to be summarized by the
Wonderware Historian Server event subsystem.

Event Snapshot Values


You can retrieve the values for Snapshot tags associated with a particular Event tag.

Historian Client 2014 R2


3-14 Wonderware Historian Client Workbook

Tag Analysis
In addition to creating valuable reports, you can use Wonderware Historian Client Workbook to
generate statistics, charts, and graphics that are useful for analysis. Wizards are provided to guide
you through selecting the required options.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Workbook 3-15

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 4, “Wonderware Historian Client Query”.

1. Click Direct Query to start the Query client tool.


2. In the Servers list, click the name of the server to use.
3. In the Query window, enter the SQL query to execute against the database.
4. Check the Enter the results as an array-formula check box to insert the results as an array
formula.
5. An array formula can perform one or more calculations and then return either a single result or
multiple results. An array formula allows you to resend the query, since the query parameters
are included in the cells that contain the query results.
6. Check the Specify format options (select cells) check box to specify a range of cells that
contain the formatting information.
7. The formatting information in the cells will be applied to the query results.
8. In the Select cell for output list, specify the location of the worksheet cell(s) that will contain
the output.
9. Click OK.
10. Click the cell that contains the red triangle to edit the query.

Historian Client 2014 R2


3-16 Wonderware Historian Client Workbook

Controls
The Controls group consists of the buttons that enable you to perform various functions like
converting an executable cell to a static value and an executable worksheet to a static worksheet,
editing the function in the highlighted cell, and refreshing any function in the worksheet, or
refreshing the worksheet itself. The Controls group consists of five buttons.

 Refresh Function
 Refresh Sheet
 Edit Function
 Convert Sheet to Values
 Convert Function to Values

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.

Refresh Sheet
The Refresh Sheet button refreshes the active worksheet, and re-executes all the functions on
the worksheet.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Workbook 3-17

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, such as the History Values wizard, the dialog box for
that function will appear. This dialog box will allow you to modify the options that were entered.

Convert Sheet to Values


The Convert Sheet to Values button 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 to Values function will not update the value of
the cell.

Convert Function to Values


The Convert Function to Values button 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 to Values function will not update the value of the
cell.

Historian Client 2014 R2


3-18 Wonderware Historian Client Workbook

Publish
The Publish group enables you to generate various types of reports to be used with Wonderware
Information Server. It consists of three buttons: Static Report, Dynamic Report, and Option.

 Static Report
 Dynamic Report
 Options

Static Report
For a static report, data is retrieved at the time the report is published to the Wonderware
Information Server. After that, its content remains static and does not change when the users
access it.

Dynamic Report
Dynamic Workbook reports include on-demand and scheduled reports. On demand reports are
executed at a user’s request, while scheduled reports are executed automatically on a defined
schedule.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Workbook 3-19

Options
You can configure the global settings related to formatting, time zone usage, data sources, and
other general options. You also can set values for formatting and date/time options, and then
reference them from the functions in your Workbook. Finally, you can set up custom filters for your
reports. The Options button consists of the following submenu items.

 Options
 Set Base Date/Time
Options
You can configure the settings related to formatting, time zone usage, data sources, and other
general options. Formatting is applied to all of the data that is inserted as a result of using the
Workbook wizards. The data source and time zone settings are applied to all functions.

Historian Client 2014 R2


3-20 Wonderware Historian Client Workbook

Set Base Date/Time


The base date and time parameters can be used within the history and aggregate functions
instead of actual dates/times. The base date and time are stored with the current workbook and
affect only the active workbook. By using these parameters, you can create generic reports that
accommodate any date/time, besides being able to change the base date and base time for the
workbook.

Status
The Status group provides details related to the Wonderware Historian Server, license
information, and Historian Client information.

The Status group consists of three buttons.


 Historian Server Details
 License Status
 About Historian Client

Historian Sever Details


The Historian Server Details button provides details for all of the Wonderware Historian Servers
that have been configured for use within the Wonderware Historian Client Workbook.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Workbook 3-21

License Status
The License Status button provides license information.

About Historian Client


The About Historian Client button provides information on the Wonderware Historian Client.

Historian Client 2014 R2


3-22 Wonderware Historian Client Workbook

Wonderware Training
Lab 6 – Using Historian Client Workbook Basic Functions 3-23

Lab 6 – Using Historian Client Workbook


Basic Functions
Introduction
In this lab, you will use the basic functionality of Wonderware Historian Client Workbook.

Objectives
Upon completion of this lab, you will be able to:
 Insert a Live Value function in Wonderware Historian Client Workbook
 Insert a History Value function in Wonderware Historian Client Workbook

Historian Client 2014 R2


3-24 Wonderware Historian Client Workbook

Create a New Workbook


1. Open Wonderware Historian Client Workbook.
A new workbook opens.
2. In cell A1, enter Reactor and press Enter.
3. Format cell A1 as follows:
Font: Arial
Font Size: 14
Bold Face: Yes

4. In cell A2, enter =NOW() and press Enter.


This cell displays the current date and time.

5. Click cell A4.


6. Click the Historian menu.

Wonderware Training
Lab 6 – Using Historian Client Workbook Basic Functions 3-25

7. On the Historian menu ribbon, click Tag Selection, and then click Tag Selection.

The Tag Selection dialog box appears.

Historian Client 2014 R2


3-26 Wonderware Historian Client Workbook

Insert a Live Value Function


8. In the Tag Selection dialog box, in the Servers pane, click the Historian Server.
9. In the Filter pane, in the Tag Name field, enter React%.

10. Click Apply.


All tags starting with React appear in the Tags pane.

Wonderware Training
Lab 6 – Using Historian Client Workbook Basic Functions 3-27

11. Select the ReactLevel and ReactTemp tags.


12. Ensure that the Select cell range to insert tags field contains the reference $A$4.

13. Click OK.


The tags appear in cells A4 and A5.

Historian Client 2014 R2


3-28 Wonderware Historian Client Workbook

14. Click cell B3.


15. On the Historian menu ribbon, click Tag Values, and then click Live Values.

The Live Values wizard appears.


16. In the Live Values - Step 1 of 3 dialog box, click the Select cell(s) containing tag name(s)
field.
17. On the worksheet, select the cells containing the tag names ReactLevel and ReactTemp.
In this example, the cell reference is Sheet1!$A$4:$A$5.

18. Click Next.

Wonderware Training
Lab 6 – Using Historian Client Workbook Basic Functions 3-29

19. In the Live Values - Step 2 of 3 dialog box, ensure that the Select cell for output field shows
$B$3 and that the Enter the results as an array-formula check box is checked (default).

20. Click Next.


21. In the Live Values - Step 3 of 3 dialog box, uncheck the Quality check box.

22. Click Finish.

Historian Client 2014 R2


3-30 Wonderware Historian Client Workbook

The data is displayed in the workbook.

23. On the Historian menu ribbon, click Refresh Sheet to update the tag values on the sheet.

24. Save the report as MyReport.xlsx to the C:\Training folder.

Wonderware Training
Lab 6 – Using Historian Client Workbook Basic Functions 3-31

Insert a History Value Function


25. On the workbook, click the Sheet2 worksheet.

26. On the Historian menu ribbon, click Tag Values, and then click History Values.

The History Values wizard appears.


27. In the History Values - Step 1 of 4 dialog box, ensure that the Select cell(s) containing tag
name(s) field contains the reference to the two tags ReactLevel and ReactTemp from
Sheet1.
In this example, the cell reference is Sheet1!$A$4:$A$5.

28. Click Next.


The History Values - Step 2 of 4 dialog box appears.

Historian Client 2014 R2


3-32 Wonderware Historian Client Workbook

29. In the History Values - Step 2 of 4 dialog box, ensure that the Select cell for output field
contains $A$1 and that the Enter the results as an array-formula check box is checked
(default).

30. Click Next.


The History Values - Step 3 of 4 dialog box appears.
31. Click More >> to see all the display options.

Wonderware Training
Lab 6 – Using Historian Client Workbook Basic Functions 3-33

The History Values - Step 3 of 4 More dialog box appears.

32. Uncheck the wwRetrievalMode check box.

Historian Client 2014 R2


3-34 Wonderware Historian Client Workbook

33. Click the Format tab.


34. Verify that the Tag based criteria (wide tables) option is selected.

35. Click the Retrieval tab.


36. On the Main Options tab, change the Retrieval mode to BestFit.
37. Verify that the Values over equal time intervals is set to 100.

38. Click Next.


The History Values - Step 4 of 4 dialog box appears.

Wonderware Training
Lab 6 – Using Historian Client Workbook Basic Functions 3-35

39. In the History Values - Step 4 of 4 dialog box, retain the default Relative time value as - 10
Minutes from Now.
This defines the relative time period of the query function.

40. Click Finish.

Historian Client 2014 R2


3-36 Wonderware Historian Client Workbook

The query returns the values for the specified time period using the BestFit retrieval mode.

41. Save MyReport.xlsx.


42. From the File Menu, click Close to close MyReport.xlsx.

Wonderware Training
Lab 7 – Using the Tag Analysis Wizard 3-37

Lab 7 – Using the Tag Analysis Wizard


Introduction
This lab demonstrates the functionality of the Tag Analysis wizard of Wonderware Historian Client
Workbook.

Objective
Upon completion of this lab, you will be able to:
 Add process data charts to an Excel report using the Tag Analysis wizard

Historian Client 2014 R2


3-38 Wonderware Historian Client Workbook

Use the Tag Analysis Wizard


This task demonstrates configuration of a Scatter analysis.
1. Create a new workbook.
2. Click the Historian menu.
3. On the Historian menu ribbon, click Tag Analysis.

The Tag Analysis wizard appears.


4. In the Select type of analysis list, click Scatter analysis.

5. Click Next.
6. In the Tag Analysis - Step 2 of 4 dialog box, ensure that the Servers drop-down list displays
the name of your Historian Server.

Wonderware Training
Lab 7 – Using the Tag Analysis Wizard 3-39

7. Next to the Analog tag field, click the Ellipsis button to change the tag.

The Select tag dialog box appears.

Historian Client 2014 R2


3-40 Wonderware Historian Client Workbook

8. In the Tags pane, find and select Reactor_001.ReactLevel.

9. Click OK.
10. In the Tag Analysis - Step 2 of 4 dialog box, next to the Analog tag 2 field, click the Ellipsis
button.
11. In the Select tag dialog box, locate and select the Reactor_001.ReactTemp tag.

12. Click OK.


13. Click Next.
The Tag Analysis - Step 3 of 4 dialog box appears.

Wonderware Training
Lab 7 – Using the Tag Analysis Wizard 3-41

14. In the Starting time field, retain the default date and time.

15. Click Next.


The Tag Analysis - Step 4 of 4 dialog box appears.

For this lab, retain the default values.


16. Click Finish.

Historian Client 2014 R2


3-42 Wonderware Historian Client Workbook

A new worksheet is created and the input tags are inserted into column A.

Analog Tag Analysis


Through Analog tag analysis you can create graphs and trends, calculate statistics, and return
information regarding configuration and limits.
17. On the Historian menu ribbon, click Tag Analysis.
The Tag Analysis - Step 1 of 5 dialog box appears.
18. In the Select type of analysis list, click Analog tag analysis.

19. Click Next.

Wonderware Training
Lab 7 – Using the Tag Analysis Wizard 3-43

The Tag Analysis - Step 2 of 5 dialog box appears. Ensure that the Servers drop-down list
displays the name of your Historian Server.
20. In the Analog tag field, change the Analog tag to ReactTemp.

21. Click Next.


The Tag Analysis - Step 3 of 5 dialog box appears.

22. Retain the default values and click Next.

Historian Client 2014 R2


3-44 Wonderware Historian Client Workbook

The Tag Analysis - Step 4 of 5 dialog box appears.

23. Retain the default values and click Next.


The Tag Analysis - Step 5 of 5 dialog box appears.
24. Retain the default values for this InTouch tag.

Note: When an InTouch tag, having the Hi and HiHi alarm limits defined, is used with the
Analog tag analysis, the defined alarm limits are automatically used. If a System Platform tag
had been used in this example, if would have been necessary to manually enter specific
values for Limit 1 and Limit 2 because a System Platform tags does not pass along its alarm
limits.

25. Click Finish.

Wonderware Training
Lab 7 – Using the Tag Analysis Wizard 3-45

The worksheet displays the tag graph, trends, statistics, and information regarding
configuration and limits.

26. Save the report as TagAnalysis.xlsx in the C:\Training folder and close the workbook.

Historian Client 2014 R2


3-46 Wonderware Historian Client Workbook

Wonderware Training
Section 2 – Historian Event Retrieval 3-47

Section 2 – Historian Event Retrieval


This section explains the various event tag selection methods and the Historian event retrieval
functionality.

Event Retrieval
Using the functions available in Wonderware Historian Client Workbook, you can select specific
event tags from the database and retrieve different types of values for these tags.

Select Event Tags


To select event tags, do the following:
1. On the Historian ribbon, click Tag Selection, and then click Tag Selection.

Historian Client 2014 R2


3-48 Wonderware Historian Client Workbook

The Tag Selection dialog box appears.


2. In the Servers pane, expand the Historian Server and Public Groups, and then click the All
Event Tags folder.

3. In the Tags Window, select an Event Tag.


4. In the Filter area, check the Include description check box to include tag descriptions in the
results.
5. In the Select cell range to insert tags list, click the name of the workbook cell into which you
want to insert the tags.

6. Click OK.

Wonderware Training
Section 2 – Historian Event Retrieval 3-49

Select Summary Tags


A tag for which an aggregation calculation, such as minimum, maximum, average, or sum is
already configured is called a summary tag.
To select summary tags, do the following:
1. On the Historian ribbon, click Tag Selection, and then click Summary Tag Selection.

The Summary Tag Selection dialog box appears.

2. In the Servers list, specify the name of the server.

Historian Client 2014 R2


3-50 Wonderware Historian Client Workbook

3. In the Filter pane, configure the criteria by which the summary tags are filtered and displayed
in the Select tags to insert into workbook window. The summary tags have the following
summary operations:
 Summarization frequency – Configure the time duration (in seconds) for which the
calculation is performed
 Calculation type – Configure the type of calculation as Sum, Maximum, Minimum, or
Average
 Tag name – Configure the name of the tag within the Wonderware Historian Server
 Description – Provide a description for the tag
4. Check the Include description check box to include tag descriptions in the results.
5. In the Select cell range to insert tags list, click the name of the workbook cell into which you
want to insert the tags.
6. Click OK to insert the summary tags into the selected cell.

Select Event Snapshot Tags


You can retrieve the values for snapshot tags associated with a particular event. For this, you can
use the Event Snapshot Tag Selection option of the Tag Selection button. The Event Snapshot
Tag Selection option enables you to select specific event snapshot tags. Using the event
snapshot tags, you can view the data values for selected analog, discrete, or string tags that have
the same time-stamp as a detected event. This provides you with a snapshot of selected data
values at the time of an event.
1. To select an event snapshot tag, do the following:
2. On the Historian ribbon, click Tag Selection, and then click Event Snapshot Tag Selection.

Wonderware Training
Section 2 – Historian Event Retrieval 3-51

The Event Snapshot Tag Selection dialog box appears.

3. In the Servers list, specify the name of the server.


4. In the Filter pane, configure the criteria by which the event tags are filtered and displayed in
the Select tags to insert into workbook window.
 Event tag – Specify the name of the event tag to which the snapshot tag is related
 Snapshot tag type – Specify the type of snapshot as Analog, Discrete, or String
5. Check the Include description check box to include tag descriptions in the results.
6. In the Select cell range to insert tags list, click the name of the workbook cell into which you
want to insert the tags.

7. Click OK.

Historian Client 2014 R2


3-52 Wonderware Historian Client Workbook

Retrieve Summary Values


You can retrieve summary values for only those tags that are configured to be summarized by the
Wonderware Historian event subsystem.
To retrieve a summary value, do the following:
1. Open a workbook.
2. In the cells, enter tag names.
3. On the Historian ribbon, click Tag Values, and then click Summary System Values.

The Summary Values - Step 1 of 4 dialog box appears.

4. In the Server list, specify the name of the server.


5. In the Select cell(s) containing tag name(s) list, specify the location of the worksheet cell(s)
that contains the tag name(s).

Note: If you want to use a named tag range variable, click Binding Options, and then
configure the range.

6. Click Next.

Wonderware Training
Section 2 – Historian Event Retrieval 3-53

The Summary Values - Step 2 of 4 dialog box appears.

7. In the Select cell for output list, specify the location of the worksheet cell(s) that will contain
the output.
8. Check 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 single result or
multiple results. An array formula resends the query, since the query parameters are included
in the cells that contain the query results.
9. If you desire special formatting for your query results, check the Select cells to specify
format options check box to specify a range of cells that contain the formatting information.
The formatting information in the cells will be applied to the query results.
10. Click Next.

Historian Client 2014 R2


3-54 Wonderware Historian Client Workbook

The Summary Values - Step 3 of 4 dialog box appears.

11. Configure the criteria for the query.


In the Display options tab, you can configure one or more of the following options to be
shown as columns in the results:
 Tag name – Specify the name of the tag within the Wonderware Historian Server
 Date time – Specify the time-stamp for the returned value

Note: For delta retrieval, Date time is the time at which the value was acquired by the
Wonderware Historian Server. For cyclic retrieval, this is the specific time requested or
calculated using an SQL function.

 Include milliseconds – Include milliseconds in the timestamp


 Quality – Specify the basic data quality indicator associated with the data value
 Replace poor quality values – Replace the current value with the text string of poor if
the value has a quality <> 0 or 133
 Detect date time – Specify what the time-stamp reflected when the event was detected by
the event system

Note: The Detect date time option is only applicable to event tags.

 OPC Quality – Specify the quality value received from the data source

Wonderware Training
Section 2 – Historian Event Retrieval 3-55

In the Summary options tab, you can configure the criteria by specifying the type of summary
data to be displayed in the result. You can configure the following options:
 Calculation type – Specify the type of calculation as Sum, Maximum, Minimum, or
Average
 Calculation frequency – Specify the time duration (in seconds) for which the calculation
is performed

12. Click Next.


The Summary Values - Step 4 of 4 dialog box appears.

Historian Client 2014 R2


3-56 Wonderware Historian Client Workbook

13. Configure the time for the query. You can configure one of the following time options:
 Relative time – Specify that the query uses a relative time in the past for the starting date
 Absolute time – Specify fixed start and end dates. You can either specify a time range or
a single point in time. If you specify a single point in time, only single tag value at that point
in time is retrieved
 Bound times – Specify that the values, which are currently assigned to the
AFStartBinding and AFEndBinding named ranges, are used for the start and end times

Note: The Bound times option only appears if the Bound Tags of Type option is selected
in a data retrieval wizard.

14. Click Finish.

Retrieve Event Snapshot Values


You can retrieve event snapshot values only for snapshot tags that are associated with an event.
To retrieve event snapshot values, do the following:
1. Open a workbook.
2. In the cells, enter tag names.

Note: Use the Event Snapshot Tags Selection option to select snapshot tags.

3. On the Historian ribbon, click Tag Values, and then click Event Snapshot Values.

The Event Snapshot Values - Step 1 of 4 dialog box appears.


4. In the Server list, specify the name of the server, as required.
5. In the Select cell(s) containing an event tag name(s) list, specify the location of the
worksheet cell(s) that contains the event tag name(s).

Wonderware Training
Section 2 – Historian Event Retrieval 3-57

6. In the Select cell(s) containing snapshot tag name(s) list, specify the location of the
worksheet cell(s) that contains the snapshot tag name(s).

7. Click Next.
The Event Snapshot Values - Step 2 of 4 dialog box appears.
8. In the Select cell for output list, specify the location of the worksheet cell(s) that will contain
the output.
9. Check the Enter the results as an array-formula check box to insert the results as an array
formula.
10. Check the Select cells to specify format options 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.
11. Click Next.
The Event Snapshot Values - Step 3 of 4 dialog box appears.
12. Configure the criteria for the query. You can configure one or more of the following criteria:
 Tag name
 Date time
 Include milliseconds
 Quality
 Replace poor quality values
 Detect date time
 OPC Quality
13. Click Next.
The Event Snapshot Values - Step 4 of 4 dialog box appears.

Historian Client 2014 R2


3-58 Wonderware Historian Client Workbook

14. Configure the time for the query. You can configure one of the following time options:
 Bound times
 Relative time
 Absolute time
15. Click Finish.

Wonderware Training
Lab 8 – Working with Event Data 3-59

Lab 8 – Working with Event Data


Introduction
In this lab, you will learn how to incorporate event data into Wonderware Historian Client
Workbook. The Historian Server configuration used in this lab includes two prebuilt events,
TransferEvent and HiLevelEvent. The TransferEvent captures snapshot data based on a discrete
condition. The second event, HiLevelEvent, captures aggregate information on certain tags based
on an analog condition.

Objective
Upon completion of this lab, you will be able to:
 Incorporate event data into Wonderware Historian Client Workbook

Historian Client 2014 R2


3-60 Wonderware Historian Client Workbook

Build Tag Lists


1. Create a new workbook with three worksheets. Add worksheets, if necessary.
2. Rename the Sheet1 worksheet to Summaries.
3. Rename the Sheet2 worksheet to Snapshots.
4. Rename the Sheet3 worksheet to Tag Lists.

Note: Ensure that the Tag Lists worksheet is the active worksheet until you are instructed to
shift to another worksheet.

5. On the Tag Lists worksheet, enter Snapshots Tags in cell A1.


6. Click cell A3.
7. Click the Historian menu.
8. On the Historian menu ribbon, click Tag Selection, and then click Event Snapshot Tag
Selection.

The Event Snapshot Tag Selection dialog box appears. Ensure that your Historian Server is
displayed in the Server field.

Wonderware Training
Lab 8 – Working with Event Data 3-61

9. In the Event tag drop-down list, click TransferEvent.


10. In the Tag name list, select all four tags:
 BatchNumber
 ProdLevel
 ReactLevel
 ReactTemp

Note: Tags may be used in multiple events. In this Lab, all four tags are used in the Snapshot
Event. However, only ProdLevel, ReactLevel, ReactTemp are reused in the Summary Event.

11. Click OK.


All four tags appear in the Tag Lists worksheet, starting from cell A3.

12. On the Tag Lists worksheet, enter Summary Tags in cell C1.
13. Click cell C3.
14. Click the Historian menu.

Historian Client 2014 R2


3-62 Wonderware Historian Client Workbook

15. On the Historian menu ribbon, click Tag Selection, and then click Tag Selection.

The Tag Selection dialog box appears. Ensure that your Historian Server is displayed in the
Server field.

16. Find and select the following tags:


 Reactor_001.ReactLevel
 Reactor_001.ReactTemp
 StorageTank_001.ProdLevel

Wonderware Training
Lab 8 – Working with Event Data 3-63

17. Click OK.


All three tags appear in the Tag Lists worksheet, starting from cell C3.

18. On the Tag Lists worksheet, enter Event Tags in cell E1.
19. Click cell E3.
20. On the Historian menu ribbon, click Tag Selection, and then click Tag Selection.

The Tag Selection dialog box appears.


21. In the Servers pane, expand the Historian Server and Public Groups, and then click All Event
Tags.
22. If necessary, remove any filter data from the Filter pane.

Historian Client 2014 R2


3-64 Wonderware Historian Client Workbook

23. In the Tags pane, select the HiLevelEvent and TransferEvent tags.

24. Click OK.


The event tags appear in the Tag Lists worksheet, in cells E3 and E4.

Wonderware Training
Lab 8 – Working with Event Data 3-65

Retrieve Summary Event Data


25. In the workbook, click the Summaries worksheet.
26. In cell A1, enter Summary Data for HiLevelEvent and press Enter.

Note: Increase the size of the text, if desired.

27. Click cell A3.


28. On the Historian menu ribbon, click Tag Values, and then click Summary System Values.

The Summary Values - Step 1 of 4 dialog box appears.


29. Click in the Select cell(s) containing tag name(s) field.
30. Click the Tag Lists worksheet and select the cells containing the tags
Reactor_001.ReactLevel, Reactor_001.ReactTemp and StorageTank_001.ProdLevel.

Historian Client 2014 R2


3-66 Wonderware Historian Client Workbook

In this example, the cell reference is ‘Tag Lists’!$C$3:$C$5.

31. Click Next.


The Summary Values - Step 2 of 4 dialog box appears.
32. Ensure that the Enter the results as an array-formula check box is checked.

33. Click Next.


The Summary Values - Step 3 of 4 dialog box appears.

Wonderware Training
Lab 8 – Working with Event Data 3-67

34. Uncheck the Quality check box, if necessary.

35. Click Summary options tab.


36. In the Calculation type field, select Average from the drop-down list.
37. In the Calculation frequency field, ensure the value is set to 600.

38. Click Next.

Historian Client 2014 R2


3-68 Wonderware Historian Client Workbook

The Summary Values - Step 4 of 4 dialog box appears.


39. Specify the Relative time as -30 Minutes from Now.

40. Click Finish.


The specified configured summary values are retrieved for the tags selected from the Tag
Lists worksheet.

Wonderware Training
Lab 8 – Working with Event Data 3-69

Retrieve Event Snapshot Data


41. On the workbook, click the Snapshots worksheet.
42. In cell A1, enter Transfer Event Snapshot Data and press Enter.

Note: Increase the font size of the text, if desired.

43. Click cell A3.

44. On the Historian menu ribbon, click Tag Values, and then click Event Snapshot Values.

The Event Snapshot Values - Step 1 of 4 dialog box appears.


45. Click in the Select cell containing an event tag name field.
46. Click the Tag Lists worksheet and select the cell containing the tag TransferEvent.
In this example, the cell reference is ‘Tag Lists’!$E$4.
47. Click in the Select cell(s) containing snapshot tag name(s) field.

Historian Client 2014 R2


3-70 Wonderware Historian Client Workbook

48. Click the Tag Lists worksheet and select the cells containing all the four tags: BatchNumber,
ProdLevel, ReactLevel, and ReactTemp.
In this example, the cell reference is ‘Tag Lists’!$A$3:$A$6.

49. Click Next.


The Event Snapshot Values - Step 2 of 4 dialog box appears.
50. Ensure that the Enter the results as an array-formula check box is checked.

51. Click Next.

Wonderware Training
Lab 8 – Working with Event Data 3-71

The Event Snapshot Values - Step 3 of 4 dialog box appears.

52. Check the Detect date time check box.

53. Click Next.

Historian Client 2014 R2


3-72 Wonderware Historian Client Workbook

54. Specify the Relative time as -15 Minutes from Now.

55. Click Finish.


In the Snapshots worksheet, you will see a snapshot of the data every time the
TransferEvent was triggered.

56. Save the report as Event Data.xlsx to the C:\Training folder and close the workbook.

Wonderware Training
Section 3 – Enhanced Workbook with Excel Functionality 3-73

Section 3 – Enhanced Workbook with Excel Functionality


This section explains how to use the features of the enhanced workbook with Excel functionality
to create reports to get data for a specified shift.

Introduction
Using the enhanced workbook features with Microsoft Excel functionality, you can create hourly
average shift reports that helps generate data for a specified shift. The Enhanced workbook
features enable the use of formatting, Aggregate Values function, and time ranges within Microsoft
Excel. These functions make shift reports more useful.

Historian Client 2014 R2


3-74 Wonderware Historian Client Workbook

Wonderware Training
Lab 9 – Using Excel References with Workbook 3-75

Lab 9 – Using Excel References with


Workbook
Introduction
In this lab you will create insert an Aggregate Value Function, an Excel Named Range, and then
use the Named Range feature to capture Live Values. You will then change the tagnames
identified within the Named Range and view how the Live Values change to reflect the new tags.

Objectives
Upon completion of this lab, you will be able to:
 Insert an Aggregate Value function using cell references for date and time references
 Use the Microsoft Excel Named Ranges feature to configure tag references

Historian Client 2014 R2


3-76 Wonderware Historian Client Workbook

Insert an Aggregate Value Function


In this task you will create an average Aggregate Value using cell references. Changing the cell
references will change the average value.
1. Create a new workbook with three blank worksheets.
2. Select Sheet1.

3. In cell A1, enter SysTimeSec and press Enter.


4. In cell A3, enter Start Time and press Enter.
5. In cell A4, enter End Time and press Enter.
6. Expand Column A as desired.
7. In cell B3, enter a date and time relative to class time as the Start Time value and press
Enter.

Note: An example of the format for the time value is 4/6/2011 10:00.

8. In cell B4, enter a date and time 5 minutes later than the Start Time value specified in step 5
as the End Time value and press Enter.

Note: The end time is 5 minutes after the start time as the average value will be calculated
for the last 5 minutes.

The workbook should now appear as follows:

9. On the Historian menu ribbon, click Tag Values, and then click Aggregate Values.

Wonderware Training
Lab 9 – Using Excel References with Workbook 3-77

The Aggregate Values - Step 1 of 4 dialog box appears.


10. In the Select cell(s) containing tag name(s) field, click in the middle of the field, and then
select cell A1. Ensure that the field’s cell reference is Sheet1!$A$1.

11. Click Next.


The Aggregate Values - Step 2 of 4 dialog box appears.
12. In the Select cell for output field, click in the middle of the field, and then select cell A7.
Ensure that the field’s cell reference is Sheet1!$A$7 and that the Enter the results as an
array-formula check box is checked.

13. Click Next.

Historian Client 2014 R2


3-78 Wonderware Historian Client Workbook

The Aggregate Values - Step 3 of 4 dialog box appears.


14. Click the Calculations tab.
15. In the Calculation type drop-down list, click Average.

16. Click Next.


The Aggregate Values - Step 4 of 4 dialog box appears.
17. Click the Absolute time option.
18. Under the Absolute time option, click the first date and time option.

19. In the field on the left, specify the cell reference as Sheet1!$B$3.

Wonderware Training
Lab 9 – Using Excel References with Workbook 3-79

Note: Under the Absolute time option, the left field indicates the start time of the aggregate
time span.

20. In the field on the right, specify the cell reference as Sheet1!$B$4.

Note: Under the Absolute time option, the right field indicates the end time of the aggregate
time span.

21. Click Finish.


The aggregate value appears in the worksheet.

Note: You can alter the time in the cells B3 and B4. The tag average value will change
accordingly.

Historian Client 2014 R2


3-80 Wonderware Historian Client Workbook

Configure Named Ranges


Instead of referencing multiple cells, you can give the group of cells a name and then reference
just that name.
22. In the workbook, click the Sheet2 worksheet.

23. Click Tag Selection, and then click Tag Selection.

The Tag Selection dialog box appears.


24. Select the following tags:
 BatchNumber
 ProdLevel
 ReactLevel
 ReactTemp

Note: Click Clear if the filter information is still applied.

25. Ensure that the value for the Selected cell range to insert tags is $A$1.

26. Click OK.

Wonderware Training
Lab 9 – Using Excel References with Workbook 3-81

27. Select cells A1 through A4.

28. In the name box, enter AnalogTags and press Enter.

29. In the workbook, click the Sheet3 worksheet.

Placing the named range tag list to another sheet in the workbook enables better formatting
with less duplication of tag names.
30. Click cell A1.
31. Click Tag Values, and then click Live Values.

The Live Values - Step 1 of 3 dialog box appears.

Historian Client 2014 R2


3-82 Wonderware Historian Client Workbook

32. In the Select cell(s) containing tag name(s) field, enter AnalogTags.

33. Click Next.


The Live Values - Step 2 of 3 dialog box appears.
34. In the Select cell for output field, click in the middle of the field and then click cell A1. Ensure
that the cell reference is Sheet3!$A$1.

35. Click Next.


The Live Values - Step 3 of 3 dialog box appears.

Wonderware Training
Lab 9 – Using Excel References with Workbook 3-83

36. Retain the default values.

37. Click Finish.


The tag name range is inserted into the worksheet.

38. In the workbook, click the Sheet2 worksheet.


39. Replace the BatchNumber tag with SteamValve tag.
40. Replace the ProdLevel tag with StorageTank_001.ProdLevel tag.
41. Replace the ReactLevel tag with Reactor_001.ReactLevel tag.
42. Replace the ReactTemp tag with Reactor_001.ReactTemp tag.

Historian Client 2014 R2


3-84 Wonderware Historian Client Workbook

43. On the workbook, click the Sheet3 worksheet to observe the changes.

Save the report as Configure Named Ranges.xlsx in the C:\Training folder and close the
worksheet.

Wonderware Training
Lab 10 – Creating an Hourly Average Shift Report 3-85

Lab 10 – Creating an Hourly Average Shift


Report
Introduction
In this lab you will use aggregate functions, format editing, and time ranges within Microsoft Excel.
At the end of this lab, you will create a report for a given shift.

Objectives
Upon completion of this lab, you will be able to:
 Create shift time range
 Insert the Aggregate Values function
 Modify Wonderware Historian Client Workbook formulas

Historian Client 2014 R2


3-86 Wonderware Historian Client Workbook

Create and Format a New Report


1. Create a new workbook.
2. In cell A1, enter Hourly Average Data Acquisition IPS and press Enter.

Note: Increase the font size, if desired.

3. Click cell A3.


4. On the Historian menu ribbon, click Tag Selection, and then click Tag Selection.

The Tag Selection dialog box appears.


5. Locate and select the SysDataAcqOverallItemsPerSec tag.
6. Click OK.

Wonderware Training
Lab 10 – Creating an Hourly Average Shift Report 3-87

Create Shift Time Range


7. In cell A5, enter a date and time that is at least seven hours prior to class time and press Enter
to specify the start date and time.
8. In cell A6, enter =A5+1/24 and press Enter.

9. Click 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.
10. Drag the handle down to cell A12.
This will increment each of the highlighted cells by 1 hour.

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.

Historian Client 2014 R2


3-88 Wonderware Historian Client Workbook

Insert the Aggregate Value Function


11. On the Historian menu ribbon, click Tag Values, and then click Aggregate Values.

The Aggregate Values - Step 1 of 4 dialog box appears.


12. Click in the middle of the Select cell(s) containing tag name(s) field, and then select cell A3.
Ensure that the field’s cell reference is Sheet1!$A$3

13. Click Next.


The Aggregate Values - Step 2 of 4 dialog box appears.

Wonderware Training
Lab 10 – Creating an Hourly Average Shift Report 3-89

14. Double-click in the middle of the Select cell for output field, and then select cell C5. Ensure
that the field’s cell reference is Sheet1!$C$5.

15. Click Next.


The Aggregate Values - Step 3 of 4 dialog box appears.
16. Click the Calculations tab.
17. In the Calculation type drop-down list, select Average, if necessary.

18. Click the Resolution tab.


19. Select the Values spaced every option.
20. Set the number to 60000 ms.

Historian Client 2014 R2


3-90 Wonderware Historian Client Workbook

Note: This value sets the data retrieval mode to Cyclic at an interval of one minute.

21. Click Next.


The Aggregate Values - Step 4 of 4 dialog box appears.
22. Click the Absolute time option.
23. Under the Absolute time option, click the first date and time option.
24. In the field on the left, specify the cell reference as Sheet1!$A$5.
25. In the field on the right, specify the cell reference as Sheet1!$A$6.

26. Click Finish.

Wonderware Training
Lab 10 – Creating an Hourly Average Shift Report 3-91

The average value for the hour appears alongside the date and time cell.

Note: The average value represents the average between the first and second time stamp.
The value in cell C6 is the average of the time stamp in cells C5 and C6.

Modify Cell Formulas


27. Click cell C6.
The wwAggregate function string appears in the formula bar.

Changing the cell reference creates relative cell referencing and enables the average values
to be cascaded down the column.
28. In the formula bar, modify a portion of the function string from Sheet1!$A$5,Sheet1!$A$6 to
Sheet1!$A5,Sheet1!$A6.

29. Press Enter to save the changes.


30. Click cell C6 and position the cursor over the bottom-right of the cell.
The cursor should turn into a + icon, indicating a handle.

Historian Client 2014 R2


3-92 Wonderware Historian Client Workbook

31. Drag the handle down to cell C12.

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 tag name reference or the date and time within the worksheet field
and Wonderware Historian Client Workbook will calculate the new values.
32. Save the report as Hourly Average Shift.xlsx in the C:\Training folder and close the
workbook.

Wonderware Training
Module 4 – Wonderware Historian Client
Query
Section 1 – Introduction to Wonderware Historian Client Query 4-3
Lab 11 – Using Wonderware Historian Client Query 4-11
Lab 12 – Using Wonderware Historian Client Query in Workbook 4-29
4-2 Wonderware Historian Client Query

Module Objectives
 Discuss the features and functionality of Wonderware Historian Client Query, including
how to retrieve specific tag information

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Query 4-3

Section 1 – Introduction to Wonderware Historian Client Query


This section introduces Wonderware Historian Client Query uses and operation.

Wonderware Historian Client Query provides a point-and-click interface to construct and analyze
the execution of the queries specifically designed for the Wonderware Historian Server.
Wonderware Historian Client Query provides an efficient and simple method to develop both,
simple and complex, queries for reporting. This also enables you to build reports to meet custom
application requirements. It is also an excellent way to learn the proper syntax for developing
queries for the Historian Server.
It is easier to build Structured Query Language (SQL) queries for reporting and custom application
requirements by using the Wonderware Historian Client Query’s point-and-click interface. In
addition, the query results are immediately available for use. You can also write custom queries if
you know SQL syntax and the schema of the database that you are using.
Wonderware Historian Client Query dynamically reconstructs and tests queries as the user makes
changes. Query has an easy access to the Historian Server data. Therefore, it provides easy
construction of the SQL queries to perform tag searches, obtain tag details and server information,
and get current, history, aggregate, summary, and event snapshots values.
By using Wonderware Historian Client Query you can construct queries for use against the
Historian Server version 7.1 or later. Wonderware Historian Client Query also uses and
understands the Historian Server custom extensions.
Wonderware Historian Client Query enables you to save queries to run at a later time. It also
enables you to save the query results.

Query Operation
Numerous distinct query types can be selected from the Query toolbar. These include Custom
queries and the Favorites 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.

Historian Client 2014 R2


4-4 Wonderware Historian Client Query

Start Query
Open Wonderware Historian Client Query (Start | All Programs | Wonderware | Historian Client
| 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.

Query Interface
Wonderware Historian Client Query consists of the following interface elements:
 Main Toolbar
 Query Toolbar
 Tag Picker
 Columns Pane
 Results Pane

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Query 4-5

Query Toolbar
The Query toolbar is used to select the query type, server, and database for the query. The Server
drop-down list contains the list of the connected servers. The Database drop-down list is only
available if the Query type is Custom.

Tag Picker
Tag Picker shows the tag groups and tags that exist in the database. It shows all the tags that are
visible to the currently logged in user, based on his or her permissions.
Using Tag Picker, you can quickly search the database for tags of a certain type and for tags that
match a particular search pattern. You can then select the ones that you want to include for the
client application or control.

Historian Client 2014 R2


4-6 Wonderware Historian Client Query

Columns Pane
The Columns pane is used to select the details for the query.

Results Pane
The Results pane is used to view the results of the queries that have been created. The Results
pane includes two tabs:
 SQL tab – The SQL tab shows the actual SQL statement that is sent to the server
 Data tab – The Data tab shows the data returned by the SQL statement

Build Queries
Wonderware Historian Client Query Columns pane displays different tabs, depending on the type
of query selected. Each tab provides various relevant configuration options to build your query.
The query results are displayed in the Results pane Data tab. The results change dynamically
whenever the query is redefined.
The Refresh query button on the Main toolbar is used to refresh your results.

As each of these options is chosen, the SQL being constructed can be viewed in the window when
the Query tab is selected. The query will change as each option is selected.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Query 4-7

View Constructed Queries


You can also keep a record of all the queries constructed. To keep a record of all queries, you
need to select the All queries option from the Options menu.

A third tab named All queries appears.

Once this option is enabled, all queries constructed can be viewed in the window of this tab.

Historian Client 2014 R2


4-8 Wonderware Historian Client Query

The following table lists the available query types and the tag types available within the Tag Picker
pane:

Query Types Description Available Tags Columns/Tabs


Aggregate Use to see aggregated Tag Filter Options: Format, Time, Criteria,
Values min, max, sum, average Analog and Discrete Calculations, and
values of the tags that Retrieval
you specify.

Alarm History For the Alarm History NA Columns, Time, Alarm


query, there are two tag Limits, Retrieval,
types: Analog and All. Source, and Order
Alarm Limits You can view the alarm Tag Filter Options: Alarm Limits
limits for a tag. For Analog
example, the Hi or Lo
alarm limit for an analog
tag.
Annotations Returns any annotations. Tag Filter Options: Criteria and Time
Analog, Discrete,
String, and Event
Custom Construct your own NA None (Editor field)
query and view the
results.
Event History Returns the time of Tag Filter Options: Columns, Time, and
Values specified events (i.e., Event. Order
when they occurred).
Event Returns the values of the Tag Filter Options: Tag Set, Columns,
Snapshot Snapshot tags Analog, Discrete, and Time, and Order
associated with the String
events at the time they
occur.
Favorites Sample files containing NA Favorites (Browser/
advanced queries that Ellipsis button)
leverage more complex
SQL. Select from these
queries to learn SQL that
does not appear in the
standard query options.
Modify the queries and
resave for future use in
your environment.
History Values Returns the history of the Tag Filter Options: Columns, Time,
tag values over time for Analog, Discrete, Format, Criteria,
specified tags. String, and All Retrieval, Source, and
Order
Includes format
configuration, and all the
InSQL time domain
extensions. Specify a
wide range of criteria
under which the data is
returned.
IO Server Build queries to return NA IO Server
the list of tags, including
the Summary tags.

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Query 4-9

Query Types Description Available Tags Columns/Tabs


Live Values Returns the real-time Tag Filter Options: Columns and Time
value of the specified Analog, Discrete, and
tags. String
Number of Returns the number of Tag Filter Options: Count
Tags tags by type. Analog, Discrete,
String, and Event
Server Version Returns the current NA None
server version of the
target server selected
from the Server drop-
down list.
Storage Returns statistics for NA Storage
Storage Type, Path, Max
and Min size thresholds.
Storage Size Returns the available NA None
Available storage space value on
Alternate, Buffer, Main,
and Permanent storage
locations.
Storage Start Returns the earliest start NA None
Date date from the
v_HistoryBlock table.
Summary Use this to see the All Columns, Time,
Values values calculated by the Calculations, and Order
summary system of the
tags that you specify.
Tag Details Obtains the configuration Tag Filter Options: Columns
information about the Analog, Discrete,
tags that you specify. String, and Event
Configuration
information defines how
a tag is acquired, stored
and displayed by default.
Tag Search Returns the tag name Tag Filter Options: Search
and description for the Analog, Discrete,
selected tag type. String, Event, and
Summary
Time Running Returns the total time (in NA None
minutes) the system has
been running.

Historian Client 2014 R2


4-10 Wonderware Historian Client Query

Configuration Options
You can also modify the font face of a query. To modify the font face of a query, do the following:
1. Click anywhere inside the SQL tab.
2. On the Main toolbar, click Configure the font.

The Font dialog box appears.

3. Select the required font type and size and click OK.

Wonderware Training
Lab 11 – Using Wonderware Historian Client Query 4-11

Lab 11 – Using Wonderware Historian Client


Query
Introduction
In this lab, you will use Wonderware Historian Client Query and understand the ease of
constructing various SQL queries in it. You will also use simple SQL queries, such as: Tag details
query, History values query, Aggregate values query using the Cyclic retrieval, and History values
query using the Average retrieval. You also will save these queries for reuse.

Objectives
Upon completion of this lab, you will be able to:
 Query the Historian Server Runtime database using the features of Wonderware Historian
Client Query
 Save custom queries for reuse

Historian Client 2014 R2


4-12 Wonderware Historian Client Query

Use Wonderware Historian Client Query to Create SQL Queries


1. Open Wonderware Historian Client Query.
The Query window appears.

Wonderware Training
Lab 11 – Using Wonderware Historian Client Query 4-13

Build a Tag Details Query


In this section, you will build a simple query to view the details of historized tags.
2. In the Query type drop-down list, select Tag details, if necessary.

3. In the Servers pane, expand the Historian server.


4. Expand Public Groups.
5. Select the Reactor-XX group, where XX is your student number.
The contents of the Reactor-XX group appear in the Tags pane.

Historian Client 2014 R2


4-14 Wonderware Historian Client Query

6. In the Results pane, click the SQL tab to view the query that was created.

7. In the Tags pane, select all the tags in the Reactor-XX group.

Notice that the SQL query changes dynamically.

8. Click the Data tab to view the result.

Note: Your results may differ due to changes made during class.

Wonderware Training
Lab 11 – Using Wonderware Historian Client Query 4-15

Build a History Values Query


In this section, you will create a Historical query with a criteria filter to view data within a value
range.
9. In the Query type drop-down list, click History values.
10. In the Tags pane, click the ReactTemp tag.

Historian Client 2014 R2


4-16 Wonderware Historian Client Query

11. In the Columns pane, Columns tab, uncheck all except the following:
 Tag Name
 Description
 Include milliseconds

Note: If any of the specified options are disabled in the Format tab, select the Narrow
query format option.

12. Click the Time tab.


13. In the Duration drop-down list, click 10 minutes.

Wonderware Training
Lab 11 – Using Wonderware Historian Client Query 4-17

14. Click the Criteria tab.


15. Check the Value check box.
16. In the drop-down list next to the Value check box, click >=, if necessary.
17. In the Value field, enter 180.
18. Check the Value not null check box.

19. Click the Retrieval tab.


20. In the Retrieval mode drop-down list, click Delta.
21. On the Retrieval tab, Query row limit field, enter 100 and then press Enter.
The results are shown in the Results pane on the Data tab.

Historian Client 2014 R2


4-18 Wonderware Historian Client Query

Build an Aggregate Values Query Using Cyclic Retrieval


In this section, you will use Historian Client Query to do an average calculation for a selected tag.
22. In the Query type drop-down list, click Aggregate values.

23. In the Columns pane, click the Criteria tab.


24. Uncheck the Value check box.

25. In the Tags pane, click the ReactLevel tag.


26. In the Columns pane, click the Calculations tab and ensure that the Average check box is
checked.

Wonderware Training
Lab 11 – Using Wonderware Historian Client Query 4-19

27. In the Results pane, click the Data tab to view the results.

Build an Event Snapshot Query


In this section, you will query details from the Historian Server event data.
28. In the Query type drop-down list, click Event snapshot.

29. In the Columns pane, click the Time tab.


30. In the Duration drop-down list, select 2 hours.

Historian Client 2014 R2


4-20 Wonderware Historian Client Query

31. In the Servers pane, click All Event Tags.


32. In the Tags pane, click the TransferEvent tag.

33. In the Columns pane, click the Tag set tab.


34. In the Snapshot tags list, click the ReactTemp tag.

Wonderware Training
Lab 11 – Using Wonderware Historian Client Query 4-21

35. In the Results pane, click the SQL tab.


Review and analyze the SQL query.

36. In the Columns pane, click the Columns tab.


37. Check the Detect date time check box.

38. Observe the results on the Data tab.

Historian Client 2014 R2


4-22 Wonderware Historian Client Query

Build a Query to Retrieve Annotations


In this section, you will build a query to view the annotations that were created earlier in the class.
39. In the Query type drop-down list, click Annotations.

40. At the bottom of the Tags pane, select the All tab. You may have to scroll to find it.

41. In the Servers pane, select the Reactor-XX group.


42. In the Tags pane, select the following tags:
 ProdLevel
 ReactLevel
 ReactTemp

43. In the Columns pane, click the Time tab.

Wonderware Training
Lab 11 – Using Wonderware Historian Client Query 4-23

44. In the Duration drop-down list, click 2 days.


This modifies the time span to enclose the time of the annotation.

45. Click the Criteria tab.


46. Check the Public and All users check boxes.

47. In the Results pane, click the Data tab to view the results.

48. On the Columns pane Criteria tab, check the All tags on server check box to see if the
results in the Data tab change.
49. Uncheck the All tags on server check box.

Historian Client 2014 R2


4-24 Wonderware Historian Client Query

Build a Query to Get Alarm Data Information


In this section, you will build a query to show alarm details and then use that information to build
and save queries for later use.
50. In the Query type drop-down list, click Alarm limits.

51. In the Tags pane, select the ReactLevel tag.


52. Click the Data tab to view the result.
Notice that the Hi value is 1800.

Wonderware Historian Client Query includes an option that records all the queries. Any query
can be saved and referred to at a later time to create a report.

Save Queries
53. On the Options menu, click All queries.

The All queries tab field will display all subsequent queries and make them available to be
copied into other applications, or saved to the Queries folder.

Wonderware Training
Lab 11 – Using Wonderware Historian Client Query 4-25

54. Change the Query type to History values and configure the following attributes:
Tab Set the following options to:
Columns Tag Name
Date and time (default)
Include milliseconds
Time 1 hour
Format Narrow (default)
Criteria Value > 1800
Retrieval Delta: By selecting this retrieval type, rows are
returned only when data changes.
Query row limit field to First 0 rows.
Note: Setting the number of rows to 0 will result in all
stored values being used.
Source Extension tables (default)

55. In the Results pane, click the Data tab.

Historian Client 2014 R2


4-26 Wonderware Historian Client Query

56. Save the results as Alarm Query.CSV to the C:\Training folder.

57. Click the All Queries tab to view the SQL code generated since the All Queries option was
enabled.

Wonderware Training
Lab 11 – Using Wonderware Historian Client Query 4-27

58. Save the results as Query1.sql to the default folder.

59. On the Query type drop-down, select Favorites.

60. Exit Wonderware Historian Client Query.

Historian Client 2014 R2


4-28 Wonderware Historian Client Query

Wonderware Training
Lab 12 – Using Wonderware Historian Client Query in Workbook 4-29

Lab 12 – Using Wonderware Historian Client


Query in Workbook
Introduction
Wonderware Historian Client Workbook contains a query building tool called Direct Query that
allows you to embed queries into the workbook. In this lab, you will embed queries into
Wonderware Historian Client Workbook.

Objective
Upon completion of this lab, you will be able to:
 Create SQL queries and view the results in Wonderware Historian Client Workbook

Historian Client 2014 R2


4-30 Wonderware Historian Client Query

Build Embedded Query


In this task you will embed a query directly into an Excel worksheet.
1. Open Wonderware Historian Client Workbook.
2. On the Historian menu ribbon, click Direct Query.

The Direct Query dialog box appears.


3. In the Direct Query dialog box, click Click to bring up the Query Form.

Wonderware Training
Lab 12 – Using Wonderware Historian Client Query in Workbook 4-31

The Wonderware Historian Client Query window appears.

4. In the Query type drop-down list, click History values.


5. In the Tags pane, select the following tags:
 BatchNumber
 ProdLevel
 ReactLevel
 ReactTemp

Historian Client 2014 R2


4-32 Wonderware Historian Client Query

6. In the Columns pane Format tab, select the Wide query format option.

Note: The wide query format ensures that the tag name will be the column title.

7. In the Results pane, view the results on the Data tab.

Wonderware Training
Lab 12 – Using Wonderware Historian Client Query in Workbook 4-33

8. In the Query window, click OK.


You return to the Direct Query dialog box, which now contains the query you built.

9. Click OK.

Historian Client 2014 R2


4-34 Wonderware Historian Client Query

The results appear on the worksheet in the selected format.

10. Save the workbook as Query Builder.xlsx in the C:\Training folder and close the workbook.

Wonderware Training
Module 5 – Wonderware Historian Client
Report
Section 1 – Introduction to Wonderware Historian Client Report 5-3
Lab 13 – Using Wonderware Historian Client Report 5-5
Section 2 – Use of Wildcards in Reports 5-15
Lab 14 – Using Wildcard Time Options and Editing a Report 5-19
5-2 Wonderware Historian Client Report

Module Objectives
 Discuss the features and functionality of Wonderware Historian Client Report
 Use the functions of Wonderware Historian Client Report and Microsoft Word to create
various types of Historian data report
 Explain the use of wildcards in Wonderware Historian Client Report

Wonderware Training
Section 1 – Introduction to Wonderware Historian Client Report 5-3

Section 1 – Introduction to Wonderware Historian Client Report


This section introduces the uses and operation of Wonderware Historian Client Report.

Introduction
Wonderware Historian Client Report is an add-in to Microsoft Word that allows you to query one or
more Wonderware Historian Server or SQL server databases and return results to a Microsoft
Word document. An add-in is a supplemental program that runs within the Microsoft Word
application and provides custom features and specialized commands.
If Wonderware Historian Client Report add-in is installed, an additional menu called Historian is
added to Microsoft Word.
After the add-in is loaded, the Historian menu contains all the commands that you use to create a
report document or report template using data from a Wonderware Historian Server or a normal
SQL server database.

Note: You can manually load/unload the Wonderware Historian Client Report add-in.

Wonderware Historian Client Report default template, HistClient.dot or HistClient.dotm, is a blank


template to use as the starting point for any report documents or additional templates that you
want to create. From there, your report can be used as an e-mail or a Web document by reusing
the template.

Add-in Installation
When you install the Wonderware Historian Client software, a word add-in is automatically loaded
into Microsoft Word. For Microsoft Office 2003 or XP, the Historian menu appears in the menu bar.
For Microsoft Office 2007 and later, the Historian tab appears in the ribbon bar.

Historian Client 2014 R2


5-4 Wonderware Historian Client Report

The Historian menu appears as a part of the ribbon.

Note: Wonderware Historian Client Report may not run properly if macro security is set as
high or above. You can check your macro security settings.

Wonderware Historian Client Report Menu Bar


The Historian menu bar is divided into six groups:
 Connection
 Edit Reports
 Reports
 Options
 Status
 Help
The toolbar buttons within each of the groups can be used to create and edit reports.

Wonderware Training
Lab 13 – Using Wonderware Historian Client Report 5-5

Lab 13 – Using Wonderware Historian Client


Report
Introduction
In this lab, you will create a report that embeds SQL statements directly into a Microsoft Word
document. You can save the document as a template and reuse it for generating reports later.

Objectives
Upon completion of this lab, you will be able to:
 Construct a live query in Wonderware Historian Client Report
 Use query format options in Wonderware Historian Client Report
 Save a report as a template

Historian Client 2014 R2


5-6 Wonderware Historian Client Report

Construct a Live Query in Report


1. Open Wonderware Historian Client Report.
A new Microsoft Word document opens with a Wonderware Historian Client logo and the
Historian menu.

Note: A security warning may appear referring to trusted macros. Please consult your
instructor for the proper settings to enable the macros.

Wonderware Training
Lab 13 – Using Wonderware Historian Client Report 5-7

2. On the Historian menu ribbon, click Toggle Field Codes.

Note: The Toggle Field Codes option enables you to view the SQL queries that are
embedded within the Microsoft Word document. The field codes are visible only on the active
Microsoft Word document.

3. On the Historian menu ribbon, click Insert Query.

The Direct Query dialog box appears.


4. Ensure that your Historian Server is displayed in the Servers drop-down box and then click
Click to bring up the Query Form.

The Query window appears.

Historian Client 2014 R2


5-8 Wonderware Historian Client Report

5. In the Query type drop-down list, click Live values.

6. In the Tags pane, select the following tags:


 BatchNumber
 ProdLevel
 ReactLevel
 ReactTemp

Wonderware Training
Lab 13 – Using Wonderware Historian Client Report 5-9

7. On the Columns pane, Columns tab, uncheck all except the following:
 Tag Name
 Date and time
 Include milliseconds

8. Click OK.

Historian Client 2014 R2


5-10 Wonderware Historian Client Report

The SQL query appears in the Query field.

9. In the Direct Query dialog box, click Format Table.


The Table AutoFormat dialog box appears.
10. In the Formats list, click Colorful 1.

11. Click OK.

Wonderware Training
Lab 13 – Using Wonderware Historian Client Report 5-11

12. In the Direct Query dialog box, click OK to embed the connection information, query, and
format options into the report.

Note: If the Toggle Field Codes option was not turned on, the query would not be visible.

Historian Client 2014 R2


5-12 Wonderware Historian Client Report

Create a Template and Run the Report


13. On the Historian menu ribbon, click Run Report.

14. You are prompted to save the query as a template.

15. Click Yes


16. Save the template as Sample Report.dot in the default location.

17. Click Save.

Wonderware Training
Lab 13 – Using Wonderware Historian Client Report 5-13

After the template has been saved, the report will run and the results will be embedded in the
Microsoft Word document.

18. Close the document without saving it, and keep Microsoft Word open.

Specify the Report Date


19. On the Historian menu ribbon, click Open Report.
The New dialog box appears.
20. On the General tab, click Sample Report.dot.
21. Click OK.
The query text appears in the Microsoft Word document.
22. Insert a blank line after the query.

23. On the Historian menu ribbon, click Insert Report Date.

Historian Client 2014 R2


5-14 Wonderware Historian Client Report

The field { RPT\Date } is inserted into the query at the cursor location.

Note: This report date is used in any queries that contain the #date wildcard. Use of the
wildcard is demonstrated in Lab 14.

24. On the Historian menu ribbon, click Run Report.


25. When prompted about saving the queries as a template, click Yes.
26. Save the template in the default location as Sample Report_Date.dot.
The report is generated in the Microsoft Word document.

27. Close the document without saving it.

Wonderware Training
Section 2 – Use of Wildcards in Reports 5-15

Section 2 – Use of Wildcards in Reports


This section explains the use of wildcards for time options and report editing.

Date and Time Wildcards


If you need to create recurring reports that cover the same time period, you can use date and time
variables, or wildcards, in the report template. For example, you might want to produce a daily
report that always covers the time period for the first shift, which starts at 8:00 a.m.
The wildcards are:
 #time wildcard – Used as a placeholder for the current (today's) date, but a specified time
 #date wildcard – Used as a placeholder for a specific date and a specified time
 #ReportTime wildcard – Used as a placeholder for a defined report time to be used with
either #date or #time
The values used for the #date and #ReportTime wildcards are set for the entire report using the
Report Options dialog box.
These wildcards are handled only by Wonderware Historian Client Report; queries that include
them do not work in the other query tools, such as the Wonderware Historian Client Query or the
Microsoft Query Analyzer.

Use of #time(xx:xx) Variable


The #time variable is used in the time functions to represent today. The use of this wildcard allows
you to run the report document on any day and retrieve the data for the same time period. The
date portion of datetime is the current date. The time portion of datetime is the time specified in
the brackets.
For example, the WHERE clause for a query for the last 8 hours of today's data, starting at 17:00
is as follows:
WHERE DateTime >= '#time(17:0:0)-8h'
AND DateTime <= '#time(17:0:0)'
The time specification for the query is indicated in the parentheses.
Valid duration units for all variables include:
s seconds
mi minutes
h hours
d days
w weeks
mm months

Note: If part of your job function is to prepare a daily report, such as a production report that
covers the same period each day, you can use the #time variable to create a template report that
can be run each day.

Historian Client 2014 R2


5-16 Wonderware Historian Client Report

Use of #date(xx:xx) Variable


The #date wildcard is used to represent a specific date in the query. This allows reports to be
based on the same time period. This wildcard is similar to the #time wildcard. The #time wildcard
is a placeholder for the current date, and the #date wildcard is a placeholder for a specific date.

For example:
WHERE DateTime >= '#date(17:0:0)-8h'
AND DateTime <= '#date(17:0:0)'
The WHERE clause indicates to use the last 8 hours of data, starting at 17:00, for the date that is
specified by the Report Date option in the Report Options dialog box.
The time specification for the query is specified within the parentheses.
Valid duration units for all variables include:

s seconds
mi minutes
h hours
d days
w weeks
mm months

Use of #ReportTime(xx:xx) Variable


The #ReportTime wildcard is used to represent the report time in the query. This wildcard can be
used with the #time and #date wildcards. When a report time is set, this wildcard is replaced by
the defined report time.

For example:
WHERE DateTime >= '#time(#ReportTime)-8h'
AND DateTime <= '#time(#ReportTime)'
This WHERE clause indicates to use the last 8 hours of data, for today's date, for the time that is
specified by the Report Time option in the Report Options dialog box.

Wonderware Training
Section 2 – Use of Wildcards in Reports 5-17

Another example is:


WHERE DateTime >= '#date(#ReportTime)-8h'
AND DateTime <= '#date(#ReportTime)'
This WHERE clause indicates to use the last 8 hours of data for the date and time specified by the
Report Date and Report Time options, respectively, in the Report Options dialog box.

Note: The #date and #ReportTime wildcards are Wonderware Historian Client Report wildcards.
Queries that include them do not work in other query tools, such as Wonderware Historian Client
Query or Microsoft Query Analyzer.

Valid duration units for all variables include:


s seconds
mi minutes
h hours
d days
w weeks
mm months

Historian Client 2014 R2


5-18 Wonderware Historian Client Report

Wonderware Training
Lab 14 – Using Wildcard Time Options and Editing a Report 5-19

Lab 14 – Using Wildcard Time Options and


Editing a Report
Introduction
This lab demonstrates the use of wildcard time options in Wonderware Historian Client Report and
how to edit a report.

Objectives
Upon completion of this lab, you will be able to:
 Apply wildcard time options to reports
 Edit a report

Historian Client 2014 R2


5-20 Wonderware Historian Client Report

Apply Wildcard Time Options


1. Create a new blank Microsoft Word document.
2. On the Historian menu ribbon, click Options.

The Report Options dialog box appears.


3. Ensure that the Use date/time wildcards check box is checked.

4. Click OK.
5. In the Microsoft Word document, enter Reactor Report for and press the space bar.
6. On the Historian menu ribbon, click Insert Report Date and press Enter.

Wonderware Training
Lab 14 – Using Wildcard Time Options and Editing a Report 5-21

7. On the next line, enter Hour Data for Reactor Tags Starting and press the space bar.
8. On the Historian menu ribbon, click Insert Report Time and press Enter.

9. On the Historian menu ribbon, click Insert Query.


The Direct Query dialog box appears. Ensure that your Historian Server is displayed in the
Servers drop-down box.
10. Click Click to bring up the Query Form.

The Query window appears.

Historian Client 2014 R2


5-22 Wonderware Historian Client Report

11. In the Query type drop-down list, click History values.


12. In the Tags pane, select the following tags:
 ProdLevel
 ReactLevel
 ReactTemp

13. Click the Time tab.


14. In the Duration drop-down list, click 1 hour.

Wonderware Training
Lab 14 – Using Wildcard Time Options and Editing a Report 5-23

15. In the Columns pane, click the Format tab.


16. Select the Wide query format option.

17. Click OK.


18. In the Direct Query dialog box, check the Show headings on every page check box.

19. Click Format Table.


The Table AutoFormat dialog box appears.

Historian Client 2014 R2


5-24 Wonderware Historian Client Report

20. In the Formats list, click Classic 4.

21. Click OK.


22. In the Direct Query dialog box, click OK.
The Additional Time Options dialog box appears.

Wonderware Training
Lab 14 – Using Wildcard Time Options and Editing a Report 5-25

23. In the Additional Time Options dialog box, select the following options:
 Yes, insert wildcards for query execution relative to a fixed time
 Date as specified in Report Options
 Time specified in Report Options

24. Click OK.

25. On the Historian menu ribbon, click Options.


The Report Options dialog box appears.

Historian Client 2014 R2


5-26 Wonderware Historian Client Report

26. In the Report time field, specify a time relative to class time.

27. Click OK.


28. On the Historian menu ribbon, click Run Report.
29. When prompted about saving the queries as a template, click Yes.
30. Save the template in the default location as Reactor Wildcard.dot.
The report is generated. Notice that the date and time have been updated in the report.

31. Close the document without saving it.

Wonderware Training
Lab 14 – Using Wildcard Time Options and Editing a Report 5-27

Edit the Report


32. On the Historian menu ribbon, click Open Report.
The New dialog box appears.
33. On the General tab, click Reactor Wildcard.dot.
34. Click OK.
The query text appears in the Microsoft Word document.
35. Click anywhere on the SQL query.
The entire query is selected.

36. On the Historian menu ribbon, click Edit Query.

Historian Client 2014 R2


5-28 Wonderware Historian Client Report

The Direct Query dialog box appears.

37. In the Query field, change (#ReportTime)-1h to (#ReportTime)-30mi.

38. Click OK.

Wonderware Training
Lab 14 – Using Wildcard Time Options and Editing a Report 5-29

39. Change the header of the report from Hour to 30 Minute, since the duration of the query has
been changed.

40. On the Historian menu ribbon, click Run Report.


You are prompted to save the template.

41. Click No.

Historian Client 2014 R2


5-30 Wonderware Historian Client Report

A new report is generated, showing data for the last half hour.

Note: When editing a query, you will need to select the Format Table options again, as all
formatting is lost when the query is edited; this is displayed in the above results.

42. Close the report without saving it and exit.

Wonderware Training
Module 6 – Wonderware Historian Client
ActiveX Controls
Section 1 – Wonderware Historian Client Controls 6-3
Lab 15 – Using the aaHistClientTrend Control 6-13
Lab 16 – Using Active Data Grid 6-31
6-2 Wonderware Historian Client ActiveX Controls

Module Objectives
 Explain the use of Wonderware Historian Client ActiveX controls in a variety of
environments
 Explain the use of the aaHistClientTrend control
 Explain the use of Active Data Grid

Wonderware Training
Section 1 – Wonderware Historian Client Controls 6-3

Section 1 – Wonderware Historian Client Controls


This section explains the use, properties, methods, and events of the ActiveX controls. In
particular, this section discusses the aaHistClientTrend and aaHistClientActiveDataGrid
controls and their common configuration needs.

Introduction
ActiveX controls can run in any application that functions as a .NET or an ActiveX container, such
as InTouch HMI software, Visual Basic, Visual C++, web pages, and so on. The controls can also
be selected from within InTouch WindowMaker when you create an InTouch Runtime graphical
user interface.
The Wonderware Historian Client objects and controls must be installed on the computer running
the application that you want to use them in. For example, if you want to use the
aaHistClientTrend control in InTouch HMI software, you must install the trend files on the InTouch
computer.
aaHistClientTrend and aaHistClientQuery are high-level controls used for trending tag values
and building SQL queries from within the ActiveX container applications.
The aaHistClientActiveDataGrid control can execute any SQL query that returns a result set
from any Wonderware Historian Server or Microsoft SQL Server database and returns the results
in a grid.
All ActiveX controls must be installed on the computer running the application. For example, if you
want to use the aaHistClientTrend control in InTouch, you must install the aaHistClientTrend
files on the InTouch node.

Internet Use
Technically, the ActiveX versions of the controls can be used within Internet Explorer. However,
because Internet Explorer is a native .NET control container, use the native controls instead of the
ActiveX versions.
Many ActiveX controls can be used on Active Server Pages (ASP) and used to retrieve data from
an Historian Server over the Internet.
ASP is a technology made available by Microsoft Internet Information Server (IIS). ASP pages are
files that contain HTML tags, text, and script commands and can call COM components to perform
tasks.
For more information on ASP, refer to the Microsoft documentation.
Wonderware Historian Server incorporates a three-tiered client/server ActiveX framework that
supports Internet-enabled applications. It is possible to deploy a global and robust Internet/intranet
solution across factories in different parts of the world with the same level of data integrity and
security of a local network.

Historian ActiveX Framework


The three-tier architecture consists minimally of a client, one or more data sources (such as
InTouch or DA/IO Servers), and one Historian Server database. A typical installation is composed
of a number of computers on each of the three tiers. Typically, these computers are networked via
a TCP/IP connection.
Wonderware Historian Client ActiveX controls are fully integrated with InTouch, I/O Servers, and
other Wonderware products components and provide unlimited scalability.

Historian Client 2014 R2


6-4 Wonderware Historian Client ActiveX Controls

ActiveX Controls and InTouch


InTouch is an ActiveX control container. This means that it is capable of hosting ActiveX controls.
Before any ActiveX control can be used in InTouch, it must be installed.
You must assign InTouch tag names to the properties of a control. A property must be assigned to
the equivalent InTouch tag name type. For example, a message property must be assigned to an
InTouch message tag name. Although you can use the Properties dialog box to assign tag names
to properties, it is easier to set the properties directly through QuickScripts.
For events, if the window containing a control is closed, its event scripts and any other InTouch
QuickScripts containing script functions associated with that control do not execute properly.

Common Properties, Methods, and Events


There are three main aspects of ActiveX controls: properties, method, and event.

Properties
Properties are attributes of the ActiveX control that you can set. For example, a property can
control what background color is used for the trend chart in the trend control.

Method
A method performs a function for an ActiveX control. For example, a method can set the time span
for the query.

Event
An event is an occurrence of something within or to the ActiveX control, such as a mouse click or a
data change that you might want to respond to through scripting (known as an event handler).

Wonderware Training
Section 1 – Wonderware Historian Client Controls 6-5

Configuring Properties
Each ActiveX control’s Properties tab displays four columns: Property, Range, Tag Type, and
Associated Tag. The Property and Range columns are read-only. The Associated Tag column
is used to associate InTouch tag names with the respective property in the Property column.

Note: Many users of other control containers become confused by the Properties dialog box.
This dialog box cannot be used to set the properties of the control at design time.

Using Events
Events are accessed through InTouch scripting and other InTouch QuickScripts.
In order for an ActiveX event script to function properly, the ActiveX control for which the script was
created must be loaded into the memory.
If the window containing an ActiveX control is closed, its ActiveX event scripts and any other
InTouch QuickScripts containing script functions associated with that ActiveX control will not
execute properly.

Note: Each control has unique configuration options.

Historian Client 2014 R2


6-6 Wonderware Historian Client ActiveX Controls

Other Properties
Not all controls provide a property panel for configuring data retrieval options. Use any of the
ActiveX control's properties, methods, and events in scripts in your application.

Configuring Connection Parameters

Configure the Historian Server Connection


Using the Connection tab, specify an automatic connection to a particular Historian Server when
the control is started at Runtime. The parameters noted below are displayed.
Server
Name of the server to which the control will connect.
Use the network name of the Microsoft SQL server. Since ActiveX controls access historical data
through the Historian Server OLE DB provider, the initial query is handled by the Microsoft SQL
server.
The server name for the Microsoft SQL server is usually the name of the computer on which it is
installed.
Database
Name of the database in the server to which you want to connect.
Username
The username assigned to the Historian Server.
Password
The password associated with the username.
Connecting to an Internet Server
To connect to an Internet server, enter the server name or IP address of the Internet server in the
http:// field.

Note: This option is not available for all controls.

The server must be specified as <servername> or www.yourserver.com.


The http:// portion of the web server URL will automatically be prefixed to the name.

Configuring Data Retrieval Properties


All Wonderware Historian Client ActiveX controls have data retrieval properties that can be
configured through a user interface property panel.
Data retrieval properties pertain to how data will be retrieved from the database. Data retrieval
properties can be configured through a user interface property panel during the design of the
container application. Data retrieval options can also be set using the properties via script.

Wonderware Historian Client Controls


Wonderware Historian Client controls must be installed on the computer running the application.
For example, if you want to use the Query control in InTouch, the control must first be installed on
the InTouch computer.

Wonderware Training
Section 1 – Wonderware Historian Client Controls 6-7

Wonderware Historian Client is designed with a modular architecture based on Microsoft .NET
architecture. Part of the migration support model involves the use of ActiveX wrappers. The
controls include an ActiveX interface that is published so that the controls may be used inside
InTouch.

Note: aaHistClientTrend and aaHistClientQuery are full-fledged Windows Forms controls that
can be used directly in IIS applications. The ActiveX interface should be used only if such usage is
not possible.

Wonderware Historian Client is composed of many controls and objects. For simplicity these are
divided into three distinct groups.

High-Level Application Controls


These are highly functional controls that behave like embedded applications. These controls are
designed to require the bare minimum of scripting and to be compatible with the simplest of
scripting environments. Examples of these types of control are Trend and Query.

Building Block Controls


These controls (and objects) provide specific functionality that is more relevant to an application
than a user. Application developers typically use these controls in environments like Visual C++
and Visual Basic. Scripting is required to make these functional.

Core Objects and Controls


These are very low-level controls intended primarily for use by Wonderware Historian Client
applications.
The Wonderware Historian Client controls can be categorized as application controls, building
block controls, or core functionality controls.
An application-level control runs within the container application, but functions as if it were a
standalone application. This type of control does not require extensive scripting to function.
Application-level controls include:
 aaHistClientTrend
 aaHistClientQuery
A building block control provides specific functionality for use within an application. Scripting is
required to make these controls functional. Building block controls include:
 aaHistClientTimeRangePicker
 aaHistClientTagPicker
 aaHistClientSingleValueEntry
 aaHistClientActiveDataGrid
The following low-level controls and objects are used by either an application or building block
control. Core functionality controls include:
 aaTag
 aaServer
 aaServers
 aaHistClientWorkbookRunner
 aaHistClientReportRunner

Historian Client 2014 R2


6-8 Wonderware Historian Client ActiveX Controls

aaHistClientTrend Control
The aaHistClientTrend control allows you to run the Wonderware Historian Client Trend
application, or a functional subset, from within the Wonderware InTouch HMI software or a .NET
container like Visual Basic, .NET, or Internet Explorer.
The graphic engine and the data retrieval process are identical to that of Wonderware Historian
Client Trend. The key differences between the EXE and the control are:
 aaHistClientTrend does not support the statistical functions
 aaHistClientTrend is a high-level application control
 Wonderware Historian Client Trend is a multiple document application, which can open
many trend files at a time
 Wonderware Historian Client Trend has no way to persist its pen definitions. This is done
by the host application
 Wonderware Historian Client Trend does not have the concept of a workspace
 There are two basic ways in which the aaHistClientTrend control can be used:
 Interactively – Simply drop the control into InTouch, and then size it to the
appropriate size. At Runtime, the user can connect to servers, select tags, and
perform all the normal operations of Wonderware Historian Client Trend
 Preconfigured – Program the trend to behave in a certain manner. Typically this
involves scripting the trend to connect to servers, add tags and control the real-time
mode appropriately
The aaHistClientTrend control requires no scripting and can be dropped into any ActiveX
container and used productively. Using its methods and events, it can be scripted to achieve a
wide variety of effects, automate tasks, or limit functionality.
At Runtime, aaHistClientTrend trends configured tag values from the Wonderware Historian
Server in the container application. You can use aaHistClientTrend just as you would use
Wonderware Historian Client Trend.
When aaHistClientTrend is used in an application, it is capable of running with all of the
functionality of Wonderware Historian Client Trend. You can also use the aaHistClientTrend
control's properties, methods, and events in Runtime scripts in your application to control the
functionality that is available to the Runtime user.
In most development environments, aaHistClientTrend appears within the ActiveX control list as
aaHistClientTrend control.
In Visual Basic, it appears as Wonderware Historian Client aaHistClientTrend control.
There are three basic ways in which tags can be added and configured:
 Through user interaction
 Through scripting using the AddServer() and AddTag() methods
 By loading a previously saved file using the FileOpen() method
These techniques can be used in conjunction with one another, but it is generally better to choose
one and use it exclusively for a specific object instance.
The aaHistClientTrend control has two primary modes: real-time and historical. The historical
mode is controlled through the property RealTimeMode.
When in the historical mode, the period of interest is controlled through the properties StartDate
and EndDate.

Wonderware Training
Section 1 – Wonderware Historian Client Controls 6-9

To make a trend appear in real-time mode with two tags added for a specified server, use a script
like the following, within the OnShow script of the window on which the control is placed:
#aaHistClientTrend1.AddServer("TRAIN01","wwUser","wwUser" );
#aaHistClientTrend1.AddTag("TRAIN01", "SysTimeSec", 1);
#aaHistClientTrend1.AddTag("TRAIN01", "SysTimeMin", 1);
#aaHistClientTrend1.RealTimeMode = 1;
#aaHistClientTrend1.LockDown = 1;
In this example, in Runtime, we should see a trend displayed in real time.
The aaHistClientTrend control consists of the following major user interface sections, each of
which can be individually turned off or on through properties:
 Tag Picker
 Tag list
 Main toolbar
 Scaling toolbar
 Time toolbar
By turning off all of the above elements, the controls get locked. As a result, the user cannot
change anything except the cosmetic properties of the display.
The aaHistClientTrend control provides many of the capabilities of Wonderware Historian Client
Trend inside any ActiveX container, including InTouch and Internet Explorer. The graphic engine
and data retrieval are identical to that of Wonderware Historian Client Trend.

Note: For a complete list of server object methods and events, refer to Online Help.

aaHistClientActiveDataGrid Control
The aaHistClientActiveDataGrid control can execute any SQL query that returns a result set
from any Wonderware Historian Server or Microsoft SQL Server database, and returns the results
in a grid.

Note: The aaHistClientActiveDataGrid does not support data definition or data manipulation
queries.

The aaHistClientActiveDataGrid control provides functionality through a user interface and with
scripting using properties, methods, and events.
In Runtime, the aaHistClientActiveDataGrid control provides a user interface that allows you to
view record-set data as returned from a specified query during Runtime.
To use the aaHistClientActiveDataGrid control in an application, it’s properties, methods, and
events are used to create scripts that set up a database connection and customize how the data
grid functions during Runtime.

Historian Client 2014 R2


6-10 Wonderware Historian Client ActiveX Controls

aaHistClientActiveDataGrid Properties
The aaHistClientActiveDataGrid properties and their description are listed in the table below:

Property Type Description


AllowUserConfiguration This read-write property determines whether the user can access the
aaHistClientActiveDataGrid Properties dialog box at Runtime.
AutoRefresh This read-write property enables or disables automatic refresh of the data
in the aaHistClientActiveDataGrid.
BOF This read-only property returns the results whether the user has attempted
to navigate prior to the first row in the data grid.
BusinessObjectServer This a read-write property specifies the path to the HTTP server when
using HTTP to access the Historian Server.
ColumnCount This read-only property gets the number of columns in the current result
set of the data grid.
Connected This read-write property is used to initiate or terminate a connection to the
Wonderware Historian Server and to check whether a connection is
currently active.
DatabaseName This read-write property specifies the name of the database to connect to.
The database must exist on the database server specified by the
ServerName property.
DefaultColumnWidth This read-write property gets or sets the default column width, in pixels, of
the columns shown in the data grid.
Domain This read-write property gets or sets the domain string for the connection
to the server.
Enabled This read-write property enables or disables the user interface functionality
of the control.
EnableShortcutMenu This read-write property enables or disables the right-click shortcut menu
of the control.
EOF This read-only property returns whether the aaHistClientActiveDataGrid
user has attempted to navigate beyond the last row in the data grid.
Handle This read-only property returns the Window handle for the control.
Password This write-only property specifies the password for the provided username
on the specified Wonderware Historian Server.
RefreshFrequency This read-write property specifies how often an automatic refresh of the
aaHistClientActiveDataGrid occurs.
Row This read-only property returns the relative row number of the selected row
in the data grid.
RowCount This read-only property returns the total number of rows in the record set
that is returned.
ServerName This read-write property specifies the name of the Wonderware Historian
Server to which you want to connect.
ShowErrorDlgs This read-write property determines whether error messages appear
during Runtime in an error dialog box.
ShowNavigatorBar This read-write property shows or hides the navigator toolbar that is
located above the data grid.
SQLString This read-write property specifies the SQL statement to be executed by the
Execute method.
UserName This read-write property specifies the username used to logon to the
Wonderware Historian Server specified in the ServerName property.
VirtualDirectoryName This read-write property gets or sets the virtual directory name.

Wonderware Training
Section 1 – Wonderware Historian Client Controls 6-11

aaHistClientActiveDataGrid Methods
The aaHistClientActiveDataGrid methods and their description are listed in the table below:
Method Type Description
ClearGrid This clears the contents of the data grid and sets the Connected
property to False.
ColumnName This returns the column name that corresponds to the specified column
index.
ColumnValue This returns the string representation of the data for the specified
column of the currently selected row.
ColumnValueByName This gets the string representation of the data for the specified column
name, for the currently selected row.
Execute This executes the SQL query defined in the SQLString property.
MoveFirst This selects the first row in the data grid.
MoveLast This selects the last row in the data grid.
MoveNext This selects the next row in the data grid.
MovePrevious This selects the previous row in the data grid.
RowColumnValue This returns the string representation of the data in the specified row
and column in the data grid.
RowColumnValueByName This gets the value at the indicated row and column (specified by
name).
ShowPropertiesDialog This shows the Properties dialog box for the
aaHistClientActiveDataGrid during Runtime.
SQLAppend This appends a section of a long SQL statement to the end of the
existing SQL string in the SQLString property.

aaHistClientActiveDataGrid Events
The aaHistClientActiveDataGrid control events types and their description are listed in the table
below:
Event Type Description
OnClick The OnClick event is triggered every time the user clicks on a data row in the
control.
OnDblClick The OnDblClick event is triggered every time the user double-clicks on a data row
in the control.
OnError The OnError event executes each time an error message is to be displayed.

Historian Client 2014 R2


6-12 Wonderware Historian Client ActiveX Controls

Wonderware Training
Lab 15 – Using the aaHistClientTrend Control 6-13

Lab 15 – Using the aaHistClientTrend Control


Introduction
This lab demonstrates how to insert and configure the aaHistClientTrend ActiveX control within an
InTouch window.

Objectives
Upon completion of this lab, you will be able to:
 Insert the aaHistClientTrend ActiveX control
 Use the trend control’s methods and properties in a script

Historian Client 2014 R2


6-14 Wonderware Historian Client ActiveX Controls

Create a New InTouch Window


1. Start InTouch WindowMaker.
2. On the WindowMaker File menu, click New Window.

The Window Properties dialog box appears.


3. In the Name field, enter TrendNew.
4. Ensure that the Size Control check box is checked. Leave the rest of the properties
unchanged.

5. Click OK.

Wonderware Training
Lab 15 – Using the aaHistClientTrend Control 6-15

The TrendNew window opens within InTouch WindowMaker.

Historian Client 2014 R2


6-16 Wonderware Historian Client ActiveX Controls

6. Drag the lower-right corner of the TrendNew window to resize it.

7. On the Special menu, click Configure | Wizard/ActiveX Installation.

The Wizard/ActiveX Installation dialog box appears.

Wonderware Training
Lab 15 – Using the aaHistClientTrend Control 6-17

8. Click the ActiveX Control Installation tab.


9. In the Available ActiveX controls pane, click aaHistClientTrend Control.

10. Click Install.


The control name appears in the Installed ActiveX controls pane.

11. Click Close.

Historian Client 2014 R2


6-18 Wonderware Historian Client ActiveX Controls

Insert the aaHistClientTrend Control

12. On the WindowMaker toolbar, click Wizards .


The Wizards Selection dialog box appears, with ActiveX Controls selected by default in the
left pane.
13. In the right pane, double-click aaHistClientTrend.

The TrendNew window appears. The cursor changes to look like this:
14. Click anywhere within the TrendNew window to insert the aaHistClientTrend control.
The control is inserted into the TrendNew window displaying its sizing handles.

Wonderware Training
Lab 15 – Using the aaHistClientTrend Control 6-19

15. Resize the control as necessary.

Historian Client 2014 R2


6-20 Wonderware Historian Client ActiveX Controls

16. Click Runtime to switch to the Runtime mode.


The control has no main menu and several of the toolbar buttons are active.

Wonderware Training
Lab 15 – Using the aaHistClientTrend Control 6-21

17. In the Servers pane, click the Historian Server name.


18. At the bottom of the Tags pane, select the Analog tab.
19. In the Tags pane, click VectorX.
20. Drag the VectorX tag to the Tag List.

The aaHistClientTrend control is now fully functional.

21. Click Development to switch back to WindowMaker.

Historian Client 2014 R2


6-22 Wonderware Historian Client ActiveX Controls

Insert the On Left Click/On Key Down Script Sample


This task will allow you to create an InTouch button that will add specific tags to the
aaHistClientTrend display pane, hide the navigation controls, and start a live trend.
22. In the TrendNew window, click the Button tool.

23. Create a button and position it below the aaHistClientTrend control.

Wonderware Training
Lab 15 – Using the aaHistClientTrend Control 6-23

24. Right-click the button and click Substitute | Substitute Strings.

25. In the New String field, enter ChangeUI.

26. Click OK.


27. Double-click ChangeUI.

Historian Client 2014 R2


6-24 Wonderware Historian Client ActiveX Controls

28. Click the Action button.

The Touch -> Action Script editor window appears.

Note: If a prior script exists in the Touch -> Action Script editor window, you may need to
clear this script before proceeding.

Wonderware Training
Lab 15 – Using the aaHistClientTrend Control 6-25

29. On the Insert menu, click ActiveX.


The ActiveX Control Browser dialog box appears.
30. In the Control Name pane, click aaHistClientTrend1.
31. In the Method / Property pane, click AddAnyTag( “String”, “String”).

32. Click OK.


The AddAnyTag( “String”, “String”) method is added to the Touch -> Action Script editor
window.
33. Add a semicolon after #aaHistClientTrend1.AddAnyTag( “String”, “String”) to the end of
the line.

Historian Client 2014 R2


6-26 Wonderware Historian Client ActiveX Controls

34. Change the first “String” argument to the name of your Historian Server and the second
“String” argument to “Henonx.”

35. Press Enter to add a new line.

Wonderware Training
Lab 15 – Using the aaHistClientTrend Control 6-27

36. Repeat the previous steps to insert the following methods and properties into the Touch ->
Action Script editor window:
 AddAnyTag
 LiveModeRate
 TagPickerVisible
 ToolBarVisible
 GraphStack ()
 RealTimeMode
Edit the script as shown below, changing the arguments and value as indicated:

#aaHistClientTrend1.AddAnyTag("<HistorianServerName>", "Henonx");
#aaHistClientTrend1.AddAnyTag("<HistorianServerName>", "VectorX");
#aaHistClientTrend1.LiveModeRate=1;
#aaHistClientTrend1.TagPickerVisible=0;
#aaHistClientTrend1.ToolBarVisible=0;
#aaHistClientTrend1.GraphStack();
#aaHistClientTrend1.RealTimeMode = 1;

37. Click OK.

Historian Client 2014 R2


6-28 Wonderware Historian Client ActiveX Controls

The Animation Links Window displays.

38. Click OK.


39. Switch to the Runtime mode and click the ChangeUI button.
The aaHistClientTrend control interface should change to live mode and display only the
specified tag and interface elements.

Wonderware Training
Lab 15 – Using the aaHistClientTrend Control 6-29

40. Click the ChangeUI button.


The other data is displayed.

At this point, you can still modify the interface by right-clicking the control and selecting
submenu options.
41. Right-click the Runtime interface and explore the menu options presented.
42. Click Development to switch back to WindowMaker.
43. Close the TrendNew Window.

Historian Client 2014 R2


6-30 Wonderware Historian Client ActiveX Controls

Wonderware Training
Lab 16 – Using Active Data Grid 6-31

Lab 16 – Using Active Data Grid


Introduction
In this lab, you will use a Wonderware Historian Client control, Active Data Grid. This control is
only available as an ActiveX control, which means it is not available as a standalone application.
You will also run an Active Data Grid control along with the user interface-based application that
you will create using InTouch - WindowMaker.

Objectives
Upon completion of this lab, you will be able to:
 Place an Active Data Grid control in the InTouch window
 Query using the Active Data Grid control

Historian Client 2014 R2


6-32 Wonderware Historian Client ActiveX Controls

Make the ActiveX Control Available in InTouch


1. On the WindowMaker File menu, click New Window.
2. In the Name field, enter Active Data Grid.
3. In the Window Properties dialog box, ensure that the Size Control check box is checked.
4. Click OK.
A new window titled Active Data Grid opens within InTouch WindowMaker.

5. Drag the lower-right corner of the Active Data Grid window to resize it.
6. On the Special menu, click Configure | Wizard/ActiveX Installation.
The Wizard/ActiveX Installation dialog box appears.

Wonderware Training
Lab 16 – Using Active Data Grid 6-33

7. Click the ActiveX Control Installation tab.


8. In the Available ActiveX controls pane, click aaHistClientActiveDataGrid Control.

9. Click Install.
The aaHistClientActiveDataGrid Control appears in the Installed ActiveX controls pane.

10. Click Close.

Historian Client 2014 R2


6-34 Wonderware Historian Client ActiveX Controls

Place the ActiveX Control on the Window

11. On the WindowMaker toolbar, click Wizards .


The Wizard Selection dialog box appears, with ActiveX Controls selected by default in the
left pane.
12. In the right pane, click aaHistClientActiveDataGrid.

13. Click OK.


The Active Data Grid window appears.
14. Click anywhere within the Active Data Grid window to insert the aaHistClientActiveDataGrid
control.
The control is inserted into the Active Data Grid window displaying its sizing handles.

15. Resize the control as necessary to fit the window.

Wonderware Training
Lab 16 – Using Active Data Grid 6-35

Connect to the Historian Server


16. In the Windows pane, right-click Active Data Grid and click Window Scripts.

The Window Script for “Active Data Grid” dialog box appears.
17. In the Condition Type: drop-down list, select On Show.
18. Click Insert ActiveX Control.

The ActiveX Control Browser dialog box appears.

Historian Client 2014 R2


6-36 Wonderware Historian Client ActiveX Controls

19. In the Control Name pane, click aaHistClientActiveDataGrid1.


20. In the Method / Property pane, click ServerName.

21. Click OK.


The field in the Window Script for “Active Data Grid” dialog box now displays the script for
the server name.

Wonderware Training
Lab 16 – Using Active Data Grid 6-37

22. In the field, after #aaHistClientActiveDataGrid1.ServerName, enter =“<the name of the


Historian Server>”; and then press Enter at the end of the line.

23. Click Insert ActiveX Control.


24. In the Control Name pane, ensure that aaHistClientActiveDataGrid1 is selected.
25. In the Method / Property pane, click UserName.

26. Click OK.


The field in the Window Script for “Active Data Grid” dialog box now displays the script for
the user name.

Historian Client 2014 R2


6-38 Wonderware Historian Client ActiveX Controls

27. In the field displaying the script, after #aaHistClientActiveDataGrid1.UserName, enter =


“aaUser”; and then press Enter.

28. Click Insert ActiveX Control.


29. In the Control Name pane, make sure that aaHistClientActiveDataGrid1 is selected.
30. In the Method / Property pane, click Password.

Wonderware Training
Lab 16 – Using Active Data Grid 6-39

31. In the field displaying the script, after #aaHistClientActiveDataGrid1.UserName, enter =


“pwUser”; and then press Enter.

32. Click OK.

Historian Client 2014 R2


6-40 Wonderware Historian Client ActiveX Controls

33. Click Runtime.


The Active Data Grid window appears in the Runtime mode.

Note: The appearance of your window might be different depending upon the sizing
properties and control you have used.

Wonderware Training
Lab 16 – Using Active Data Grid 6-41

Query Using the Active Data Grid Control


34. Right-click anywhere on the control and click SQL.

The ActiveDataGrid Properties dialog box appears.


35. Click Templates.

The Templates dialog box appears.

Historian Client 2014 R2


6-42 Wonderware Historian Client ActiveX Controls

36. In the Description pane, click Analog History.

37. Click Select


38. On the eighth line of the SQL statements here field, replace SysTimeSec with ReactTemp.

39. Click Apply.

Wonderware Training
Lab 16 – Using Active Data Grid 6-43

The results of the query appear. Notice that the ActiveDataGrid Properties dialog box remains
open.

40. In the ActiveDataGrid Properties dialog box, click OK.


41. Right-click anywhere on the control and click SQL.
42. Click Templates.
The Templates dialog box appears.

Historian Client 2014 R2


6-44 Wonderware Historian Client ActiveX Controls

43. In the Description pane, click Analog Wide History.

44. Click Select.


45. On the second line of the SQL statements here field, replace SysTimeSec with ReactTemp,
ReactLevel.

46. Click Apply.


The results of the query appear.

Wonderware Training
Lab 16 – Using Active Data Grid 6-45

47. In the SQL statement here field, replace -30 with -60.

48. Click OK.

Historian Client 2014 R2


6-46 Wonderware Historian Client ActiveX Controls

The result of the query shows the data for the last 1 hour.

49. Click Next Record to page through the data.

50. Experiment with other query template options on your own.


51. Exit WindowViewer.
52. Exit WindowMaker.

Wonderware Training

You might also like