You are on page 1of 642

AVEVA™ Training

A V E V A ™ T R A I N I N G

y
Training Manual

op
Revision A
June 2021
Part Number 11-HM-10053

C
T
O

AVEVA™ InTouch HMI


N

2020 R2
o
D
© 2021 AVEVA Group plc and its subsidiaries. All rights reserved.

AVEVA and the AVEVA logo are a trademark or registered trademark of AVEVA Group plc in the U.S. and
other countries.

y
No part of this documentation shall be reproduced, stored in a retrieval system, or transmitted by any means,
electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of AVEVA.

op
No liability is assumed with respect to the use of the information contained herein.

Although precaution has been taken in the preparation of this documentation, AVEVA assumes no
responsibility for errors or omissions. The information in this documentation is subject to change without
notice and does not represent a commitment on the part of AVEVA. The software described in this
documentation is furnished under a license agreement. This software may be used or copied only in
accordance with the terms of such license agreement.

ArchestrA, Aquis, Avantis, Citect, DYNSIM, eDNA, EYESIM, InBatch, InduSoft, InStep, IntelaTrac, InTouch,

C
OASyS, PIPEPHASE, PRiSM, PRO/II, PROVISION, ROMeo, SIM4ME, SimCentral, SimSci, Skelta,
SmartGlance, Spiral Software, Termis, WindowMaker, WindowViewer, and Wonderware are trademarks of
AVEVA and/or its subsidiaries. An extensive listing of AVEVA trademarks can be found at:
https://sw.aveva.com/legal. All other brands may be trademarks of their respective owners.

Contact Information
T
AVEVA Group plc
High Cross
Madingley Road
Cambridge
O
CB3 OHB. UK

https://sw.aveva.com/

For information on how to contact sales, customer training, and technical support, see
https://sw.aveva.com/contact.
N
o
D
Table of Contents 1

Module 1 Introduction .................................................................................1-1


Section 1 – Course Introduction......................................................................... 1-3
Section 2 – InTouch Software Overview............................................................ 1-5
Section 3 – System Requirements and Licensing ............................................. 1-9
Section 4 – InTouch Application Types............................................................ 1-17
Lab 1 – Creating the InTouch Application........................................................ 1-19

Module 2 Window Layout and Basic Navigation ......................................2-1


Section 1 – WindowMaker Overview ................................................................. 2-3

y
Section 2 – WindowViewer Overview ................................................................ 2-7
Section 3 – Configure and Test Navigation Using WindowMaker ..................... 2-9
Lab 2 – Setting Up Windows and Navigation................................................... 2-11

op
Module 3 InTouch Tagname Dictionary.....................................................3-1
Section 1 – The Tagname Dictionary................................................................. 3-3
Lab 3 – Defining Memory Tags........................................................................ 3-11
Section 2 – I/O Configuration........................................................................... 3-19
Lab 4 – Configuring the Communication Driver ............................................... 3-27
Lab 5 – Creating I/O Access and I/O Tags ...................................................... 3-37
Section 3 – Tag Viewer.................................................................................... 3-51

C
Lab 6 – Watching Tags with Tag Viewer ......................................................... 3-55
Section 4 – DBDump and DBLoad .................................................................. 3-69
Lab 7 – Exporting and Importing Tags............................................................. 3-73
Section 5 – Other Tag Management Utilities ................................................... 3-85

Module 4 Situational Awareness Visualization.........................................4-1


T
Section 1 – Industrial Graphics and Situational Awareness Visualization ......... 4-3
Section 2 – Element Styles ................................................................................ 4-7
Lab 8 – Building a Dashboard............................................................................ 4-9
Section 3 – Window Construction Using the Graphic Editor............................ 4-35
O
Lab 9 – Building the Mixer Operational Display ............................................... 4-43
Section 4 – Custom Properties and Animations in Symbols............................ 4-91
Lab 10 – Building a Command Symbol............................................................ 4-97
Section 5 – HTML5 Widgets .......................................................................... 4-115
Lab 11 – Creating a Carousel Dashboard ..................................................... 4-119
N

Module 5 InTouch Alarms ...........................................................................5-1


Section 1 – InTouch Tagname Alarm Configuration .......................................... 5-3
Lab 12 – Configuring InTouch Alarms ............................................................. 5-11
Section 2 – Live Alarms Management ............................................................. 5-33
Lab 13 – Visualizing and Acknowledging Live Alarms..................................... 5-37
Section 3 – Historical Alarms Management ..................................................... 5-59
o

Lab 14 – Visualizing and Filtering Historical Alarms and Events ..................... 5-63

Module 6 Data Logging and Trending .......................................................6-1


D

Section 1 – InTouch History and Real-Time Trending ....................................... 6-3


Lab 15 – Logging Historical Data Using InTouch History .................................. 6-7
Lab 16 – Trending Real-Time Data.................................................................. 6-27
Section 2 – Using Historian with InTouch ........................................................ 6-39
Lab 17 – Building a Historian Client Trend Display.......................................... 6-47
Section 3 – Trend Pen ..................................................................................... 6-61
Lab 18 – Trending with Trend Pen................................................................... 6-67

AVEVA™ InTouch HMI 2020 R2


2 AVEVA™ InTouch HMI 2020 R2

Module 7 Introduction to QuickScript ....................................................... 7-1


Section 1 – Introduction to InTouch QuickScript ................................................ 7-3
Lab 19 – Opening an Application with QuickScript .......................................... 7-17

Module 8 Introduction to Industrial Graphic QuickScript .NET .............. 8-1


Section 1 – Industrial Graphic QuickScript.NET................................................. 8-3
Section 2 – ShowGraphic and InTouch Windows ............................................ 8-17
Lab 20 – Creating a Scalable Window Navigation Control............................... 8-21
Section 3 – ShowGraphic and Industrial Graphics ........................................... 8-31

y
Lab 21 – Building a Mixer Browser Using ShowGraphic .................................. 8-33
Lab 22 – Creating a Context Driven Alarm Window Using ShowGraphic ........ 8-43

Module 9 Security ....................................................................................... 9-1

op
Section 1 – OS Security Implementation............................................................ 9-3
Lab 23 – Setting Up and Using OS Security .................................................... 9-13
Section 2 – Lock Down Your Application ......................................................... 9-29
Lab 24 – Locking Down Your Application......................................................... 9-35

Module 10 Application Distribution........................................................... 10-1


Section 1 – Network Application Distribution.................................................... 10-3

C
Lab 25 – Distributing an InTouch Application ................................................... 10-7

Module 11 Application Maintenance ......................................................... 11-1


Section 1 – Manage Industrial Graphics .......................................................... 11-3
Section 2 – Convert Windows to Industrial Graphics and Frame Windows ..... 11-5
Lab 26 – Converting Windows to Industrial Graphics and Frame Windows .... 11-7
T
Section 3 – Application Backup and Restore ................................................. 11-13
Lab 27 – Backing Up and Restoring an InTouch Application ......................... 11-15

Module 12 Web Client ................................................................................. 12-1


O
Section 1 – Web Client..................................................................................... 12-3
Lab 28 – Using the Web Client....................................................................... 12-11
N
o
D

AVEVA™ Training
y
op
C
Module 1 – Introduction
T
Section 1 – Course Introduction 1-3
Section 2 – InTouch Software Overview 1-5
Section 3 – System Requirements and Licensing 1-9
O

Section 4 – InTouch Application Types 1-17


Lab 1 – Creating the InTouch Application 1-19
N
o
D
1-2 Module 1 – Introduction

Module Objectives
 List the objectives of the course and establish the agenda
 Discuss the key components of InTouch
 List the system requirements and licensing
 Discuss the InTouch Application types

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – Course Introduction 1-3

Section 1 – Course Introduction


This section will explain the objectives and agenda for this course. It will also outline products by
AVEVA and how InTouch meets the human-machine interface requirements for visualization.

Course Description
The tag-based AVEVA InTouch HMI 2020 R2 course is a 5-day, instructor-led class that explains

y
how to create and configure a Stand-alone InTouch application using Industrial Graphics. The
course provides a fundamental understanding of the basic principles of InTouch HMI visualization
software and the steps necessary to develop a Human Machine Interface system for a plant floor
or facility. You are guided through setup, layout, best practice concepts, features, and functions of

op
the InTouch HMI software platform. Hands-on labs reinforce concepts and features.

Objectives
Upon completion of this course, you will be able to:
 Create an InTouch application

C
 Build an HMI with Situational Awareness symbols
 Construct a Key Performance Indicator display
 Configure an OI Server
 Establish communications with I/O-aware programs
 Create, export, and import tags
T
 Test and monitor tags
 Build displays with pre-built library graphics
 Build displays with custom graphics
O
 Visualize and interact with data
 Present and manage live and historical alarms
 Configure and apply security to an application
 Log and trend historical data
N

 Display real-time trend data


 Back up and restore an application
 Distribute an application to a production environment
 View application windows and graphics in a browser
o

Audience
Individuals who need to configure or modify InTouch HMI applications
D

Prerequisites
 Knowledge of the following tools, features, and technologies is required:
 Industrial automation software concepts
 Microsoft Excel for modifying a .csv file

AVEVA™ InTouch HMI 2020 R2


1-4 Module 1 – Introduction

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 2 – InTouch Software Overview 1-5

Section 2 – InTouch Software Overview


This section will introduce the InTouch, explains the benefits of using InTouch, discusses its key
capabilities, and provides an overview of its features.

Overview of InTouch Software


InTouch software provides graphic visualization of operations management and control. InTouch

y
provides you with a quick and easy way to create HMI applications for Microsoft operating
systems. InTouch applications are used around the world in a variety of industries such as food
processing, semiconductors, oil and gas, automotive, chemical, pharmaceutical, pulp and paper,
transportation, and utilities.

op
The InTouch software is made up of four software components which allow you to create, design,
and run your InTouch applications. These four software components are: AVEVA Application
Manager, InTouch WindowMaker, InTouch WindowViewer, and InTouch Web Client.

C
T
Key Benefits
O

The key benefits of InTouch are:


 Developers and operators can create applications quickly and efficiently
 Device integration and connectivity
N

 Visual representation and interaction that brings the right information to the right people at
the right time

Key Capabilities
The key capabilities of InTouch are:
o

 Display resolution-independent graphics and intelligent symbols to speed up design


 Author sophisticated scripting to extend and customize applications for specific needs
 Use real-time distributed alarming with historical views for analysis
D

 Built-in, real-time, and historical trending


 Leverage Microsoft .NET controls integration
 Access extensible library of predesigned, industrial graphics, controls, and widgets
 View Application Windows in a web browser

AVEVA™ InTouch HMI 2020 R2


1-6 Module 1 – Introduction

Ancillary InTouch Technologies

OPC UA
OPC Unified Architecture (OPC UA) is an industrial machine-to-machine communication protocol
for interoperability. It provides process control with enhanced security, advanced communication,
security, and information models, and cross-platform connectivity.
OPC UA differs significantly from OPC. The following provides the key differences between classic

y
OPC and OPC UA.

OPC UA Classic OPC

op
Uses a services architecture to export Uses the COM/DCOM technology of Microsoft to
data, which improves the ease of communicate. It does not have configurable time-
communication and connectivity. outs. It depends on the DCOM time-out, which is
configured in the system.
Is platform independent and can connect Is dependent on Windows operating systems.
to a wide variety of devices and platforms.
Has built-in security. Has limited security.

C
No built-in capabilities to handle problems, No built-in capabilities to handle problems, such as
such as lost messages. lost messages.

MultiLanguage Support
T
You can develop InTouch applications that can be switched to another language at run time.
To enable run-time language switching, you must complete the following tasks:
 Configure multiple languages for the application
Export your application text for off line translation
O

 Translate one or more exported dictionary files


 Import one or more translated dictionary files
As part of the setup for run-time language switching, you can also localize alarm comments and
N

alarm fields. In addition to switching the run-time language of text strings, you can also configure
run-time language switching of alarm comments, alarm states, alarm types, and alarm classes in
the Alarm Viewer and Alarm DB View controls.
When configuring Languages for Run-time Language Switching, every InTouch application is
associated with a base language used to develop the application. You must configure any
additional languages that you want to support.
o

More information is available from the Start menu click AVEVA Documentation, select Application
Management and Extension Guide. InTouch HMI 2020 R2 supports Multilanguage Switching.
D

AVEVA™ Training
Section 2 – InTouch Software Overview 1-7

InTouch Access Anywhere


InTouch Access Anywhere provides secure access to your process anytime, anywhere, from any
device with AVEVA InTouch HMI functionality. This provides HMI for Remote User, including:
 Extends HMI applications access to mobile, casual, and non-traditional users using a wide
variety of devices with an HTML5 compliant browser.
 Enables remote users to securely achieve greater visibility of plant floor data (graphics,
performance, alarms, trends) from any location.
 Licensed for use with AVEVA InTouch HMI only.

y
 No data is transferred, only mouse clicks, keystrokes and gestures from the remote user
to the RDP host and graphics from the RDP host to the client end.

op
C
T
The above image illustrates a plant floor or control network intranet using port 8080 (http). This is
O
the simplest implementation of InTouch Access Anywhere. The product is installed on a Microsoft
RDP Server where each connection is licensed. Basically, the user initiates the process by
pointing an HTML5 compliant browser to the machine hosting the InTouch Access Anywhere
software. The user then logs in with their Windows credentials and communication handled using
WebSockets over http.
N

AVEVA Connect
AVEVA software in the cloud drives business resiliency and ensure sustainable growth. It enables
you to transform faster, reduce costs and easily scale to respond to dynamic economic conditions.
AVEVA Connect is our common cloud platform, providing a central location to access the broadest
o

and deepest industrial software portfolio, enhanced by the power of industrial Artificial Intelligence.
AVEVA Connect provides a flexible, powerful set of tools that turn opportunities into business
value. Talk to an expert today and see how AVEVA Connect can transform your business.
D

InTouch HMI uses AVEVA Connect within WindowMaker as a cloud-based storage with the ability
to organize user access through a cloud-based tenant. This allows an enterprise business to
create a working library of industrial graphics that all satellite plant locations can access to
construct local HMIs in a highly collaborative manner in real time.

AVEVA™ InTouch HMI 2020 R2


1-8 Module 1 – Introduction

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 3 – System Requirements and Licensing 1-9

Section 3 – System Requirements and Licensing


This section will describe the operating systems and other software requirements the host
computer must meet prior to installing InTouch 2020 R2.

Hardware Recommendations
The following table provides guidelines for hardware configurations suitable for Aveva InTouch

y
HMI 2020 R2 software based on the size of the installation. These guidelines are subject to the
limitations of your Windows operating system.

op
Hardware Requirements
Small Installation (1 - Medium Installation Large Installation (>50K
25K I/O per Node) (25K - 50K I/O per Node) I/O per Node)
CPU Cores (Minimum)1 Greater than or equal to 2 Greater than or equal to 2 Greater than or equal to 8
RAM (GB)1 Greater than or equal to 4 Greater than or equal to 8 Greater than or equal to 16

C
Storage (GB)2 Greater than or equal to Greater than or equal to Greater than or equal to
30 500 1000
Network (Mbps) Greater than or equal to Greater than or equal to Greater than or equal to
100 1000 1000

In redundant environments, increase CPU and RAM to maintain a maximum of 40% typical resource utilization.
T
1

2 Minimum amount of storage needed to provide sufficient capacity for 1 week at max frequency.Software Requirements for InTouch 2020
R2.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


1-10 Module 1 – Introduction

System Sizing Guidelines


The following table provides guidelines for hardware configuration suitable for InTouch 2020 R2
Logical Free Disk
Application Level RAM Network Speed
Processors Space
InTouch Client Nodes
WindowViewer Min 4 1 GB 100 GB 100 Mbps
Historian Client Recommended 8 4 GB 200 GB 1 Gbps
InTouch Thin Client Nodes

y
RDP Clients, ITAA, Min 2 512 MB N/A 100 Mbps
Mobile Devices Recommended 4 2 GB N/A 100 Mbps

op
The table above provides guidelines for hardware configurations suitable for InTouch HMI 2020 R2
software. These guidelines are subject to the limitations of your Windows operating system. See
the AVEVA GCS Technology Matrix for supported versions of Windows operating systems and
SQL Server.
We recommend an HD display resolution for engineering tools such as the WindowMaker.
A Windows Server operating system is required for large installations with more than 50,000 tags

C
per node.
32-bit operating systems are no longer supported. Installation is blocked on unsupported operating
systems.
These guidelines are provided for reference only. The system configuration required for your
application will depend on multiple factors, including but not limited to the size and complexity of
the application, and the features and components used.
T
Encrypted Communications
O
The end to end communication between software applications (server and client) can be
encrypted and secured to prevent eavesdropping and malicious tampering (aka: Man-in-the-
Middle) attacks.
To enable encrypted network communication, one of the nodes in the network must be configured
N

to host and run the System Management Server. The role of the System Management Server is to
generate, manage, and distribute secure digital certificates used for establishing and maintaining
secure communications.
All other nodes need to be configured to connect to the SMS so they all become part of the same
community.
The System Management Server does not need to be available at runtime for secure
o

communications to be established. In fact, once joined to the System Management Server, a node
will not need access to the System Management Server until it is time to renew the certificates.
When accessing the server as a standard user, you cannot establish a secure SuiteLink channel.
D

For a secure, encrypted communication workflow, the standard user should be added to the
'ArchestrAWebHosting' user group on the server side.
For more information about adding users to user-groups, refer to the Windows-specific
documentation. If the authentication fails between the Client and the Server, or if the Client or
Server do not have access to the Certificate store, the system continues with the unsecure and
non -encrypted connection as a fallback.

AVEVA™ Training
Section 3 – System Requirements and Licensing 1-11

Protocols Secured or not Secured


The following protocols are either all secured or all are not secured:
 SuiteLink
 iData
 iBrowse
 HCAL
List of software which support secured communication:

y
 InTouch HMI 2017 Update 3 and later
 *OI Server
 InTouch Web Client in 2017 Update 3 and later

op
 Historian 2017 Update 3 and later
 Sentinel System Monitor 1.1 for System Platform 2017 Update 3 and later
*Communications from the specific OI Server to any other products listed above can be
encrypted. This is generic and applies to all OI Server versions.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


1-12 Module 1 – Introduction

Node to Node Communication


Node-to-Node communication is unsecured under certain scenarios, including the following:
 The version of the software installed on one or more nodes is earlier than 2017 Update 3
(Communication Driver version has no impact)
 One node points to a System Management Server, but there is no System Management
Server configured on the other node
 There is no System Management Server configured for both nodes

y
Please note that if one node points to one System Management Server and the other node points
to another System Management Server, there will be NO network connection between the nodes.

op
C
T
O

Licensing
Aveva enforces the use of its products with a software license. InTouch uses the License Server to
N

make licenses available. The License Manager manages one or more License Servers.
The License Manager interface makes licenses available to InTouch. First, import the entitlement
.xml file received upon purchase of the license. Then, select which licenses on the entitlement to
activate on the License Server. Once activated, it becomes available to WindowMaker,
WindowViewer, and Web Client upon start up. The license is released when an InTouch
component is shut down.
o

InTouch will run in Demo Mode if it cannot consume a valid license at start up time.
To install licensing, see the Licensing Guide.
D

AVEVA™ Training
Section 3 – System Requirements and Licensing 1-13

Licensing for InTouch Application Graphics in a Web Browser


You need a valid InTouch Web Server license to login and view application graphics from a web
browser.
Licensing also extends to hosting application graphics on external websites. For detailed
information on licensing, see the AVEVA Enterprise Licensing help. The Web Server provides two
types of licenses:
 The InTouch Web Server Unlimited Read‐Only license will allow you to connect to unlimited 
sessions for viewing application graphics in a web browser.

y
 The InTouch Web Server Unlimited ReadWrite license will allow you to connect to unlimited 
sessions for viewing and interacting with application graphics in a web browser.

op
License Status Change
If the Web Server has acquired a valid license but then failed to renew the license, the Web Client
will be in Grace Period mode. A notification message will be displayed in the notification page. The
message will be logged every time Web Client attempts and fails to renew the license.

Acquiring a License

C
Acquiring the license is a two-stage process. After the Web Server starts up, it will first
Authenticate the user and then determine the user’s Authorization. If anonymous access has been
enabled then the authentication step is bypassed and Web Client is launched in a Read -Only
mode with the 'Guest' user.
Authentication:
T
 Web Client supports Windows authentication. The web server will validate if the user is
part of either the "aaInTouchUsers" or the "aaInTouchRWUsers" to be authenticated to
use the Web Client. Both the user groups will be created during installation. For a remote
authentication server, the domain user groups must be created on the server.
O
 The login user at the time of Web Client installation will be automatically added to both
user groups.
Additional users can be added later. After adding the new user to the group, the new user must log
off and then re-login for the change to take effective.
N

Authorization:
 After the user is authenticated, the web server will attempt to acquire the ReadWrite
license.
 If a ReadWrite license is not available, then it will attempt to acquire the Read-Only
license.
o

 If a ReadOnly license is not available, then the web client will operate in a Single Session
Mode.
D

AVEVA™ InTouch HMI 2020 R2


1-14 Module 1 – Introduction

Read-Only and ReadWrite Modes


The Web Client supports two types of modes: ReadWrite and Read-Only.
In the ReadWrite mode, the user can:
 Write to external references such as Application Server attributes or InTouch tags.
 Acknowledge alarms with details of the operator.
You can access the Write and Alarm Ack capability if both the following conditions are met:
 The Web Server has acquired the Unlimited ReadWrite license.

y
Licensing the Web Client

op
AVEVA™ Viewing Application Graphics in a Web Browser Licensing the Web Client
 The user logged in to Web Client session is part of the aaInTouchRWUsers user group.
If ReadWrite mode is not available, then the Web Server attempts the Read-Only mode.
The user can access the Read-Only mode only if:
 The Web Server has acquired the Unlimited ReadWrite license, but the user logged in does not 
belong to the Web Client aaInTouchRWUsers user group, or

C
 The Web Server has acquired the Unlimited ReadOnly license, or
 The Web Server does not acquire any license and this web client session is the first client session.
In the Read-Only mode, the client session cannot write to external references or acknowledge
alarms.
T
Single Session Mode
If the Web Server does not acquire any license at startup, it will operate in the Single Web Session
mode, which is assigned on a first come first serve basis.
O
 If a valid license is unavailable and the first session license has been acquired, the Web Client will 
notify the user that no licenses are available.
 The Web Server allows sessions a grace period if the Web Server has acquired an unlimited 
license, but subsequently loses the license.
N
o
D

AVEVA™ Training
Section 3 – System Requirements and Licensing 1-15

Flex Licensing
Starting with AVEVA InTouch HMI 2020, AVEVA offers Flex subscription options offering complete
flexibility in the procurement, design, management and utilization of the industrial control systems
most valuable to your plant operation. For InTouch HMI, Flex Subscriptions enable the ability to
write set points and acknowledge alarms. This course has Flex Subscriptions enabled to
demonstrate these features.
Aveva Flex Subscription options offer added levels of flexibility.

y
op
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


1-16 Module 1 – Introduction

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 4 – InTouch Application Types 1-17

Section 4 – InTouch Application Types


This section will provide an overview of the different types of InTouch applications.

Overview
You use the AVEVA Application Manager to manage tasks such as creating InTouch applications,

y
deleting InTouch applications, and modifying the name, description, and path of your InTouch
applications. Application Manager shows a list of your current InTouch applications. Once you
have created an InTouch application, it appears as a tile in the Application Manager. From there
you can select an application from the list to open in WindowMaker or WindowViewer.

op
InTouch Application Types
Depending on the version of InTouch, the AVEVA Application Manager allows you to create
several different types of InTouch applications. This course focuses on the STANDALONE +
Symbols InTouch application type. Next, we will describe the various types of InTouch applications.

C
Legacy InTouch Application
This application type is not included in the scope of this course and refers to an application type
from an older version of InTouch. Legacy applications, also named standalone, are for backward
compatibility and support only older rasterized graphic types and wizards native to the InTouch
software.
T
Managed InTouch Applications
This application type is not included in the scope of this course and refers to an application type
O
that leverages the Application Server IDE to create an InTouchViewApp. There are two versions of
the InTouchViewApp. The first, allows all of the features built into InTouch to be used, such as
InTouch Alarms, InTouch Historical Logging, InTouch Security, InTouch Scripting, and InTouch I/O
Access. In this case, the IDE simply manages deployment of the InTouch Application to production
nodes. The second InTouchViewApp is used with InTouch for System Platform. This method uses
N

the ViewApp property to disable all of the built-in systems of InTouch in favor of using Application
Server’s built-in alarm, security, history, scripting and deployment features. For additional
information on Managed InTouch application, please refer to the InTouch for System Platform
training course.

STANDALONE + Symbols InTouch Application (the focus of this course)


o

This course will focus on creating, editing, and running a STANDALONE + Symbols InTouch
application. The STANDALONE + Symbols applications combine all of the features of the legacy
applications with the advanced capability of vector-based Industrial graphics. This type of InTouch
D

application allows you to drag, drop, and configure Industrial graphics into your windows without
leaving the WindowMaker interface.
Throughout this course, you will develop a STANDALONE + Symbols InTouch application. The
main software component of InTouch used to create a STANDALONE + Symbols InTouch
application is the AVEVA Application Manager.
Edit a STANDALONE + Symbols InTouch application by launching WindowMaker from the AVEVA
Application Manager. WindowMaker allows you to create and configure OI access, tags, windows,

AVEVA™ InTouch HMI 2020 R2


1-18 Module 1 – Introduction

graphics, alarms, history, security, scripting, and Network Application Development. In addition to
other application configuration changes.
You run a STANDALONE + Symbols InTouch Application by launching WindowViewer from either
the AVEVA Application Manager or from WindowMaker directly. WindowViewer allows you to test
and prove your application design.

Application Templates
An Application Template provides a mature starting point for creating a STANDALONE + Symbols

y
InTouch application. This feature reduces design time by creating reusable standards from pre-
built starter applications.

op
Target Resolution
A target resolution allows the user to create an application for a production environment with a
screen resolution that is different than the Engineering node. Target resolution is specified during
application creation and can be modified after an application has been created. When a window is
being created, target resolution provides a guideline to stay within the target resolution size.
Historically, InTouch automatically converted the resolution of the original application to match the
resolution of the computer where the application is running. This conversion process could have

C
had a severe impact on the position of graphics or the placement of windows in an application.
Therefore, the Target Resolution feature prevents automatic conversion by setting the size of the
application up front, regardless of the resolution on the computer that it is being run. If Target
Resolution is set to default resolution, this is equivalent to enabling the automatic conversion
feature.
T
The WindowMaker Interface
The WindowMaker development environment allows an InTouch application developer to
O
configure most of the available user interface elements, such as toolbars, view panes, status bar,
classic and project view panes, and even the title and application directory path displayed in the
WindowMaker title bar.
You can turn off user interface elements to provide additional work space or rearrange the toolbars
and the view panes to suit your style and efficiency. You can also display the optional ruler, and
N

turn the visible grid on and off, which is used to accurately place graphical elements on an open
window. You can adjust the levels of undo supported by WindowMaker or change the spacing of
the visible grid.

WindowMaker Toolbars and Panes


o

The WindowMaker view panes provide hierarchical graphical views of application elements. These
views display the windows, scripts, menus, wizards and other items that have been configured in
the application, and provides easy access to them. They also provide quick access to many of the
most commonly used commands and functions in WindowMaker.
D

WindowMaker combines the Classic view and the Project view to show InTouch application
windows as well as the tools available for use. Like other toolbars, they can be hidden or shown,
and be docked with the WindowMaker application frame or undocked to float over the workspace.
The Project view allows you to create project folders to help you organize and manage application
elements. For example, creating a folder for Production Area which might contain all of the
windows that represent processes found in the Production Area. This makes finding what you are
looking for much easier in an application with hundreds of windows.

AVEVA™ Training
Lab 1 – Creating the InTouch Application 1-19

Lab 1 – Creating the InTouch Application

Introduction
In this lab, you will create an InTouch application using the InTouch Application Manager. From
Application Manager, you will lock the window size of your application for development in
subsequent labs. Then, you will open your InTouch application in WindowMaker.

y
Objectives

op
Upon completion of this lab, you will be able to:
 Create an InTouch + Symbol Library application
 Open an InTouch application in WindowMaker for editing

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


1-20 Module 1 – Introduction

Create the InTouch Application + Symbol Library


In the following steps, you will initialize and use the InTouch Application Manager to create an
InTouch application.
1. Open InTouch HMI Application Manager.

y
op
C
T
The AVEVA Application Manager dialog box appears.
O
N
o
D

AVEVA™ Training
Lab 1 – Creating the InTouch Application 1-21

2. Click New.

y
op
C
The Select a Template dialog box appears with the + Symbol Library template selected.
3. Click Next.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


1-22 Module 1 – Introduction

The Enter Application Details dialog box appears.

y
op
C
4. In the Application Name field, enter InTouch Training Application.
T
O
N
o
D

AVEVA™ Training
Lab 1 – Creating the InTouch Application 1-23

5. In the Directory Name field, enter InTouch Training Application.

y
op
C
6. In the Application Path field, enter C:\Training.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


1-24 Module 1 – Introduction

7. Ensure the Set Default Directory toggle is enabled.

y
op
C
Leave the Resolution set to Screen Resolution. This automatically detects the resolution of
your screen and uses that resolution for the application.
8. Click Finish.
T
O
N
o
D

AVEVA™ Training
Lab 1 – Creating the InTouch Application 1-25

The new InTouch Training Application tile appears in the AVEVA Application Manager.

y
op
C
9. In the InTouch Training Application tile, on the Quick Access Toolbar, click Application
Properties.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


1-26 Module 1 – Introduction

The Properties dialog box appears.

y
op
C
10. In the Properties dialog box, click the Lock Window Size toggle.
T
O
N
o

This setting will prevent graphics and windows from being resized if the screen resolution
changes.
D

Note: Lock Window Size can also be enabled on the WindowMaker Properties dialog
box. WindowMaker restart is required for this method.

11. In the Properties dialog box, click OK.

AVEVA™ Training
Lab 1 – Creating the InTouch Application 1-27

Open the InTouch Application


Next, you will open the new InTouch application in WindowMaker.

12. In the InTouch Training Application tile, Quick Access Toolbar, click WindowMaker.

y
op
C
T
Note: Double-clicking the InTouch Training Application tile will also open WindowMaker.
O
After a few moments, WindowMaker opens and then updates.
N
o
D

<End of Lab>

AVEVA™ InTouch HMI 2020 R2


1-28 Module 1 – Introduction

y
op
C
T
O
N
o
D

AVEVA™ Training
y
op
C
Module 2 – Window Layout and Basic
Navigation
T
Section 1 – WindowMaker Overview 2-3
O
Section 2 – WindowViewer Overview 2-7
Section 3 – Configure and Test Navigation Using WindowMaker 2-9
Lab 2 – Setting Up Windows and Navigation 2-11
N
o
D
2-2 Module 2 – Window Layout and Basic Navigation

Module Objectives
 Discuss how to lay out Windows
 Embed an Industrial graphic and configure wizard options
 Add a Show Window animation to an embedded graphic

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – WindowMaker Overview 2-3

Section 1 – WindowMaker Overview


This section will provide an overview of using WindowMaker.

Overview
WindowMaker is the InTouch application editor used to create and define windows, graphics,
animations, the layout of your windows, and the look and feel of your HMI application.

y
WindowMaker includes a graphical tool set that is used to design InTouch interfaces.
WindowMaker can also be used to configure and maintain features such as scripts, graphics,
ActiveX controls, .NET clients, alarms, historical logging, and security to create and manage the

op
visual interface.
WindowMaker helps you build an InTouch application that is comprised of windows that can
contain graphics, text, animations, navigation elements, window scripts, and action scripts. When
you create a window, the window properties of the window are defined, such as background color,
title, and screen position.

C
InTouch Windows
InTouch is comprised of windows that can contain graphics, text objects, animations, and action
scripts. When a window is first created, properties of the window itself such as title, background
color, and dimensions are defined.
When a new window is created, behaviors and aesthetic properties are defined in the Window
T
Properties dialog box. You can specify whether or not a window will automatically close other
windows that it intersects with, or position the window on top or behind open windows. Border
style, position and size, and background color can also be defined.
When a new window is created, the default settings are retained from the previously created
O
window, or of the currently active window. Window names can contain up to 32 characters and can
include any character on the keyboard except quotation marks.

Window Types
N

Window Type options include the following:


 Replace – Automatically closes any windows it intersects when it appears on the screen,
including popup and replace type windows.
 Overlay – Appears on top of the currently displayed windows and can be larger than the
windows it is overlaying. Clicking on any visible portion of a window behind an overlay
o

window makes that window active.


 Popup – Is similar to an overlay window, yet always stays on top of all other open
windows even if another window is clicked.
 Frame – This window type is used to host a single Industrial graphic. Frame windows
D

enable panning and zooming at runtime.

AVEVA™ InTouch HMI 2020 R2


2-4 Module 2 – Window Layout and Basic Navigation

Template Windows
Template Windows are reusable application windows that act as a model, or starting point, for
creating new windows; which aid in establishing application design standards. Template windows
are different from other windows as the Template property is enabled, they are listed separately
from other windows in WindowMaker, they can be selected from the Template Window browser,
and they can be used as a template to create new windows.

InTouch Window Layout

y
Build a window portal by arranging windows of various sizes and position to create a single display
for the application. This allows a mix of windows that can be designated for different purposes,
such as a menu window, a content window, an overview window, and an auxiliary information

op
window. Fixed windows, such as menu windows or overview windows, rarely change and can
remain in place in the overall display. Conversely, content windows, such as P&ID displays or
auxiliary displays, are used for frequently changing content and can be quickly switched to display
new areas of a process or facility.
While windows remain open they continue to update data being displayed and consume system
resources such as CPU and RAM resources to process scripts and animation. This is true even if
the window is open but not visible on the screen. For content windows, the Replace window type is

C
used to close the window that it covers in order to free up system resources. This will allow peak
efficiency with the use of system resources and maintain maximum performance of the CPU and
RAM.

Embedding an Industrial Graphic on an InTouch Window


T
You can embed prebuilt symbols in application windows from the Industrial Graphic Toolbox.
There are two ways to embed an Industrial graphic into a window:
 Drag and drop an Industrial graphic from the Industrial Graphic Toolbox directly onto the
O
window

 Embed Industrial Graphic can be used to open the Industrial Graphic Library and
view the library of available Industrial graphics
N
o
D

AVEVA™ Training
Section 1 – WindowMaker Overview 2-5

Adding the ShowWindow Animation to an Industrial Graphic


The simplest form of window navigation is the use of buttons configured to open a window. The
buttons are configured by adding a ShowWindow animation to open a specific window. Multiple
buttons are organized together on a window to allow users to navigate the application. In runtime
when the operator clicks the navigation button the selected window will open. In runtime when the
operator clicks the navigation button the selected window will open.

Switching Between Development and Runtime

y
The menu in both WindowMaker and WindowViewer provides a switch named the FastSwitch.
The FastSwitch allows application developers to test what they have designed in WindowMaker in

op
the WindowViewer runtime environment.

Configuring Custom Properties and Wizard Options


As part of the Situational Awareness Library in the graphic toolbox, the symbols selected contain
thousands of configurable options. Wizard Options allow you to configure these options. For
example, a single Industrial pump symbol includes dozens of visual configurations. Situational

C
Awareness Library symbols are designed to leverage these Wizard Options to configure the look
and behavior of the final graphic in runtime.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


2-6 Module 2 – Window Layout and Basic Navigation

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 2 – WindowViewer Overview 2-7

Section 2 – WindowViewer Overview


9
This section will provide an overview of the InTouch runtime environment, WindowViewer.

Overview
InTouch WindowViewer is the runtime visualization application, where users can view and control
processes in a visual display format with animations and user interfaces. It executes scripts,

y
interfaces with the alarm manager and the historical data retrieval and storage system, drives
animations, connects to IO data, displays graphics and text, and provides interactive tools for
supervisory control and data acquisition.

op
Menus in WindowViewer allow you to perform basic functions such as opening and closing
windows, starting and stopping logic, logging into and out of security, launching the tag testing tool
Tag Viewer, starting and stopping historical logging, and exiting WindowViewer.
WindowViewer monitors user input by responding to peripheral devices such as a mouse when a
user clicks a graphic. For example, an operator clicks an input field to change a set point, or an
operator might click a button to navigate to a new window.
WindowViewer also supports automation through scripting as a scripting execution engine. Tasks

C
which require 24-hour-a-day monitoring can be triggered to execute by WindowViewer
automatically without an operator present.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


2-8 Module 2 – Window Layout and Basic Navigation

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 3 – Configure and Test Navigation Using WindowMaker 2-9

Section 3 – Configure and Test Navigation Using WindowMaker


This section will provide an overview of how to use WindowMaker to embed symbols in windows
and apply animations to symbols. This section will also explain how to test animations that will
navigate to different windows in runtime.

Embed an Industrial Graphic in a Window


There are several methods of placing a graphic from the Industrial Graphic Toolbox into a window

y
in WindowMaker. The simplest of these methods is to drag and drop the graphic from the Industrial
Graphic Toolbox onto the window.
Symbols embedded on a window contain all of the built-in functionality, which is accessible by

op
double-clicking to configure features.

Apply InTouch Animations to Industrial Graphics


After a graphic has been added to a window from the Industrial Graphic Library, an InTouch
animation can be applied. After an InTouch animation has been applied, any built-in interactive
functionality is disabled and replaced by the InTouch animation. InTouch animations can be used

C
to create navigation buttons using Show Window and Hide Window animations. These
animations allow you to select one or more windows, which can be controlled when the operator
clicks the graphic to which the animation was applied.

Configure Navigation
T
A typical window layout built using WindowMaker will include a menu window. A menu window
typically contains some interactive method the user selects to change the content being displayed
in WindowViewer. To provide this interaction, windows are arranged in such a way that the menu
O
window is always visible as the user navigates to different content. The navigation commonly
takes the form of buttons, where each button represents a single window that can be displayed.
Therefore, each button will be labeled with the name of the window it displays and the animations
applied to it will display that window.
For small applications, rows of buttons is easily manageable. However, it is not scalable for
N

medium to large applications. This course will explain more than one method of navigation.
o
D

AVEVA™ InTouch HMI 2020 R2


2-10 Module 2 – Window Layout and Basic Navigation

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-11

Lab 2 – Setting Up Windows and Navigation

Introduction
In this lab, you will create windows in WindowMaker, and configure properties and dimensions of
the windows to arrange them into a layout that will be used throughout this course. Then, you will
embed a symbol from the Industrial Graphic Toolbox into a window, edit the label on the symbol,
and add an animation that will allow you to interact with the symbol to open a window. You will

y
duplicate the symbol and edit the duplicate to produce a row of buttons that open different
windows. Finally, you will test your window layout and navigation in runtime using WindowViewer.

op
Objectives
Upon completion of this lab, you will be able to:
 Create a basic application window layout
 Create a menu window used for navigation
 Create a Frame window

C
 Create a Template window
 Create a window from a Template window
 Embed an Industrial Graphic on a window
 Add a Show Window animation to a button
 Test what you have configured in Runtime using WindowViewer
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


2-12 Module 2 – Window Layout and Basic Navigation

Create the Layout Windows


In the following steps, you will create windows and position them to create a basic window layout
that will be used throughout this course.
1. On the WindowMaker File menu, select New Window.

y
op
C
T
The Window Properties dialog box appears.
2. In the Name field, enter Menu.
O
N
o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-13

3. In the Window Type area, select Popup.

y
op
4. Uncheck the Title Bar check box.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


2-14 Module 2 – Window Layout and Basic Navigation

5. Configure the Dimensions area as follows:

X Location: 0
Y Location: 0
Window Width: 1800
Window Height: 100

y
op
6. Click OK.

C
The new Menu window is listed under the Windows folder in the Windows & Scripts pane,
T
and is open on the canvas.
O
N
o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-15

7. On the File menu, select New Window.


The Window Properties dialog box appears with the settings from the Menu window,
configured previously.

y
op
C
8. In the Name field enter KPI.
9. Configure the Dimensions area as follows:

X Location: 0
Y Location: 100
Window Width: 350
T
Window Height: 580
O
N
o

10. Click OK.


D

AVEVA™ InTouch HMI 2020 R2


2-16 Module 2 – Window Layout and Basic Navigation

The KPI window is listed under the Windows folder in the Windows & Scripts pane, and is
open on the canvas.

y
op
11. On the File menu, select New Window.

C
Next, you will create Template windows and create windows from these templates.

12. In the Name field, enter Content_NonFrame.


T
O
N
o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-17

13. In the Window Type area, select Replace.


14. Check the Title Bar check box.

y
op
15. Check the Template check box.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


2-18 Module 2 – Window Layout and Basic Navigation

16. Configure the Dimensions area as follows:

X Location: 350
Y Location: 100
Window Width: 1450
Window Height: 580

y
op
17. Click OK.

C
The Content_NonFrame window is listed under the Template Windows folder in the
T
Windows & Scripts pane, and is open below the Menu window on the canvas.
O
N
o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-19

18. On the File menu, select New Window.


19. In the Name field, enter Content_Frame.
20. Check the Frame check box.

y
op
C
Because the settings from the previous template window have become the default settings, the
Window Type, Title Bar, Template, and Dimensions are already configured.
21. Click OK.
The Content_Frame window is listed under the Template Windows folder in the Windows &
Scripts pane, and is open below the Menu window on the canvas.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


2-20 Module 2 – Window Layout and Basic Navigation

Next, you will create a new window from a Template window. To do this, you must first save and
close all Template windows.
22. Click the Save All Windows button.

y
23. In the Windows & Scripts pane, right-click the Content_Frame template window and select
Close.

op
C
T
O

The Content_Frame window closes.


N
o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-21

24. In the Windows & Scripts pane, right-click the Content_NonFrame window and select
Close.

y
op
The Content_NonFrame window closes.
C
T
25. On the File menu, select New Window from Template.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


2-22 Module 2 – Window Layout and Basic Navigation

The Template Window Browser appears.

y
op
C
26. In the Template Window Browser, select Content_Frame.
T
O
N
o
D

27. Click OK.

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-23

The Window Properties dialog box opens.

y
op
C
T
Notice that Template is not checked because this is a window created from a Template window.
28. In the Name field, enter Mixer.
O
N
o
D

29. Click OK.


The Mixer window appears.

AVEVA™ InTouch HMI 2020 R2


2-24 Module 2 – Window Layout and Basic Navigation

Next, you will create the remaining template and windows that will be used in this course.
30. On the File menu, select New Window, and configure the Windows Properties dialog box as
follows:

Name: Information_Frame
Frame: checked
Window Type: Replace

y
Title Bar: checked
Template unchecked
X Location: 0

op
Y Location: 680
Window Width: 1800
Window Height: 300

The Window Properties dialog box will look like the following image.

C
T
O
N

31. Click OK.


o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-25

The canvas will look like the following image.

y
op
C
T
O
N

32. Click the Save All Windows button.


o
D

AVEVA™ InTouch HMI 2020 R2


2-26 Module 2 – Window Layout and Basic Navigation

Next, you will use the drag-and-drop method to make the Information_Frame window a Template
window.
33. In the Windows & Scripts pane, drag the Information_Frame window onto the Template
Windows folder.

y
op
C
The Information_Frame template window can now be used as a template to create other
windows.
T
34. Close the Information_Frame template window.
O
N
o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-27

Next, you will create two windows from the Information_Frame template window.
35. Use the Information_Frame template window to create a new window named
Current_Alarms.

Note: In the Template Window Browser, you will need to scroll down to locate the
Information_Frame template window.

y
op
C
T
O
N
o
D

Note: Do NOT close the Current_Alarms window at this time.

AVEVA™ InTouch HMI 2020 R2


2-28 Module 2 – Window Layout and Basic Navigation

36. Use the Information_Frame template window to create a new window named
Historical_Alarms_and_Events.

y
op
C
T
O
N

37. Save and close the Historical_Alarms_and_Events window.


o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-29

Embed and Configure the Menu Graphics


Next, you will embed graphics and configure them to switch between the Mixer, Current_Alarms,
and Historical_Alarms_and_Events windows in runtime.
38. In the Industrial Graphic Toolbox, expand Situational Awareness Library \ Input.

y
op
C
T
39. Drag SA_PageNavigation to the left side of the Menu window.
O

An instance of SA_PageNavigation is embedded in the Menu window.


N
o
D

AVEVA™ InTouch HMI 2020 R2


2-30 Module 2 – Window Layout and Basic Navigation

40. In the Menu window, right-click the embedded instance, and select Substitute | Substitute
Strings.

y
op
C
The Substitute Strings dialog box appears.
41. In the New String field, enter Mixer.
T
O

42. Click OK.


The label of the embedded instance changes to Mixer.
N
o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-31

43. On the Arrange toolbar at the bottom of WindowMaker, click the Rotate Clockwise button.
The Mixer symbol is rotated.

y
op
44. If necessary, use the arrow keys to ensure the entire Mixer symbol is completely visible within
the Menu window.

C
45. Right-click the Mixer symbol, and select Animation Links.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


2-32 Module 2 – Window Layout and Basic Navigation

The Animation Links dialog box appears.


46. In the Animation Links dialog box, click Show Window.

y
op
C
The Windows to Show when touched dialog box appears.
47. Check the Mixer check box.
T
O
N

48. Click OK.


o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-33

49. In the Animation Links dialog box, click OK.

y
op
C
The symbol is now a button that opens the Mixer window when clicked at runtime.
50. Ensure the Mixer button is selected, then right-click and select Duplicate.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


2-34 Module 2 – Window Layout and Basic Navigation

A duplicate button appears.

y
51. Drag the duplicate button to the right of the Mixer button.

op
C
52. Right-click the duplicate button, and select Substitute | Substitute Strings.
53. In the New String field, enter Alarms.
T
O

54. Click OK.


N
o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-35

55. Right-click the Alarms button and select Animation Links.


56. In the Animation Links dialog box, click Show Window.
57. In the Windows to Show when touched dialog box, uncheck the Mixer check box, and
check the Current_Alarms check box.

y
op
58. Click OK.

C
59. In the Animation Links dialog box, click OK.
T
60. Repeat the previous steps to create a third button labeled Events, with a Show Window
animation link to the Historical_Alarms_and_Events window.
The Menu window will appear similar to the following image.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


2-36 Module 2 – Window Layout and Basic Navigation

Test in Runtime
Finally, you will test what you have configured in runtime by opening WindowViewer.
61. In the top-right corner of WindowMaker, click RUNTIME.

y
op
After a moment, WindowViewer opens showing the Menu window, the KPI window, the Mixer
window, and the Current_Alarms window.

C
T
O
N
o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-37

62. Close the Mixer window.

The Mixer window closes.

y
op
63. In the Menu window, click the Mixer button.
The Mixer window opens.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


2-38 Module 2 – Window Layout and Basic Navigation

64. In the Menu window, click the Events button.


The Replace behavior has closed the Current_Alarms window and opened the
Historical_Alarms_and_Events window in its place.

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 2 – Setting Up Windows and Navigation 2-39

65. In the Menu window, click the Alarms button.


The Current_Alarms window replaces the Historical_Alarms_and_Events window.
66. In the top-right corner of WindowViewer, click Development! to return to WindowMaker.

y
op
67. Right-click the WindowViewer icon on the task bar and select Close window.

C
T
O
WindowViewer closes.
N

<End of Lab>
o
D

AVEVA™ InTouch HMI 2020 R2


2-40 Module 2 – Window Layout and Basic Navigation

y
op
C
T
O
N
o
D

AVEVA™ Training
y
op
C
Module 3 – InTouch Tagname Dictionary
T
Section 1 – The Tagname Dictionary 3-3
Lab 3 – Defining Memory Tags 3-11
Section 2 – I/O Configuration 3-19
O

Lab 4 – Configuring the Communication Driver 3-27


Lab 5 – Creating I/O Access and I/O Tags 3-37
N

Section 3 – Tag Viewer 3-51


Lab 6 – Watching Tags with Tag Viewer 3-55
Section 4 – DBDump and DBLoad 3-69
o

Lab 7 – Exporting and Importing Tags 3-73


Section 5 – Other Tag Management Utilities 3-85
D
3-2 Module 3 – InTouch Tagname Dictionary

Module Objectives
 Demonstrate how to use the InTouch Tagname Dictionary
 Define an InTouch Access name
 Configure an IO Server
 Create I/O Tags

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – The Tagname Dictionary 3-3

Section 1 – The Tagname Dictionary


This section will explain tag types and the Tagname Dictionary.

Overview
At the most basic level, a Tag is a named value. Tags are used to store and manipulate values and
properties, such as minimum and maximum ranges or alarm information. Defining tagnames and

y
properties is done in the InTouch Tagname Dictionary. For communication bandwidth, storage size
and efficiency, and proper handling each tag is defined with a specific data type which designates
that tag for a specific use. In runtime, WindowViewer loads and maintains a copy of the dictionary,
which is updated with all current values and properties for these tagnames.

op
During runtime, an InTouch application accesses the Tagname Dictionary and provides specific
tag information via animation links, and InTouch subsystems such as Alarms, History, Security,
and scripting.
You can set up an InTouch application to identify a subset of data stored on another node by using
a three-part naming convention. This convention includes the node, application, and topic names.
To obtain data from a remote node, you must configure an Access name for your InTouch

C
application that specifies these three items.
You must associate InTouch I/O tags with an Access name. Additionally, each I/O tag definition
includes the Item name which, for example, is equivalent to the memory address in a PLC. Tags,
including I/O configuration, and Access names are described in more detail in the following
sections.
T
Memory Tags, I/O Tags, and $System Tags
InTouch data tags, which include discrete, integer, real, and message, are categorized as either
O
memory tags or I/O tags. Additionally, the dictionary has predefined tags named $System tags
that have very useful built-in functionality, such as Date and Time information.
For I/O tags, WindowViewer acts like an I/O client and requests or writes data to an external I/O-
aware application, such as an OI Server, DA Server, and OPC Server. WindowViewer can act as
an I/O server supplying I/O values to requesting clients from both $System tags, memory tags and
N

I/O tags defined in the Tagname Dictionary.


o
D

AVEVA™ InTouch HMI 2020 R2


3-4 Module 3 – InTouch Tagname Dictionary

Memory Tags
Memory tags are InTouch application tags that do not acquire data from a remote source. For
example, memory tags can store the results from a mathematical calculation performed in an
InTouch QuickScript. WindowViewer can act as an I/O server and provide results to an external
client application requesting this Memory tag.
Memory tags are also used in animations such as a counter used to control a Location or Fill
animation. Memory tags can be used as a logic state flag in a QuickScript or used to track the
toggle state of an action pushbutton. Memory tags also serve as simulation data during the design

y
phase of an InTouch application where linking to I/O data is not yet possible or presents a risk until
the design is tested and proven.
There are four Memory types:

op
 Memory Discrete: Internal discrete tag with a value of either 0 (False or Off) or 1 (True or
On)
 Memory Integer (Analog): A 32-bit signed integer value in whole numbers
 Memory Real (Analog): Floating (decimal) point value calculated in 64-bit precision stored
in 32-bit precision
 Memory Message: Text string tag that can be up to 131 characters

C
I/O Tags
All tags that read or write their values to or from an external source are named I/O tags. This
includes all inputs and outputs from programmable controllers, process computers, and data from
network nodes.
T
I/O tags are accessed either through the Microsoft Dynamic Data Exchange (DDE) or SuiteLink
communication protocols. SuiteLink is a proprietary protocol recommended for network
communication and diagnostics with other I/O applications.
When the value of a read/write I/O tag changes, it is immediately written to the remote application.
O
The tag can also be updated from the remote application when the item to which the tag is linked
changes in the remote application.
By default, all I/O tags are set to Read/Write. However, you can restrict them to read only by
selecting the Read Only option in the Tagname Dictionary dialog box.
N

There are four I/O Types:


 I/O Discrete: Discrete input/output tag with a value of either 0 (False, Off) or 1 (True, On)
 I/O Integer (Analog): A 32-bit signed integer value
 I/O Real (Analog): Floating (decimal) point tag
 I/O Message: Text string input/output tag that can be up to 131 characters long
o
D

AVEVA™ Training
Section 1 – The Tagname Dictionary 3-5

$System Tags
There are a number of pre-built $System tags in the Tagname Dictionary. These $System tags
provide data for security, date information, time information, and miscellaneous functions, such as
determining the vertical and horizontal position of the current selection. $System tags cannot be
deleted or renamed.
$System tags such as $OperatorEntered and $PasswordEntered allow data to be written to
them, allowing these tags to be used to create a login feature for InTouch Security.
$ConfigureUsers, opens the configure users security dialog box when a value of 1 is written to

y
the tag, but only if the user has the proper access level. Several of the $System tags are also
predefined to log events to the Alarms and Events subsystem when it is enabled. For example,
each time a new alarm occurs, the $NewAlarm tag is set to 1, and this incident is recorded in the
event history.

op
Special Purpose Tag Types
There are several special tag types that perform complex functions, such as creating dynamic
alarm displays, historical trends, monitoring or controlling the tag that each historical trend pen is
plotting, and so on.

C
Group Var
Use the Group Var type for a tag with an assigned Alarm Group to create dynamic alarm displays,
disk logs, and print logs. Group Var tags create alarm windows or alarm logs that display all alarms
associated with a specific group variable. You can also control the alarms that are displayed or
logged by assigning a different Alarm Group to the Group Var tag.
T
Hist Trend
InTouch requires a Hist Trend tag type when you create a historical trend. All of the fields
O
associated with historical trends can be applied to Hist Trend tags.

Tag ID Tags
N

Use Tag ID tags with historical trend objects. Use Tag ID tags to retrieve information about tags
being plotted in a historical trend. In most cases, Tag ID tags display the name of the tag assigned
to a specific pen or to change the tag assigned to the pen.
o
D

AVEVA™ InTouch HMI 2020 R2


3-6 Module 3 – InTouch Tagname Dictionary

Local Tags
Local Tags allow the user to create per-session memory tags for use with Web Client. For
example, the user can configure a local memory tag to be used for navigation. A Web Client on
another node has a local copy of this tag. When the value of the tag changes, such as when the
user clicks to navigate to a different window, the change made to that tag is not updated on the
Web Server node. Thus, each session will behave independently. Otherwise, the last user to
change navigation in the network would change navigation for every Web Client pointing to the
same Web Server. Imagine how disruptive this would be.

y
Note: .Dot fields are not supported for local tags.

op
C
T
O

Tag Naming Conventions


N

When creating tagnames, consider the following naming conventions:


 The maximum length is 32 characters
 Spaces are not permitted
 If you start with a number, do not follow with another number or a function character
 The backlash character “\” is reserved for SuperTags
o

 You must use at least one alpha character


D

AVEVA™ Training
Section 1 – The Tagname Dictionary 3-7

Creating Tags
Tags and their tagnames are created using the Tagname Dictionary.
There are several ways to open the Tagname Dictionary:
 Menu bar: Special | Tagname Dictionary
 Tools pane shortcut: Tagname Dictionary
 Keyboard shortcut: Ctrl+T
The first time you access the Tagname Dictionary, the definition for the internal system tagname

y
$AccessLevel appears. This is the first tag in the Tagname Dictionary.
After saving a tag definition in the Tagname Dictionary, the definition for the tag edited last is
displayed.

op
C
Many tags require a greater level of detail to be properly handled. A Details area is displayed for
each type of tag to define its details. This Details section may be seen by selecting either Details
T
or Details & Alarms radio buttons at the top of the Tagname Dictionary. The fields which are
shown in the details area vary based on the Type selection.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-8 Module 3 – InTouch Tagname Dictionary

Select Tag Dialog Box


To change the tag in the Tagname Dictionary, use the Select button to open the Select Tag dialog
box. The Select Tag dialog box displays all tags contained within the Tagname Dictionary. This is
also known as the Tag Browser. This is the primary tool used to view and select local and remote
tagnames and tagname dotfields from applications, or any other tag source that supports the
Tagname Dictionary interface. It enables selection of existing tags, addition of new tags and
viewing of basic Tagname Dictionary information.
The Tag Browser is also used to access the Tag Editor to perform editing, replication, and

y
configuration of remote references for remote tag sources. The first time the Tag Browser is
accessed, by default, <local> is selected for the tag source. This means that the tagnames in the
local application Tagname Dictionary are displayed. Thereafter, the most recently accessed tag

op
source tagnames are displayed.
The Tag Browser operates in either Dictionary or Selection mode. The mode is determined by
the method used to access it.

C
T
O
N
o
D

AVEVA™ Training
Section 1 – The Tagname Dictionary 3-9

Configuring Tags
The following configuration options are available in the Tagname Dictionary.

y
op
C
Group
The Group button assigns the tag to a specific Alarm Group.

Read Only and Read Write


T
Read Only and Read Write are used to set write restrictions for I/O tags.

Comment
O
Additional text that can be used to describe the tag. The comment cannot exceed 50 characters.

Log Data
Enables historical logging to the InTouch Historical Logging subsystem. Log Deadband adds a
N

tolerance to the data logged by the historical logging subsystem. This is used to reduce the
consumption of storage space.

Log Events
Enables tracking of tag state changes to the Alarm and Event subsystem.
o

Retentive Value
Retains the current value of the tag when WindowViewer is closed.
D

Retentive Parameters
Retains the current alarm limit when WindowViewer is closed.

Alarm Comment
This field contains default alarm comment text string which can be used when an alarm is
acknowledged.

AVEVA™ InTouch HMI 2020 R2


3-10 Module 3 – InTouch Tagname Dictionary

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 3 – Defining Memory Tags 3-11

Lab 3 – Defining Memory Tags

Introduction
In this lab, you will create Memory Real, Memory Integer, Memory Discrete, and Memory Message
tags. Some of these tags will be used in subsequent labs.

y
Objectives
Upon completion of this lab, you will be able to:

op
 Define memory tags

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-12 Module 3 – InTouch Tagname Dictionary

Use the Tagname Dictionary to Create Tags


In the following steps, you will open the Tagname Dictionary, and define memory tags.
1. On the WindowMaker Special menu, select Tagname Dictionary.

y
op
C
T
O
The Tagname Dictionary dialog box appears.
2. Click New.
N
o
D

AVEVA™ Training
Lab 3 – Defining Memory Tags 3-13

3. In the Tagname field, enter Tag_Discrete1.

y
op
4. Click Type.

C
T
The Tag Types dialog box appears.
O
5. Check the Memory Discrete check box.
N
o
D

6. Click OK.

AVEVA™ InTouch HMI 2020 R2


3-14 Module 3 – InTouch Tagname Dictionary

The Memory Discrete tag type displays to the right of the Type button.

y
op
7. In the Comment field, delete AccessLevel.

C
T
8. Click Save.
O
N
o
D

AVEVA™ Training
Lab 3 – Defining Memory Tags 3-15

9. Click New.
Notice that the Tagname field automatically increments to Tag_Discrete2.

y
op
10. Retain all of the defaults, and click Save.
11. Click New.
12. In the Tagname field, enter Tag_Integer.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-16 Module 3 – InTouch Tagname Dictionary

13. Click Type.


14. In the Tag Types dialog box, check the Memory Integer check box.

y
op
C
15. Click OK.
16. In the Tagname Dictionary, click Save.
17. Repeat the previous steps to create another tag and configure it as follows:

Tagname: Tag_Real
T
Type: Memory Real

Note: Remember that you must click the New button prior to creating a new tag, or your
O
existing tag will be overwritten.
N
o
D

18. Click Save.

AVEVA™ Training
Lab 3 – Defining Memory Tags 3-17

19. Repeat the previous steps to create another tag and configure it as follows:

Tagname: Tag_Message
Type: Memory Message

y
op
20. Click Close to save the tag definition, and exit the Tagname Dictionary.

C
T
O

Note: Do not confuse the typical Windows Close button [X] at the top-right corner side of
N

the Tagname Dictionary, which cancels the current definition and exits the Tagname
Dictionary.

<End of Lab>
o
D

AVEVA™ InTouch HMI 2020 R2


3-18 Module 3 – InTouch Tagname Dictionary

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 2 – I/O Configuration 3-19

Section 2 – I/O Configuration


This section will discuss the data acquisition components of InTouch.

System Platform Management Console


The System Platform Management Console, or ArchestrA System Management Console (SMC),
provides application diagnostics. The SMC can be used to configure historians and

y
communication drivers, as well as view system messages, warnings, and errors. Additionally, the
SMC can remotely connect and perform these same tasks on other nodes on the network.

op
C
T
O
N

Communication Drivers
The Operations Integration Server Manager is a part of the SMC suite of utilities. It enables the
configuration, diagnosis, activation, or deactivation of communication servers located on the same
node or on a different node.
o

You can open multiple instances of the Operations Integration Server Manager at the same time;
however, you can only use the first instance to create device hierarchies and configure a
communication server. In all other instances are set to read-only.
D

AVEVA™ InTouch HMI 2020 R2


3-20 Module 3 – InTouch Tagname Dictionary

Navigating the Operations Integration Server Manager


Within the SMC the Operations Integration Server Manager is displayed in two parts. On the left is
the Console Tree used for navigation and on the right, the Details pane used for configuration.
The Details pane contains faceplates, that will vary depending on the type of communication driver
that is being configured. The Operations Integration Server Manager has one or more node
groups in its hierarchy and each node group comprises one or more nodes. A node represents a
computer that hosts at least one communication driver.

y
op
C
T
O

Server Groups
N

A server group comprises one or more server instances that use the same communication driver
protocol, such as a Modbus-MBTCP. When you install a specific communication driver on a
computer, a server group and default server instance are automatically created for that
communication driver. Since there is a limit of one server group per communication driver per
computer node, that server group effectively is the communication driver.
Where the server group appears in the Operations Integration Server Manager depends on what
type of Operations Integration Server Manager it is for. For the purpose of this course, the MBTCP
o

is optimized and is contained in the Operations Integration Supervisory Servers folder.


D

AVEVA™ Training
Section 2 – I/O Configuration 3-21

Server Instances
Each server instance has its own configuration and diagnostics, can be activated and deactivated
separate from all other server instances, and appears as a separate application to external clients.
When you install a communication driver on a computer, a server group and a default server
instance are automatically created for it in the Operations Integration Server Manager. The name
of the default server instance is based on the short name of the communication driver installed.
For example, for the Simulation OI Server, the default server instance is named OI.SIM.1. All
server instance names follow this basic format.

y
The middle part of a server instance name becomes the application name that external clients will
use to access it. For example, if a server instance is named OI.SIM_0001.1, the corresponding
application name will be SIM_0001. This middle part of the server instance name is used in the

op
InTouch runtime client, WindowViewer, to connect to this data source.

Configuring the OI Server


The Configuration node is used to configure an OI Server for runtime. The Configuration node has
two functions. First, it has several global parameters that can be configured to adjust the OI Server
runtime performance. These parameters apply to all server instances in the server group.

C
Second, the Configuration node has its own hierarchy of configurable objects. Each object
represents a physical device, such as a channel, port, bridge, or PLC. Some OI Servers have two
levels of objects in the hierarchy. For example, a parent object may represent a network channel,
port, or bridge, while a child object may represent an individual device on that network.

Configuring Global Parameters


T
Each OI Server has a unique set of parameters that you can configure for an environment. These
parameters are unique to each type of field device, such as a PLC. For descriptions of these
configuration parameters see your OI Server-specific documentation.
O
Using the Operations Integration Server Manager, you can also configure a set of common or
global parameters for each OI Server. For example, the IP address of the device you are
connecting to.
N

Configuring Device Groups


Device groups are labels used by client applications when accessing the OI Server.
The Device Group Update Interval determines how often the OI Server polls the device and sends
data to the client application. If this is not specified, all unnamed device groups have an update
interval of 1,000 milliseconds. If you configure multiple device groups with different update
intervals, the client application can receive data at various intervals.
o

Smaller update intervals quicken the turnaround for data changes and increase overhead because
a large amount of data is being transmitted between the device and the OI Server. Large update
intervals slow turnaround for data changes.
D

AVEVA™ InTouch HMI 2020 R2


3-22 Module 3 – InTouch Tagname Dictionary

Configuring Device Items


Defining device items provides a more user-friendly way to name data in the device. Defining
device items is optional. Use device items to access data in the OI Server and devices connected
to the OI Server. Device items consist of two pieces: a name and an item reference. After it is
defined in the OI Server, you can access it in the client program either through item name or the
item reference. The device Item name is an alternative name for the item reference. It is an alias,
or a label, for the data in the device. You can use this label instead of the item reference when you
create the client application.

y
The item reference identifies data in the device. The item reference is a PLC memory reference.
Each device’s memory reference can have a different format. For more information, see your OI
Server specific documentation. The actual item reference can be entered as the device Item
name. In this case, the item reference value can be left empty.

op
You can add device items while the OI Server is active, and these new items are immediately
available to client applications once they are saved.

Activating the OI Server


After the configuration of the OI Server is complete, and the changes have been saved, the OI
Server can then be activated. There are several modes of activation. These modes are Auto

C
Service, Manual Service, and Not a Service.
Running the OI Server as a service allows the OI Server to start automatically when the operating
system starts, without the presence of a human user to log in. This is a good mode for disaster
recovery or following server restarts. The final step is to perform the activation which runs the OI
Server. After an OI Server runs as an auto or manual service, it stays running until stopped in the
Operations Integration Server Manager or the computer shuts down.
T
Log Viewer
O
The SMC also includes a health monitoring system for all applications, named the Log Viewer. The
Log Viewer runs as a system service. The Log Viewer records information regarding the activity
occurring on the computer. For example, it records start-up data, error conditions, and OI Server
information. The Log Viewer should be checked occasionally to monitor the health and
configuration of any system.
N

The Log Viewer highlights error messages in red. These indicate malfunctioning processes and
should be resolved quickly. Warning messages are highlighted in yellow. These indicate major
events in the system. Text not highlighted indicates informational messages only.
o
D

AVEVA™ Training
Section 2 – I/O Configuration 3-23

Troubleshoot using the Log Viewer


The following is an example of the thought process behind tracking down a problem with InTouch.
First you will gather as much information first about the process that is malfunctioning. For
instance, you attempt to open WindowMaker and an error message is displayed. Note the text of
the message you received for keywords that you can search on later.
Next, you will open SMC and access the Log Viewer. Look for red and yellow messages. Also, use
the text and keywords you collected earlier about the failed process to search for clues in the
logged messages.

y
Lastly, you will use the Find command from the SMC to single out key words and text indicating the
source of the problem. You may also use the Filter command to reduce the number of messages
displayed and narrow your search. The Filter may also be used to set a time range for the

op
messages displayed.
This approach with these tools will assist you to rapidly identify the cause of issues so that you can
resolve them to stabilize your environment.

Using Bookmarks
Bookmarks are unique labels applied to individual messages for quick access. You cannot enter

C
duplicate bookmark names for more than one message, and a messages can have only one
bookmark. The Message window can display a Bookmark column, which is initially hidden by
default, but can be shown by using a configuration setting.
Set bookmarks in two ways: adding a regular bookmark that you can name and setting a fast
bookmark that is named for you.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-24 Module 3 – InTouch Tagname Dictionary

PLCSim
The PLCSim used in this course is the ModRSsim2.exe. It is a publicly available application which
requires script-based logic to represent a simulation, commonly written in Visual Basic. The
student media supplied with this course contains this executable along with its supporting
mixer_v20.0519.vbs script. To work with the Modbus TCP protocol used by this simulator
application, a MBTCP OI Server is required. The OI Server used for this course is MBTCP. It is
purchased and licensed separately and therefore not included with the student media. A standard
InTouch license includes the ability to use two I/O servers. The AVEVA System Platform 2020 R2
and later installer includes a list of the most common OI servers, including MBTCP. This will

y
simplify the effort to install the MBTCP communication server.

InTouch Access Names

op
You must associate InTouch I/O tags with an Access name. An Access name defines a
communication link with another I/O data source. Each Access name specifies an external I/O
source consisting of a node name, an application name, and a topic. When you create I/O tags,
you must associate them with an Access name in the definition of the tag.

Creating an Access Name

C
An Access name includes a form that allows you to specify the external I/O source. The following
table shows the entries that must be completed for the Access name.

Option Purpose
Access Name The Access name must be unique for each I/O source (typically the same as the topic
name). InTouch uses Access names to reference real-time I/O data. Each Access
T
name is associated with an I/O source that must be on the same network as the
InTouch Application Node.
Node Name The Node Name is the computer name or IP address of the computer on the network
which is hosting the I/O source. A blank Node Name implies local node access.
O
Application Name The Application Name is the process or executable running on the remote computer,
which InTouch will connect to. Note: Do not enter the .exe extension portion of the
program name.
Topic Name The Topic Name is the device group, scan group, or channel used by one or more
N

items (PLC memory addresses) that will be polled at a specific frequency or rate. The
OI Server will contain the same spelling of the topic name in its device group list
configuration.
Which Protocol to Select DDE (local node only) for support of older I/O servers, or connections to
use Microsoft Office products; or SuiteLink (proprietary network protocol).
When to advise Advise all items: Select if the server program is to poll for all data whether or not it is
server in visible windows, alarmed, logged, trended or used in a script. Selecting this option
o

impacts performance and is not recommended.


Advise only active items: Select if the server program is to poll only points in visible
windows and points that are alarmed, logged, trended, or used in any script. An
InTouch Pushbutton action script is not polled unless it opens in a visible window.
D

AVEVA™ Training
Section 2 – I/O Configuration 3-25

Defining I/O Tags


An I/O tag is different from a Memory tag because it requires both an Access name and an I/O
Item name. The Access name covers the first three of four parts: node, application, and topic. The
Item name covers the fourth, which is the PLC Memory Address, or data register, of the field
device.
There is a feature that allows you to use the tagname as the Item name and this is acceptable if
the manufacturer of the field device only requires characters which are supported by InTouch
Tagnames. However, by controlling the Device Item Map in the OI Server, you could restrict the

y
alias names used in the item map by using only characters supported in InTouch tagnames. This
would allow you to still use the Use Tagname as Item Name feature. This is the approach used in
this course.

op
The Item name does not have to match the tagname. The Item name field in the InTouch Tagname
Dictionary supports a wider range of symbols and characters than a tagname name field. This
allows you to work with hundreds of field device manufacturers’ unique naming conventions. For
example, the Item name field supports the common characters: space( ) and period(.). Whereas,
both of these characters are not supported in InTouch tagnames.
In the definition of an analog I/O tag there are two parts that control the data from the remote
source. These are referred to as Raw and EU. The Raw value allows you to scale device values in

C
cases where the PLC does not already perform scaling.
The EU, which represents the Engineering Units as seen by a human, can be used to scale the
Raw value coming from the field device. To scale, select the value range from the field device such
as 4 to 20ma or 0 to 4095 for example. And then in the EU fields select the equivalent engineering
units that the human operator will use.
T
For example, a temperature transducer measures 0 to 100 degrees Celsius. The PLC provides
this temperature as an analog to digital converted value ranging 0 to 4095. In the Min Raw field
you would enter 0, and in the Max Raw field you would enter 4095. However, in the MinEU field
you would enter 0 and in the MaxEU field, 100. The value is then linearly scaled by interpolating
O
between the Raw and the EU mathematically. Therefore, if the temperature memory address in the
PLC contains 3276 then InTouch will scale this to 80 degrees Celsius, and 80 degrees Celsius
could be displayed on an InTouch window in runtime.
If, on the other hand, this I/O tagname was a set point for the temperature, the above scaling
works in reverse. The user would enter 80 degrees Celsius as the set point and InTouch would
N

write 3276 to the PLC memory address.


If the PLC is performing all scaling you would not scale the tag in InTouch. In such cases, the Raw
value will reflect the range of the scaled value. To do this the Raw fields and the EU fields both
contain the same numbers. For example, Min Raw and MinEU would both contain 0, and Max
Raw and MaxEU would both contain 100. This would establish a ratio of 1 to 1 (1:1).
o
D

AVEVA™ InTouch HMI 2020 R2


3-26 Module 3 – InTouch Tagname Dictionary

Standardization of Units of Measure (UOM)


The Engineering Unit is the unit of measure used by a tag. This is entered when defining the
properties of a tag in the Tagname Dictionary. Examples of engineering units include: °F, °C, l and
RPM. Engineering units are case sensitive when working with the AVEVA Historian. AVEVA
Historian can differentiate ml (milliliters) and ML (megaliters), for example.
Starting with AVEVA Historian 2020 R2, engineering units are grouped together in dimensions.
This allows like engineering units such as volume, temperature or pressure to be converted from
one form to another. For example, the dimension temperature, which includes °F, °C, and K allows

y
the conversion from °F to K or from °C to °F, etc.

op
C
The SMC, which is used to configure the AVEVA Historian, displays the engineering units under
the Tag Configuration node. For each engineering unit, such as °C in the illustration above, any
InTouch tags with the engineering unit property defined as °C are automatically associated when
these tags are imported into Historian, such as when checking the Storage to Historian feature in
WindowMaker’s Historical Logging. It is, therefore, an important consideration to use the
engineering units as defined in Historian as a guide for the exact spelling of the engineering unit in
T
the Tagname Dictionary when defining a tag. One benefit of following this guidance is the UOM
conversion feature of Historian. See the description in the previous paragraph above.

Runtime I/O Access and I/O Server Functionality


O
At runtime WindowViewer uses the four I/O address pieces: node, application, topic, and item to
remotely connect to external data sources, such as the OI Server and retrieve data. For example,
if the application name is Microsoft Excel, the topic name is the name of the spreadsheet that
contains the data, and the Item name is the identification of the cell on the spreadsheet where the
N

date is written to or read from.


WindowViewer also acts as an I/O server. When an I/O-aware Windows application requests data
from WindowViewer using the appropriate connection syntax, WindowViewer will serve that data
to the requesting client. For example, in Microsoft Excel the following formula entered into a cell of
the spreadsheet will connect to WindowViewer on the local node and retrieve the current seconds
of the internal clock as seen by WindowViewer:
o

=VIEW|TAGNAME!'$Second’
Starting with InTouch HMI 20202 R2 WindowViewer acts as an OI Server for OPC Unified
Architecture (OPC UA). This allows any third party OPCUA client to request data from
D

WindowViewer. OPCUA is an industrial machine-to-machine communication protocol for


interoperability. It provides process control with enhanced security, advanced communication,
security, and information models, and cross-platform connectivity.

AVEVA™ Training
Lab 4 – Configuring the Communication Driver 3-27

Lab 4 – Configuring the Communication


Driver

Introduction
In this lab, you will configure an OI Server named MBTCP. This is the OI Server you will use to
connect to a Modbus simulator to provide PLC data throughout this course. Then, you will

y
configure the OI Server using the System Platform Management Console (SMC). Finally, you will
import a previously configured device item definition list contained in a .csv file. This list is used to
configure aliases for PLC items.

op
Objectives
Upon completion of this lab, you will be able to:
 Configure an OI Server using the SMC
 Archive OI Server configuration

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-28 Module 3 – InTouch Tagname Dictionary

Configure the Communication Driver in the System Management


Console
In the following steps, you will use the System Platform Management Console (SMC) on your
Engineering node to remotely configure the Operations Integration Server Manager on your
Production node. The Operations Integration Server Manager will link to the Modbus simulator that
has already been installed on the Production node.
1. On your Engineering node, open the System Platform Management Console.

y
Once started, the window will be labeled SMC - ArchestrA System Management Console.
2. In the left pane, expand Operations Integration Server Manager.

op
3. Expand Default Group.
4. Right-click Default Group, and select New | Node.

C
T
O

The New Node dialog box appears.


5. In the Node Name field, enter the name of the remote Production node where the OI Server is
N

installed.

Note: Your instructor will provide the name of the Production node.
o
D

6. Click OK.

AVEVA™ Training
Lab 4 – Configuring the Communication Driver 3-29

7. Expand the Production node name.

y
op
8. Expand OI.MBTCP.1, and click Configuration.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-30 Module 3 – InTouch Tagname Dictionary

9. Expand Configuration / PORT and click PLC.


10. With PLC selected, in the right pane, ensure the PLC Parameters tab is selected.

y
op
simulation is running.

Note:
C
11. In the Network Address field, enter the name of the Production node where the PLC

Your instructor will provide the name of the Production node.


T
O
N
o
D

AVEVA™ Training
Lab 4 – Configuring the Communication Driver 3-31

Import the Device Item Definition List


Next, you define a Device Group, which specifies the polling rate of the OI Server. Then you will
import a Device Item definition list that has been preconfigured in a .csv file. This list contains
aliases for PLC register addresses.
12. Click the Device Groups tab, right-click inside the table, and then select Add.

y
op
13. In the Name column, enter Topic1.

C
T
O

Note: Be sure to change the name of the default value from Topic_0 to Topic1 before
pressing Enter or moving to another tab. This name will be used as the Access name in
InTouch in a later lab.
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-32 Module 3 – InTouch Tagname Dictionary

14. Click the Device Items tab, right-click inside the table, and then select Import.

y
op
15. In the Open dialog box, navigate to C:\Training, and select PLCItemList.

C
16. Click Open.
After the .csv file is imported, the table will be populated.

17. In the top-right corner, click the Save button to save the configuration.
T
O
N
o
D

AVEVA™ Training
Lab 4 – Configuring the Communication Driver 3-33

Activate the OI Server


Next, you will use the SMC to activate the OI Server connection, OI.MBTCP.1. Prior to activation,
the server is marked with a white x inside of a red border.

18. Right-click OI.MBTCP.1, and select Activate (Auto start after reboot).

y
op
The OI.MBTCP.1 server is activated. C
T
After it becomes activated, the white x becomes a white check mark inside of a green border.
A license file icon appears, indicating that the server is running and licensed.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-34 Module 3 – InTouch Tagname Dictionary

Archive Configuration Set


Finally, you will archive the configuration.
19. Click Configuration.

y
op
C
20. Right-click Configuration and select Archive Configuration Set.
T
O
N

The Archive Configuration Set dialog box appears.


o

21. In the Configuration Set Name field, enter MixerCfg.


D

22. Click Archive.

AVEVA™ Training
Lab 4 – Configuring the Communication Driver 3-35

23. Navigate to your Production Node.

Note: Your instructor will provide the name of the Production node.

24. On the Production node, open Windows File Explorer.


Windows File Explorer opens.
25. In Windows File Explorer, navigate to:
C:\ProgramData\Wonderware\OI-Server\$Operations Integration Supervisory

y
Servers$\OI.MBTCP\OI.MBTCP

Note: C:\ProgramData is a hidden folder, which requires you to enter the first part of this

op
path manually.

26. In the OI.MBTCP folder, observe the archive file MixerCfg.aacfg has been saved.

C
T
O

27. On the Production node, close Windows File Explorer.


Windows File Explorer closes.
N

28. Navigate to your Engineering Node.

Note: Do not close the SMC, you will use it in the next lab.

<End of Lab>
o
D

AVEVA™ InTouch HMI 2020 R2


3-36 Module 3 – InTouch Tagname Dictionary

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 5 – Creating I/O Access and I/O Tags 3-37

Lab 5 – Creating I/O Access and I/O Tags

Introduction
In this lab, you will create an Access name to connect to the Communication Driver. Then, you will
create I/O tags to access device item data from the PLC simulator.

y
Objectives
Upon completion of this lab, you will be able to:

op
 Create an Access name for the Communication Driver
 Create I/O tags

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-38 Module 3 – InTouch Tagname Dictionary

Create an Access Name


In the following steps, you will create an Access name, which allows you to access I/O data using
tags that will be created later in this lab.
1. In WindowMaker, on the Special menu, select Access Names.

y
op
C
T
O

The Access Names dialog box appears.


2. Click Add.
N
o
D

The Add Access Name dialog box appears.

AVEVA™ Training
Lab 5 – Creating I/O Access and I/O Tags 3-39

3. In the Access Name field, enter PLCSim.

y
op
4. In the Node Name field, enter the name of the Production node where the PLC simulator is
running.

C
Note: Your instructor will provide the name of this computer.

5. In the Application Name field, enter MBTCP.


6. In the Topic Name field, enter Topic1.
T
O
N

7. Leave the remaining default settings and click OK.


o
D

AVEVA™ InTouch HMI 2020 R2


3-40 Module 3 – InTouch Tagname Dictionary

PLCSim appears in the Access Names list.

y
op
8. Click Close.

Define I/O Tags in the Tagname Dictionary


Next, you will create and define tags to access I/O data.
9. On the Special menu, select Tagname Dictionary.

C
10. In the Tagname Dictionary, click New.
11. In the Tagname field, enter Mixer100_Pump1_CMD.
T
O
N
o
D

AVEVA™ Training
Lab 5 – Creating I/O Access and I/O Tags 3-41

12. Click Type, and in the Tag Types dialog box, check the I/O Discrete check box.

y
op
13. Click OK.

C
Notice the definition defaults to Read Write which is appropriate for this tag which will be used
to stop and start a pump.
T
O
N

14. Click Access Name.


o
D

AVEVA™ InTouch HMI 2020 R2


3-42 Module 3 – InTouch Tagname Dictionary

The Access Names dialog box appears.


15. Select PLCSim.

y
op
16. Click Close to select the PLCSim Access name.
PLCSim displays next to the Access Name button.

C
17. Check the Use Tagname as Item Name check box.
T
Notice the tagname has been copied into the Item field, but it is grayed out so it cannot be
O
edited. The Item name can be edited by changing the name of the tag. Otherwise, you must
uncheck Use Tagname as Item Name to edit the Item field.
18. Click Save.
N
o
D

AVEVA™ Training
Lab 5 – Creating I/O Access and I/O Tags 3-43

19. Click New.


The Tagname automatically increments to Mixer100_Pump2_CMD.
The Item field automatically updated to match the Tagname because Use Tagname as Item
Name is checked.

y
op
C
20. Click Save.
21. Click New.
22. In the Tagname field, enter Mixer100_Pump1_PV.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-44 Module 3 – InTouch Tagname Dictionary

23. Select the Read only option.

y
op
24. Click Save.
25. Create another tag named Mixer100_Pump2_PV.

C
Note: Remember to click New before defining a new tag and to click Save after the definition
is complete.
T
O
N
o
D

AVEVA™ Training
Lab 5 – Creating I/O Access and I/O Tags 3-45

Next, you will define analog I/O tags.


26. Create another tag named Mixer100_Temperature_PV.
27. Change the Type to I/O Real.
Notice the Details pane of the Tagname Dictionary changed because the Type has been set
to I/O Real.

y
op
28. Configure the tag as follows:

Initial Value: 0 C
T
Min EU: 0
Max EU: 300
Deadband: 0
O
Min Raw: 0
Max Raw: 4095
Log Deadband: 0
N

Conversion: Linear

29. Without closing the Tagname Dictionary, navigate to the SMC.


o
D

AVEVA™ InTouch HMI 2020 R2


3-46 Module 3 – InTouch Tagname Dictionary

Identify Standardization for Unit of Measure


Next, you will use the SMC to identify the standard set for temperature tags. This will serve as an
example of how to find the standard associated with the unit of measure or engineering unit that
should be used when defining an I/O tag in InTouch. You will not make any changes in this section.
It is used to retrieve the correct syntax while determining the standard.
30. In the SMC, expand Historian / Historian Group / SxxENG / Configuration Editor / System
Configuration / Tag Configuration.

y
31. Click Engineering Units.
32. In the right pane, scroll down to the first Temperature in the Dimension column and select the
first dimension which is named Temperature SI °C °C Celsius.

op
C
T
33. In the Dimension list, double-click Temperature SI °C °C Celsius.
The °C Properties dialog box appears showing the standard unit that should be used for all
O
tags defined using degrees Celsius. This shows the standard Unit Name you will use for a
Temperature tag is °C. In future labs this engineering unit will be visible in graphics at runtime.
N
o
D

34. Click Cancel to close the °C Properties dialog box.


35. Close the SMC.

AVEVA™ Training
Lab 5 – Creating I/O Access and I/O Tags 3-47

Continue Defining I/O Tags in the Tagname Dictionary


36. Navigate to WindowMaker.
The Tagname Dictionary is still open.
37. In the Engineering Units field, enter °C.

Note: You can copy and paste the °C engineering unit from the C:\Training\Lab 5- Degrees
Celsius file.

y
38. Change the Access Name to PLCSim.

op
39. Click Save.

C
40. Create another I/O Real tag and configure it as follows:

Note: In the Tagname field, you will need to change Mixer101 to Mixer100.

Tagname: Mixer100_Level_PV
T
Max EU: 1000
Eng Units: l
O
The engineering unit for the dimension volume for liters uses a lowercase l.
N
o
D

41. Click Save.

AVEVA™ InTouch HMI 2020 R2


3-48 Module 3 – InTouch Tagname Dictionary

42. Create another tag and configure it as follows:

Tagname: Mixer100_Inlet1_Position
Type: I/O Integer
Min EU: 0
Max EU: 100
Min Raw: 0
Max Raw: 10

y
Eng Units: %
Access Name: PLCSim

op
The engineering unit for the dimension ratio for percent uses a % symbol.

C
T
O

43. Click Save.


N
o
D

AVEVA™ Training
Lab 5 – Creating I/O Access and I/O Tags 3-49

44. Click New, and click Save to create the Mixer100_Inlet2_Position tag.
45. Click New, and in the Tagname field, enter Mixer100_Outlet_Position.

y
op
C
46. Retain the remaining default settings, and click Close to save the current definition and exit
the Tagname Dictionary.
T
O
N
o

<End of Lab>
D

AVEVA™ InTouch HMI 2020 R2


3-50 Module 3 – InTouch Tagname Dictionary

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 3 – Tag Viewer 3-51

Section 3 – Tag Viewer


This section will describe the Tag Viewer and will explain how to view, save, and import watch
windows. This section will also discuss dotfields, and explain how to interpret value, time, and
quality information in a watch window.

Overview

y
Tag Viewer is an application that allows you to watch and monitor tags, and modify tag values at
runtime. It provides you with a list of all available tags in the application arranged hierarchically,
based on their alarm groups. It displays tags available in the local InTouch application and does
not support remote references.

op
Tag Viewer is useful during engineering troubleshooting and diagnostic testing. It also reduces
application development and diagnostic time, and enhances application stability and reliability by
providing real-time direct runtime access to the Tagname Dictionary.
To use Tag Viewer, you must first enable it in WindowMaker and then start it from WindowViewer.
You can then start the application at runtime. It can be started through a script or the special
function menu.

C
Enable and Start Tag Viewer
Enable Tag Viewer using the WindowViewer Properties form WindowMaker.
You can also configure the WindowViewer menu so that the Tag Viewer option can be selected an
launched from the Special menu at runtime. Tag Viewer can also be launched from a script named
T
LaunchTagViewer().
The Tag Viewer window contains three parts:
 The left pane, which displays the tags in a hierarchical structure, based on their alarm
O
groups
 The right pane, which displays the list of all available dotfields for the tag or alarm group
selected on the left pane
 The watch window at the bottom, which displays the live runtime values of tags that you
N

want to monitor.
 The Value, Timestamp, and Quality columns that represent Value Time Quality (VTQ) I/
O data monitoring, display if the data you are receiving is good and how to identify data
related problems.

Adding Tagnames to Watch window


o

The watch window is displayed at the bottom of the Tag Viewer by default. You can use this
window to view the value of tags at runtime. You can create additional watch windows to group
relevant tags together. You can also remove a watch window, if required.
D

AVEVA™ InTouch HMI 2020 R2


3-52 Module 3 – InTouch Tagname Dictionary

Using Tag Viewer


You can assign tags to a watch window to view current tag values. You can add tags using several
methods.
 Right-click a tag and select Add to Watch
 Click a tag and drag it to the watch window
 Double-click a tag

y
op
Note: You can open only one instance of Tag Viewer at a time.

C
You can monitor the value, time, and quality of a tag in the watch window to determine if the data
you receive is good, and identify data related issues. Issues include loss of communication or mis-
configured tags.

VTQ Dotfields (.fields)


T
The watch window of the Tag Viewer displays diagnostic information for I/O tags. This is
represented in the watch list by columns named Value, Time, and Quality. The information
contained in these columns comes directly from dotfields of properties from each I/O tag. These
three dotfields together are referred to as VTQ, an industry term that represents the diagnostic
O
quality of a tag.
VTQ places a time stamp and quality indicator on all data values delivered to VTQ-aware clients.
VTQ provides indicators of data quality useful for diagnostics and troubleshooting.
N

Value: .Value field is the tag value.


Time: .Time fields represent the last update time for the tag.
Quality: .Quality fields contains a code that represents the health of the tag.

.Value
o

Contains the value of the specified tagname. This is also the default dotfield for every InTouch
tagname within the system. If no other dotfield is specified, this dotfield is assumed.
D

.Time
Time dotfields represent updated time stamps and can be integer, string, or real data types based
on the time values being shown. For example, the .TimeDate indicator is an integer tagname
dotfield used to display the whole number of days since 01/01/1970. TimeDate would then contain
a number which represents the time that has passed since the I/O server sent the value.

AVEVA™ Training
Section 3 – Tag Viewer 3-53

. Quality
The data quality standard is based on the Open Platform Communications (OPC) proposed
quality, which is based on Fieldbus data quality specifications.
Quality flags represent the quality state for the data value of an item. This design makes it fairly
easy for both servers and client applications to determine how much functionality they want to
implement. InTouch typically uses a dozen of these codes.
The Quality field allows the user to access the quality of an I/O tagname as provided by an I/O
Server. If the I/O connection becomes invalid, the quality dotfields are automatically reset to the

y
initial value of zero. The .ReferenceComplete dotfield is also set to zero to indicate incomplete.
When the client application is unable to communicate with the server .QualityStatus is 0.

op
The following list shows some of the common codes that are returned by the .Quality dotfield:
Good (.Quality of 192)
 The communications link has been verified
 The PLC understood the poll request and returned a valid response packet
 If a write occurred, there were no errors during the write process
 There were no conversion problems with the data contained in the response packet

C
Example: The value 0x0000A is returned due to a poll of a register containing 10 (decimal).
Clamped High (.Quality of 86)
 The communications link has been verified
 The PLC understood the poll request and returned a valid response packet
The register was read or written without error
T

 It was necessary to clamp its intended value to a limit because the value was larger than
the maximum allowed
 In the case of a string, the string is truncated
O
Example: An unsigned 16-bit integer is clamped to 65535.
Clamped Low (.Quality of 85)
 The communications link has been verified
N

 The PLC understood the poll request and returned a valid response packet
 The register was read or written without error
 It was necessary to clamp its intended value to a limit because the value was smaller than
the minimum allowed
Example: An unsigned 16-bit integer is clamped to 0.
o

Cannot Convert (.Quality of 64)


 The communications link has been verified
 The PLC understood the poll request and returned a valid response packet
D

 The data from the PLC could not be converted into the desired format

AVEVA™ InTouch HMI 2020 R2


3-54 Module 3 – InTouch Tagname Dictionary

Possibilities for cannot convert include, but are not limited to:
 The server may return a constant in place of the data or return quality information alone
 The data is not usable
 It is not known whether the value is too large or too small
 The data returned from the PLC is of the incorrect data type
 A floating point number is returned, but is not value (for example: Not A Number)
Example: The value of 0x000A is returned from a BCD register in a PLC.

y
Communications Failed (.Quality of 24)
Any combination of the following:
Data communications are down

op

 The topic is in slow poll (or equivalent) mode


 There have been no link validating messages
 Lack of resources in the server
For example, a TSR (or driver) cannot allocate memory.
 Lack of resources in the communications link

C
 The communications link is off line
 All communications channels are in use
 The network is unable to route the message to the PLC
Example: Attempting to read data from a PLC that has been powered off.
Cannot Access Point (.Quality of 4)
T
 The communications link has been verified
 The PLC understood our poll request and returned a valid response packet
 The PLC reported that it could not access the requested point
O
Possibilities for lack of accessibility include, but are not limited to:
 Item does not exist in PLC memory
 Item is not currently available (locked in some way due to resource contention)
 Item is not of the correct format/data type
N

 A write attempt was made, but item is read-only


 In most cases, a group of items will be affected when one item is invalid. This is due to the
block-polling scheme used by the servers
For example, if one item in a block of 10 is invalid, and then the entire block is marked
invalid by the PLC. The Server will report invalid quality for all items in the block.
o

 The data is unusable


Example: Attempting to read R40001, but R40001 is not defined in the PLC's memory map.
D

Saving Watch windows


You can create multiple watch lists and save them for later viewing. You can also rename a watch
list. Your watch window can contain multiple tabs, or watch lists, to help you organize your watched
tag lists.

AVEVA™ Training
Lab 6 – Watching Tags with Tag Viewer 3-55

Lab 6 – Watching Tags with Tag Viewer

Introduction
In this lab, you will use Tag Viewer to monitor I/O data and check the health of I/O communication
for your tags.

y
Objectives
Upon completion of this lab, you will be able to:

op
 Create watch windows containing tags
 Determine the value, time, and quality of I/O tags
 Save a watch window in Tag Viewer

Simulator Process

C
In this course you will use a PLCSim process that simulates a Mixer tank, which adds two
ingredients, blends them together, and then drains the mixer.
T
The process begins with Inlet1 valve opening and Pump1 running. The Level begins to increase.
Once the Level reaches 60%, the Inlet1 valve closes and Pump1 stops running.
Simultaneously, the Inlet2 valve opens and Pump2 starts running. The Level increases to
approximately 100% (intentionally, the logic in the simulator does not fill the tank to exactly 100%
O
every single time.)
At 100%, the Inlet2 valve closes and Pump2 stops running. The agitator starts mixing for a time
(typically, 15 seconds). The agitator then stops. At this point the Outlet valve opens and the tank is
drained to 0%.
N

During the entire process, the Temperature increases and decreases randomly.
The entire process takes approximately 1 minute and 30 seconds, and then repeats itself
indefinitely.
o
D

AVEVA™ InTouch HMI 2020 R2


3-56 Module 3 – InTouch Tagname Dictionary

Monitor Tags Using Tag Viewer


In the following steps, you will enable Tag Viewer for use in WindowViewer. In WindowViewer, you
will launch Tag Viewer and add tags to the watch list to monitor the I/O data coming from the PLC
simulator.

Note: WindowViewer configuration changes, such as enabling Tag Viewer, require WindowViewer
to restart. WindowViewer is currently shut down. Therefore, the configuration changes will take
affect the next time WindowViewer starts.

y
1. On the WindowMaker Special menu, select Configure | WindowViewer.

op
C
T
O
N
o
D

AVEVA™ Training
Lab 6 – Watching Tags with Tag Viewer 3-57

The WindowViewer Properties dialog box appears.


2. On the General tab, check the Enable Tag Viewer check box.

y
op
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-58 Module 3 – InTouch Tagname Dictionary

3. Click the Window Configuration tab, and check the Tag Viewer check box.

y
op
C
T
O
N

Note: This will add a new Tag Viewer menu option under the Special menu at runtime.

4. Click OK.
o

5. In WindowMaker, click RUNTIME.


D

AVEVA™ Training
Lab 6 – Watching Tags with Tag Viewer 3-59

After a moment, WindowViewer opens.


6. On the WindowViewer Special menu, select Tag Viewer.

y
op
After a moment Tag Viewer opens.
7. Maximize the Tag Viewer window.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-60 Module 3 – InTouch Tagname Dictionary

In the left pane, a list of all of the tags in the application is displayed.
8. In the tag list, scroll down, and click Mixer100_Inlet1_Position.
9. Press and hold down the Ctrl key, and click to select the following additional tags:
 Mixer100_Inlet2_Position
 Mixer100_Outlet_Position

y
op
C
T
O
N

10. Drag and drop the 3 tags down onto the watch list.
o
D

All three tags are identified as I/O type because they show a current timestamp.

AVEVA™ Training
Lab 6 – Watching Tags with Tag Viewer 3-61

11. In the watch list window, right-click and select Rename Tab.

y
op
The Rename Tab dialog box appears.
12. In the New Tab Name field, enter Mixer100.

C
T
13. Click OK.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-62 Module 3 – InTouch Tagname Dictionary

14. In the watch list, click in the empty space to ensure that you have no tags selected.
15. Right-click in the empty space and select Add Separator.

y
op
C
A separator line appears below the tags.
T
O
N
o
D

AVEVA™ Training
Lab 6 – Watching Tags with Tag Viewer 3-63

16. In the tag list, select Mixer100_Pump1_PV.

17. On the toolbar, click the Add to Watch List button.

y
op
C
T
O
N

The Mixer100_Pump1_PV tag appears in the watch list.


18. In the tag list, right-click Mixer100_Pump2_PV, and select Add to Watch.
o
D

The Mixer100_Pump2_PV tag appears in the watch list.

AVEVA™ InTouch HMI 2020 R2


3-64 Module 3 – InTouch Tagname Dictionary

19. In the watch list, right-click the empty space, and select Add Separator.
20. Add the following tags to the watch list:
 Mixer100_Level_PV
 Mixer100_Temperature_PV

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 6 – Watching Tags with Tag Viewer 3-65

Test the Health of the I/O Tags


Next, you will verify the timestamp and quality of the data coming from the PLC Simulator. Your
times and dates will vary.
21. In the watch list Timestamp column, verify that every I/O tag has a timestamp.
22. In the Quality column, verify that every tag has a quality of 192.
A quality of 192 represents good data.

y
op
second.

C
23. In the Mixer100_Temperature_PV row, verify that the timestamp is updating once per

The timestamp is updating once per second because the Update Interval for Topic1 is set to
1000 ms in the OI Server configuration and because the value is constantly changing.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-66 Module 3 – InTouch Tagname Dictionary

Add a Watch Window


Next, you will add a watch window. Additional watch windows allow you to view different watch lists
(sets of tags) in separate tabs.
24. In the empty space of the watch list, right-click and select Add Watch Window.

y
op
25. Rename the new tab to Memory Tags.

C
T
26. Add the following tags to the Memory Tags watch window:
 Tag_Discrete1
O
 Tag_Discrete2
 Tag_Integer
 Tag_Message
 Tag_Real
N

27. Verify that all memory tags do not have a timestamp and have a quality of 192.
The reason memory tags do not have a timestamp and the quality is defaulted to 192 is
because they are defined as memory tags and not I/O tags.
o
D

AVEVA™ Training
Lab 6 – Watching Tags with Tag Viewer 3-67

Modify a Tag Value


Next, you will modify the value of a tag. Tag Viewer gives you the ability to write to tags defined as
Read Write. Memory tags cannot be configured as Read Only tags; therefore, you can write to all
memory tags. Tag_Real is defined as a Memory Real tag which allows you to write to its value.
28. In the watch list, double-click Tag_Real.
The Modify Real Value dialog box appears.
29. In the Value field, enter 50.

y
op
30. Click OK.

C
31. In the watch list, verify that the value of Tag_Real displays 50.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-68 Module 3 – InTouch Tagname Dictionary

Save a Watch List


Finally, you will save the watch list so that you can access it at a later time.
32. In the empty space of the watch list, right-click and select Save Watch List.

y
op
C
33. In the Save As dialog box, navigate to C:\Training.
34. In the File name field, enter My Watch List.
T
O
N
o

35. Click Save.


36. Close Tag Viewer.
D

<End of Lab>

AVEVA™ Training
Section 4 – DBDump and DBLoad 3-69

Section 4 – DBDump and DBLoad


This section will explain how to use the DBDump and DBLoad utilities for bulk handling of
InTouch tags.

Overview
When you back up the Tagname Dictionary using the DBDump utility, a copy of the Tagname

y
Dictionary is exported to a file that can be opened by external applications. These files can be
manipulated externally and loaded back into the Tagname Dictionary using the DBLoad utility to
replace existing entries or add new tags.

op
The Tagname Dictionary is a convenient tool for creating tags. It is a simple interface that makes
this job quite easy. However, when creating thousands of tags for a large application, this task can
be time consuming. You can streamline tag development of large amounts of similar tags using
DBDump and DBLoad to make bulk additions or changes.

Backing Up and Restoring the Tagname Dictionary

C
InTouch has two utility programs to back up and restore your Tagname Dictionary:

DBDump Exports an InTouch application Tagname Dictionary as a .csv (comma-separated


value) file that can be viewed or edited in any program supporting .csv files.
Microsoft Excel is used in this course.
DBLoad Imports an InTouch application Tagname Dictionary as a .csv (comma-separated
T
value) file that can be viewed or edited in any program supporting .csv files.
Microsoft Excel is used in this course.
O
These two utilities allow you to copy, modify, or create tags and then load them into one
application. The DBDump and DBLoad utilities are started from the AVEVA Application Manager
for STANDALONE + Symbol InTouch applications.

DBDump
N

Use the DBDump utility to export the Tagname Dictionary from an InTouch application to a file. The
file contains a list of all the tags contained in the Tagname Dictionary. This list can be organized
into section headers based on the type of tag as defined in the Tagname Dictionary. The file also
contains a list of all of the Access names.
o

DBLoad
Use the DBLoad utility to load, update, or replace a Tagname Dictionary in an InTouch application
from a file. Prior to loading the file, the contents of the file can be modified with mode switches
D

instructing DBLoad how to handle conflicts. A conflict happens is when a tag in the file matches a
tag that already exists in the Tagname Dictionary. The mode switch determines how the conflict is
handled.
For example, mode=ask, the default, will prompt the user for every conflict encountered. If you are
loading the same file that was just dumped using DBDump, this could mean responding to tens of
thousands of prompts. For this reason, mode=replace is more often used to create new tags or
modify existing tags. However, this option can be dangerous without a backup of your application

AVEVA™ InTouch HMI 2020 R2


3-70 Module 3 – InTouch Tagname Dictionary

prior to using DBLoad. Therefore, DBLoad will prompt you to backup your application before every
use.
You can create a database input file template by creating a new InTouch application and then
running the DBDump program before any new tags have been created. The resulting exported file
represents a template of the Tagname Dictionary format used by the DBDump and DBLoad
utilities.
DBDump and DBLoad is the most common method used to modify tags because it accommodates
version control and tracking of changes made to tags.

y
Using DBLoad, it is possible to:
 Create tags
Modify existing tag properties, such as Access names and Item names

op

 Change logging properties


 Make mass changes to the Tagname Dictionary

Key Words Used by DBDump and DBLoad


The .csv file contains a set of keywords that organizes mode commands, Access names, alarm
groups, and tag data within the file.

C
 A colon (:) precedes all keywords
 To continue a line, enter a backslash (\) at the end of the line
 To enter comments, precede them with a semi-colon (;)
The following table lists the keywords used in the .csv import file. The order of the list is organized
by the DBDump utility. However, you can change the order within the file. The file does not include
T
all keywords. For example, the .csv file can be as short as 3 lines: a mode line, a tag type header,
and a single tag using that tag type.
O
Keyword Description
:Mode Specifies how duplicate tag records are handled when importing the contents using
DBLoad
:IOAccess Access names defined for the InTouch application
:AlarmGroup Alarm groups defined for the InTouch application
N

:MemoryDisc Memory discrete tags


:IODisc I/O discrete tags
:MemoryInt Memory integer tags
:IOInt I/O integer tags
:MemoryReal Memory real tags
o

:IOReal I/O real tags


:MemoryMsg Memory message tags
:IOMsg I/O message tags
D

:GroupVar Group Var tags


:HistoryTrend Hist Trend tags
:TagID Tag ID tags
:IndirectDisc Indirect discrete tags
:IndirectAnalog Indirect analog tags
:IndirectMsg Indirect message tags

AVEVA™ Training
Section 4 – DBDump and DBLoad 3-71

Each tag type header keyword includes a set of attributes that specify the properties of Access
names, alarm groups, and the fields used by the Tagname Dictionary. For example, the :IOAccess
keyword includes attributes to specify the node, application, topic, and communication protocol,
which are properties of every InTouch Access name.
All data records must begin with the valid keyword for the tagname :type, followed by the valid
keyword for each data record (separated by commas). For example,
:IOMsg,Group,Comment,Logged,EventLogged,Event Logging Priority, …

y
Database Input File Format
The first line of a database input file specifies the operating :mode for the file when it is loaded or
merged into an application using the DBLoad utility. There must always be a mode command on

op
the first line. However, additional mode commands can be added throughout the file to instruct
DBLoad on how to handle the tags that follow that mode command.
This course uses Microsoft Excel, which interprets the commas in the .csv file as delimiters and
automatically separates the data records into columns and rows.

C
T
O
N

Note: If a tag is renamed in the file, DBLoad creates a new tag rather than delete the original tag
instance. DBLoad cannot delete a tag from the Tagname Dictionary.
o
D

AVEVA™ InTouch HMI 2020 R2


3-72 Module 3 – InTouch Tagname Dictionary

Database Input File Operating Modes


The following lists the valid operating mode keywords and the actions that occur in each mode
when a duplicate tagname is encountered during the load:
:mode=ask Change the tagname of the input or the existing entry to your specified
tagname and then insert the new definition into the Tagname Dictionary.
:mode=replace Delete the existing entry and replace it with the new entry.
:mode=update Overwrite the existing definition with only the fields that are explicitly

y
defined in the input file; i.e., include DELTA changes only.

Note: Additional :mode= options are in the InTouch User Guide.

op
C
T
O
N
o
D

AVEVA™ Training
Lab 7 – Exporting and Importing Tags 3-73

Lab 7 – Exporting and Importing Tags

Introduction
In this lab, you will use the DBDump utility to export all of the mixer tags in your application to a
.csv file. You will then modify the .csv file to create another set of mixer tags. These new tags will
link automatically with the PLC simulator configured in an earlier lab. Next, you will import the new
tags from the .csv file and verify that the new tags were created. Then you will use Tag Viewer to

y
test the communication and quality of the new tags. Finally, you will use the DBLoad utility to add
the remaining mixer tags that will be used throughout the rest of the labs.

op
Objectives
Upon completion of this lab, you will be able to:
 Use the DBDump utility to export tags to a .csv file
 Use Microsoft Excel to modify the definition of tags in a .csv file
 Use the DBLoad utility to load the modified .csv file to create new tags

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-74 Module 3 – InTouch Tagname Dictionary

Export the Tags Using DB Dump


In the following steps, you will use the DBDump utility to export Mixer tags to a .csv file.
1. Close WindowViewer.
2. Close WindowMaker.
3. Open the InTouch HMI Application Manager.

y
4. Ensure InTouch Training Application is selected, and click the DBDump button.

op
C
T
O
N

The CSV File to Dump To dialog box appears.


o
D

AVEVA™ Training
Lab 7 – Exporting and Importing Tags 3-75

5. In the Directories list, double-click [..].

y
op
6. In the Name of CSV Dump file field, enter Mixer100.CSV.

C
T
O

Note: The Group output by types setting organizes the content of the .csv file into easy-to-
read format. When this option is disabled, it makes the dump faster on slower computers.

7. Click OK.
N

A Dump successful message appears.


o
D

8. Click OK.

AVEVA™ InTouch HMI 2020 R2


3-76 Module 3 – InTouch Tagname Dictionary

Modify the Tags


Next, you will open and modify the .csv file in Microsoft Excel. In the spreadsheet, you will change
all Mixer100 tags to Mixer200. This file will then be used in future steps to create another set of
tags.
9. Open Windows File Explorer and navigate to C:\Training.
10. Double-click the Mixer100 file to open it in Microsoft Excel.
11. In Microsoft Excel use Save As to save your file as C:\Training\Mixer200.

y
Note: Before the next step, ensure that .csv (Comma delimited) is in the Save as type
field.

op
12. Click Save.
A confirmation message appears.

Note: Depending on your version of Excel, you may receive an additional prompt to confirm
that the .csv format is preserved. If so, click Yes to keep the current formatting.

C
13. In cell A1, replace ask with replace.
T
14. Press Ctrl+H to open the Find and Replace dialog box.
15. In the Find what field, enter Mixer100, and then in the Replace with field, enter Mixer200.
O
N

16. Click Replace All.


o
D

AVEVA™ Training
Lab 7 – Exporting and Importing Tags 3-77

A confirmation message appears displaying that 18 replacements were made.

17. Click OK.

y
18. In the Find and Replace dialog box, click Close.
19. In Microsoft Excel, click Save.

op
20. Click Yes to the confirmation message to keep the current formatting.
21. Close Microsoft Excel.

Note: Depending on your version of Excel, you may receive an additional prompt to confirm
that the .csv format is preserved. If so, click Yes to keep the current formatting.

22. Close Windows File Explorer.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-78 Module 3 – InTouch Tagname Dictionary

Import New Tags Using DBLoad


Next, you will use the DBLoad utility to import the new .csv file you created. This creates a set of
Mixer200 tags in addition to the Mixer100 tags that were already in the Tagname Dictionary.
23. In the AVEVA Application Manager ensure the InTouch Training application is selected.

24. Click the DBLoad button.

y
op
C
T
O

The Database Load dialog box appears.

Important: Using the DBLoad utility to replace or modify existing tags can present a risk if the
N

.csv file is not properly formatted or if errors are introduced by the user. Therefore, it is a best
practice to have a backup of your application, which may be used to restore the application in
the event the Tagname Dictionary becomes corrupted. In this course, you will cover the
detailed steps to properly back up and restore your application in a later lab.

25. Click Yes.


o
D

AVEVA™ Training
Lab 7 – Exporting and Importing Tags 3-79

The CSV File to Load From dialog box appears.


26. In the Directories list, double-click [..] to navigate to C:\Training.
27. In the Files list, select Mixer200.CSV.

y
op
28. Click OK.
A Load successful message appears.

C
T
29. Click OK.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-80 Module 3 – InTouch Tagname Dictionary

Test in Runtime
Next, you will use Tag Viewer to verify the existence and health of all of the new Mixer200 tags.
30. In the AVEVA Application Manager, double-click the InTouch Training Application tile to
open WindowMaker.
After a moment, WindowMaker opens and the Windows to Open dialog box appears with no
windows checked.
31. In the Windows to Open dialog box, click OK.

y
32. Click RUNTIME.
33. On the WindowViewer Special menu, select Tag Viewer.

op
34. In the watch list, right-click in the empty space, and select Load Watch List.

C
T
O
35. In the Select a File dialog box, navigate to the C:\Training folder, and open the
My Watch List file.
N
o
D

AVEVA™ Training
Lab 7 – Exporting and Importing Tags 3-81

36. Add a watch window named Mixer200.


37. Add all of the Mixer200 tags to the Mixer200 watch window.
38. Verify that all of the Mixer200 tags have a Quality of 192.

y
op
C
T
39. In the watch list right-click in the empty space and select Save Watch List.
O
N
o
D

40. Close Tag Viewer.


41. Close WindowViewer.
42. Close WindowMaker.

AVEVA™ InTouch HMI 2020 R2


3-82 Module 3 – InTouch Tagname Dictionary

Import the Remaining Tags


Finally, to save time creating all of the remaining mixer tags, you will import these from a .csv file
that contains all of the I/O tags necessary to complete the remaining labs. You will then verify that
all of the tags have been imported.
43. Open the InTouch HMI Application Manager.

44. Ensure InTouch Training Application is selected, and click the DBLoad button.

y
45. In the Database Load dialog box, click Yes.
46. In the CSV File to Load From dialog box, Files list, select AllMixerTags.CSV.

op
47. Click OK.
C
T
48. In the Database Load message, click OK.
49. In the AVEVA Application Manager, double-click the InTouch Training Application tile.
50. In the WindowMaker Windows to Open dialog box, select the following windows:
O
 Current_Alarms
 KPI
 Menu
 Mixer
N
o
D

51. Click OK.

AVEVA™ Training
Lab 7 – Exporting and Importing Tags 3-83

52. On the Special menu, click Tagname Dictionary.


53. Click Select.

y
op
The Select Tag dialog box appears.
54. Verify that the Tagname Dictionary has 123 or more tags.

C
T
O
N

55. Click Cancel.


56. Close the Tagname Dictionary.
o

<End of Lab>
D

AVEVA™ InTouch HMI 2020 R2


3-84 Module 3 – InTouch Tagname Dictionary

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 5 – Other Tag Management Utilities 3-85

Section 5 – Other Tag Management Utilities


This section will discuss the Cross Reference Utility and Tag use counts. It will explain how to find
and delete tags.

InTouch Cross Reference Utility


The InTouch Cross Reference Utility allows you to determine tagname usage in animation links,
InTouch QuickScript, QuickFunctions, ActiveX controls, Industrial graphics, and scripts.

y
For all animation links, wizards, and ActiveX controls, cross-reference displays the window name
and the coordinates where the tag can be found. It also allows you to view the content of the
QuickScript or QuickFunction where the tag is found.

op
C
T
O
N

The Cross Reference utility is a modeless window dialog box. This allows you to leave the cross
reference open while working in WindowMaker. This is handy when searching and modifying tag
names and tag values identified in the cross reference list, particularly large applications with tens
of thousands of tags. The initial time to open the Cross Reference utility can take several minutes.
o
D

AVEVA™ InTouch HMI 2020 R2


3-86 Module 3 – InTouch Tagname Dictionary

Filter and Sort in the Cross Reference Utility


Columns such as Name, Type, and Use may be dragged to the top of cross reference to
automatically sort the contents by those column names. Each subsequent drag operation sub-
sorts the previous column automatically. In each column, a filter button can be used to refine the
search. This includes a custom option for non-default filter criteria.

Use Counts and Unused Tagnames

y
InTouch maintains a use count for each tagname in the database. This count is not updated
automatically for certain operations, such as deleting a window, changing, or deleting tagnames in
links or scripts. In these cases, InTouch continues to consider the tagname as being used in the
application and does not allow it to be deleted. Therefore, you need to update use counts to

op
enable deletion of tagnames.

Updating Use Counts


Since InTouch maintains a use count for each tagname in the database, you will need to remove
all references to that tag before you will be allowed to delete it.

C
T
O
N
o
D

AVEVA™ Training
Section 5 – Other Tag Management Utilities 3-87

Display Tag Count


It is possible to continuously display and update the number of tags used in WindowMaker by
enabling the WindowMaker configuration.

y
op
C
T
The tag count is displayed in the menu bar of WindowMaker.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


3-88 Module 3 – InTouch Tagname Dictionary

Deleting Tags
When a tag is referenced by any script or animation, it cannot be deleted. Use the Cross
Reference tool to determine everywhere the tag is applied.
The Delete button is not available in the Tagname Dictionary if either WindowViewer is running or
the tag is being used in the application. Therefore, techniques must be applied to free tag usage
before a tag can be deleted.
In other words, to delete an unused tag from the Tagname Dictionary, you must complete the

y
following tasks:
 Shut down WindowViewer
 Determine tag use with the Cross Reference utility

op
 Delete the tag from all windows, animation links, Failover configuration, ActiveX and .Net
Controls and scripts containing the tagname
 Update Use Counts
 Delete the tag from the Tagname Dictionary or the Delete Unused Tags utility for bulk tag
deletion

Bulk Tag Deletion

C
After you have updated the use count, the Delete Unused Tags utility will show all tags which can
be deleted.
T
O
N
o
D

Note: References to a tag inside of quotes (“ “), such as within a script or animation link, excludes
this tag from the use counts check and will cause it to appear in the Delete Unused Tags utility. Be
cautious when deleting any tag that you may be unfamiliar with.

AVEVA™ Training
y
op
C
Module 4 – Situational Awareness
Visualization
T
Section 1 – Industrial Graphics and Situational Awareness Visualization 4-3
O
Section 2 – Element Styles 4-7
Lab 8 – Building a Dashboard 4-9
Section 3 – Window Construction Using the Graphic Editor 4-35
N

Lab 9 – Building the Mixer Operational Display 4-43


Section 4 – Custom Properties and Animations in Symbols 4-91
Lab 10 – Building a Command Symbol 4-97
o

Section 5 – HTML5 Widgets 4-115


Lab 11 – Creating a Carousel Dashboard 4-119
D
4-2 Module 4 – Situational Awareness Visualization

Module Objectives
 Define the concepts of the Situational Awareness Library
 Describe Element Styles
 Explain the levels of Situational Awareness Displays
 Create detailed displays (similar to P&ID and workflow or procedural displays)
 Explain the features of Situational Awareness symbols
 Visualize data with displays built using the Situational Awareness Library

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – Industrial Graphics and Situational Awareness Visualization 4-3

Section 1 – Industrial Graphics and Situational Awareness


Visualization
This section will explain the capabilities and usage of the Situational Awareness Library.

Overview

y
The pre-built graphics available out of the box with InTouch are divided into two graphic types. The
first type is Legacy graphics, which are file-based, rasterized, and native to WindowMaker. The
second type is Industrial Graphics, which are database stored, vectorized, and handled outside of
WindowMaker. Our focus for this course will be on Industrial Graphics.

op
Industrial Graphics are divided into two libraries: the Industrial Graphic Library, and the Situational
Awareness Library. Symbols from these two libraries are accessed from the Industrial Graphic
Toolbox.

Industrial Graphic Toolbox

C
The Industrial Graphic Toolbox is a library that stores symbols. In the Industrial Graphic Toolbox,
you can create a folder hierarchy to organize symbols. You can also move symbols around within
the folder hierarchy. These folders are named “graphic toolsets”.
The power of Industrial Graphic is reusability. You can design symbols that can be reused over
and over again with your InTouch application. For example, use the Industrial Graphic Toolbox to
create a process graphic that represents a single tank in a tank farm, then re-use the graphic for
T
every tank in the farm.
When you create a new symbol, it is listed in the Industrial Graphic Toolbox. After you create a
symbol, you can move it, or open the Graphic Editor to edit it.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-4 Module 4 – Situational Awareness Visualization

When you place a symbol in the graphic toolbox onto a window, this is referred to as embedding
an instance. It is like making a copy of the symbol for use in the window. When you edit the graphic
in the graphic toolbox the changes are propagated, or pushed, to all of the instances of that
symbol throughout the application. This design approach allows you to maintain standards and
propagate modifications everywhere without having to make changes to each instance of the
symbol manually.
After a symbol has been embedded into a window it can be linked to tags so that the graphics
displayed in the window will show current process values in runtime. For example, a pump graphic
has tags linked to command override, operation hours, set point, open limit switch and closed limit

y
switch, operating temperature, power consumption, and other process values which are
represented on the screen graphically for the pump.

op
Graphic Assemblies
Symbols from the library can be embedded into another symbol. Using this technique, you could
create an entire process window by assembling valves, pumps, temperature, and level symbols
together inside a single symbol which represents a process. This concept is named a graphic
assembly. A graphic assembly is still referred to as a single symbol, which can then be embedded
on a window and named up using navigation to display the state of the process.

C
Situational Awareness Philosophy
The Industrial Graphic Toolbox contains a library of Situational Awareness graphics that have
been created to represent new industry standard graphics. These graphics address the need to
have the operator ascertain the current situation and make key decisions rapidly.
T
Most HMIs use animation and color to represent plant processes in a very visual manner. Studies
have shown that this has led to a number of cases where the HMI is to blame for slow operator
response to critical situations. These traditional HMIs made it difficult to identify normal conditions,
and overloaded the operator’s attention.
O

Symbols in the Situational Awareness Library were designed to simplify the visual input the
operation must process in order to take action.Through a limited use of color and a strategic use of
animation, the operator's focus can be directed to the point in the process that requires immediate
attention.
N

The Situational Awareness philosophy was created to encompass the following design guidelines:
 Rational use of color
 Data in context
 Reduce mental workload
 Support for common assessment tasks
o

 Standardization
 Integrated alarming
 Information density
D

 “Big Picture” overviews


 User-centered design
 Task analysis design

AVEVA™ Training
Section 1 – Industrial Graphics and Situational Awareness Visualization 4-5

The Situational Awareness Library


The Graphic Editor includes a set of Situational Awareness Library symbols. These symbols
include multiple visual and functional configurations that are enabled by selecting values from a
set of wizard options associated with each symbol.
Situational Awareness Library symbols use a largely monochrome color palette, however, it is not
limited to gray-scale only. This is done to increase the contrast between normal operating
conditions and a vivid colored alarm state.

y
Situational Awareness Library symbols include an extensive set of default custom properties.
These custom properties can be set to show or hide parts of the symbol itself, set the full array of
alarm conditions, and show reported values based on the symbol's configuration.

op
C
T
O
N

Using the Symbol Wizard, a single Situational Awareness Library symbol can support multiple
configurations by showing or hiding functional elements as options that are part of the default
symbol set.

Situational Awareness Library Wizard Options


o

When you place a Situational Awareness symbol on a window, and open it for configuration, you
are presented with a list of wizard choices and options. The wizard selections that are made will
effect the look, behavior, size, and position of the graphic on the window. Therefore, after
embedding a Situational Awareness Library symbol on a window, the very first steps are to answer
D

the wizard choices and options, and then to complete the rest of the configuration such as
placement on the window, labels, and linking to tags.
When you first start out with a brand new Situational Awareness graphic, its physical size in
storage media is very large. As you make choices and select options in the wizard list, the size of
the symbol gets smaller based on the selections made in the wizard options. Any elements,
custom properties, and named scripts not enabled through wizard selections are not included in
the final design. This makes the final symbol light-weight and higher performance.

AVEVA™ InTouch HMI 2020 R2


4-6 Module 4 – Situational Awareness Visualization

About Custom Properties


You can configure and use custom properties to extend the functionality of symbols and use them
in combination with InTouch tags. You can use binding with custom properties to dynamically
change the reference of a custom property.

y
op
C
T
As you can see from the table, the InTouch tag type called Discrete is typically mapped to the
Boolean custom property type in Industrial Graphics. Where a 0 or 1 from the Discrete tag in
InTouch corresponds to False or True or 0 or 1 in Industrial Graphics. However, Industrial
Graphics will not generate an error or complain if any numerical data type is used for Boolean; it is
O
simply translated as 0 or non-zero. Where zero is False and non-zero is True.
The InTouch tag type called Integer is typically mapped to the Integer custom property in
Industrial Graphics. Integer represents whole numbers without fractions, such as -56 or 2568.
The InTouch tag type called Real is typically mapped to either a Float or Double custom property
N

in Industrial Graphics. Real represents high resolution values which include a fractional part, such
as -0.336 or 3235.9.
For the InTouch tag type called Message, it is typically mapped to the String custom property in
Industrial Graphics. Message represents string or text data, but may contain numerical characters
and symbols. Message tags in InTouch are limited to 131 characters in length. This is NOT a
restriction of Industrial Graphic String custom properties, so this must be taken into consideration.
o

In addition to the String custom property type, InTouch Message tags can also be linked to the
custom property types for Time and Elapsed Time, which contain a date and time character mask
for representing time data, in String format.
D

AVEVA™ Training
Section 2 – Element Styles 4-7

Section 2 – Element Styles


This section will discuss element styles and the Application Style Library. It will also explain how
to import and export the Application Style Library.

Element Styles
An element style defines a set of visual properties that determine the appearance of text, lines,
graphic outlines, and interior fill shown in Industrial Graphics or graphics. An element style applied

y
to a symbol sets preconfigured visual property values that take precedence over native visual
properties of a symbol.
Element styles provide the means for developers to establish consistent visual standards in their

op
applications. An element style can define the same visual properties of text, lines, fill, and outlines
for all symbols or graphics that belong to an application. Likewise, element styles can show the
current status of an object represented by a symbol. For example, an element style animation can
be applied to a symbol when an object transitions to an alarm state.

Application Style Library

C
An InTouch application can change element styles using the Application Style Library. The
Application Style Library provides an Element Styles tab where the overrides for text, fill, line, and
outline can be modified for each element style. The entire Application Style Library can be
exported or imported.
A set of element styles is provided in the predefined Application Style Library. The Application
T
Style Library includes a set of 25 user-defined element styles for flexibility and customization.
User-defined element styles appear towards the bottom of the list of the element style overrides
field and are named User_Defined_01 to User_Defined_25. All visual properties of user-defined
Element styles are initially set to default values. Existing element styles cannot be renamed or
O
deleted. Also, new element styles cannot be added.

Export and Import Application Style Library


The Application Style Library can be exported as an .xml file from WindowMaker. The Application
N

Style Library can also be imported to override the element styles throughout the application. A pre-
built list of element style libraries has been provide for InTouch applications. For example, color
overrides such as olive, denim, brick, sand, and flora can be selected. This provides additional to
the monochromatic environment.
o
D

AVEVA™ InTouch HMI 2020 R2


4-8 Module 4 – Situational Awareness Visualization

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 8 – Building a Dashboard 4-9

Lab 8 – Building a Dashboard

Introduction
In this lab, you will add two Situational Awareness Library dashboard symbols to a window. Then,
you will configure the wizard options, link tags, and position these symbols to present summary
data at runtime. You will also use the Application Style Library to override element styles.

y
Objectives
Upon completion of this lab, you will be able to:

op
 Configure wizard options for the look and behavior for Situational Awareness symbols
 Link InTouch tags to custom properties of Situational Awareness symbols
 Visualize I/O data coming from multiple sources
 Override a default element style in the Application Style Library
 Import an Application Style Library

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-10 Module 4 – Situational Awareness Visualization

Embed and Configure Situational Awareness Dashboard Symbols


In the following steps, you will embed two Situational Awareness dashboard symbols in the KPI
window.
1. In WindowMaker, in the Industrial Graphic Toolbox, expand InTouch Training Application \
Situational Awareness Library \ Dashboard Tools, and select SA_ColumnChart_Pairs.

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 8 – Building a Dashboard 4-11

2. Drag SA_ColumnChart_Pairs to the top of the KPI window.

y
op
C
T
Note: Do not resize or reposition the symbol at this time because the wizard options and
wizard choices in the following steps will change the dimensions and appearance of the
O
symbol. You will resize and reposition the symbol in a later step.
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-12 Module 4 – Situational Awareness Visualization

3. In the KPI window, right-click SA_ColumnChart_Pairs and select Industrial Graphic


“SA_ColumnChartPairs1” | Edit Symbol Properties.

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 8 – Building a Dashboard 4-13

The Edit Symbol Properties dialog box appears.


4. In the Wizard Options pane, ensure the NumberofBars Wizard Option is selected.
5. In the NumberofBars details pane, Value drop-down list, select Four.
In the background, the symbol on the KPI window represents a preview of the changes made
in Wizard Options. In this example, the 10 bar chart has been updated to show only four pairs
of bars.

y
op
C
T
6. In the Wizard Options pane, select ShowAxisDescriptions.
7. In the ShowAxisDescriptions details pane, Value drop-down list, select False.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-14 Module 4 – Situational Awareness Visualization

8. Click the Custom Properties tab.


The Bar01A custom property displays details on the right.

y
op
C
9. In the Bar01A details pane, Default Value field, delete the --- placeholder.
T
10. On the right side of the Default Value field, click the ellipsis button .
O
N
o
D

The Select Tag dialog box appears.

AVEVA™ Training
Lab 8 – Building a Dashboard 4-15

11. Scroll down, and select Mixer100_Totalizer1_PV.

y
op
C
12. Click OK to select the tag and close the Select Tag dialog box.
The selected tagname is displayed in the Default Value field.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-16 Module 4 – Situational Awareness Visualization

13. Repeat the previous steps to configure the custom property as follows:

Bar01B: Mixer100_Totalizer2_PV
Bar02A: Mixer200_Totalizer1_PV
Bar02B: Mixer200_Totalizer2_PV
Bar03A: Mixer300_Totalizer1_PV
Bar03B: Mixer300_Totalizer2_PV
Bar04A: Mixer400_Totalizer1_PV

y
Bar04B: Mixer400_Totalizer2_PV

op
Note: Ensure the placeholder (---) is removed before each tag is selected.

C
T
O
N

14. Click OK.


o
D

AVEVA™ Training
Lab 8 – Building a Dashboard 4-17

15. Right-click the SA_ColumnChart_Pairs symbol, and select Substitute | Substitute Strings.

y
op
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-18 Module 4 – Situational Awareness Visualization

16. Configure the Substitute Strings dialog box as follows:


Current String New String
#.## #.##
0.00 0.00
B1 M100
B2 M200
B3 M300
B4 M400

y
Chart Heading Consumed Ingredients
Legend A Special Sauce
Legend B Water

op
Short Description Per Mixer

C
T
O

17. Click OK.


N
o
D

AVEVA™ Training
Lab 8 – Building a Dashboard 4-19

18. Resize and position the symbol to the right side of the window, leaving space on the left for the
data values to grow and still be fully displayed.

y
op
C
T
O
The bottom-right corner of WindowMaker shows the position and size of the graphic. These
fields can be edited directly by double-clicking the numbers in the status bar and pressing
Enter after making a change. The values shown here may be used to match the image as
shown.
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-20 Module 4 – Situational Awareness Visualization

19. In the Industrial Graphic Toolbox, drag SA_BulletGraph to the bottom of the KPI window.
Do not reposition or resize the graphic at this time.

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 8 – Building a Dashboard 4-21

20. Double-click the embedded instance of SA_BulletGraph to open the Edit Symbol Properties
dialog box.
21. In the Wizard Options pane, select PartialRange.
22. In the PartialRange details pane, Value drop-down list, select True.

y
op
C
T
23. Click the Custom Properties tab, and ensure Actual is selected.
24. Maximize the Edit Symbol Properties dialog box.
O
25. In the Actual details pane, replace --- with Mixer100_Totalizer3_PV +
Mixer200_Totalizer3_PV + Mixer300_Totalizer3_PV + Mixer400_Totalizer3_PV.
N

Note: Entering the addition symbol (+) as part of the expression in the Default Value field
does not require spaces around the operator. However, spaces do help with readability and
are recommended.
o
D

AVEVA™ InTouch HMI 2020 R2


4-22 Module 4 – Situational Awareness Visualization

26. Configure additional custom properties as follows:

Name Default Value


AlarmSeverity 2
AlarmShelved False
BadMax: 7000
GoodMin: 3500
Maximum: 7500

y
Minimum 0.0
Target: 6500

op
C
T
Note: The AlarmSeverity Custom Property default value is set to 2. This selects the High
Severity Level 2 alarm border which is yellow in color. This will be seen at runtime.

27. Click OK.


O
N
o
D

AVEVA™ Training
Lab 8 – Building a Dashboard 4-23

28. Right-click the SA_BulletGraph symbol and select Substitute | Substitute Strings.
29. Configure the Substitute Strings dialog box as follows:
Current String New String
# #
#.# #.#
Chart Heading Produced Product
Main Label All Mixers

y
Short Desc liters
Short Description Batch Totals

op
C
T
30. Click OK.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-24 Module 4 – Situational Awareness Visualization

31. Resize and position the symbol to the left side of the window, leaving space on the right.

y
op
C
T
O

The bottom-right corner of WindowMaker shows the position and size of the graphic.
N
o
D

AVEVA™ Training
Lab 8 – Building a Dashboard 4-25

Test in Runtime
Next, you will test the configured symbols in runtime.
32. Click RUNTIME.
In the WindowViewer KPI window, the two graphics display real-time data.

y
op
C
T
O
N

Note: The yellow alarm border indicates that the production output is not meeting the target
of 6500.
o
D

AVEVA™ InTouch HMI 2020 R2


4-26 Module 4 – Situational Awareness Visualization

Use Element Style Overrides


Next, you will configure the style for the current value of the bullet graph.
33. Click Development!.
34. Close WindowViewer.
35. On the WindowMaker Special menu, select Configure | Application Style Library.

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 8 – Building a Dashboard 4-27

The Configure Application Styles dialog box appears.

y
op
36. Click the Element Styles tab. C
T
37. In the Element Style Overrides list, scroll down and select Actual_Value_Moving_Element.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-28 Module 4 – Situational Awareness Visualization

38. With the Actual_Value_Moving_Element selected, click the Fill (Fs) tab.

y
op
C
39. To the right of the Fill Color Override check box, click the color box.
T
O
N
o
D

AVEVA™ Training
Lab 8 – Building a Dashboard 4-29

The Select Fill Color dialog box appears.


40. On the Solid Color tab, in the Standard Palette area, click a light blue color.

y
op
C
T
O

41. Click OK to close the Select Fill Color dialog box.


N

The Fill Color Override is set to light blue.


42. Click OK to close the Configure Application Styles dialog box.
o
D

AVEVA™ InTouch HMI 2020 R2


4-30 Module 4 – Situational Awareness Visualization

Test in Runtime
Next, you will test the configured symbols in runtime.
43. In WindowMaker, click RUNTIME.
44. In the KPI window, in the Produced Product bullet graph symbol, verify that the current value
indicator is represented by a light blue ellipse.

y
op
C
T
O
N

45. Click Development!.


o
D

AVEVA™ Training
Lab 8 – Building a Dashboard 4-31

Import an Application Style Library


Next, you will import a color style using the Application Style Library.
46. Close WindowViewer.
47. On the WindowMaker File menu, select Import | Application Style Library.

y
op
C
T
48. Navigate to C:\Program Files (x86)\ArchestrA\Framework\Bin\AdditionalElementStyles.
49. Select the file named ElementStyle-Denim.
O
N
o
D

50. Click Open.

AVEVA™ InTouch HMI 2020 R2


4-32 Module 4 – Situational Awareness Visualization

An Imported Application Style Library successfully message appears.

y
51. Click OK.
The graphics in WindowMaker are still gray in color until WindowMaker has been restarted.

op
Test in Runtime
Next you will test the new element style in runtime.
52. In WindowMaker, click RUNTIME.
53. Verify that all of the Situational Awareness graphics use a denim-colored application style.

C
Notice that the override for the Actual_Value_Moving_Element that was light blue is now
black.
T
O
N
o
D

AVEVA™ Training
Lab 8 – Building a Dashboard 4-33

Next you will apply the Application Style Library to the design environment.
54. Close WindowViewer.
55. Close WindowMaker.
56. Open the InTouch HMI Application Manager and double-click the InTouch Training
Application tile.
WindowMaker opens.
57. In the Windows to Open dialog box, select the following windows:

y
 Current_Alarms
 KPI

op
 Menu
 Mixer

C
T
O

58. Click OK.


N
o
D

AVEVA™ InTouch HMI 2020 R2


4-34 Module 4 – Situational Awareness Visualization

59. Notice that the Application Style Library colors have now been applied to your design time
application.

y
op
C
T
O
N
o

<End of Lab>
D

AVEVA™ Training
Section 3 – Window Construction Using the Graphic Editor 4-35

Section 3 – Window Construction Using the Graphic Editor


This section will explain the capabilities of the Graphic Editor for designing entire window graphic
assemblies and custom graphics.

Working with Symbols in the Industrial Graphic Toolbox


When you create a new symbol using the Industrial Graphic Toolbox, it appears in the list. You

y
can then open the symbol for editing in the Graphic Editor using one of the following methods:
 Double-click the symbol in the Industrial Graphic Toolbox
 Right-click the symbol and select Open

op
 Select the symbol and click Enter
It is important to note that any changes to the parent Industrial Graphic are propagated to all
embedded instances of that symbol. The Symbol Editor is an extension of WindowMaker. More
than one Symbol Editor window can be open at a time. However, all Symbol Editor windows must
be close before closing WindowMaker. To see the latest changes in WindowMaker after saving or
closing a symbol in Symbol Editor, one of the following methods must be used to update the
graphic:

C
 Close and reopen the window
 Switch to runtime to obtain the latest revisions
 Click the Symbol Changed icon at the bottom of the window
T
O

Duplicating a Symbol in the Industrial Graphic Toolbox


N

To create duplicate symbols in the Industrial Graphic Toolbox use the right-click context menu. A
duplicated symbol is an exact copy of the original symbol but cannot have a duplicate name. No
two symbols can have the same name in the Industrial Graphic Toolbox.

Deleting a Symbol in the Industrial Graphic Toolbox


You can delete a symbol you no longer need. Deleting a symbol removes it from the Industrial
o

Graphic Library. If you accidentally delete an original library symbol this can be recovered by
importing a file containing all original Industrial Graphic library objects.
When you delete a symbol, you are shown where the symbol is used. This lets you understand the
D

impact of deleting the symbol before you actually delete it. If you delete a symbol that is used in an
InTouch window, it is not deleted from that window. However, the Industrial Graphic animation links
no longer work and you cannot edit the symbol with the Symbol Editor

AVEVA™ InTouch HMI 2020 R2


4-36 Module 4 – Situational Awareness Visualization

Export Selected Symbols from the Industrial Graphic Toolbox


Instead of exporting or importing the entire set of Industrial Graphics, one or more selected
symbols can be exported or imported. The selected Industrial Graphics are exported to an .aaPKG
file to a designated folder location. If you export a symbol with other symbols embedded, all of the
symbols are exported when the host symbol is exported.

Accessing Help on Industrial Graphics

y
Extensive HTML documentation is available on the Situational Awareness Library. This can be
accessed from the context menu in the Industrial Graphic Toolbox. Opening the Help
documentation for the first time requires providing permission in the default web browser in your
environment.

op
Graphic Editor
The Graphic Editor is comprised of the following components:

Tools Pane

C
The Tools pane contains elements you can use to draw on the canvas.
T
O

The Tools pane contains the following components:


 A pointer tool to select and move elements on the canvas
 Basic geometrical objects, such as lines, rectangles, polygons, and arcs
N

 A status element you can use to show quality and status


 Windows common controls, such as combo boxes, calendar controls, and radio button
groups
o
D

AVEVA™ Training
Section 3 – Window Construction Using the Graphic Editor 4-37

Elements Pane
The Elements pane contains a list of all the elements on the canvas.

y
op
The Elements pane is particularly useful for selecting one or more elements that are visually
hidden by other elements on the canvas. You can use the Elements pane to:
 See a list of all elements, groups of elements, embedded symbols, and client controls on
the canvas

C
 Select elements or groups of elements to work with them
 Rename an element or a group of elements
The z-order of elements specifies which element appears on top of other elements when the
elements overlap on the canvas. When you place new elements on the canvas, they are placed at
the top and can cover all other elements.
T
The order of the elements can be changed as follows:
 Bring one or more elements to the very front
 Send one or more elements to the very back
O
 Bring one or more elements one level forward
 Send one or more elements one level backward
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-38 Module 4 – Situational Awareness Visualization

Properties Pane
You can use the Properties pane to view and configure properties for the selected element or
group of elements. These properties include wizard options, size, location, color, and fill style, as
well as runtime behavior.

y
op
C
T
O
Animation Summary
You can use the Animations pane to add or remove animations to elements on the canvas.
N
o
D

Canvas
The canvas is your drawing area. The canvas is used to draw, size, position, and edit elements.

AVEVA™ Training
Section 3 – Window Construction Using the Graphic Editor 4-39

Rotating Elements
You can rotate elements to any orientation (0-359 degrees):
 Graphically with the rotation handle
 Numerically by typing the orientation angle in the Properties editor
 Using the 90-degree rotation tools in a clockwise or counter-clockwise direction

y
The element is rotated around its point of origin. By default, the point of origin is in the center of the
element.

op
Editing Element Properties
You can control the appearance of an element, a group of elements, or multiple elements with
functions on the toolbar and properties in the Properties pane.
Often you can edit an element by changing the values of its properties instead of using the mouse
to perform the same function. This is useful when you want very exact editing, such as when you
want to resize an element to a specific width.

C
Selecting Tags and Dotfields within Graphic Editor
InTouch Tags and dotfields may be selected in the Symbol Editor. From the InTouch Tag Browser
tab within the Galaxy Browser the DotFields selector may be used to select a dotfields. The syntax
for InTouch tags and dotfields. For example Analog003.MaxEU.
T
InTouch tags are selected in Symbol Editor to select a default value for custom properties marked
with Public Visibility. These default values can then be overridden in WindowMaker. The exception
to this is when a symbol has been placed into a Frame window. Frame windows require that all
tags are linked in the Symbol Editor before the symbol is embedded.
O

Placeholders versus Hard-Coded Links in Custom Properties


Fixed tag links in the Symbol Editor represents the default value that the custom property will use
N

in both WindowMaker and WindowViewer. In some cases, rather than hard-code an actual
InTouch tagname, the use of a placeholder, which is represented by three contiguous dash
characters (---) is used to make the symbol generic in the library. In such cases where a
placeholder is used the symbol will not work directly after embedding it into a window.
If this method is used, an additional step of linking tags to replace the placeholders is necessary.
This prevents accidentally using a symbol in runtime linked to the wrong data source because
o

there is a visual notation that appears in runtime that indicates something has not been configured
properly. This forces the step of linking tags before using the symbol.
Search and replace features do not work with placeholders. The design decision to hard-code tags
D

instead of using placeholders allows the Substitute References feature to be used to replace all
references in the symbol quickly to link to new data sources.

AVEVA™ InTouch HMI 2020 R2


4-40 Module 4 – Situational Awareness Visualization

Selecting Dotfields within the Select Tag Dialog Box


Dotfields may be used as the data source for a custom property in Industrial Graphics. The
selected dotfield must match the correct data type expected for the custom property. Linking
dotfield properties of tags, such as .EngUnits and .MaxEU, to custom properties is done by
selecting them from the dotfield drop-down list within the Select Tag dialog box in WindowMaker.
When using the Symbol Editor, this same selection can be done using the Galaxy browser.

y
op
C
T
O

Selecting dotfields within Native InTouch Animations and Expressions


In native InTouch Animation expressions and scripts you can popup a quick pick list of dotfields
N

using a shortcut. After entering a tagname followed by a dot (.) double-click to the right of the dot,
and a popup window containing the InTouch dotfields list will appear. This is a complete list of all
dotfields, some of which may be invalid for the tagname that is used in the expression. Consult the
Help documentation for a detailed understanding of every dotfield.
o
D

AVEVA™ Training
Section 3 – Window Construction Using the Graphic Editor 4-41

When selecting tags and tag dotfields within the Symbol Editor they cannot be validated at design
time. Therefore, their color appears maroon, indicating that their source is unknown. This is normal
behavior as these tags will be bound at runtime. Some tags cannot be found in the Tag Selector.
The master alarm group tag $System and any SuperTags will not be visible from the InTouch Tag
Browser tab, but these can be typed into the Default Value field manually. For $System specifically,
you must enter InTouch:$System when using this tag.

y
op
C
T
O
N

Selecting Appropriate Tags and DotFields for Custom Properties


When choosing a tag or dotfield, the data type must match the appropriate data type in the symbol
or animation that it is used. The icon associated with the tag represents its data type, even if you
are unfamiliar with the tags definition. The tag selected must be aligned with the data type of the
custom property. Dotfields, on the other hand, may be different data type than the tag that the tag
that they are associated with. If a dotfield is used, the dotfield data type overrides the tag data type
o

for the purpose of linking to a custom property.


When working with InTouch message tags or string data there is a toggle button next to the
Default Value field of a string custom property. This switch, used only with String data types,
D

allows you to chose between linking a message tag or a string type dotfield. The mode that
supports referencing a tag or dotfield is referred to as Reference or Expression mode. This mode
supports both mathematical and logical expressions. For example, the following logical expression
can be used with this mode enabled Mixer100_Inlet1_OLS and not Mixer100_Inlet1_CLS. The
second mode of this toggle button is referred to as Static Text mode. In Static Text mode you are
allowed to enter any string or text. This entry will not be referenced (looked up) or calculated.

AVEVA™ InTouch HMI 2020 R2


4-42 Module 4 – Situational Awareness Visualization

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-43

Lab 9 – Building the Mixer Operational


Display

Introduction
In this lab, you will design a Mixer symbol using Situational Awareness Library graphics. The Mixer
symbol will be reused for different configurations in future labs.

y
You will arrange the elements in your Mixer symbol as shown in the graphic below.

op
C
T
Objectives
O
Upon completion of this lab, you will be able to:
 Create a symbol in the graphic toolbox in WindowMaker and open it for editing in the
Graphic Editor
 Build a graphic assembly using Industrial Graphics from the Situational Awareness Library
N

 Configure the Wizard Options for valves, pumps, meters, and an agitator
 Link I/O tagnames and tagname.dotfields to custom properties within embedded symbols
 Add Connection Points and Connectors to a symbol
 Use the Zoom control bar features at runtime
o
D

AVEVA™ InTouch HMI 2020 R2


4-44 Module 4 – Situational Awareness Visualization

Create the Mixer Symbol


In the following steps, you will create a new symbol named Mixer, which you will build using the
Situational Awareness Library.
1. In WindowMaker, in the Industrial Graphic Toolbox, right-click the top most
InTouch Training Application node, and select New | Graphic Toolset.

y
op
2. Name the toolset Training.

C
T
3. Right-click Training, and select New | Symbol.
O
N

4. Rename the symbol Mixer.


o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-45

Next, you will open the Mixer symbol and embed Situational Awareness Library graphics.
5. Double-click the Mixer symbol.
After a moment, the Graphic Editor appears.

y
op
C
T
O
6. Maximize the Graphic Editor.
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-46 Module 4 – Situational Awareness Visualization

7. On the toolbar, click the Embed Industrial Graphic button.

y
The Galaxy Browser appears.
8. In the Graphic Toolbox pane, expand Situational Awareness Library, and click the
Equipment toolset.

op
C
T
O
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-47

9. In the Equipment pane, select SA_Valve_2Way.

y
op
C
T
10. Click OK.
O

On the canvas, the cursor changes to an angle bracket .


11. On the top-left corner of the canvas, click to place the symbol.
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-48 Module 4 – Situational Awareness Visualization

12. On the right side of the Graphic Editor, in the Properties pane Name field, enter Inlet1, and
press Enter.

Note: When changing field properties, press the Enter key as a final step to retain your
changes.

y
op
C
T
O
13. In the Wizard Options area, ValveType drop-down list, select Analog.
N
o
D

Note: Double-clicking on the field will also change Wizard Options. This is particularly useful
when there are two options such as True or False.

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-49

On the canvas, the Inlet1 graphic changes to reflect the ValveType wizard option. The
graphics below show Inlet1 before and after selecting the Analog ValveType.

y
14. On the canvas, right-click the Inlet1 symbol, and select Substitute | Substitute Strings.

op
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-50 Module 4 – Situational Awareness Visualization

The Substitute Strings dialog box appears.


15. In the Substitute Strings dialog box, enter Inlet 1.

y
op
C
Note: In the Graphic Editor, Substitute Strings supports the use of special characters,
T
including spaces whereas the Element Names, Graphic Names, and Group Names do not.

16. Click OK.


O
The label on the symbol is updated.
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-51

17. Right-click the Inlet1 symbol, and select Custom Properties.

y
op
C
The Edit Custom Properties dialog box appears.
Next, you will select tags and create an expression for the Default Value field.
T
18. In the Custom Properties pane, verify that EquipStateActive is selected.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-52 Module 4 – Situational Awareness Visualization

19. In the EquipStateActive details pane, Default Value field, delete False.

y
op
C
When the Default Value field is improperly configured, such as when it is blank, the field is
highlighted with a red outline and the icons at the top of the details pane and in the Custom
Properties list are marked with a yellow warning triangle.
T
O
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-53

20. In the Default Value field, double-click to open the Galaxy Browser.
The Galaxy Browser appears.

y
op
21. Click the InTouch Tag Browser tab.
C
T
O
N
o
D

22. In the tag list, scroll down, and select Mixer100_Inlet1_OLS.

AVEVA™ InTouch HMI 2020 R2


4-54 Module 4 – Situational Awareness Visualization

y
op
23. Click OK.

C
The Default Value field displays the selected tag.
T
O
N
o
D

Note: A magenta text color normally indicates that the reference cannot be found. However,
InTouch tags are resolved at runtime.

24. In the Default Value field, after the Mixer100_Inlet1_OLS tagname, enter a space, and then
type and.

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-55

25. In the Default Value field, after the Mixer100_Inlet1_OLS and expression, enter another
space, and then type not.

y
26. In the Default Value field after the Mixer100_Inlet1_OLS and not expression, enter a space,
and click the Browse Galaxy ellipsis button.

op
C
27. Ensure the InTouch Tag Browser tab is selected, scroll down and select
Mixer100_Inlet1_CLS.
T
O
N
o
D

28. Click OK.

AVEVA™ InTouch HMI 2020 R2


4-56 Module 4 – Situational Awareness Visualization

The final expression will look like the following image.

y
op
C
29. In the Custom Properties pane, select EquipStateActual.
T
O
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-57

30. In the EquipStateActual details pane, Visibility option, select Private.

y
op
Note: Private properties will not be shown when a symbol is embedded in another symbol

C
or an InTouch window. However, the data of these properties will be used by WindowViewer.

31. In the Custom Properties pane, select EquipStateOutOfRange, and select Private.
32. In the Custom Properties pane, select PV.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-58 Module 4 – Situational Awareness Visualization

33. In the PV details pane, Default Value field, delete Me.PV.

y
op
The Galaxy Browser appears.
C
34. In the Default Value field, double-click to open the Galaxy Browser.

35. On the InTouch Tag Browser tab, in the tag list, scroll down, and double-click
T
Mixer100_Inlet1_Position.
The Default Value field will look like the following image.
O
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-59

Next, you will select tagname dotfields using the Galaxy Browser.
36. In the Custom Properties pane, select PVMax, and delete the Default Value.

y
op
37. Double-click the Default Value field.
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-60 Module 4 – Situational Awareness Visualization

38. Ensure Mixer100_Inlet1_Position is selected.


39. In the DotFields drop-down list, select MaxEU.
The tagname and dotfield are displayed in the status bar of the Galaxy Browser.

y
op
C
T
O

40. Click OK.


Mixer100_Inlet1_Position.MaxEU appears in the Default Value field.
N
o

41. In the Custom Properties pane, select PVMin, and delete the Default Value.
42. Double-click the Default Value field, and select Mixer100_Inlet1_Position.
D

43. In the DotFields drop-down list, select MinEU.


44. Click OK.

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-61

The Custom Properties pane will look like the following image.

y
op
C
45. Click OK to close the Edit Custom Properties dialog box.

Next, you will duplicate Inlet1, and in the duplicate embedded symbol you will substitute strings
T
and substitute references.
46. On the canvas, right-click the Inlet1 valve graphic, and click Duplicate.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-62 Module 4 – Situational Awareness Visualization

A duplicate valve appears.

y
47. On the canvas, drag the duplicate valve below the original valve.

op
C
T
48. With the duplicate selected, in the Properties pane, Name field, enter Inlet2.
O
N

49. On the canvas, right-click the duplicate valve, and select Substitute | Substitute Strings.
The Substitute Strings dialog box appears.
50. Enter Inlet 2, and click OK.
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-63

51. Right-click the Inlet2 valve, and select Substitute | Substitute References.

y
op
C
T
The Substitute References dialog box appears.
52. Click Find & Replace.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-64 Module 4 – Situational Awareness Visualization

The Find & Replace pane appears.

y
op
C
T
53. In the Find What field, enter Inlet1.
54. In the Replace with field, enter Inlet2.
O
N

55. Click Replace All.


o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-65

The Replace All button replaces all references of Inlet1 with Inlet2.

y
op
C
T
56. Click OK to close the Substitute Reference dialog box.
Next, you will create a third valve named Outlet.
O
57. Repeat the previous steps to duplicate the Inlet2 valve, and configure the duplicate symbol as
follows:

Properties Name field: Outlet


Substitute Strings: Outlet
N

Substitute References: Outlet


o
D

AVEVA™ InTouch HMI 2020 R2


4-66 Module 4 – Situational Awareness Visualization

Next, you will add pumps to the Mixer symbol. The pump symbol is preconfigured with the desired
wizard options. However, you will configure the symbol strings and references.
58. In a blank space on the canvas, right-click and select Embed Industrial Graphic.

y
op
C
The Galaxy Browser appears.
59. In the Graphic Toolbox pane, ensure the Situational Awareness Library \ Equipment
toolset is open.
60. Click the SA_Pump_Blower_RotaryValve symbol.
T
O
N
o
D

61. Click OK.

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-67

62. Place the symbol to the right of Inlet1.

y
op
C
63. Name the symbol Pump1.
64. Label the symbol Pump 1.
T
O

65. Right-click the Pump1 symbol, and select Custom Properties.


66. Configure the custom properties as follows:
N

Custom Property Default Value Visibility


EquipState Mixer100_Pump1_PV Public
LabelVisible True Public

The Edit Custom Properties dialog box will look like the following image.
o
D

67. Click OK.

AVEVA™ InTouch HMI 2020 R2


4-68 Module 4 – Situational Awareness Visualization

Next, you will create a duplicate pump.


68. Duplicate Pump1, and place the duplicate to the right of Inlet2.

y
op
69. Configure the duplicate symbol as follows:

Properties Name field:


C Pump2
T
Substitute Strings: Pump 2
Substitute References: Pump2
O
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-69

Next, you will add an agitator to the Mixer symbol. The Agitator symbol is preconfigured with the
desired wizard options. However, you will configure the symbol strings and references.
70. In a blank space on the canvas, right-click and select Embed Industrial Graphic.

y
op
C
The Galaxy Browser appears.
71. In the Graphic Toolbox pane, ensure the Situational Awareness Library \ Equipment
toolset is open.
72. Click the SA_Agitator_Settler symbol.
T
O
N
o
D

73. Click OK.

AVEVA™ InTouch HMI 2020 R2


4-70 Module 4 – Situational Awareness Visualization

74. Place the Agitator symbol to the right of Pump1 and Pump2.
75. Name the symbol Agitator.
76. Change the label to Agitator.

y
op
77. Configure the custom properties as follows:
Custom Property
EquipState
Default Value
C
Mixer100_Agitator_PV
Visibility
Public
T
LabelVisible True Public
PV EquipState * 100 Private
PVRangeFullScaleMax 100 Private
O
PVRangeFullScaleMin 0 Private
N
o

Note: By default the PV and PVRange custom properties are used for a variable speed
D

motor. The data source used in this course, PLCSim, uses a simple on/off motor for the
agitator. You configured the PV and PVRange properties as fixed values so EquipState, when
set to true, will simulate the motor running at 100%.

78. Click OK.

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-71

Next, you will add a level meter to the Mixer symbol.


79. In a blank space on the canvas, right-click and select Embed Industrial Graphic.
The Galaxy Browser appears.
80. In the Graphic Toolbox pane, click the Situational Awareness Library \ Meters toolset.
81. In the Meters pane, select the SA_Meters symbol.

y
op
C
T
O

82. Click OK.


N
o
D

AVEVA™ InTouch HMI 2020 R2


4-72 Module 4 – Situational Awareness Visualization

83. Place the SA_Meters symbol to the right of Agitator.

y
op
C
84. Name the symbol Level.
85. In the Wizard Options area, Type drop-down list, select Level.
T
O
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-73

Next, you will enable the Custom Property Label Type for Engineering Units so that you can
display Tagname.EngUnits dotfield for the level by using a custom property. This feature will be
used in future labs.
86. In the Wizard Options area, EngUnitsType drop-down list, select CustomPropertyLabel.

y
op
87. Change the labels as follows:

C
Old New
Label Level
T
O
N
o

Notice the Label for EU has not changed. Unlike Substitute Strings, Custom Property labels
will only show in WindowViewer runtime.
D

AVEVA™ InTouch HMI 2020 R2


4-74 Module 4 – Situational Awareness Visualization

88. Right-click the Level symbol, and select Custom Properties.


The Edit Custom Properties dialog box appears.
89. In the Custom Properties pane, verify that EngUnits is selected.

90. In the Details pane, ensure that Expression or Reference mode is selected (default).
91. Configure the custom properties with tag and dotfields as follows:
Custom Property Default Value Visibility

y
EngUnits Mixer100_Level_PV.EngUnits Public
PV Mixer100_Level_PV Public
PVRangeFullScaleMax Mixer100_Level_PV.MaxEU Public

op
PVRangeFullScaleMin Mixer100_Level_PV.MinEU Public

C
T
92. Click OK.
O
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-75

Next, you will duplicate Level and modify it to become a temperature meter.
93. Duplicate Level, and place the duplicate to the right of Level.
94. Name the duplicate Temperature.
95. In the Wizard Options area, Type drop-down list, select Temperature.
96. Configure the duplicate symbol as follows:

Change From To

y
Substitute Strings: Level Temperature
Substitute References (Find & Replace): Level Temperature

op
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-76 Module 4 – Situational Awareness Visualization

Next, you will add a tank to the Mixer symbol.


97. In a blank space on the canvas, right-click and select Embed Industrial Graphic.
The Galaxy Browser appears.
98. In the Graphic Toolbox pane, click the Situational Awareness Library \ Equipment toolset.
99. Scroll down and select the SA_Tank_Vessel symbol.

y
op
C
T
O

100.Click OK.
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-77

101.Place the SA_Tank_Vessel symbol anywhere on the canvas.


102.Name the symbol Tank.
103.In the Wizard Options area, Type drop-down list, select Tank.
104.In the Size drop-down list, select Large.
105.In the LabelType drop-down list, select CustomPropertyLabel.

y
op
106.On the canvas, place Tank over the Agitator, Level, and Temperature embedded symbols.

C
T
O
N

107.In the Elements list, right-click Tank, and select Custom Properties.
108.With the Label custom property selected, in the Default Value field, verify the Static Text

mode is enabled (default).


o
D

AVEVA™ InTouch HMI 2020 R2


4-78 Module 4 – Situational Awareness Visualization

109.In the Default Value field, enter Mixer100.

y
op
110.Click OK.

C
Notice the Label for Tank is not changed. Unlike Substitute Strings, Custom Property labels
will only show in WindowViewer runtime.
T
111.In the Elements list, right-click Tank, and select Order | Send To Back.
Tank is positioned in the z-order behind all other elements by appearing at the bottom of the
list.
O
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-79

Add Pipes to the Mixer


Next, you will add Connectors and Connection Points to represent piping.
112.On the top toolbar of the Graphic Editor, click the Canvas Zoom drop-down list, and select
Fit.

y
113.Click Snap to Grid to turn off the snap to grid feature.

op
114.In the Tools pane, double-click Connection Point.

C
Double-clicking a tool saves time by not requiring you to reselect the tool when using it
multiple times. Clicking another tool or pressing the Esc key will cancel the operation.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-80 Module 4 – Situational Awareness Visualization

Next, you will place a Connection Point on the Tank as an anchor point for the connector that you
will add between the pump and the tank.
115.Line up the cursor for the Connection Point on the left side border of the tank directly across
from the built-in Connection Point on the right side of Pump1.

y
op
116.Click to place the Connection Point.

C
T
O

117.Add a Connection Point to the Tank across from Pump2.


N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-81

Next you will add connectors.


118.In the Tools pane, double-click Connector.

y
op
119.Hover over the bottom center of the Tank until the Connection Point displays, click then drag
the Connector to the Connection Point on the bottom-right side of the Outlet valve.

C
T
120.Hover over the Connection Point on the right side of Inlet1, and drag the Connector to the
Connection Point in the center of Pump1.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-82 Module 4 – Situational Awareness Visualization

121.Create a Connector between Pump1 and the adjacent Connection Point on the Tank.

y
122.Add connectors between Inlet2, Pump2, and Tank as shown below.

op
C
T
O
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-83

123.In the Tools pane, click Pointer.

y
Note: Clicking the Pointer tool cancels the connector draw operation.

op
124.In the Elements list, hold the ctrl key and select Connector2, Connector3, Connector4, and
Connector5.

C
125.In the Properties pane, ConnectionType drop-down list, select Straight.
T
O

The bends in the selected connectors are removed. however, the valves and pumps are not
aligned. You will align them next.
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-84 Module 4 – Situational Awareness Visualization

126.On the canvas, select Inlet1, hold the Shift key down, and select Inlet2 to add it to the
selection.

y
op
127.With Inlet1 and Inlet2 selected, use the up or down arrow keys on the keyboard to straighten

C
the Connectors between the valves and the pumps.
T
O
N

128.In the top-left corner of the Graphic Editor, click the Save and Close button.
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-85

Embed the Mixer Symbol in the Mixer Window


Next, you will embed the Mixer symbol in the Mixer window in WindowMaker.
129.In the WindowMaker Industrial Graphic Toolbox, Training toolset, click Mixer.
130.Drag the Mixer symbol onto the Mixer window.
The Frame window automatically centers and stretches the symbol to fill the window.

y
op
C
T
131.In the Properties pane, ShowZoomControl drop-down list, select Visible.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-86 Module 4 – Situational Awareness Visualization

Test in Runtime
Finally, you will open WindowViewer and test the Mixer symbol in the Mixer window.
132.Click RUNTIME.
In WindowViewer the Mixer window displays the current state of the Mixer100 process.

y
op
C
The process begins with the Inlet1 valve opening and Pump1 running. The Level begins to
increase. Once the Level reaches 60%, the Inlet1 valve closes and Pump1 stops running.
Simultaneously, the Inlet2 valve opens and Pump2 starts running. The Level increases to
approximately 100% (intentionally, the logic in the simulator does not fill the tank to exactly
T
100% every single time.)
At 100%, the Inlet2 valve closes and Pump2 stops running. The agitator starts mixing for a
time (typically, 15 seconds). The agitator then stops. At this point the Outlet valve opens and
O
the tank is drained to 0%.
During the entire process, the Temperature increases and decreases randomly.
The entire process takes approximately 1 minute and 30 seconds, and then repeats itself
indefinitely.
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-87

Next, you will use the features of the Frame window, including the ZoomControl toobar, to zoom
and pan the Mixer graphic.

Note: If your monitor supports touch gestures, for this runtime test, you may also try pinch to
zoom and swipe to pan using your hand.

133.In the Mixer window, on the ZoomControl toolbar drop-down list, select 125.

y
op
C
T
O
N

Notice the Mixer graphic is larger after zooming.


o
D

AVEVA™ InTouch HMI 2020 R2


4-88 Module 4 – Situational Awareness Visualization

134.On the ZoomControl toolbar, click the Pan button.

135.In the Mixer window, click and hold down the mouse button, and move the mouse to pan the
graphic.

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 9 – Building the Mixer Operational Display 4-89

136.On the ZoomControl toolbar, click the Rubber Band Zoom button.

137.In the Mixer window, click and drag a rectangle over the Temperature and Level graphics.
Notice the window is zoomed to show the area that was captured using the Rubber Band

y
Zoom tool. More of the window may be visible than what you captured because the window
will maintain aspect ratio.

op
C
T
138.On the ZoomControl toolbar, click the Rubber Band Zoom button to cancel the Rubber
Band Zoom.
O
Finally, you will use the mouse and keyboard to zoom and pan the Mixer graphic.
139.With the Ctrl button held down on the keyboard, and the cursor hovering over the middle of
the Mixer window, scroll the mouse wheel up and down to zoom.
N

The Mixer graphic is zoomed in and out at the mouse cursor position.
140.Ensure the Mixer graphic is zoomed above 100 and then on the Mixer graphic, click and hold
down the middle mouse button to pan the graphic.

Note: You cannot pan a graphic at a zoom of 100.


o

141.On the ZoomControl toolbar, click the Zoom Normal button.


D

Observe that the Mixer graphic has been restored to its original size.
142.Click Development!.

<End of Lab>

AVEVA™ InTouch HMI 2020 R2


4-90 Module 4 – Situational Awareness Visualization

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 4 – Custom Properties and Animations in Symbols 4-91

Section 4 – Custom Properties and Animations in Symbols


This section will provide a brief overview of the graphic tools in the Graphic Editor that pertain to
adding custom properties and animations.

Custom Properties
Custom Properties are the only mechanism for customization of a symbol. The custom properties

y
describe how each part of the graphic is used (Description). Custom properties define the initial
value or starting state of the graphic (Default Value). Custom properties guide the data type
required to link external values (Data Type). Custom properties can be marked Private to prevent
configuration changes when a symbol is embedded in another symbol or window (Visibility).

op
C
T
O
N
o

You can associate custom properties with functionality you want exposed and that you want to be
reusable. You can also use custom properties to connect an embedded Industrial Graphic to
InTouch tags.
D

AVEVA™ InTouch HMI 2020 R2


4-92 Module 4 – Situational Awareness Visualization

Custom Properties Dialog Box


The Custom Properties dialog box allows the addition, deletion, and configuration of custom
properties. From this dialog box, you add a custom property, name it, set its data type, default
value, mark it public or private and provide a description.

y
op
C
T
In the Visibility box, configure how the symbol is visible. Do one of the following:
 Click Public if you want the custom property to be visible (available to be edited or used)
O
when this symbol is embedded in another symbol or in an InTouch Window.
 Click Private if you want the custom property to be hidden. This means the property
cannot be seen or edited when the symbol is embedded in another symbol or in an
InTouch Window.
N

For custom properties using the String Data Type, the option is presented to treat the default
value as the text as it is entered. Otherwise the default value will be looked up as a reference or
expression. For example, tags, graphic elements, other custom properties, attributes and so on.
This switch is available only for string data types. Other data types do not offer this option.
 Select the T icon (Static Text) to indicate that it is a static value. This treats the content of
the Default Value field as-is, a literal string or as text. It takes each character as shown
o

including white space. No calculations or lookup are performed.


 Select the Tag icon (Reference or Expression) to indicate that the Default Value field
contains a link to an external reference such as a tag, custom property, or graphic element
property.
D

AVEVA™ Training
Section 4 – Custom Properties and Animations in Symbols 4-93

Creating a Custom Property


At this point in the course you have only used existing custom properties to link tags and dotfields.
You can also create your own custom properties for use in a symbol. For this purpose, the Edit
Custom Properties dialog box allows you to add and delete custom properties. When a custom
property is first created, it can be given a name and the data type can be selected. Unlike tags in
InTouch, custom properties do not require setting Min and Max range for values.

Validating Custom Properties

y
The red check mark at the top right of the Edit Custom Properties dialog box allows you to verify
the syntax, expression, or entry of the Default Value field. The use of the Validate feature is for
cases where you are building a lengthy expression and need to confirm that the formatting and

op
syntax are correct. Otherwise, this step is optional because clicking OK to save the changes
automatically performs a Validate.

Clearing the Configuration of Custom Properties


Next, to the Validate option in the top right corner of the Edit Custom Properties dialog box is the
eraser button, which clears the content of the Default Value field and restores a default value

C
appropriate to the selected data type. This ensures no errors will be encountered when providing
the appropriate default value after clearing the contents of the Default Value field.

Renaming Custom Properties


To rename a custom property, first select the custom property name in the Custom Properties list,
T
pause, and click a second time. An edit field will appear and allow you to rename the custom
property. It should be noted that renaming a custom property will impact animations, expressions,
references, and scripts that referenced the original custom property name.
The following rules will assist in naming custom properties appropriately:
O
 If the symbol includes an embedded symbol, the name of the custom property cannot be
the same as the name of the embedded symbol or of an element of the embedded symbol
 A script using a dimensioned local variable (to be covered later) cannot match the name of
a custom property
N

 If an element or a group is renamed, the animation references to it are not automatically


updated. All animation links must be changed manually to reference the old name

Animations
An animation can be applied to an element or a group of elements on the canvas. The available
o

animations for selection are limited by the primitive parts that make up the element or group. For
example, a text animation cannot be applied to a rectangle that has no text.
You can use animations to bind the run-time behavior and appearance of elements to InTouch
D

tags, custom properties, and other element’s properties.


For example, you can bind the vertical fill of a rectangle to an InTouch tag that contains the current
level of a tank.
Animations are specific to the selected element and vary between elements of different types.

AVEVA™ InTouch HMI 2020 R2


4-94 Module 4 – Situational Awareness Visualization

Visualization and Interaction Animation Types


There are two types of animations:
 Visualization animations determine the appearance of the element, such as visibility,
blinking, fill style, percent fill horizontal, or value display
 Interaction animations determine the behavior of an element, allowing a user to click,
drag, or type to interact with the element. For example a horizontal slider used to change
an analog value
 There are visualization and interaction animations that are specific to certain elements.

y
For example, the DataStatus animation is specific to the Status element. Element-specific
animations also determine element behavior and appearance.
You can configure the following common animation types: *

op
Animation Type Description
Visibility Shows or hides the element depending on a value or an expression.
Fill Style Specifies the interior fill style depending on a discrete or analog expression or one
or more conditions.
Line Style Specifies the style and pattern of the element line depending on a discrete or analog
expression or one or more conditions.
Text Style Specifies the style of the element text depending on a discrete or analog expression
or one or more conditions.

C
Blink Sets the element to blink invisibly or with specified colors depending on a discrete
value or expression.
*Element Style Defines a set of visual properties that determine the appearance of text, lines,
graphic outlines, and interior fill shown in Industrial Graphics or graphics.
% Fill Horizontal Fills the element with color partially from left to right or vice versa, depending on an
analog value or expression.
% Fill Vertical Fills the element with color partially from top to bottom or vice versa, depending on
an analog value or expression.
T
Location Horizontal Positions the element with a horizontal offset depending on an analog value or
expression.
Location Vertical Positions the element with a vertical offset depending on an analog value or
expression.
Increases or decreases the element width depending on an analog value or
O
Width
expression.
Height Increases or decreases the element height depending on an analog value or
expression.
Point Changes the X and Y coordinate values of one or more selected points on a symbol
or graphic element.
N

Orientation Rotates the element by an angle around its center point or any other point
depending on an analog value or expression.
Value Display Shows a discrete, analog, string value, time value, name or expression.
Tooltip Shows a value or expression as a tooltip when the mouse is moved over the
element.
Disable Disables the element’s animation depending on a Boolean value or expression.
User Input Enables the run-time user to type a Boolean, analog, string, time or elapsed time
value that is then assigned to an attribute.
o

Slider Horizontal Enables the run-time user to drag the element left or right and write back the offset
to an analog attribute.
Slider Vertical Enables the run-time user to drag the element up or down and write back the offset
to an analog attribute.
D

*Pushbutton Writes predetermined values to Boolean or analog references when the user
clicks on the element.
Action Scripts Runs an action script when the run-time user clicks on the element.
Show Symbol Shows a specified symbol at a specified position when the run-time user clicks on
the element.
Hide Symbol Hides a specified symbol when the run-time user clicks on the element.

*The Element Style and Pushbutton animations will be used in this lab.

AVEVA™ Training
Section 4 – Custom Properties and Animations in Symbols 4-95

Connectors and Connection Points


Connectors allow a visual representation of the association between two elements on the canvas.
For example, Connectors can be used to represent pipes or electrical wiring in an P&ID diagram.
Connectors must be anchored to a Connection Point. After a Connector has been anchored,
the element associated with the Connection Point can be repositioned on the canvas and the
Connector will follow the graphic automatically.
The resize handles of every graphic act as native Connection Points to anchor a Connector.
Using Connection Points, you can add your own custom anchors for a Connector.

y
ZoomPercent

op
ZoomPercent is a read/write property that allows you to both monitor and set the zoom level
associated with the symbol hosted by a Frame window. For example, ZoomPercent = 200 will
double the default size of the graphics in a Frame window. The zoom will automatically expand
around the geometric center of the symbol that is hosted.
ZoomPercent can also be used to monitor the current zoom level applied in runtime. For example,
ZoomPercent > 100 will trigger the moment any zoom occurs on the graphic. ZoomPercent can
be a value between 100 and 5000.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-96 Module 4 – Situational Awareness Visualization

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 10 – Building a Command Symbol 4-97

Lab 10 – Building a Command Symbol

Introduction
In this lab, you will create a custom symbol to be used as a command panel for starting and
stopping pumps. You will create and configure a custom property. Additionally, you will animate the
command buttons with Pushbutton and Element Style animation types.

y
op
Objectives C
T
Upon completion of this lab, you will be able to:
 Create a custom property
O
 Configure animations
 Add a Pushbutton animation
 Add an Element Style animation
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-98 Module 4 – Situational Awareness Visualization

Create a CMD Symbol


In the following steps, you will create a symbol to start and stop the mixer pumps.
1. In WindowMaker, in the Industrial Graphic Toolbox, right-click the Training toolset and
select New | Symbol.

y
op
2. Name the new symbol CMD.

C
T
O
3. Double-click CMD to open it for editing.
4. In the Graphic Editor, right-click a blank spot on the canvas, and select Custom Properties.
N
o
D

The Edit Custom Properties dialog box appears.

AVEVA™ Training
Lab 10 – Building a Command Symbol 4-99

5. In the Edit Custom Properties dialog box, click the Add custom property button.

y
op
6. In the Name field, enter CMD.

C
T
O

7. Press Enter to accept the name.


N

The CMD custom property is added to the Custom Properties pane.


o
D

Note: To rename a custom property, first select the property, then click the selected property
text. The rename field will then be shown so the name can be edited. Press enter to accept the
name change.

8. In the CMD details pane, Data Type drop-down list, verify Boolean is selected.

AVEVA™ InTouch HMI 2020 R2


4-100 Module 4 – Situational Awareness Visualization

9. In the Default Value field, clear the default contents and enter --- .
Three dashes represent a placeholder for Custom Properties. This suppresses error
messages until this property is linked to I/O data at a later time.
10. In the Visibility area, ensure Public is selected.
11. In the Description field, enter the following:
Used to write command overrides to field devices.

y
op
C
T
12. Click OK to close the Edit Custom Properties dialog box.
O
N
o
D

AVEVA™ Training
Lab 10 – Building a Command Symbol 4-101

Add Command Buttons


Next, you will add buttons to the empty canvas and animate them.

13. In the Tools pane, select the Button tool.

y
op
14. On the canvas, click and drag down and to the right to draw a button.
15. Enter Start for the button text.

C
T
16. Press Enter to accept the name.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-102 Module 4 – Situational Awareness Visualization

17. In the Properties pane, name the button StartButton.


18. In the Properties pane, on the ElementStyle drop-down list, select Intensity1.
19. In the Properties pane, Width field, enter 50.
20. In the Properties pane, Height field, enter 30.

y
op
C
T
The button is updated to show the changes to the properties.
O
N
o
D

AVEVA™ Training
Lab 10 – Building a Command Symbol 4-103

Next, you will add animations to the button.


21. Double-click the button to open the Edit Animations dialog box.
22. In the Edit Animations dialog box, click Add Animation.

y
23. On the Interaction list, select Pushbutton.

op
C
T
O
N

The Pushbutton animation details pane appears.


24. In the Pushbutton animation details pane, click Boolean.
o
D

AVEVA™ InTouch HMI 2020 R2


4-104 Module 4 – Situational Awareness Visualization

25. In the Boolean field, enter CMD.


26. In the Action area, click Set.

y
op
C
T
27. Add an Element Style animation.
O
N
o
D

AVEVA™ Training
Lab 10 – Building a Command Symbol 4-105

28. In the Element Style animation details pane, select Boolean.


29. In the Boolean field, enter CMD.
30. In the Values area, True, 1, On field, on the drop-down list, select Intensity4.

y
op
C
31. In the False, 0, Off field, uncheck the Element Style check box.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-106 Module 4 – Situational Awareness Visualization

Note: When an Element Style is disabled, the configured Element Style of the element is
used.

y
32. Click OK to close the Edit Animations dialog box.
Next, you will duplicate the button and modify the animations.

op
33. Duplicate the button, and place the duplicate button to the right of StartButton.

C
34. In the Properties pane, name the button StopButton.
35. In the Text field, enter Stop.
T
O
N
o
D

AVEVA™ Training
Lab 10 – Building a Command Symbol 4-107

36. Double-click the StopButton button to edit the animations.


37. Ensure the Element Style animation is selected in the Animations list.
38. In the Element Style animation details pane, in the True, 1, On field, uncheck the Element
Style check box.
39. In the False, 0, Off field, check Element Style and from the drop-down list, select Intensity4.

y
op
C
40. In the Animations list, select the Pushbutton animation.
41. In the Pushbutton animation details pane, in the Action area, click Reset.
T
O
N

42. Click OK.


43. In the top-left corner of the Graphic Editor, click the Save and Close button.
o
D

AVEVA™ InTouch HMI 2020 R2


4-108 Module 4 – Situational Awareness Visualization

Embed the CMD Symbol in the Mixer Symbol


Next, you will add the CMD symbol to the Mixer symbol two times. You will link pump tags to these
embedded instances.
44. In WindowMaker, in the opened Mixer window, click on the Mixer graphic to show the
Quick Access Toolbar.

y
op
C
45. On the Quick Access Toolbar, click the Edit Symbol button.
T
O

The Graphic Editor opens and displays the Mixer symbol.


N
o
D

AVEVA™ Training
Lab 10 – Building a Command Symbol 4-109

46. In a blank space on the canvas, right-click and select Embed Industrial Graphic.
47. The Galaxy Browser appears.
48. In the Galaxy Browser, Graphic Toolbox pane, click the Training toolset.
49. In the Training pane, select the CMD symbol.

y
op
C
T
50. Click OK.
O

51. Place the CMD symbol below Pump 1 on the canvas and position it as shown below.
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-110 Module 4 – Situational Awareness Visualization

52. Name the symbol Pump1_CMD.

53. Right-click Pump1_CMD and select Custom Properties.

y
54. In the CMD details pane, Default Value field, delete --- .
55. In the Default Value field, double-click to open the Galaxy Browser.

op
56. In the InTouch Tag Browser tab tag list, scroll down and double-click
Mixer100_Pump1_CMD.

57. Click OK.

C
Next, you will duplicate Pump1_CMD and in the duplicate, you will substitute references.
T
58. Duplicate Pump1_CMD.
59. Position the duplicate below Pump2 on the canvas as shown below.
O
N
o
D

AVEVA™ Training
Lab 10 – Building a Command Symbol 4-111

60. With the duplicate selected, name the symbol Pump2_CMD.

In the Elements list, the name has been updated.

y
op
61. Right-click Pump2_CMD and select Substitute | Substitute References.
62. Replace Pump1 with Pump2.
63. Click OK to close the Substitute Reference dialog box.
64. Click Save and Close.

C
In WindowMaker, notice the Mixer graphic has been updated to show the new CMD buttons.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-112 Module 4 – Situational Awareness Visualization

Test What You Have Built


Finally, you will test the new CMD buttons in WindowViewer.
65. Click RUNTIME.
66. For Pump1_CMD and Pump2_CMD, click Start and then click Stop to operate the pumps.
67. To resume automatic operation of the simulator, ensure the pumps are in the same state as
their associated valves. Consider the following scenarios:

y
 PLC Simulator halted
Note only the Inlet 1 and Pump 1 are synchronized because the valve is closed and the
pump is stopped. Inlet 2 and Pump 2 are desynchronized because the valve is opened
while the pump is stopped. Whenever the valves and their associated pumps are

op
desynchronized, the level in the tank stops moving.

Level Stopped

C
T
 PLC Simulator Automatic Mode
O
Note Inlet 1 and Pump 1 are synchronized. Inlet 2 and Pump 2 are synchronized.
The level in the tank is moving.
N

Level Moving
o
D

68. Click Development!.

<End of Lab>

AVEVA™ Training
Lab 10 – Building a Command Symbol 4-113

y
op
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-114 Module 4 – Situational Awareness Visualization

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 5 – HTML5 Widgets 4-115

Section 5 – HTML5 Widgets


This section will discuss InTouch HMI support for the web technology called HTML5 Widgets.

Introduction
Widgets are small components that can extend the functionality of InTouch. HTML5 Widgets are a

y
self-contained code block based on website design that can be imported into InTouch without
changing any of its features. The power of this has been added to InTouch which now acts as a
container for HTML5 Widgets both in design time and runtime. Widgets are most frequently used
to provide on-screen user interface elements that ingrate with other platforms and data sources. A

op
widget can be run in WindowViewer with consistent placement and user interface. For example,
social media, weather, RSS or podcast widgets.
By default, the Carousel widget is available under the Widgets folder in the Graphic Toolbox.

Importing HTML5 Widgets

C
You can import a widget for a STANDALONE + Symbols application. The file format is Custom
Widget Package (.cwp), which includes HTML5, CSS, and Javascript files. After the widget has
been imported, it can be viewed on WindowViewer. Additionally, design time properties determine
the behavior or the widget at runtime.

Carousel Widget
T
A carousel widget allows you to cycle through Industrial Graphics like a carousel without any user
input. It also supports user selection of the previous or next step in the carousel. For examples,
this widget can be used to display dashboards, alerts or alarm information on large monitors on
O
the plant floor.

Properties
In addition to the standard graphics properties, you can also configure properties specific to the
N

widget, under Widget Properties in the Graphic Editor.


Name Description Default
Autoplay If the Autoplay property is set to true, the carousel widget will automatically True
start on load. If it is set to false, the user must select the next item to start the
carousel.
BackgroundColor Sets a background color for the widget. Specify the color value in RGB, HTML #FFFFFF
o

Code (White #FFFFFF) or valid HTML color name.


GraphicNames A comma separated list of Industrial Graphics the carousel will display in Empty
runtime.
Interval The amount of time delay (in milliseconds) between automatically cycling an 5000
D

item.
Keyboard If the Keyboard property is set to true, the carousel will respond to keyboard True
inputs.
Loop If the Loop property is set to true, the carousel will cycle through the graphics True
continuously, else it will stop after a single cycle.
Pause If the Pause property is set to true, the carousel will pause the cycling of the True
graphics, when it detects the mouse hovering or a touch down event. The
graphics will resume cycling when the mouse is moved away.

AVEVA™ InTouch HMI 2020 R2


4-116 Module 4 – Situational Awareness Visualization

QR Code Scanner
The QRCode_Scanner widget connects to a camera to scan for a QR code and returns the
resulting string.

Properties
In addition to the standard graphics properties, you can also configure properties specific to the
widget, under Widget Properties in the Graphic Editor.

y
Name Description Default
QRCode The resulting string of the scanned QR code. The default value is empty. Empty

op
AutoStart If set to true, the camera will start automatically. True
AutoStop If set to true, the camera will stop after scanning a QR Code. True
Start If set to true, the camera will start. False
Stop If set to true, the camera will stop. False
BackgroundColor Sets the background color of the widget. Specify the color value in RGB, Black
HTML Code (#FF0000) or valid HTML color name.

C
Limitation
 The device must have a camera.
 Using the QR Code on a physical machine instead of a virtual machine is recommended.
 Access the web client using the secure URL (https://) when using the web client remotely.
T
Usage
You can configure a script to read the QR code and display a graphic based on the scanned value.
O
In RunTime, the QR Code Scanner widget will appear with a floating toolbar with the following
buttons - AutoStart, AutoStop and StartStop.
When the widget is loaded, the camera will start automatically if AutoStart is set to True. To leave
the camera on, click AutoStop.
N

To manually start the camera, click StartStop and scan the QR Code.
The camera will stay on after you scan the QR code, allowing the user to scan additional QR
codes. To stop the camera, click StartStop.
The floating toolbar will display the QRCode derived from the QR Code scanned by the camera.
The user can script an action based on the QRCode returned.
o
D

AVEVA™ Training
Section 5 – HTML5 Widgets 4-117

Web Browser Widget


Using the web browser widget, users can display a web site in WindowViewer and the Web Client.
If Web Client is running in HTTPS, then only HTTPS URL page can be loaded. If Web Client is
running in HTTP, then HTTP and HTTPS can both be loaded. If the policy of the web site blocks
cross domain access, then this widget will not work. The URL need not be in double quotes, but
must be a valid URL.

Properties

y
URL: The address of the website.

Limitations

op
 If no protocol is specified, by default the https protocol will be used.
 If the Web Client is configured to use the HTTPS protocol, then only the HTTPS URL page
will be loaded. If the HTTP URL is used, the web browser widget will display a message
"Mixed Content: The page at 'https://localhost/intouchweb' was loaded over HTTPS, but
requested an insecure frame 'http://**********'. this request has been blocked: the content
must be served over HTTPS."

C
 The web browser widget will not function, if the web site policy blocks cross domain (cross
origin) access. A link will be provided to open the web page in a separate tab.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-118 Module 4 – Situational Awareness Visualization

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 11 – Creating a Carousel Dashboard 4-119

Lab 11 – Creating a Carousel Dashboard

Introduction
In this lab, you will create an HTML5 carousel widget to use as a dashboard that will display an
existing clock from the library and a symbol built in previous labs.

y
op
C
T
O

Objectives
Upon completion of this lab, you will be able to:
 Use HTML5 Widgets
N

 Display graphics in the Carousel widget


o
D

AVEVA™ InTouch HMI 2020 R2


4-120 Module 4 – Situational Awareness Visualization

Create a New Window


In the following steps, you will create a new window to contain a carousel widget.
1. On the WindowMaker File menu, select New Window, and configure the
Windows Properties dialog box as follows:

Name: Home
Frame: checked

y
Window Type: Replace
Title Bar: unchecked
Template

op
unchecked
X Location: 0
Y Location: 100
Window Width: 1800
Window Height: 880

The Window Properties dialog box will look like the following image.

C
T
O
N

2. Click OK.
o
D

AVEVA™ Training
Lab 11 – Creating a Carousel Dashboard 4-121

3. In the Industrial Graphic Toolbox, in the Training toolset, create a new symbol named
HomeDashboard.

y
4. Open the HomeDashboard symbol for editing.

op
5. In a blank space on the canvas, right-click and select Embed Industrial Graphic.
6. In the Galaxy Browser, Graphic Toolbox pane, click the Widgets toolset.
7. In the Widgets pane, select the Carousel widget.

C
T
O
N
o

8. Click OK.
D

AVEVA™ InTouch HMI 2020 R2


4-122 Module 4 – Situational Awareness Visualization

9. Click the canvas to place the Carousel widget on the canvas.

y
op
10. In the Properties pane, scroll down to locate the Widget Properties.

C
T
O
N

11. In the Widget Properties area, GraphicNames field, enter:


Mixer,ClockAnalogWall
o
D

12. Save and close the symbol.

AVEVA™ Training
Lab 11 – Creating a Carousel Dashboard 4-123

Next, you will place the HomeDashboard symbol onto the Home window in WindowMaker.
13. Drag the HomeDashboard symbol onto the Home window.

y
op
14. In the Properties pane, Appearance area, change the MaintainAspectRatio property to
False.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


4-124 Module 4 – Situational Awareness Visualization

Test in Runtime
Finally, you will open WindowViewer and test the new carousel.
15. Close the KPI popup window.
16. Click RUNTIME.
Notice that the Industrial Graphics you listed automatically start scrolling when the Home
window opens in WindowViewer.

y
op
C
T
When your mouse hovers over the carousel, it pauses automatic scrolling because the Pause
custom property of the widget is set to True by default.
17. Wait until the carousel shows the Mixer graphic, then hover your mouse over the carousel to
O
pause automatic scrolling with the Mixer graphic showing.
18. Use the pump Cmd buttons in the Mixer graphic to stop or start one of the pumps.
Remember, when you are finished, to resume automatic operation of the simulator, ensure the
pumps are in the same state as their associated valves.
N

19. Click Development!.


20. Close the Home window.
21. Open the KPI, Mixer, and Current_Alarms windows.
o

<End of Lab>
D

AVEVA™ Training
y
op
C
Module 5 – InTouch Alarms
T
Section 1 – InTouch Tagname Alarm Configuration 5-3
Lab 12 – Configuring InTouch Alarms 5-11
Section 2 – Live Alarms Management 5-33
O

Lab 13 – Visualizing and Acknowledging Live Alarms 5-37


Section 3 – Historical Alarms Management 5-59
N

Lab 14 – Visualizing and Filtering Historical Alarms and Events 5-63


o
D
5-2 Module 5 – InTouch Alarms

Module Objectives
 Define InTouch Alarms
 Describe the Alarm subsystem
 Define InTouch Tag alarm types
 Describe InTouch Alarm Properties configuration
 Explain how Alarms can be visualized

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – InTouch Tagname Alarm Configuration 5-3

Section 1 – InTouch Tagname Alarm Configuration

This section will explain how to configure a discrete alarm, and an analog limit alarm. This section
will also discuss alarm dotfields, priority, groups, severity, and advanced alarm features.

Overview
InTouch has two types of notifications: Alarms and Events.

y
Alarms represent warnings of process conditions that could cause problems and require a
response. You can configure alarms to require an acknowledgment even if the condition causing
the alarm has passed. This ensures that an operator is aware of events that caused a temporary

op
alarm state but have returned to normal.
A typical alarm is triggered when a process value exceeds a user-defined limit, such as an analog
value exceeding a hi-limit threshold. This triggers an unacknowledged alarm state that can be
used to notify the operator of a problem. Once the operator acknowledges the alarm, the system
returns to an acknowledged state.
Events are considered informational and represent normal system status messages, and do not

C
require an operator response. A typical event is triggered when a certain system condition takes
place, such as an operator logging into InTouch. If configured to do so, InTouch can log an event to
the alarm database and print it out to a printer.
Any tag can be configured to do event monitoring while you are defining it in the Tagname
Dictionary. When you define a tag to do event monitoring, an event message is logged to the alarm
system each time the tag value changes. The event message logs how the value changed,
T
whether the operator, I/O, scripts, or the system initiated the change.
Alarms are enabled in the Tagname Dictionary on a tag-by-tag basis. As a supervisory system,
InTouch is frequently used to monitor discrete alarm outputs from a PLC or DCS system. Then,
O
InTouch is used primarily to track operator information based on who acknowledges, or who is
logged into the system when an alarm occurs. InTouch can add value with three types of analog
alarm monitoring that may not exist in an existing hardware based system:
 Limit Alarms – used to track Lo, LoLo, Hi, and HiHi value limits which can also be
changed in Runtime through InTouch dotfields.
N

 Rate of Change Alarms – used to compare a previous alarm value and its timestamp,
and the current value and timestamp, to determine the value has changed by too much
during that period.
 Minor and Major Deviation Alarms – Used to monitor that the current alarm value does
not drift too far from the target value specified. Events are informational data, triggered
when a tag changes is enabled by checking the log events option for any tag type. Events
o

can be used, for example, to monitor the start-stop cycles on a piece of equipment to
determine the maintenance period. Events can be disabled globally for all tags through
WindowMaker configurable enabled events. Events are not displayed in a live alarm
display and are only shown in the Historical Display option.
D

AVEVA™ InTouch HMI 2020 R2


5-4 Module 5 – InTouch Alarms

Alarm Groups
Tag Viewer allows you to watch tags and monitor their values at runtime. You can view all tags
available in the application. The tags are arranged in a tree structure, based on their alarm groups.
It provides you with a list of all available tags in the application arranged hierarchically, based on
their alarm groups.You can group alarms to make tracking and management easier. Alarm groups
are logical representations of different areas of a factory, pieces of equipment, operator
responsibility, or a manufacturing process. For example, the following figure shows a three-tier
alarm group hierarchy for a tank farm application.

y
op
C
Alarm groups are useful for filtering in alarm displays, alarm printers, and acknowledgment scripts.
T
Every tag is associated with an alarm group. By default, tags are assigned to main $System group.
You can create a hierarchy of additional alarm groups under the $System group, up to a maximum
of 32 levels.
You create alarm groups and associate tags with them while you are defining your tags in the
O
Tagname Dictionary.

Alarm and Event Properties


N

When an alarm or event is configured for a tag, a priority between 1 and 999 must be provided,
where 1 is the highest priority.
The table below shows a suggested range for critical, major, minor, and informational alarms. This
range might be specified by regulations:

Critical: 1-249 .
o

Major: 250-499
Minor: 500-749
D

Informational: 750-999

AVEVA™ Training
Section 1 – InTouch Tagname Alarm Configuration 5-5

Alarm Annunciation
InTouch provides numerous ways to provide operator notification, and to annunciate that an alarm
has occurred. InTouch provides system tags, alarm groups, tagname dotfields, script functions,
symbol properties, animation links, and popup windows – any or all of which can be used to
monitor and annunciate alarm conditions. By leveraging Industrial Graphics, script functions and
animations in nearly infinite number of possibilities to alert Operators can be achieved.

Alarm Dotfields

y
You can use alarm dotfields to dynamically manage alarm conditions. Many of these dotfields are
accessible using I/O, expressions, and scripts. Through I/O access, you can monitor and control a

op
specific tag’s alarm information using other Windows applications, such as Excel, or
WindowViewer running on a remote node.
To access dotfields associated with a tag, use this syntax:
tag.dotfield
For example, if you want to allow runtime changes to the HiHi alarm limit on a tag named
Analog_tag, you can create an Analog - User Input animation link to a button and enter

C
Analog_tag.HiHiLimit as the expression in the link’s dialog box. During runtime, the operator
simply clicks the button and types in a new value for the HiHi alarm limit assigned to the
Analog_tag.
The following list represents some frequently used alarm dotfields.

Dotfield Name Description


T
.Ack Monitors/controls the alarm acknowledgment status of tags and alarm controlling
alarm properties of tags and groups at runtime.
.Ack has an inverse tag dotfield named .UnAck. When an unacknowledged alarm
occurs, .UnAck is set to 1. The .UnAck dotfield can be used in animation links or
O
condition scripts to trigger annunciators for any unacknowledged alarms.
.Alarm Signals that an alarm condition exists.
.AlarmEnabled Disables/enables events and alarms.
.HiLimit, .HiHiLimit, Read/write analog tagname dotfields that monitors /controls the limits for value
N

.LoLimit, .LoLoLimit alarm checks. These dotfields are only valid for integer and real tags.

Alarm Inhibition
Alarms can be prevented from annunciation such as appearing in the Alarm Client using Alarm
Inhibition Alarms. For example, an Alarm Group named Production1 can have all of its Hi and HiHi
o

alarms inhibited. Inhibition requires a discrete tag be created and linked to the inhibition field of a
tag or group.
In runtime, when this discrete tag is set to 1, all of the alarm states the inhibition tag was linked to,
D

are inhibited. For each distinct inhibition, additional discrete tags must be created and linked.
Alarm inhibition can be hidden from the Alarm Client display while still being tracked and recorded.

AVEVA™ InTouch HMI 2020 R2


5-6 Module 5 – InTouch Alarms

Alarm Border Animation


Alarm Border animation shows a highly visible colored border around a graphic element or group
of elements, when an alarm condition occurs. The color and fill pattern of the border indicates the
severity and current state of the alarm. Alarm Border animation enables operators to quickly
recognize alarm conditions.

y
op
C
Alarm border animation also shows an indicator icon at the top-left corner of the border. Alarm
severity appears within the indicator icon as a number from 1 to 4. The indicator icon can be
shown or hidden as an option of Alarm Border animation and can be configured from the
T
ArchestrA IDE.
Alarm border animation can be applied to all types of symbols except embedded symbols and
nested groups. Alarm border animation can also be applied to graphic elements and group
elements.
O
N
o
D

AVEVA™ Training
Section 1 – InTouch Tagname Alarm Configuration 5-7

Alarm Border Animation Behavior


Alarm Border animation appears around a graphic element based on the current state of the
object's aggregated alarm attributes. The appearance of the alarm border itself reflects the current
alarm state and the user's interaction with the alarm.
 A symbol process value transition into an alarm state: Alarm Border animation appears
around the symbol based on alarm severity with blinking
 The user acknowledges an alarm with the process value still in an alarm state: Alarm
Border animation appears around the symbol without blinking

y
 The alarm value returns to normal without the user acknowledging the alarm: Alarm
Border animation remains around the symbol in a defined Return to Normal visual style
without blinking

op
C
T
 The alarm value returns to normal and the user acknowledges the alarm: Alarm Border
animation no longer appears around a symbol
O
 The user suppresses an alarm: Alarm Border animation remains around the symbol in a
Suppressed visual style; however, an alarm indicator icon does not appear for a
Suppressed state
N

Note: Alarm Border animation is not used for alarms in an inhibited or a shelved state.

 If a new alarm condition occurs when Alarm Border animation appears around a symbol,
the animation updates to show the new alarm state
 In the case of aggregation alarms, Alarm Border animation shows the highest current
alarm state
o
D

AVEVA™ InTouch HMI 2020 R2


5-8 Module 5 – InTouch Alarms

Alarm Border animations can be configured by selecting Alarm Border from the list of
Visualization animations. The Alarm Border pane contains mutually exclusive fields to set the
referenced attributes for aggregate or individual alarms.

y
op
C
T
For aggregation alarms, users specify Alarm Border animation by entering an attribute or object
O
name in the Use Standard Alarm-Urgency References field of the Alarm Border pane. The
selected object attributes map to the following aggregation alarm attributes:
 AlarmMostUrgentAcked: Indicates the acknowledgment status (True/False) of the
highest priority current alarm
N

 AlarmMostUrgentInAlarm: Indicates the InAlarm status (True/False) of the highest


priority current alarm
 AlarmMostUrgentMode: Indicates the mode (Enabled/Silenced/Disabled) of the highest
priority current alarm
 AlarmMostUrgentSeverity: Indicates the severity as an integer (1-4) of the highest
priority current alarm; if no alarms are in an InAlarm state or waiting to be acknowledged,
the value is 0
o

To set Alarm Border animation for individual alarms, users specify references to the following
alarm attributes or tags:
InAlarm attribute
D

 Acked attribute
 Mode attribute
 Severity attribute
Alarm Border animation subscribes to these attributes. Based on the alarm state of these
attributes, Alarm Border animation is applied to the graphic element in runtime.

AVEVA™ Training
Section 1 – InTouch Tagname Alarm Configuration 5-9

Configure Alarm Border Overrides


Alarm border animation shows an indicator icon at the top-left corner of the border with alarm
severity as a number from 1 to 4. A default alarm border indicator image is assigned to each alarm
severity level. The default images appear in the Image column of the Alarm and Event Priority
Mapping and Historization dialog box. This is accessed in WindowMaker, Special | Configure |
Alarm Priority Mappings option. The images are saved in an .xml file located in the ArchestrA
global data cache.

y
op
C
T
Modify Alarm Border Animation Element Styles
The color and fill pattern of alarm borders are set by the Outline properties of a set of alarm
Element Styles. The following table shows the Element Styles applied to alarm border animations
O
by alarm severity and alarm state. The assignment of these Element Styles to alarm conditions
cannot be changed. Only the assigned Element Style Outline properties can be changed to modify
the appearance of alarm borders.
Alarm
Alarm State Element Style
Severity
N

1 UnAcknowledged Alarm_Critical_UNACK
1 Acknowledged Alarm_Critical_ACK
1 Return To Normal Alarm_Critical_RTN
2 UnAcknowledged Alarm_High_UNACK
2 Acknowledged Alarm_High_ACK
o

2 Return To Normal Alarm_High_RTN


3 UnAcknowledged Alarm_Medium_UNACK
3 Acknowledged Alarm_Medium_ACK
3 Return To Normal Alarm_Medium_RTN
D

4 UnAcknowledged Alarm_Low_UNACK
4 Acknowledged Alarm_Low_ACK
4 Return To Normal Alarm_Low_RTN
All Suppressed Alarm_Suppressed

AVEVA™ InTouch HMI 2020 R2


5-10 Module 5 – InTouch Alarms

Alarm Acknowledgment Models


Acknowledged alarms can be processed in a variety of methods, based on the industry regulations
and network environments. InTouch is configured to automatically acknowledge an alarm which
returns to normal. However, regulated industries can disable this feature.
Alarm Acknowledgment models include the following:
 Condition – This is the default state and handles alarms as an instance. That is, only the
most current alarm state is shown and may be acknowledged. For example, a tag
configured with both a Lo and a LoLo state, that is currently in a LoLo alarm implies that it

y
is also in a Lo alarm as the value must cross through the Lo state in order to reach the
LoLo state. Thus, when the LoLo instance is acknowledged the Lo state is automatically
acknowledged.

op
 Event Oriented – This alarm state is similar to condition acknowledgment, except it is
designed to deal with race conditions frequently occurring in high latency networks, such
as acknowledgment from an operator station connected over the Internet.
 Expanded Summary – This is the alarm model typically used for regulated industries.
This option requires each state and sub-state be recorded as acknowledged separately.

C
T
O
N
o
D

AVEVA™ Training
Lab 12 – Configuring InTouch Alarms 5-11

Lab 12 – Configuring InTouch Alarms

Introduction
In this lab, you will configure alarm limits for InTouch tags. Then, you will use the Situational
Awareness Wizard Options to enable alarm limit indicators, and an alarm border animation for the
SA_Meters symbol.

y
Objectives
Upon completion to this lab, you will be able to:

op
 Define alarm limits for an Analog tag
 Define a Discrete alarm for a Discrete tag
 Enable advanced settings on the SA_Meters symbol including Alarm Limits and Alarm
Border
 Set fixed values for AlarmMostUrgentMode and AlarmMostUrgentSeverity properties
 Link InTouch alarm dotfields to custom properties

C
 Identify Element Styles associated with an Alarm Border
 Configure the Alarm Acknowledgment Model for a tagname
 Create Alarm Groups and configure tags to use Alarm Groups
 Configure an Inhibit tag and use it to inhibit alarms
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-12 Module 5 – InTouch Alarms

Configure Alarms for Mixer


In the following steps, you will add and configure alarm limits within the mixer temperature tag.
Then, you will add and configure an Alarm Border animation and LimitAlarm marks for the
Temperature element of the Mixer symbol.
1. In the WindowMaker Tagname Dictionary, select the Details and Alarms option.

y
op
2. Click the Select button.
3. In the Select Tag dialog box, select Mixer100_Temperature_PV.

C
T
O
N

4. Click OK.
o
D

AVEVA™ Training
Lab 12 – Configuring InTouch Alarms 5-13

In the Tagname Dictionary, the tag is displayed and the Alarms pane appears.
5. In the Alarms pane, check the Low and High check boxes.
6. In the Low Alarm Value field, enter 120, and in the High Alarm Value field, enter 150.

y
op
7. Click Save.
8. Repeat the previous steps to select the following tags, and enable the same alarm limits and
alarm values as follows:

C
Tagname Enable Low Limit Enable High Limit
Mixer200_Temperature_PV 120 150
Mixer300_Temperature_PV 120 150
Mixer400_Temperature_PV 120 150

9. Click Close to save and close the Tagname Dictionary.


T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-14 Module 5 – InTouch Alarms

Next, you will add an alarm border to the mixer temperature element.
10. In WindowMaker, in the opened Mixer window, click on the Mixer graphic to ensure the
Quick Access Toolbar is showing.

y
op
C
11. On the Quick Access Toolbar, click the Edit Symbol button.
T
O
N
o
D

AVEVA™ Training
Lab 12 – Configuring InTouch Alarms 5-15

The Graphic Editor opens and displays the Mixer symbol.


12. Click the Temperature element, and in the Properties pane, SymbolMode drop-down list,
select Advanced.
Additional properties appear.

y
op
C
T
13. In the AlarmLimitIndicators drop-down list, select True.
More properties appear.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-16 Module 5 – InTouch Alarms

14. Configure the additional wizard options as follows:

AlarmHiLimitIndicator: True
AlarmLoLimitIndicator: True
AlarmBorder: True

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 12 – Configuring InTouch Alarms 5-17

15. Right-click Temperature and select Custom Properties.

y
op
16. Configure the custom properties as follows:
Custom Property Default Value Visibility

C
AlarmHiLimit Mixer100_Temperature_PV.HiLimit Public
AlarmIndicatorVisible True Private
AlarmLoLimit Mixer100_Temperature_PV.LoLimit Public
AlarmMostUrgentAcked Mixer100_Temperature_PV.Ack Public
AlarmMostUrgentInAlarm Mixer100_Temperature_PV.Alarm Public
T
AlarmMostUrgentMode 1 Private
AlarmMostUrgentSeverity 1 Private
AlarmMostUrgentShelved False Private
O
N
o
D

Note: For tag-based designs, Alarm-Urgency Reference sources (Mode, Severity, and
Shelved) must be set to fixed values.

17. Click OK.


18. Save and close Mixer.

AVEVA™ InTouch HMI 2020 R2


5-18 Module 5 – InTouch Alarms

Test in Runtime
Next, you will test what you have configured in runtime.
19. Click RUNTIME.
20. Verify the alarm border displays when any temperature exceeds the alarm limits.

y
op
C
The alarm limit indicators are shown on the Temperature symbol where the HiLimit and the
LoLimit are positioned relative to the MinEU and MaxEU values defined for the tag.
21. Click Development!.
T
O
N
o
D

AVEVA™ Training
Lab 12 – Configuring InTouch Alarms 5-19

Configure Alarm Properties


Next, you will configure the Alarm Properties of the application to disable the behavior that causes
the alarm border to hide when the alarm value returns to normal.
22. Close WindowViewer.
23. In the WindowMaker Tools pane, expand Configure, and double-click Alarms.

y
op
C
The Alarm Properties dialog box appears.
24. Uncheck the RTN implies ACK check box.
T
O
N

25. Click OK.


o
D

AVEVA™ InTouch HMI 2020 R2


5-20 Module 5 – InTouch Alarms

Verify the Alarm Border Configuration


Next, you will identify the override pattern that is used when an alarm returns to normal.
26. On the WindowMaker Special menu, select Configure | Application Style Library.

y
op
C
T
The Configure Application Styles dialog box appears.
O
N
o
D

AVEVA™ Training
Lab 12 – Configuring InTouch Alarms 5-21

27. Click the Element Styles tab, and in the Element Style Overrides list, scroll down and select
AlarmBorder_Critical_RTN.
In the images below, the Element Style column has been expanded to show the entire width
of the Element Style names.

y
op
C
T
The line color and pattern of AlarmBorder_Critical_RTN are displayed.
28. Click the Outline tab.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-22 Module 5 – InTouch Alarms

The Line Pattern, Line Weight, and Line Color of the border are displayed.

y
op
C
The Preview area shows the appearance of alarm border configurations. In this case, it
T
displays the cross-hatch pattern, which looks like small evenly-spaced triangles.The settings
in the Outline tab can be configured to override default alarm border settings.
29. Click Cancel.
O
N
o
D

AVEVA™ Training
Lab 12 – Configuring InTouch Alarms 5-23

Test in Runtime
Next, you will test what you have configured in runtime.
30. Click RUNTIME.
31. In the Mixer window, notice the AlarmBorder_Critical_RTN is represented on the screen by
the cross-hatch pattern.

Note: Depending upon the state of the simulator, you may have to wait for up to 30 seconds

y
to notice this behavior.

op
C
T
32. Click Development!.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-24 Module 5 – InTouch Alarms

Create an Alarm Group


Next, you will create and configure alarm groups that you will add tags to.
33. Close WindowViewer.
34. Create a new tag and configure it as follows:

Tagname: MixerGroup_Inhibit
Data Type: Memory Discrete

y
op
Next, you will add an Alarm Group. C
T
35. In the Tools pane, double-click Alarm Groups.
O
N
o

The Alarm Groups dialog box appears.


D

AVEVA™ Training
Lab 12 – Configuring InTouch Alarms 5-25

36. Click the Add button.


The Add Alarm Group dialog box appears.
37. In the Group Name field, enter Mixers.

y
op
38. Click OK.
In addition to creating an alarm group named Mixers, InTouch automatically creates a Mixers
tag to represent this group. This new tag is added as a child of the $System master alarm
group.

C
T
39. Click Close to close the Alarm Groups dialog box.
The Mixers group has been added as a Group Var type tag in the Tagname Dictionary.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-26 Module 5 – InTouch Alarms

Configure Alarm Inhibit for an Alarm Group


Next, you will link an Alarm Inhibitor tag for the Mixers group.
40. In the Tagname Dictionary, select the Mixers tag, and click OK.

y
op
C
41. In the Value area to the right of the Low field, click the ellipsis button.
T
O
N
o
D

AVEVA™ Training
Lab 12 – Configuring InTouch Alarms 5-27

42. In the Select Tag dialog box, select the MixerGroup_Inhibit tag, and click OK.
MixerGroup_Inhibit is displayed in the Low field.

y
op
C
43. Repeat the previous steps to configure the High field with the same inhibit tag.
T
O
44. Click Save.
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-28 Module 5 – InTouch Alarms

Modify the Alarm Group for Tags


Next, you will assign alarm groups to tags.
45. Select the Mixer100_Temperature_PV tag, and click the Group button.

y
op
C
T
O

46. In the Alarm Groups dialog box, select Mixers.


47. Click Close to select the Mixers alarm group.
N

The Mixers group is assigned to the Mixer100_Temperature_PV tag.


o
D

AVEVA™ Training
Lab 12 – Configuring InTouch Alarms 5-29

Configure the Alarm Acknowledgment Model


Next, you will select the Expanded Summary ACK Model for the temperature tags. Expanded
Summary provides a time and date stamp for each alarm state change.
48. In the Alarms pane, ACK Model area, select the Expanded Summary option.

y
op
49. Click Save.
50. Repeat the previous steps to select the Mixers group, and Expanded Summary ACK Model

C
for each of the following tags:
 Mixer200_Temperature_PV
 Mixer300_Temperature_PV
 Mixer400_Temperature_PV
T
Define an Alarm State for a Discrete Tag
Next, you will configure the alarm for a discrete tag created in an earlier lab.
51. Select Tag_Discrete1, and then in the Alarm State area, select On.
O
N
o
D

Notice the Group is $System and the ACK Model is set to Condition.
52. Click Close.

Note: As a reminder, the Close button also saves your changes.

AVEVA™ InTouch HMI 2020 R2


5-30 Module 5 – InTouch Alarms

Test in Runtime
Next, you will test your alarm configuration changes in runtime.
53. Click RUNTIME.
54. On the WindowViewer Special menu, click Tag Viewer.
55. In the watch window, right-click, and select Load Watch List.

y
op
C
56. Navigate to C:\Training and open My Watch List.
T
57. Create a new watch window named Alarms.
58. In the tag list, expand the Mixers alarm group, right-click Mixer100_Temperature_PV, and
select Add to Watch.
O
N
o

59. Click a blank space on the watch window, right-click and select Add Separator.
D

AVEVA™ Training
Lab 12 – Configuring InTouch Alarms 5-31

60. In the tag list, select $System.

y
op
61. From the Dotfield Name list on the right, drag Alarm to the watch list.

C
$System.Alarm appears at the bottom of the watch list.
T
62. In the tag list, select the Mixers alarm group.
O
N

63. From the Dotfield Name list on the right, drag Alarm to the watch list.
Mixers.Alarm appears at the bottom of the watch list.
o

64. In the tag list, select Mixer100_Temperature_PV.


D

65. From the Dotfield Name list on the right, drag Alarm to the watch list.
Mixer100_Temperature_PV.Alarm appears at the bottom of the watch list.

Note: The Mixer100_Temperature_PV value between 120 and 150 will cause the
Mixer100_Temperature_PV.Alarm value to show False.

66. Add Tag_Discrete1.Alarm to the watch list.

AVEVA™ InTouch HMI 2020 R2


5-32 Module 5 – InTouch Alarms

Finally, you will inhibit all mixer alarms.


67. Add the MixerGroup_Inhibit tag to the watch list.

y
op
68. In the watch list, double-click MixerGroup_Inhibit.
The Modify Discrete Value dialog box appears.

C
69. In the Modify Discrete Value dialog box, click True, and click Apply.
T
70. Notice the following:
 Mixers.Alarm and Mixer100_Temperature_PV.Alarm are set to False because they are
inhibited.
 $System.Alarm is True because Tag_Discrete1.Alarm is true.
O
The MixerGroup_Inhibit tag inhibits only tags using the Mixers alarm group, but
Tag_Discrete1 is not defined to use the Mixers alarm group.
 $System.Alarm is True when any uninhibited alarm is true.
71. In the Modify Discrete Value dialog box, click False, and click OK.
N

72. In the watch list, right-click, and select Save Watch List.
73. Close Tag Viewer.
74. Click Development!.
o

<End of Lab>
D

AVEVA™ Training
Section 2 – Live Alarms Management 5-33

Section 2 – Live Alarms Management


This section will describe alarm management, define alarm ack models, and discuss alarm query
syntax. This section will also explain of the .NET Alarm Client features, discuss alarm inhibition,
and compare alarm inhibition with alarm suppression.

Alarm Client Overview

y
The Alarm Client is a .NET control that allows the operator to see the state of alarms and events
and is built with functionality for sorting, acknowledging, and handling alarms. The Alarm Client
has been designed with defaults that meet industry standards and best practices of most
industries.

op
At runtime the Alarm Client supports interaction through standard menu and click functionality. The
Alarm Client automatically displays all of the alarms from the InTouch application using a default
alarm query that points to the $System master alarm group. This query an be configured to show
alarms from specific alarm groups in InTouch. Alarm Groups allow you to organize tags by area or
process.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-34 Module 5 – InTouch Alarms

Alarm Client Run-Time Behavior


Run-Time Behavior for the Alarm Client changes the functionality at runtime. Features can be
enabled, disabled, and configured using the Run-Time Behavior animation of the control. These
include disabling UI features such as, which menu options appear in the right-click context menu,
or how queries and filters are stored in the Users profile when modified at runtime. For example,
you can disable the ability of users to modify the design time configured Queries and Filters. Or
you may allow operators to modify the queries and filters and have their changes loaded at
runtime when WindowViewer restarts. This option allows you to save user queries and filters, that

y
are configured by default

op
C
T
O

When the Save User Queries and Filters option is selected, modifications made to queries or
N

filters at runtime are saved on a per user, and alarm control, instance to a .xml file. For example, a
saved query will save as UserQueryFilter_001.xml. Modifications are saved in the following
default directory:
C:\Users\<OS Login Name>\AppData\Local\
The map between the Alarm Control instance and the above .xml file is saved in a map file,
o

InstancesMap.dat. Modified queries and filters will be available upon closing and restarting the
alarm control window or WindowViewer.
If you uncheck the Save User Queries and Filters option, updates made to queries and filters
during run-time will not be saved.
D

Note: When the Save User Queries and Filter option is checked, the Overwrite Design Time
Queries and Filters option is enabled and checked by default. When checked, this option
resolves naming conflicts between design-time queries and filters and run-time queries and filters
loaded from the .xml file. Naming conflicts will be resolved by overwriting the design time queries
and filters.

AVEVA™ Training
Section 2 – Live Alarms Management 5-35

View Alarms in the Alarm Client


At runtime the Alarm Client displays each alarm as an individual row in its grid. Alarm rows are
displayed in color to indicate the current state of the alarm. Columns provide details such as which
user was on duty at the time the alarm occurred, the limit that triggered the alarm, which computer
node the alarm came from, and the time and date that the alarm occurred.

Alarm Management

y
The Alarm Client is the primary tool used to manage alarms in your InTouch application.
Management of alarms involves identifying the when, where, and what of each alarm occurrence.
By interacting with the Alarm Client a user can perform management functions such as

op
acknowledging an alarm, hiding an alarm, or filtering the list of alarms to show a specific
occurrence of an alarm or event. Filters allow alarms to be displayed by group, tagname, or
priority.

Acknowledging Alarms
Every alarm in InTouch has two binary states. The first state is in alarm or not. The second is

C
acknowledged or not. These two binary states form a simple four-part truth table. The Alarm Client
allows you to manage this by displaying alarms in red, white, and rose colors. The fourth state is
when the alarm disappears from the Alarm Client.
When an alarm is first triggered it is both in alarm and unacknowledged. This state is named
UNACK_ALM. Before the problem that caused the alarm is resolved an operator can
acknowledge the alarm and take action to resolve the cause. This changes the state of the alarm
T
from UNACK_ALM to ACK_ALM. To acknowledge an alarm using the Alarm Client, the operator
must right-click the row of the alarm and chose Ack Selected. This causes a dialog box to appear
in which the operator must enter an alarm comment in order to acknowledged the alarm.
Once the cause of the alarm has been resolved an acknowledged alarm will disappear form the
O
Alarm Client. It is also possible that an alarm will return to normal before a user has time to
acknowledge it. This is named UNACK_RTN. An alarm in this state will remain visible in the Alarm
Client until it is acknowledged. In all cases an alarm must be both acknowledged and returned to
normal for it to disappear from the Alarm Client.
N

Alarm Query Syntax


The Alarm Client supports the use of queries which look similar to the following:
\intouch!$System
o

The above query connects to WindowViewer on the current PC and obtains all live alarms. The
Alarm Client uses syntax like this to populate the display with alarm records that match the query.
By default, the Alarm Client is configured for current alarms only.
The Alarm Client allows alarm query syntax to include the space character as a separator between
D

alarm queries. For example: \intouch!group1 \intouch!group2. This query example would fill the
Alarm Client with alarms only from group1 and group2.
The alarm query syntax also supports retrieving alarms from other InTouch nodes. For example:
\\Server01\InTouch!$System will retrieve all InTouch alarms from the computer node named
Server01.
Alarm queries also support wild card characters. For example, \intouch!$System!Mixer* will
retrieve all alarms for tags with a name that begins with mixer.

AVEVA™ InTouch HMI 2020 R2


5-36 Module 5 – InTouch Alarms

User Input Animation


User Input is a type of interactive animation in InTouch. This means that a user is able to click or
touch the screen to interact with a button or graphic. The User Input animation supports multiple
InTouch data types including: Boolean, analog, and string.

y
op
C
The User Input animation allows you to create a prompt message that appears for the user. The
resulting dialog box presents a list of choices that they can select from. You can use these choices
to set a reference for an InTouch tag. The User Input animation supports encryption to protect the
characters which are typed from observation from an onlooker and supports reflecting the input
selected back to the graphic or button through visual presentation.
T
O
N
o
D

AVEVA™ Training
Lab 13 – Visualizing and Acknowledging Live Alarms 5-37

Lab 13 – Visualizing and Acknowledging Live


Alarms

Introduction
In this lab, you will create a symbol, and embed and configure a .NET Alarm Client. Then you will
use the Alarm Client to visualize and acknowledge current alarms at runtime.

y
Objectives

op
Upon completion of this lab, you will be able to:
 Configure the .NET Alarm Client for current alarms
 Visualize alarms using the .NET Alarm Client
 Acknowledge alarms using the .NET Alarm Client
 Configure a User Input animation

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-38 Module 5 – InTouch Alarms

Add and Configure the Alarm Client


In the following steps, you will create a new symbol, and embed and configure the properties of an
Alarm Client.
1. In the Industrial Graphic Toolbox, Training toolset, create a new symbol named
CurrentAlarms, and open it for editing.

2. In the Tools pane, select the Alarm Client tool.

y
op
3. Click the canvas to place the Alarm Client.

C
4. Name the element LiveAlarms.
T
O
N
o
D

AVEVA™ Training
Lab 13 – Visualizing and Acknowledging Live Alarms 5-39

5. Double-click LiveAlarms to edit the animations.


The Edit Animations dialog box appears.

y
op
C
T
The Alarm Mode configuration uses a valid default for InTouch HMI applications. You will
manipulate the Alarm Query later in this lab.
6. In the Animations pane, select Column Details.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-40 Module 5 – InTouch Alarms

7. In the Column Details animations pane, Column Details list, uncheck the User1 check box.
In the grid preview below the Column Details list, the User1 column has been removed.

y
op
C
T
8. In the Column Details animations pane, Column Details list, select Name.
O
N
o
D

AVEVA™ Training
Lab 13 – Visualizing and Acknowledging Live Alarms 5-41

9. Click Name, and rename it to Tag.

y
10. With Tag selected, click the up arrow button until Tag appears below User1.

op
C
T
O
N

The Tag column is in the first position in the grid preview.


11. In the Animations pane, select Run-Time Behavior.
o
D

AVEVA™ InTouch HMI 2020 R2


5-42 Module 5 – InTouch Alarms

The Run-Time Behavior animations pane appears.

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 13 – Visualizing and Acknowledging Live Alarms 5-43

12. In the Run-Time Behavior animations pane, Show Context Menu list, uncheck the check
boxes next to the following menu items:
 Ack Others
 Shelve Selected
 Shelve Others
 Unshelve Selected
 Unshelve Others
 Hide Selected

y
 Hide Others
 Hidden

op
 Sort
 Queries and Filters
 Freeze

C
T
O
N

13. Click OK.


o
D

AVEVA™ InTouch HMI 2020 R2


5-44 Module 5 – InTouch Alarms

LiveAlarms will look similar to the following image.

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 13 – Visualizing and Acknowledging Live Alarms 5-45

Add Buttons to CurrentAlarms


Next, you will add buttons to the CurrentAlarms symbol and configure them to display different
sets of alarms in the Alarm Client.

14. In the Tools pane, select the Button tool.

y
op
15. On the canvas, draw a button next to the bottom-left corner of LiveAlarms.

16. Label the button All.

C
T
O

17. In the Properties pane, name the button AllButton.


18. On the Element Style drop-down list, select Intensity1.
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-46 Module 5 – InTouch Alarms

19. Double-click AllButton to add animations.


20. Add an Element Style animation.

y
op
C
21. In the Element Style animations pane, select Boolean.
T
22. In the Boolean field, enter LiveAlarms.AlarmQuery == "\InTouch!$System".

Note: Case sensitivity is important for text entered inside of quotes.


O
23. In the Values area, True, 1, On field, from the drop-down list, select Intensity4.
24. In the False, 0, Off field, uncheck the Element Style check box.
N
o
D

AVEVA™ Training
Lab 13 – Visualizing and Acknowledging Live Alarms 5-47

25. Add a Pushbutton animation.

y
op
C
The Pushbutton animation details pane appears.
26. Click String.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-48 Module 5 – InTouch Alarms

The Pushbutton String animations pane appears.

y
op
C
27. In the String field, enter LiveAlarms.AlarmQuery.
28. In the Action area, click Set.
T
29. In the Value1 field, enter \InTouch!$System.
The Values field is case sensitive. Please verify you have entered the string correctly.
O
N
o
D

30. Click OK.

AVEVA™ Training
Lab 13 – Visualizing and Acknowledging Live Alarms 5-49

31. Duplicate the AllButton.


32. Move the duplicate button to the right of the AllButton.
33. In the Properties pane, name the button MixersButton.
34. In the Text field, enter Mixers.

y
op
C
T
35. Double-click MixersButton to edit the animations.
O

36. In the Pushbutton animations pane, Value1 field, replace $System with Mixers.
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-50 Module 5 – InTouch Alarms

37. In the Animations pane, select Element Style.


38. In the Element Style animations pane, Boolean field, replace $System with Mixers.

y
op
39. Click OK.
40. Duplicate MixersButton, and place the duplicate to the right of MixersButton.

C
41. In the Properties pane, name the duplicate DiscreteAlarmTestButton.
42. In the Text field, enter Discrete Alarm Test.
T
O
N

43. Adjust the size of the button so the whole label is displayed.
o
D

AVEVA™ Training
Lab 13 – Visualizing and Acknowledging Live Alarms 5-51

44. Double-click DiscreteAlarmTest to edit the animations.


45. In the Element Style animations pane, Boolean field, enter Tag_Discrete1.

y
46. In the Animations pane, select Pushbutton.

op
47. In the Pushbutton animations pane, States area, click Boolean.
48. In the Boolean field, enter Tag_Discrete1.
49. In the Action area, select Toggle.

C
T
50. Click OK.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-52 Module 5 – InTouch Alarms

Next, you will create a new button instead of duplicating the existing button so that you do not have
to delete animations inherited from the button that was created previously.
51. Create a new button and place it to the right of DiscreteAlarmTestButton.
52. In the Properties pane, name the button AckAllButton.
53. On the ElementStyle drop-down list, select Intensity1.
54. In the Text field, enter Ack All.

y
op
C
55. Double-click AckAllButton, and add a User Input animation.
T
O
N
o
D

AVEVA™ Training
Lab 13 – Visualizing and Acknowledging Live Alarms 5-53

The User Input animations pane appears.

y
op
56. In the User Input animations pane, configure the User Input animation as follows:

States: Boolean
Reference
Boolean: InTouch:$System.Ack

C
Message to User: Are you sure you want to acknowledge ALL alarms?
Prompt
True Message: Yes
False Message: No
Interaction
T
Input Only: checked

Because it is referencing the $System tag, the prefix InTouch: is required.


O
N
o
D

57. Click OK.

AVEVA™ InTouch HMI 2020 R2


5-54 Module 5 – InTouch Alarms

58. Adjust the height of LiveAlarms to approximately half the original height.
59. Adjust the width of the LiveAlarms element to fit the width of the buttons.

y
op
60. Save and close CurrentAlarms.
C
T
O
N
o
D

AVEVA™ Training
Lab 13 – Visualizing and Acknowledging Live Alarms 5-55

Embed the Symbol


Next, you will embed and configure the new symbol in the Current_Alarms window.
61. Embed CurrentAlarms in the Current_Alarms window.

y
op
C
Notice the Alarm Client does not fill the entire window. You will modify this next.
T
62. In the Properties pane, MaintainAspectRatio property, set the value to False.
The CurrentAlarms symbol is stretched to fill the entire frame window.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-56 Module 5 – InTouch Alarms

Test What You Have Built


Next, you will test the functionality of the Alarm Client and the configured buttons.
63. Click RUNTIME.
The All button is enabled so every tag in the InTouch application that is currently in alarm is
being displayed. This includes the $System alarm group and the Mixers alarm group.
The Discrete Alarm Test button is enabled (indicated with Intensity 4). Because
Tag_Discrete1 is set to alarm when on, or true, there is also a record in the Current Alarm

y
window for Tag_Discrete1. Note the Group column displays $System for Tag_Discrete1.

op
Note: You may have to scroll down to view the Tag_Discrete1 record.

C
64. Click the Mixers button.
The All button is disabled and the Mixers button is enabled. Alarms for the Mixers group are
displayed. In the Current Alarms list Tag_Discrete1 no longer appears because it does not
belong to the Mixers group.
T
O

65. Click the All button to display all alarms.


N
o
D

AVEVA™ Training
Lab 13 – Visualizing and Acknowledging Live Alarms 5-57

66. Click the Ack All button.


The confirmation message appears.

y
op
67. Click Yes.
This will clear all of the alarms which have returned to normal prior to using the Ack All button.

C
The entries that are acknowledged appear in brown color and remain visible until they return
to normal.
68. Verify that Tag_Discrete1 appears as an acknowledged tag that has not returned to normal.
T
O

Finally, you will set Tag_Discrete1 to False, which will return to normal and cause Tag_Discrete1
N

to disappear from the Alarm Client.


69. Click the Discrete Alarm Test button.
The Tag_Discrete1 record no longer appears in the list.
70. Open Tag Viewer, and ensure the My Watch List file is loaded.
71. In the Alarms watch list, double-click MixerGroup_Inhibit.
o

72. In the Modify Discrete Value dialog box, click True, and click OK.
In the watch list the MixerGroup_Inhibit tag is set to True.
D

73. Close Tag Viewer.


74. Click the Discrete Alarm Test button to enable it.
The Tag_Discrete1 tag is the only alarm displayed in the Alarm Client because all of the Mixer
group tags have been inhibited.

AVEVA™ InTouch HMI 2020 R2


5-58 Module 5 – InTouch Alarms

75. In the Alarm Client, click the Tag_Discrete1 record to select it.
76. Right-click the Tag_Discrete1 record.
77. Click Ack Selected.

y
op
78. In the Comment field, enter This test is complete.

79. Click OK.

C
Tag_Discrete1 has been acknowledged with a comment.
T
O

80. Open Tag Viewer, and set MixerGroup_Inhibit to False.


N

81. Close Tag Viewer.


82. Click Development!.

<End of Lab>
o
D

AVEVA™ Training
Section 3 – Historical Alarms Management 5-59

Section 3 – Historical Alarms Management


This section will explain how to record alarms in a database and retrieve those alarms to view in
the Alarm Client.

Overview
Historical alarms and events are managed in InTouch with a few utilities. In this section, event

y
configuration, historical alarm configuration, and the use of the alarm client for visualizing alarms
and events are discussed. Alarms and events are recorded to a database and later extracted for
visualization. The tools which are used for these functions are discussed below.

op
Alarm DB Logger
The Alarm DB Logger is an alarm consumer that uses an alarm query to determine which alarms
will be logged to a database. These alarm queries are sent to the Alarm Manager which sends all
alarms matching the query to the Alarm DB Logger.
The Alarm DB Logger also has the ability to automatically reconnect. The Alarm DB Logger

C
reports any errors to the ArchestrA Logger which can be viewed in the System Platform
Management Console (SMC).

Alarm DB Logger Manager


The Alarm DB Logger Manager is a wizard utility used to configure the Alarm DB Logger. This
T
utility provides buttons to start and stop the Alarm DB Logger. The executable for the Alarm DB
Logger Manager, named almlogwiz.exe, may be closed after starting the Alarm DB Logger
(wwalmlogger.exe). The Alarm DB Logger does not have a console user interface so it does not
show an icon on the task bar while it is running.
O
N
o

The Alarm DB Logger Manager can also be used to monitor the Alarm DB Logger smart cache,
which represents the in-memory buffer used to hold alarm records. The smart cache holds alarms
D

retrieved from the Alarm Manager until these are logged to the database. As records are written
the count is decremented. Most of the time the count will show 0 unless a large number of alarms
is sent at one time.
Unwritten alarm records are buffered in the smart cache when the SQL Server connection is down
or when the alarms come at a rate faster than the logging rate of the Alarm DB Logger, which, by
default, is 10 records per second.

AVEVA™ InTouch HMI 2020 R2


5-60 Module 5 – InTouch Alarms

The Alarm DB Logger Manager utility can be launched from a shortcut in the WindowMaker Tools
pane Applications toolset, or from the Start menu.

y
op
The Alarm DB Logger Manager provides you with the ability to:
 Run the application

C
 Select the database connection type
 Create the database and necessary SQL tables in the database
 Delete the alarm database
 Specify the alarm query
 Select the logging mode – Detailed or Consolidated
T
 Enable logging of events
 Set performance tuning parameter
 Store settings in the registry
O
N
o
D

AVEVA™ Training
Section 3 – Historical Alarms Management 5-61

Before you begin using the Alarm DB Logger, you must use the Alarm DB Logger Manager to
connect to MSSQL by configuring the node where SQL is running, setup login authentication
information, create a database (which automatically creates the necessary tables, views, and
stored procedures), test your database connection, delete the database if necessary, configure an
alarm query and the logging mode, and configure other settings, such as whether to log events
and the rate of logging.

y
op
C
T
O
Running Alarm DB Logger as a Service
You may configure Alarm DB Logger Manager to run as a service. This allows the Alarm DB
Logger to start without a human present to log on to the console. Additionally, InTouch alarms
generated while running WindowViewer in Terminal (RDP) Sessions may also be logged into the
N

alarm database.
The following limitations apply.
 The combination of Alarm DB Logger configured as a service and InTouch running locally
as a console application is not supported. If InTouch needs to run in the Console session,
the AlarmDB Logger must be run as a Normal Application. This means WindowViewer
must be configured to run as a Service in addition to configuring Alarm DB Logger to run
o

as a service.
 If Alarm DB Logger is configured to run as a service for InTouch HMI application it cannot
also serve to log alarms from Application Server (InTouch for System Platform - Managed
D

InTouch).

AVEVA™ InTouch HMI 2020 R2


5-62 Module 5 – InTouch Alarms

Supported Queries When AlarmDbLogger is Configured as a Service


For InTouch alarms from Terminal Sessions
\\<TerminalServerNodeName>:<TerminalSessionIPAddress>\InTouch!$System
Where:
 "TerminalServerNodeName is the computer name of the Terminal Server Node
 "TerminalSessionIPAddress is the IPAddress of the TS Client initiating the session. This is
the session IP of the alarm provider. This is not the IP address of the terminal server.

y
 For example
 "Terminal Server Computer name: TSNode1
 "Terminal Server IP Address: 10.2.1.1

op
(As returned by an < ipconfig > command executed from the console)
 "Terminal Session IP Address: 10.2.1.67
(This is the IP address of the terminal client as returned by an < ipconfig> command
executed from the terminal session. You can also rely on the InTouch function
TSEGetClientId () executed from the InTouch Application in a Terminal Session.)

C
T
O
N
o
D

AVEVA™ Training
Lab 14 – Visualizing and Filtering Historical Alarms and Events 5-63

Lab 14 – Visualizing and Filtering Historical


Alarms and Events

Introduction
In this lab, you will use the Alarm DB Logger Manager to configure the Alarm DB Logger to record
historical alarms and events in a database. You will then duplicate the CurrentAlarms symbol

y
created in a previous lab and configure the duplicate to connect to a database and retrieve
historical alarms and events.

op
Objectives
Upon completion of the lab, you will be able to:
 Configure a tag to log events
 Configure and start the Alarm DB Logger
 Configure a .NET Alarm Client for historical alarms and events

C
 Construct Queries and Filters
 Filter alarm records in the Alarm Client in runtime
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-64 Module 5 – InTouch Alarms

Configure a Tag to Log Events


In the following steps, you will configure the MixerGroup_Inhibit tag to log events. This will allow
you to log and display when mixer alarms are inhibited.
1. Close WindowViewer.
2. In the WindowMaker Tagname Dictionary, select the MixerGroup_Inhibit tag.
3. Check the Log Events check box.

y
4. In the Priority field, enter 999.

op
C
5. Click Close.
6. Click RUNTIME.
This will start WindowViewer and generate alarms which are needed for the remainder of this
lab.
T
7. Click Development!.

Configure and Start the Alarm DB Logger


O

Next, you will open the Alarm DB Logger Manager and configure it to record historical alarms and
events.
8. In the Tools pane, expand Applications, and double-click Alarm DB Logger Manager.
N
o
D

AVEVA™ Training
Lab 14 – Visualizing and Filtering Historical Alarms and Events 5-65

The Alarm DB Logger Manager dialog box appears.

y
op
9. Click Settings.
The Alarm DB Logger Manager - Configuration dialog box appears.
10. In the SQL Server/MSDE area, Authentication drop-down list, verify
Windows Authentication is selected.

C
Notice the User Info area is now grayed out because User Info fields are only used when
T
using SQL Server Authentication.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-66 Module 5 – InTouch Alarms

11. In the Server Name field, enter your Engineering node name.

Note: Your instructor will provide the Engineering node name.

12. In the Database name field, ensure the default WWALMDB is entered.

y
op
C
T
13. Click Create.
O
A Success message appears.
N

14. Click OK.


o

15. Click Next.


D

AVEVA™ Training
Lab 14 – Visualizing and Filtering Historical Alarms and Events 5-67

The Alarm DB Logger Manager - Query Selection dialog box appears.

y
op
16. Retain the defaults and click Next.
C
T
The Alarm DB Logger Manager - Advanced Setting dialog box appears.
O
N
o
D

17. Retain the defaults, and click Finish.

AVEVA™ InTouch HMI 2020 R2


5-68 Module 5 – InTouch Alarms

18. In the Alarm DB Logger Manager, click Start.

y
op
The Alarm DB Logger Manager fills the smart cache first with records that match the
\InTouch!$System (all alarms) alarm query. Then, at a rate of 10 per second, it writes these
alarms and events into the database until the smart cache is empty. As new alarms occur
these are written to the WWALMDB database.
19. Close the Alarm DB Logger Manager dialog box.

C
The Alarm DB Logger (wwalmlogger.exe) continues running and recording alarms even after
you close the Alarm DB Logger Manager.
T
O
N
o
D

AVEVA™ Training
Lab 14 – Visualizing and Filtering Historical Alarms and Events 5-69

Create the Symbol to View Historical Alarms and Events


Next, you will duplicate the CurrentAlarms symbol, and configure the new symbol to display and
query historical alarms and events from the Alarm DB Logger in runtime.
20. In the Industrial Graphic Toolbox, Training toolset, right-click the CurrentAlarms symbol,
and select Duplicate.
Symbol duplication may take a few moments.

y
op
C
T
21. Name the new symbol HistoricalAlarmsEvents.
22. Open HistoricalAlarmsEvents for editing.
O
23. On the canvas, delete all of the button elements.
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-70 Module 5 – InTouch Alarms

24. Rename LiveAlarms to HistAlarms.

25. Double-click HistAlarms to edit the animations.


26. In the Alarm Mode animations pane, Client Mode drop-down list, select Historical Alarms

y
and Events.

op
C
T
O
N

27. In the Database Connectivity area, Authentication Mode drop-down list, ensure Windows
Integrated is selected.
o
D

AVEVA™ Training
Lab 14 – Visualizing and Filtering Historical Alarms and Events 5-71

28. In the Server Name field, enter your Engineering node name.
This is the same node name provided by your instructor earlier in this lab.

y
op
29. Click Test Connection.
A Connection successful message appears.

C
T
30. Click OK to close the Connection successful message.
31. In the Animations pane, select Queries and Filters.
O
N
o

The Queries and Filters animations pane appears.


D

AVEVA™ InTouch HMI 2020 R2


5-72 Module 5 – InTouch Alarms

32. In the top-right corner of the Queries list, click the Add new query button.

y
op
The Add Query or Filter dialog box appears.
33. In the Query or Filter Name field, enter Mixer100_Temperature_PV UNACK_RTN.

C
T
O
N
o
D

AVEVA™ Training
Lab 14 – Visualizing and Filtering Historical Alarms and Events 5-73

34. In the name list, select State, and then click the right arrow button to add it to the filter
definition list.

y
op
Value:
=
UNACK_RTN C
35. In the filter definition list, select State, and configure the area to the right as follows:

Operator:
T
O
N
o
D

36. Click Set.

AVEVA™ InTouch HMI 2020 R2


5-74 Module 5 – InTouch Alarms

37. Add Tag to the filter definition list, select Tag, and configure the area to the right as follows:

Operator: =
Value: Mixer100_Temperature_PV

38. Click Set.

y
op
C
39. Click OK to close the Add Query or Filter dialog box.
T
The Queries list shows the newly added query.
O
N
o
D

AVEVA™ Training
Lab 14 – Visualizing and Filtering Historical Alarms and Events 5-75

40. In the Animations pane, select Run-Time Behavior.


41. In the Run-time Behavior animations pane, Queries and filters conflict resolution area,
uncheck the Overwrite Design Time Queries and Filters check box.
42. In the Show Context Menu area, uncheck the Ack Selected check box.
Historical alarms and events cannot be acknowledged.
43. Check the Queries and Filters check box.

y
op
C
T
O

44. Click OK.


N

45. Save and close HistoricalAlarmsEvents.


o
D

AVEVA™ InTouch HMI 2020 R2


5-76 Module 5 – InTouch Alarms

Embed the Symbol in the Window


Next, you will embed and configure the HistoricalAlarmsEvents symbol in the
Historical_Alarms_and_Events window.
46. Close the Current_Alarms window.
47. Open the Historical_Alarms_and_Events window.
48. Embed HistoricalAlarmsEvents in the Historical_Alarms_and_Events window.

y
49. In the Properties pane, set MaintainAspectRatio to False.
The HistoricalAlarmsEvents symbol fills the frame window.

op
C
T
O
N
o
D

AVEVA™ Training
Lab 14 – Visualizing and Filtering Historical Alarms and Events 5-77

Test What You Have Built


Next, you will use the Historical_Alarms_and_Events window to display the results of the query
and filter defined earlier in this lab. Then, you will use the tag viewer to modify an event tag to
generate an event record to be queried and displayed by the historical alarm client.
50. Click RUNTIME.
In the Historical_Alarms_and_Events window, the list of historical alarms are displayed in
red and blue, and events are displayed in brown.

y
op
51. In the Historical_Alarms_and_Events window, right-click the HistoricalAlarmsEvents
symbol, and select Queries and Filters.

C
T
After a moment, the Query and Filter Favorites dialog box appears.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-78 Module 5 – InTouch Alarms

52. Check the Mixer100_Temperature_PV UNACK_RTN check box.

y
op
53. Click OK.
You can view all of the matching records.

C
T
O
N
o
D

AVEVA™ Training
Lab 14 – Visualizing and Filtering Historical Alarms and Events 5-79

Next you will generate an event, then change the filter to view the event.
54. Use Tag Viewer to toggle MixerGroup_Inhibit to True.
Load the C:\Training\My Watch List watch window if it has been closed.
55. Use Tag Viewer to toggle MixerGroup_Inhibit to False.
56. Close Tag Viewer.
57. In the Historical_Alarms_and_Events window, right-click the HistoricalAlarmsEvents
symbol and select Queries and Filters.

y
58. In the Filters list, click Add New Filter.

op
C
T
O

The Add Query or Filter dialog box appears.


N
o
D

AVEVA™ InTouch HMI 2020 R2


5-80 Module 5 – InTouch Alarms

59. In the Query or Filter Name field, enter Events Only.

60. In the name list, select Class, and then click the right arrow button to add it to the filter
definition list.

y
op
Operator: = C
61. In the filter definition list, select Class, and configure the area to the right as follows:
T
Value: Event

62. Click Set.


O
N
o
D

63. Click OK to close the Add Query or Filter dialog box.


The Filters list shows the newly added query.

AVEVA™ Training
Lab 14 – Visualizing and Filtering Historical Alarms and Events 5-81

64. In the Queries list, check the Default query.


65. In the Filters list, check the Events Only filters.

y
op
66. Click OK to save and apply the filter.
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


5-82 Module 5 – InTouch Alarms

67. In the HistoricalAlarmsEvents symbol, locate the MixerGroup_Inhibit events.


You may have to scroll to locate these events.

y
op
68. In the Historical_Alarms_and_Events window, right-click the HistoricalAlarmsEvents
symbol, and select Queries and Filters.

C
69. Uncheck the Events Only check box.
70. Click OK.
This restores the default query, which includes both alarm and event history.
T
O
N
o
D

AVEVA™ Training
Lab 14 – Visualizing and Filtering Historical Alarms and Events 5-83

Earlier in this lab, when configuring the HistAlarms grid, you unchecked to disable a setting in
the Queries and filters conflict resolution area, called Overwrite Design Time Queries. You will
see the effect of this setting next.
71. Click Development!.
72. Click RUNTIME.
73. In the Historical_Alarms_and_Events window, right-click the grid and select Queries and
Filters.

y
74. Verify your Runtime filter called Events Only has been deleted.
The design time Queries and Filters did not have an Events Only filter and this has
overwritten Runtime.

op
C
T
O

75. Click Cancel.


N

76. Click Development!.

<End of Lab>
o
D

AVEVA™ InTouch HMI 2020 R2


5-84 Module 5 – InTouch Alarms

y
op
C
T
O
N
o
D

AVEVA™ Training
y
op
C
Module 6 – Data Logging and Trending
T
Section 1 – InTouch History and Real-Time Trending 6-3
Lab 15 – Logging Historical Data Using InTouch History 6-7
Lab 16 – Trending Real-Time Data 6-27
O

Section 2 – Using Historian with InTouch 6-39


Lab 17 – Building a Historian Client Trend Display 6-47
N

Section 3 – Trend Pen 6-61


Lab 18 – Trending with Trend Pen 6-67
o
D
6-2 Module 6 – Data Logging and Trending

Module Objectives
 Explain the differences between real-time and historical trends
 Enable historical logging in InTouch
 Use historical trend wizards
 Examine historical data
 Import InTouch tags into Historian
 Verify imported tags are acquiring data to access in Historian

y
 Use Historian Client Trend .NET control to retrieve data from Historian

op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – InTouch History and Real-Time Trending 6-3

Section 1 – InTouch History and Real-Time Trending


This section will discuss the built-in InTouch historical logging features. The features include how
to enable InTouch history, visualizing InTouch history, and using HistData for exporting historical
logs to .csv files. This section will go on to explain how to use the Trend Client .NET control for
real-time trending visualization.

InTouch Historical Logging Overview

y
InTouch Historical Logging is built-in to InTouch HMI. Configuration of historical logging is done in
three phases:

op
1. Enable historical logging
2. Enable log data for each tag
3. Build a historical display window
In this section you will record historical data to .lgh and .idx files and retrieve historical data from
these files to display as traces on a chart. Finally, you will use the HistData wizard to write to a .csv
file which can be opened in Microsoft Excel.

Configure Historical Logging

C
To start historical logging you must enable historical logging in the Historical Logging Properties
dialog box. Historical Logging Properties are global settings which allow you to enable historical
logging, determine how long you will keep data for, and determine where on your network your
T
data will be stored.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-4 Module 6 – Data Logging and Trending

Enable Log Data Per Tag


Individual tag data can be recorded to the historical log files when the log data feature is enabled.
This setting can be done on a tag by tag basis in the Tagname Dictionary, or in bulk by using the
DB Load feature.

Visualize Historical Data


InTouch provides four trend wizards which are used to construct a historical logging window.

y
These wizards allow you to retrieve and visualize your historical data at runtime.
 The first wizard is a chart which shows your data as pens or traces representing the
values of each tag. A single pen color is used for each tag and up to eight tags can be

op
displayed at one time.
 The second wizard is a zoom and pan wizard, which allows you to scroll back in time
and to zoom in and out on the pens in the chart.
 The third wizard is a legend which simply allows you to identify which color belongs to
which tag.
 The final wizard is the HistData wizard. This wizard communicates with the HistData
server which must be running on the same computer node as the InTouch application.

C
The purpose of the HistData server is to create a .csv file containing rows and
columns of data that represents the current information that is displayed on the chart.
The .csv file can be opened in Microsoft Excel for viewing.

How InTouch Historical Logging Works


T
When historical logging is enabled, each day at midnight two files are created. The files which are
created are .lgh, which contains the data. The second file is .idx which is an index for quick lookup
of tag information. An entry is recorded in the data file each time the value of a tag changes. This
is named delta storage. Additionally, WindowViewer writes one record every hour for every tag that
O
has been enabled for historical logging. This is named cyclic storage.

Trend Client Overview


N

Real-time trending in InTouch is done using the Trend Client. The Trend Client is a .NET control
which must be added to an Industrial Graphic. The functionality of the Trend Client includes real-
time plotting of tag data, and a backfill feature which leverages InTouch history. Backfill allows the
chart to be instantly filled with data while waiting for real-time information to be plotted.

Configure Real-Time Trending


o

After the .NET Trend Client has been embedded into a symbol, its animations are then configured
to determine the following:
 Pens
D

 Appearance
 Options
 Historical Sources

AVEVA™ Training
Section 1 – InTouch History and Real-Time Trending 6-5

Pens
The Pens animation allows you to add references to tags for plotting traces on the Trend Client
chart in real-time. Pen configuration induces a legend description, data range, width of the pen,
color of the pen, numerical formatting, and the historical source for backfill purposes.

y
op
C
T
O
You can connect a pen to an InTouch tagname using the tagname. You can also reference
tagname dotfields using tagname.EngUnits. You can browse InTouch tags on the InTouch
Browser tab in the Galaxy Browser. An ellipsis button is provided in the UI for each location
where a reference can be specified.
N

Use reference mode to specify a reference to an attribute or symbol property such as


Tank_001.PV. You can enclose static string values with double quotes (such as “Description:” or
“+Tank_001.Desc”) with or without references in Reference mode. When you are in Reference
mode, you can also click the ellipsis button to the right of the box to show a selection tool such as
the Galaxy Browser or the Tag Picker.
For analog tag values options such as Min, Max, and Units can be specified using InTouch
o

dotfields. Discrete tags, also named Boolean, do not have definitions for Min, Max, or EngUnits.
For these data types you must specify the configuration as a static value by changing the input
mode toggle switch to static text next to each field where a value will be entered.
D

AVEVA™ InTouch HMI 2020 R2


6-6 Module 6 – Data Logging and Trending

Configure Appearance and Options


The appearance and behavior of the Trend Client is determined by the Appearance and Options
settings. For example, you can change the background color or image used in the chart, you can
turn on a legend to display which pens are configured, or determine the rate at which the chart
updates real-time data.
 Single tag mode - hides all pens except the pen selected in the legend
 Background color - supports gradients, images, solid colors, textures, and so on
Border Color - configures the color of the border for the entire chart area

y

 Highlight pen - the currently selected pen turns bright yellow and double-think to stand
out among all of the pens on the chart
X time axis - specifies the time settings for the chart

op

 Y value axis - specifies the tag scale information on the chart

Create an InTouch History Connection


You can get data from InTouch .lgh files using the Historical Sources animation. Configure the file
path to the InTouch history data, which will be used to backfill traces on the chart when the chart is

C
initially displayed. This allows the chart to be useful without having to wait for real-time data to plot
across the entire timespan of the chart. If the chart remains on the screen long enough, eventually
real-time data will fill the entire chart, and replace the backfilled portions.
Once a historical source to InTouch history has been defined each pen that is added to the chart
must use this historical source to backfill its individual data.
T
O
N
o
D

AVEVA™ Training
Lab 15 – Logging Historical Data Using InTouch History 6-7

Lab 15 – Logging Historical Data Using


InTouch History

Introduction
In this lab, you will configure the application to begin historical logging. Then, you will configure the
tags that will log data. Next, you will create a window that will contain the historical trend wizards.

y
Then, you will test the window in runtime.

Objectives

op
Upon completion of this lab, you will be able to:
 Enable historical logging
 Configure a tag for log data
 Build a window using historical trend wizards

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-8 Module 6 – Data Logging and Trending

Enable Historical Logging


In the following steps, you will enable and configure historical logging properties. You will then
specify where the log files should be stored.
1. Close WindowViewer.
2. In the WindowMaker Tools pane, ensure Configure is expanded, and then double-click
Historical Logging.

y
op
C
The Historical Logging Properties dialog box appears.
3. Check the Enable Historical Logging check box.
T
O
N
o
D

AVEVA™ Training
Lab 15 – Logging Historical Data Using InTouch History 6-9

4. Select the Store Log Files in Specific Directory option, and enter C:\Training.

y
op
C
T
5. Click OK.
O
Configure Tags to Log Data
Next, you will add the log data feature to several tags.
6. In the Tagname Dictionary, select Mixer100_Agitator_PV.
N

7. Check the Log Data check box.


o
D

8. Click Save.
9. Repeat the previous steps to check the Log Data check box for the following tags:
 Mixer100_Level_PV
 Mixer100_Temperature_PV
10. Close the Tagname Dictionary.

AVEVA™ InTouch HMI 2020 R2


6-10 Module 6 – Data Logging and Trending

Build a Window with Historical Trend Wizards


Next, you will create a new window and use the wizard tool to add and configure three unique
Historical Trend wizards to the window.
11. On the WindowMaker File menu, select New Window from Template.
12. In the Template Window Browser, double-click Content_NonFrame.
13. Name the window InTouch_History.

y
op
14. Click OK.
C
T
15. Close the Mixer window.
16. In the Menu window, duplicate a button, and change the label to History.
O
N
o
D

AVEVA™ Training
Lab 15 – Logging Historical Data Using InTouch History 6-11

17. Change the Show Window animation link to show only the InTouch_History window.

y
op
Your screen will look similar to the following image.

C
T
O
N

18. On the toolbar, click the Wizards button.


o
D

AVEVA™ InTouch HMI 2020 R2


6-12 Module 6 – Data Logging and Trending

The Wizard Selection dialog box appears.


19. In the left pane, select Trends.
20. In the right pane, select Hist Trend w/Scooters and Scale.

y
op
C
T
21. Click OK.
22. Place Hist Trend w/Scooters and Scale in the top-left corner of the InTouch_History
window.
O
N
o
D

AVEVA™ Training
Lab 15 – Logging Historical Data Using InTouch History 6-13

23. Double-click Hist Trend w/Scooter and Scale to configure the trend.
The Historical Trend Chart Wizard dialog box appears.
24. Click Suggest.

y
op
C
The Hist Trend and Pen Scale fields update.
25. Click Pens.
The Trend Pens dialog box appears.
T
O
N
o

26. In the Pen 1 field, double-click the empty field.


A list of tags that have Log Data enabled appears.
D

AVEVA™ InTouch HMI 2020 R2


6-14 Module 6 – Data Logging and Trending

27. Select Mixer100_Agitator_PV.

y
op
28. Click OK.
29. Configure additional pens as follows:

Pen 2: Mixer100_Level_PV C
T
Pen 3: Mixer100_Temperature_PV
O
N
o
D

30. Click OK.


31. In the Historical Trend Chart Wizard, click OK.

AVEVA™ Training
Lab 15 – Logging Historical Data Using InTouch History 6-15

32. Click the Wizards button.


33. In the left pane, select Trends, and in the right pane, select Trend Zoom/Pan Panel.

y
op
34. Click OK. C
T
35. Place Trend Zoom/Pan Panel below Hist Trend w/Scooters and Scale.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-16 Module 6 – Data Logging and Trending

36. Double-click Trend Zoom/Pan Panel.


The Trend Panel Wizard dialog box appears.
37. Click Suggest.
The Hist Trend and Pan Minutes fields update.
38. Rename both tags by removing the 1 that was added.

y
op
C
The HistTrend tag is used to communicate between the wizards, therefore the tagname must
be the same.
T
O

39. Click OK.


N
o
D

AVEVA™ Training
Lab 15 – Logging Historical Data Using InTouch History 6-17

40. Reposition and resize the wizards to fit the height of the window.
Your screen will look similar to the following image.

y
op
41. Click the Wizards button.

C
42. Select Trends, and then select Trend Pen Legend.
T
O
N
o

43. Click OK.


D

AVEVA™ InTouch HMI 2020 R2


6-18 Module 6 – Data Logging and Trending

44. Place the Trend Pen Legend to the right of the chart.

y
op
45. Double-click Trend Pen Legend.

C
46. In the Trend Legend Wizard dialog box, click Suggest.
T
47. In the Hist Trend and Pen Scale fields, remove the 1 that was added.
O
N
o
D

The remaining settings for the first legend are already correct for the Pen Number 1
configuration.
48. Click OK.

AVEVA™ Training
Lab 15 – Logging Historical Data Using InTouch History 6-19

49. Duplicate the first legend, and place the duplicate below Pen Number 1.

y
50. Double-click the duplicate to configure the legend.

op
51. In the Pen Number field, enter 2.
52. In the Colors area, Trend Pen option, click the box to the right and select red.

C
T
O

53. Click OK.


N
o
D

AVEVA™ InTouch HMI 2020 R2


6-20 Module 6 – Data Logging and Trending

54. Duplicate the second legend, and place the duplicate below Pen Number 2.
55. Double-click the duplicate, and in the Pen Number field, enter 3.
56. In the Colors area, Trend Pen option, click the box to the right and select yellow.

y
op
57. Click OK.

C
The History window will look similar to the following image.
T
O
N
o
D

AVEVA™ Training
Lab 15 – Logging Historical Data Using InTouch History 6-21

Test What You Have Built


Finally, you will test the Trend Wizard functionality in runtime.
58. Click RUNTIME.

59. In the History window, wait 30 seconds and click the Update to Current Time button.

y
op
C
T
60. Slide the left scooter until it touches the left edge of the visible data in the chart.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-22 Module 6 – Data Logging and Trending

61. Click the Zoom In button.


The chart displays zoomed in.

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 15 – Logging Historical Data Using InTouch History 6-23

62. Slide the left scooter slowly to the right.


The legend values for each pen change as you drag the left scooter across the view, based on
the slider location.

y
op
C
T
The legend values on the right are based on the location of the right scooter. If a scooter
crosses an empty area of the chart where no traces are shown, the word Unavail will appear
instead of values.
O
N

63. Click Zoom In, or Zoom Out, to view different levels of detail.
o

64. Click Development!.


D

AVEVA™ InTouch HMI 2020 R2


6-24 Module 6 – Data Logging and Trending

Enable Log Data for Additional Mixer Tags


Next, to save time, you will import a .csv file to set Log Data for Mixers 200-400. This will enable
historical logging for tags that will be used in future labs in this course.
65. Close WindowViewer.
66. Close WindowMaker.
67. Open the AVEVA Application Manager.

y
68. Ensure the InTouch Training Application tile is selected and click the DBLoad button.

op
C
T
O

The Database Load dialog box appears.


N

69. Click Yes.


o
D

AVEVA™ Training
Lab 15 – Logging Historical Data Using InTouch History 6-25

The CSV File to Load From dialog box appears.


70. In the Files list, select LogDataForMixers.csv.

y
op
71. Click OK.
A Load successful message appears.

C
T
72. Click OK.
73. Double-click the InTouch Training Application tile to open WindowMaker.
O
The Windows to Open dialog box appears.
74. Click OK.
75. In WindowMaker, click RUNTIME.
This will ensure that data will continue to be logged.
N

76. Click Development!.

<End of Lab>
o
D

AVEVA™ InTouch HMI 2020 R2


6-26 Module 6 – Data Logging and Trending

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 16 – Trending Real-Time Data 6-27

Lab 16 – Trending Real-Time Data

Introduction
In this lab, you will create a real-time trend symbol and embed a .NET Trend Client control. You will
configure the Trend Client to display mixer tags in real-time. Additionally, you will connect the
Trend Client to InTouch history to backfill the chart from historical data.

y
Objectives
Upon completion of this lab, you will be able to:

op
 Use a Trend Client to display real time production data
 Configure a Trend Client to display mixer process tags
 Backfill a Trend Client with InTouch historical data

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-28 Module 6 – Data Logging and Trending

Build a Real-Time Window


In the following steps, you will create a real-time window.
1. In WindowMaker, on the File menu, select New Window from Template.
2. In the Template Window Browser, double-click Content_Frame.
3. Name the window RealTime.

y
op
4. Click OK.
5. Close the InTouch_History window.
C
T
6. In the Menu window, add a duplicate navigation button labeled RealTime, with an animation
link to show only the RealTime window.
O
N
o
D

AVEVA™ Training
Lab 16 – Trending Real-Time Data 6-29

Create the Trend Client Symbol


7. In the Industrial Graphic Toolbox, the Training toolset, create a new symbol named
Realtime, and open it for editing.

8. In the Tools pane, select the TrendClient tool.

y
op
9. Click the canvas to place the element.
10. Name the element Realtime.

C
11. Double-click Realtime to edit the animations.
12. In the Animations pane, select Historical Sources.
T
O

13. In the top-right corner of the Historical Sources animations pane, click the Add Row
N

button.
o
D

AVEVA™ InTouch HMI 2020 R2


6-30 Module 6 – Data Logging and Trending

14. At the bottom of the Historical Sources animations pane, select the
InTouch Log History/LGH option.
15. In the Name field, enter InTouchHistory.
16. In the UNC Path field, enter C:\Training.

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 16 – Trending Real-Time Data 6-31

Next, you will add one discrete InTouch tag pen and one analog InTouch tag pen to the Trend
Client.
17. In the Animations pane, select the Pens animation.

y
op
18. In the Pens animations pane, click the Add Row button.
19. In the Pen Name field, enter Level.
20. In the Expression or Reference field, enter Mixer100_Level_PV.

C
T
21. In the Pen Details area, ensure that the Description field is set to the 'Static Text' mode,
as shown below.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-32 Module 6 – Data Logging and Trending

22. In the Description field, enter Level.

23. In the Units field, switch to Expression or Reference mode, and enter
Mixer100_Level_PV.EngUnits.

y
op
24. In the Min field, switch to Expression or Reference mode, and enter
Mixer100_Level_PV.MinEU.

C
25. In the Max field, switch to Expression or Reference mode, and enter
Mixer100_Level_PV.MaxEU.
T
26. In the Pen Options area, change the color to bright green.
O
27. Change the Width to 2.
N
o
D

28. In the Pen Options area, retain the default settings for all other options.

29. In the Historical area, ensure Source is 'Static Text' mode, and enter InTouchHistory.
30. Ensure Tag is 'Static Text' mode, and enter Mixer100_Level_PV.

AVEVA™ Training
Lab 16 – Trending Real-Time Data 6-33

31. Add another pen to the Pens animation, and configure it as follows:

Pen Name: Agitator


Expression or Reference: Mixer100_Agitator_PV
Pen Details
Description: Agitator
Units: <blank>

y
Min: 0
Max: 1

op
Note: Discrete InTouch tags, such as the Mixer100_Agitator_PV, do not have Engineering
Units. To display a clean square waveform on the Trend Client that fills the full height of the
chart, you will provide static values of 0 for Min and 1 for Max.

Pen Options
Color: Bright Red

C
Width: 2
Historical
Source: InTouchHistory
Tag: Mixer100_Agitator_PV
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-34 Module 6 – Data Logging and Trending

32. In the Animations pane, select Appearance.

y
33. In the Appearance animations pane, change the Background color to black.

op
34. Change Highlight color to white.
35. Change Width to 3.
36. In the Style drop-down list, select the last option.

C
T
O
N
o
D

AVEVA™ Training
Lab 16 – Trending Real-Time Data 6-35

37. In the Animations pane, select Options.

y
38. In the Options animations pane, check the Show pen selector check box.

op
C
T
O
N

39. Click OK.


o
D

AVEVA™ InTouch HMI 2020 R2


6-36 Module 6 – Data Logging and Trending

The Realtime symbol will look similar to the following image.

y
op
40. Save and close Realtime.
C
T
41. In WindowMaker, embed the Realtime symbol in the RealTime window.
42. In the Properties pane, set the MaintainAspectRatio property to False.
O
N
o
D

AVEVA™ Training
Lab 16 – Trending Real-Time Data 6-37

Test What You Have Built


Finally, you will test the RealTime window you just built.
43. Click RUNTIME.
The chart is backfilled immediately with InTouch history and begins scrolling toward the left as
new real-time tag data is plotted.

y
op
C
The Agitator pen is selected by default in the pen selector (legend). The Allow highlight pen
option that was selected in the Appearance animation makes the Agitator pen a thick white
line on the trend.
T
44. Select the Level pen.
O
N
o

Notice in the rising slope of the level at 60% full, a small, flat line indicating the moment when
ingredient 1 and ingredient 2 are transitioning. During this 4-second window, the level remains
steady in the mixer. You can also see the agitator only runs when the mixer is full.
D

45. Click Development!.


46. In WindowMaker, close the RealTime window.

<End of Lab>

AVEVA™ InTouch HMI 2020 R2


6-38 Module 6 – Data Logging and Trending

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 2 – Using Historian with InTouch 6-39

Section 2 – Using Historian with InTouch


This section will explain how to import tags into Historian Server using the Tag Importer Wizard in
the ArchestrA System Management Console. The section will go on to describe how to build a
Historian Client Trend display in InTouch.

Overview of Historian Server

y
Historian Server is a real-time process historian. Historian Server extends the functionality of
Microsoft SQL Server, increasing acquisition speed, reducing storage volume, and extending time
series query functionality. Historian Server bridges the gap between a real-time high-volume plant
monitoring environment and an open, flexible business information environment.

op
Historian Server acquires plant data from high-speed I/O, DA, and OI Servers, as well as InTouch,
Application Server, and intelligent devices. Historian Server compresses and stores data in real-
time and responds to requests for this data.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-40 Module 6 – Data Logging and Trending

Relational Databases and Historian Server


In a Relational Database Management System (RDBMS) information is stored in multiple tables
that are related or linked together. Data can be inserted (written) and selected (read) from an
RDBMS using Structured Query Language (SQL), the language used to communicate with
relational databases.
Historian Server is a real-time process historian which is tightly coupled to Microsoft SQL Server
so it can leverage all of the features of Microsoft SQL Server. These features include database
security, replication, backups, and compatibility with most SQL utilities and tools. When using SQL

y
or other tools to work with Historian Server the Historian data is presented and accessible as
though it were an actual database in order to maximize compatibility and support.
Historian Server configuration data is relatively static and does not change at a real-time rate.

op
Over the life of the server, configuration changes such as adding and deleting tags, changing
descriptions, altering engineering ranges, and modifying storage details. To contain this static
data, Historian Server uses a Microsoft SQL Server database, named the Runtime database, to
store configuration information.

Limitations of Relational Databases

C
Though MSSQL supports high-throughput and time-series data there are significant differences
between a typical database management system and Historian Server as a real-time process
historian. Typical relational databases are not viable solutions for storing plant data because of the
following limitations:
 They cannot handle the volume of data produced by plants
T
 They cannot handle the storage rate of plant data
 SQL does not effectively handle time-series data
Consider a plant with 60,000 tags changing every second or faster. That means that a minimum of
60,000 rows of data must be inserted into the database each second, or risk misrepresenting the
O
real-time history of what happened in the plant. Such a transaction rate is not sustainable using
SQL Server.
It is not merely a matter of having enough storage space to hold that much data; it is often a
requirement that historical data be robustly protected, which multiplies the amount of storage
N

required for backups and mirroring. Some industries impose mandatory regulations to maintain
several years’ worth of data, which further magnifies the overall storage requirements.
Time series data is ordered by time, and most historian data only represents samples from a
continuum of real data where not all data is of equal significance. Consider the following examples
which would fail when using SQL Server by itself:
If an instrument reports a value time stamped at 7:59:58.603 and a user queries the
o


relational database for the value at 8:00:00.000, no data will be returned because there
are no records stored for precisely that time. A relational database does not recognize a
time continuum.
D

 If a temperature was 21.0º C and two minutes later was 23.0º C, a relational database has
no inherent ability to infer that halfway between these two samples the temperature was
approximately 22.0º C. The relational database will return a null result.
Historian Server solves all of these problems inherent with SQL Server.

AVEVA™ Training
Section 2 – Using Historian with InTouch 6-41

Managing Historian Server with SMC


The System Platform Management Console uses the Management Console and Configuration
Editor nodes for a Historian Server.
The Management Console, Status section shows if the server is running, which modules are
running, when the server was started, the number of licensed tags, and a log of events.

y
op
Enable Storage to Historian
The Historian Client Access is a native component of InTouch HMI. This allows WindowViewer

C
to push historical data to Historian. This feature, called Enable Storage to Historian, is configured
in the Historical Logging Properties dialog box. This feature is used instead of importing tags
from configuration editor in the SMC using the Import Tags wizard. There are two considerations
when using Enable Storage to Historian instead of the Import Tags wizard.
The first consideration is that Enable Storage to Historian requires WindowViewer to run
uninterrupted in order to continuously provide data to the Historian. In contrast, Import Tags wizard
T
detects I/O sources external to WindowViewer when importing the tagname.x file. This allows
Historian to read data directly from I/O sources bypassing WindowViewer. In this way,
WindowViewer could close and Historian would still have access to the data sources external to
WindowViewer. The Enable Storage to Historian gets all of its data from WindowViewer, even the
O
data sources external to WindowViewer. Therefore, if WindowViewer closes, there will be gaps in
the historical data record during this downtime.
The second consideration is Message tags in WindowViewer are not recorded in Historian when
using the Enable Storage to Historian feature. In contrast, the Import Tags wizard will record string
N

data.
o
D

AVEVA™ InTouch HMI 2020 R2


6-42 Module 6 – Data Logging and Trending

y
op
C
T
O
Configuration Options for Enable Storage to Historian
From the Historical Logging Properties dialog box, the Enable Storage to Historian feature can be
enabled. The name of the historian must be specified in the Historian node name box, either type
the node name of the computer running the Historian server or specify the IP address and if the
N

server is installed on the same machine you can use ‘localhost’. Only the following special
characters are allowed; period (.), underscore (_) and hyphen (-).
Enable Storage to Historian feature will push location information to the Historian for History store
forward. To do this, the path for the storage location may be entered in the History store forward
directory field. The files stored in this location will allow the historical data to stored temporarily if
the connection to the Historian server is lost. After the connection is established, the Historian
o

server will sync with the files from this store forward directory and preserve all information.
Additional configuration settings are available from the Advanced Settings button in the dialog box.
Consult help documentation for additional information.
D

The settings provide a way to handle multiple instances of WindowViewer to store to Historian. To
accommodate similarities between InTouch applications, configuration options are provided in
order to deal with tag naming conflicts. By using the Always affix unique string option you can
choose to add a prefix or suffix to each tagname. A best practice would be to use the node name
or location name of each instance of WindowViewer as the prefix or suffix of each tagname to
make all the tags in Historian unique. It is particularly important when dealing with the built-in
System tags in WindowViewer as every instance of WindowViewer has the same 34 built-in
System tags.

AVEVA™ Training
Section 2 – Using Historian with InTouch 6-43

To record alarms and events in the history blocks, enable the Log Alarms and Events. At runtime,
WindowViewer will start an application called ArchestrA Historian Alarm Publisher
(aahAlarmPublisher.exe). This application monitors alarms and events that have been configured
for any tag and records both alarms and events in history blocks. This method of storage uses
HCAL for historian. InTouch HMI 2020 R2 leverages WWALMDB for storage and retrieval using
the Alarm DB Logger and does not show the use of history blocks for retrieval in the Historical
Alarm Client.

Importing InTouch Tags Using the Configuration Editor

y
Though this feature is not covered in this course, the Import Tags feature of the Configuration
Editor is used to create tags from an InTouch Tagname Dictionary file, Tagname.x. Imported tags

op
will then be recorded by Historian Server. Importing a tagname database eliminates the need to
manually configure I/O Server and tag definitions for both the InTouch HMI software and the
historian. Information in the tagname database is automatically mapped to the appropriate tables
within the historian Runtime database as part of the import process.
You can import tagname databases from multiple InTouch nodes, but you can only import one
application from each node. The name of the node becomes part of the definition and the
namespace must be unique.

C
To perform an import, you must have administrative permission in Microsoft SQL Server. The SMC
uses this authentication while working with Configuration Editor. Use the Configuration Editor to
import tag definitions and afterwards commit these changes to the Historian Server, and then the
historian acquires data for these tags.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-44 Module 6 – Data Logging and Trending

y
op
C
T
O
Historian Client Trend
Historian Client Trend is a client application that enables you to query tags from a Historian
database and plot them on a graphical display. Trend supports two different chart types: a regular
trend curve and an XY scatter plot.
N

After you add tags to a trend chart, you can manipulate the display in a variety of ways, including
panning, zooming, and scaling. You can customize any trend by configuring display options and
set general options for use with all trends.
Before Trend can be used to query tag information from the database, the server must be running
and you must have security access.
o

Importing DLLs in WindowMaker


The trend tool has both a stand-alone application and a control that can be embedded in a window
D

in InTouch. To use this control the Historian Client must be installed and licensed. This includes the
files needed to manage this control in InTouch.
The DLL named aaHistClientTrend is a control that provides essential interactive functionality of
the Historian Client Trend for use in container applications, such InTouch. In InTouch, you can
select this control within WindowMaker when you create your runtime graphical user interface.
This DLL is installed automatically when you install Historian Client.

AVEVA™ Training
Section 2 – Using Historian with InTouch 6-45

Using the Trend in InTouch


When using Historian Client Trend in InTouch runtime, the user interface supports simple drag,
drop, and click operations which an InTouch user can use to analyze their plant data. For example,
tags can be dragged from the Tag Picker into the chart to instantly display historical information for
that tag. The toolbars then allow pan, zoom, and scaling of the tag data.
The Historian Client Trend allows for both historical analysis and real-time data plotting. By clicking
the Live Mode button you can put the trend in continuous scroll mode. This allows you to play back
plant history at any point in time or plot real-time data coming from these tags. In this way the

y
Historian Client Trend supports both historical and real-time data plots.

op
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-46 Module 6 – Data Logging and Trending

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 17 – Building a Historian Client Trend Display 6-47

Lab 17 – Building a Historian Client Trend


Display

Introduction
In this lab, you will enable storage to Historian and use the Historian Client Trend .NET control to
create a display for tag data from Historian Server in a trend chart.

y
Objectives

op
Upon completion of this lab, you will be able to:
 Enable Storage to Historian
 Use the Historian Client Trend .NET control in InTouch
 Import a .NET client control library file using WindowMaker
 Use Live Mode to continuously refresh the trend with current data

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-48 Module 6 – Data Logging and Trending

Enable Storage to Historian


In the following steps, you will enable storage to Historian.
1. Close WindowViewer.
2. In WindowMaker, in the Tools pane, ensure Configure is expanded and double-click
Historical Logging.

y
op
C
The Historical Logging Properties dialog box appears.
T
O
N
o
D

AVEVA™ Training
Lab 17 – Building a Historian Client Trend Display 6-49

3. In the Historical Logging Properties dialog box, check Enable Storage to Historian.
4. In the Historian node name field, enter the name of your Historian Server (Engineering
node).

Note: Your instructor will provide the name of your Historian Server (Engineering node).

5. Check Log Alarms and Events.

y
op
C
T
O
N

6. Click OK.
o
D

AVEVA™ InTouch HMI 2020 R2


6-50 Module 6 – Data Logging and Trending

Import the Historian Client Trend .NET Control


In the following steps, you will import the Historian Client Trend .NET control into WindowMaker.
7. On the File menu, select Import | Client Control.

y
op
C
T
8. Navigate to C:\Program Files (x86)\Common Files\ArchestrA, scroll down, and click
aaHistClientTrendControl.dll.
O
N
o
D

AVEVA™ Training
Lab 17 – Building a Historian Client Trend Display 6-51

9. Click Open to begin the import process.


The Import Client Controls dialog box appears.

y
After a moment, the import is completed.

op
C
10. Click Close.
The aaTrendControl has been imported into the Industrial Graphic Toolbox.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-52 Module 6 – Data Logging and Trending

Create the Trend Symbol


Next, you will create a new Trend symbol.
11. In the Training toolset, create a new symbol named Trend, and open it for editing.
12. In a blank space on the canvas, right-click and select Embed Industrial Graphic.
13. In the Galaxy Browser, ensure the top most InTouch Training Application node is selected.
14. Select the aaTrendControl.

y
op
C
15. Click OK.
16. Click on the canvas to place the control.
The new control appears.
T
O
N
o
D

17. Save and close the symbol.

AVEVA™ Training
Lab 17 – Building a Historian Client Trend Display 6-53

Create the Trend Window


Next, you will create a new window and embed the Trend symbol in the window.
18. In WindowMaker, on the File menu, select New Window from Template.
19. In the Template Window Browser, double-click Content_Frame.
20. Name the window Trend.

y
op
21. Click OK.
The Trend window appears.
C
T
22. Embed the Trend symbol in the Trend window.
23. In the Properties pane, set the MaintainAspectRatio to False.
O
N
o
D

24. In the Menu window, add a Trend navigation button.

AVEVA™ InTouch HMI 2020 R2


6-54 Module 6 – Data Logging and Trending

Test in Runtime
Next, you will view the historian tag data in the trend in runtime.
25. Click RUNTIME.
The Trend window appears with an empty chart.

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 17 – Building a Historian Client Trend Display 6-55

Connect to Historian Server


The first time you use the Trend control you must specify connection information. The Historian
Client maintains an active connection with the Historian Server. When the Trend window closes
and reopens, the Trend control will automatically reconnect to the Historian Server. Next, you will
connect to Historian Server.
26. In the Trend window, click the Configure the servers button.

y
op
The Server List Configuration dialog box appears.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-56 Module 6 – Data Logging and Trending

27. In the Server field, enter the name of your Historian Server (Engineering node).

Note: Your instructor will provide the name of your Historian Server (Engineering node).

y
op
C
T
O
28. In the Login area, ensure Windows Integrated is selected.
In the training classroom, your Windows login is used to connect as an administrator of
Microsoft SQL Server.
N

Note: If special instructions are required, your instructor will provide this information.

29. Click Add.


o
D

AVEVA™ Training
Lab 17 – Building a Historian Client Trend Display 6-57

The Server list displays your Historian Server (Engineering node) name. The font face will be
normal text if a successful connection was made to your Historian Server. The font will be
italicized if trend was unable to connect successfully to your Historian Server.

y
op
C
T
30. Click Close.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-58 Module 6 – Data Logging and Trending

31. In the Tag Picker, Servers list, select the Historian Server (Engineering node) name.
The list of tags available from the Historian Server appears in the Tags list.

y
op
C
32. In the Tag Picker, select Mixer100_Agitator_PV, Mixer100_Level_PV, and
T
Mixer100_Temperature_PV.
O
N
o
D

AVEVA™ Training
Lab 17 – Building a Historian Client Trend Display 6-59

33. In the Tag Picker, drag the following tags onto the chart.
 Mixer100_Agitator_PV
 Mixer100_Level_PV
 Mixer100_Temperature_PV
All three tags are now plotted on the chart.

y
op
Manipulate Time Duration

C
Next, you will manipulate the trend by changing the Duration of the data displayed.
T
34. On the Time toolbar, Duration drop-down list, select 1 hour.
O
N
o

The trend chart updates to display the 1-hour time span. Because you only started
WindowViewer a minute ago, the majority of the chart will be empty.
D

35. On the Duration drop-down list, click 1-minute.


The trend chart updates to display the 1 minute time span.

AVEVA™ InTouch HMI 2020 R2


6-60 Module 6 – Data Logging and Trending

Enable Live Mode


Finally, you will view trend data in one second intervals.
36. Click the Enable or disable live or replay mode button.

y
The trend chart begins scrolling in one second intervals.

op
37. Click Development!.
38. In WindowMaker, close the Trend window.

<End of Lab>

C
T
O
N
o
D

AVEVA™ Training
Section 3 – Trend Pen 6-61

Section 3 – Trend Pen


This section will introduce Trend Pen, including type of trend plots, Trend Pen time periods,
historical data retrieval using Trend Pen and the difference between Single Pen and Multipen.

Trend Pen Overview


A trend line gives operators a quick visual snapshot of a process value over a defined period. A

y
Trend Pen shows a succession of process values as a trend line consisting of current and
historical data updated at a minimum of one second intervals.

op
Understanding the Types of Trend Plots
You can configure two types of Trend Pen plots. A Line plot draws a line between each successive
data point during the trend period.

C
A Step Line plot draws a horizontal line from a trend data point to the time of the next point on the
T
trend’s X-axis, and then draws a vertical line to the data point. A Step Line plot is the default for a
Trend Pen.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-62 Module 6 – Data Logging and Trending

Understanding the Types of Trend Pen Periods


A trend time period is the interval of process values shown on the X-axis of the trend during run
time, which consists of a start time, end time, and a duration.
You can configure two types of Trend Pen periods.
 Moving time period In a Moving trend period, the start time of a trend period is the current
time. The end time is the duration of the time period from the start time.
End Time = Start Time + Time Period
Fixed time period

y

In a Fixed trend period, the start time is initially the current time. The start time of a trend
period does not change automatically and can be specified by a script using the StartTime
property.

op
The end time of a Fixed trend period is set by the duration of the trend from the specified
start time of the period. The EndTime property is read only.
End Time = Start Time + Time Period

Understanding Trend Pen Historical Data Retrieval


When a Trend Pen first loads into WindowViewer it begins plotting in real-time. Simultaneously, if

C
configured for historical retrieval it will backfill the Trend Pen with historical data.
The following procedure shows the steps to configure a Trend Pen. Typically, configuring a Trend
Pen includes several steps to place the Trend Pen next to a meter symbol to visually indicate the
Trend Pen plot shows the changes in the symbol’s process value over time.
The horizontal and vertical boundaries of the Trend Pen graphic rectangle represent the
T
drawing area of Trend Pen plot during run time. The horizontal axis of the graphic rectangle
represents the time period of the trend. The vertical axis represents the range of the trend’s
possible values.
O
N

The Trend Pen dialog box appears when the mouse key is released. You can also show the Trend
Pen dialog box by double-clicking on the Trend Pen graphic or selecting Edit Animations from
the Special menu.
o

Reference Field
The reference is the data source that appears as the value shown by the trend, which can be
an external reference like an object’s attribute, an InTouch analog tag value, or a custom
D

property. Constants and expressions are not allowed.


Auto-Detect
The Historian server is auto-detected from the AppEngine on which the reference attribute is
running. For example, if the Reference field is set to UDO.UDA1, then Auto-Detect is set to
the Historian server name configured for the AppEngine on which UDO is running.

AVEVA™ Training
Section 3 – Trend Pen 6-63

Expression
When an expression or reference is entered in the Server Name field, the Trend Pen connects
to the specified Historian Server.
The icon to the left of the Server Name field toggles input to the field as an expression or
Static Text mode.
A Trend Pen only shows live data if the Server Name field is left blank in Expression mode.
Moving

y
The start time of a trend period is the current time. The end time is the duration of the time
period from the start time. The start time for the next period is set to the end time of the
previous trend period.

op
Fixed
In a Fixed trend time period, the StartTime and EndTime properties do not change
automatically. The start time of a trend period is the current time initially. The StartTime
property can be changed by a script.
The EndTime property of a Fixed trend period is read only. The end time of a trend period is
the duration of the trend from the specified start time of the period.

C
Duration (Minutes) Field
The trend time period can be specified as a constant, an external reference, an expression, or
custom property. If a floating point number is entered, the period is rounded up to the nearest
minute.
The minimum trend period is 1 minute and the maximum period is 10080 minutes (1week).
T
Auto-Range or Clip out of Range Values
If Auto-Range is selected, the Min Range and Max Range fields are disabled. The Y-axis of
the trend line is automatically adjusted to show the full range of trend values within the upper
O
and lower boundaries of the Trend Pen graphic.
If Clip out of Range Values is selected, the Min Range and Max Range fields are enabled.
Min Range and Max Range set the lower and upper limits of the trend’s Y-axis value range.
Both fields can be set to constants, external references, or custom properties.
N

When a value exceeds the trend’s minimum or maximum limits using Clip out of Range
Values, the trend line is truncated at the limit of the value range and appears as a horizontal
line for the period when the process value is out of trend’s value range.
Plot Type
Step Line: A plot draws a horizontal line from a trend data point to the time of the next data
o

point on the trend’s X-axis, and then draws a vertical line to the data point.
Line: A plot draws a line directly to each successive point within the trend period.
D

AVEVA™ InTouch HMI 2020 R2


6-64 Module 6 – Data Logging and Trending

SA_Trend_SinglePen Symbol
The SA_Trend_SinglePen symbol shows a single measured value as a trend line over a specified
period. The symbol includes a Type Wizard Option to show a trend line as a Tail trend by itself
without a trend client area or as a Simple trend that includes more visual elements.

y
op
C
T
O
N

The symbol includes a set of run time controls to show additional data about the measured value
in a floating tooltip or along the Y axis of the trend. Operators can also change the length of the
trend period while the application is running by selecting another trend period from a control.
The symbol includes a Wizard Option to insert a meter at either side of the trend with the trend line
showing a meter's measured value over the trend period. The trend can show the typical symbol
components of meter symbols with an optimal value range, a setpoint, and tracker line shown in
o

the trend client area. The meter is similar to the general purpose SA_Meters symbol with an option
to select from eight different types of meters.
D

AVEVA™ Training
Section 3 – Trend Pen 6-65

SA_Trend_MultiPen Symbol
The SA_Trend_MultiPen symbol supports up to four concurrent trend lines that show measured
values over a specified trend period. The symbol provides Wizard Options to change the trend plot
type, the mode of the trend period, and how trend lines are drawn when their measured values
exceed the range shown on the Y axis of the trend grid.
The symbol can show real time and historical data when the trend pens are set to reference
InTouch tags. The trend can only show real-time data when the pens are set to InTouch tags.
The symbol includes a set of run time controls for operators to select a pen to show additional data

y
about its measured value in a floating tooltip or along the Y axis of the trend. Operators can also
change the length of the trend period while the application is running by selecting another trend
period from a control.

op
C
T
O
N
o

Each pen appears as a graphic square in a pen selector panel above the trend grid. The border
color of each pen square matches the color of the pen line shown in the trend. When a pen's
D

measured value goes into an alarm state, Alarm Border animation appears around the pen
square.

AVEVA™ InTouch HMI 2020 R2


6-66 Module 6 – Data Logging and Trending

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 18 – Trending with Trend Pen 6-67

Lab 18 – Trending with Trend Pen

Introduction
In this lab, you will create a Trend Pen element to show the recent history from a field device.

Objectives

y
Upon completion of this lab, you will be able to:
 Use the Trend Pen element to display historical data

op
 Use the FillTrend color option for the Trend Pen
 Use fixed width and height for a symbol

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-68 Module 6 – Data Logging and Trending

Prepare the Mixer Symbol for the Trend Pen


You will now modify the Mixer symbol to create room for the Trend Pen.
1. In WindowMaker, in the Industrial Graphic Toolbox, open the Mixer symbol for editing.
2. In the Symbol Editor, Elements list, select Tank.
3. In the Properties pane, adjust the Width property to 500.

y
op
4. Ensure Snap to Grid is enabled.
C
T
O
N
o
D

AVEVA™ Training
Lab 18 – Trending with Trend Pen 6-69

5. On the canvas, select the Temperature element.


6. Move the Temperature element to the right side of the tank.

y
op
C
The Temperature meter is now positioned on the right side of the tank.
7. In the Elements list, with Temperature selected, hold down the Ctrl key and click on Level
and Agitator to add them to the selection.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-70 Module 6 – Data Logging and Trending

8. With the Temperature, Level and Agitator elements selected, on the toolbar, click Make
Horizontal Spacing Equal.

y
op
C
9. Right-click the canvas and click Select All.
10. With all elements selected, use the arrow keys to move the graphics to the top-left corner of
the canvas, leaving one blank grid space on the left and top of the canvas.
T
O
N
o

11. Click on a blank space on the canvas to select the canvas.


12. In the Properties pane, Size property, select Fixed.
D

AVEVA™ Training
Lab 18 – Trending with Trend Pen 6-71

The canvas is resized to the fixed width and height, and handles appear for resizing.

y
op
C
T
13. Drag to resize the canvas to provide one blank grid space on the bottom and right side of the
symbol.
O
N
o
D

The canvas size determines how much white space is included with the symbol to maintain its
aspect ratio in frame windows and at runtime. This helps when displaying a symbol with a
different shape than the frame window hosting it.

AVEVA™ InTouch HMI 2020 R2


6-72 Module 6 – Data Logging and Trending

Create Custom Properties for Temperature and Level


Next, you will create custom properties for Temperature and Level so these can be assigned
different mixer temperatures and levels in later labs.
14. Right-click the canvas and select Custom Properties and create the following:

Data
Name Default Value Visibility
Type

y
LevelPen_Max Float Mixer100_Level_PV.MaxEU Public
LevelPen_Min Float Mixer100_Level_PV.MinEU Public
LevelPen_PV Float Mixer100_Level_PV Public

op
TempPen_Max Float Mixer100_Temperature_PV.MaxEU Public
TempPen_Min Float Mixer100_Temperature_PV.MinEU Public
TempPen_PV Float Mixer100_Temperature_PV Public

C
T
15. Click OK.
O
N
o
D

AVEVA™ Training
Lab 18 – Trending with Trend Pen 6-73

Add a Trend Pen to the Temperature Meter for InTouch History


Next, you will add a Trend Pen to compliment the Temperature meter. The Trend Pen will be
configured to backfill using InTouch historical data from LGH files.
16. In the Symbol Editor, in the Zoom drop-down list, select 300%.

y
op
17. In the Tools pane, click Trend Pen.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-74 Module 6 – Data Logging and Trending

18. In the space between Level and Temperature, click and drag to the right and down to draw a
trend pen on the canvas.

y
op
Upon release of the mouse, the Edit Animations dialog box opens with the Trend Pen

C
animation showing. T
O
N
o
D

AVEVA™ Training
Lab 18 – Trending with Trend Pen 6-75

19. In the Trend Pen details pane, enter the details as follows:

Details Value
Reference TempPen_PV
Historical Source InTouch Log History/LGH
UNC Path C:\Training
Time Period Moving
Duration 5

y
Y Axis Range Clip out of range values
Min Range TempPen_Min
Max Range TempPen_Max

op
Plot Type Line

C
T
O
N

20. Click OK to close the Edit Animations dialog box.


o
D

AVEVA™ InTouch HMI 2020 R2


6-76 Module 6 – Data Logging and Trending

21. Name the Trend Pen element TempPen.


22. With TempPen selected, in the Properties pane, set the Width to 150 and Height to 130.
23. Align TempPen with the Temperature element as shown.

Note: If necessary, disable Snap to Grid to accurately align the Trend Pen.

y
op
C
T
24. In the Properties pane, Fill Style area, set FillTrend to True.
25. In the Properties pane, Fill Style area, click FillColor then click the ellipsis button to open the
O
Select FillColor dialog box.
N
o
D

AVEVA™ Training
Lab 18 – Trending with Trend Pen 6-77

26. In the Select FillColor dialog box, click Color Picker .

y
op
C
27. With the eye dropper cursor, click on the denim color element style of the temperature symbol.
T
O
N
o
D

The FillColor under the trend pen turns to denim.

AVEVA™ InTouch HMI 2020 R2


6-78 Module 6 – Data Logging and Trending

28. Using the color intensity bar, click and drag to select a lighter shade of denim for the FillColor.

y
op
C
29. Click OK to close the Select FillColor dialog box.
T
30. With the TempPen selected, click Send to Back on the toolbar.
O
N

Add a Trend Pen to the Level Meter for Historian Data


Next, you will add a Trend Pen to compliment the Level Meter. The Trend Pen will be configured to
backfill using Historian data.
o

31. In the Tools pane, click Trend Pen.


D

AVEVA™ Training
Lab 18 – Trending with Trend Pen 6-79

32. In the space between Agitator and Level, click and drag to the right and down to draw a trend
pen on the canvas.

y
op
C
Upon release of the mouse, the Edit Animations dialog box opens with the Trend Pen
animation showing.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-80 Module 6 – Data Logging and Trending

33. In the Trend Pen details pane, enter the details as follows:

Details Value
Reference LevelPen_PV
Historical Source Historian
Historian Expression
Server Name <Historian Node Name>
(Instructor will provide)

y
Time Period Moving
Duration 5
Y Axis Range Clip out of range values

op
Min Range LevelPen_Min
Max Range LevelPen_Max
Plot Type Line

C
T
O
N
o

34. Click OK to close the Edit Animations dialog box.


D

AVEVA™ Training
Lab 18 – Trending with Trend Pen 6-81

35. Name the Trend Pen element LevelPen.


36. With LevelPen selected, in the Properties pane, set the Width to 130 and Height to 130.
37. Align LevelPen with the Level element as shown.

y
op
C
38. On the toolbar, click Zoom to Normal.
T
39. Save and close the Mixer symbol.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


6-82 Module 6 – Data Logging and Trending

Test in Runtime
Next, you will test the Trend Pen in runtime.
40. In WindowMaker, open the Mixer window.
41. Click RUNTIME.
The trends will backfill and display the last five minutes of data, and then continuously plot in
real time.

y
op
C
T
42. Click Development!.
O
<End of Lab>
N
o
D

AVEVA™ Training
y
op
C
Module 7 – Introduction to QuickScript
T
Section 1 – Introduction to InTouch QuickScript 7-3
Lab 19 – Opening an Application with QuickScript 7-17
O
N
o
D
7-2 Module 7 – Introduction to QuickScript

Module Objectives
 Introduce QuickScript
 Describe InTouch scripting

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – Introduction to InTouch QuickScript 7-3

Section 1 – Introduction to InTouch QuickScript

This section will provide an overview of the various InTouch QuickScript types, and describe the
features and functions that are unique to each QuickScript type. This section will also explain the
QuickScript Editor.

QuickScript

y
QuickScript is the name of the script language, and functionality used in the InTouch environment.
The actual script language is very similar to PLC languages like IEC611-31 and Structured Text.
InTouch QuickScript capabilities allow you to execute commands and logical operations based on

op
specified criteria being met. All InTouch QuickScripts are event driven, such as a data change, a
condition, a mouse click, or a timer. You can add conditional statements, loops, and local variables
to the basic scripts to create complex effects in your application.
QuickScript types include the following:
 Application – Scripts linked to the entire application
 Window – Scripts linked to a specific window

C
 Key – Scripts linked to a specific key or key combination on the keyboard
 Action – Scripts associated with an object linked to a Touch Link - Touch Pushbutton -
Action animation link
 Data Change – Scripts linked to a tagname and/or tagname.field only
 Condition – Scripts linked to a discrete tagname or expression
T
 ActiveX Event – Scripts that execute ActiveX control events in runtime
 QuickFunctions – Scripts you create that can be named from other InTouch QuickScripts
using CALL FunctionName(); or inside animation link expressions. QuickFunctions can
be either synchronous or asynchronous, while all other script types are synchronous only
O

Specific functions already configured to the proper syntax and format, are available from the script
dialog box and can be pasted with a single mouse click. Additional information about scripting
concepts and about creating and editing scripts is available in the application Help and in the
InTouch HMI Scripting and Logic Guide, available within your local installation of InTouch.
N

You can configure most script types to execute based on multiple conditions using script triggers.
For example, you can define a script to run when WindowViewer is started, and then periodically at
fixed intervals while WindowViewer is running. Each script type has one or more triggers.
The order in which scripts are processed is based on a complex set of variables as the InTouch
WindowViewer application’s QuickScript engine is not scan based, therefore, the order of
execution cannot be guaranteed. When using QuickScript, avoid building script dependencies
o

based on any perceived sequence, the sequence can change as well based on criteria beyond the
control of application designers.
For all InTouch While scripts (repeating at specified interval), the script will not execute the first
D

time until the period has elapsed. Additionally, InTouch is not based on a scan engine with
guaranteed interval, so the only guarantee is that the script will NOT execute faster than the
interval specified. Finally, WindowViewer will make every attempt possible to run scripts as fast as
the specified time, however, no script can run faster than the Tick Interval setting specified in
WindowViewer properties.

AVEVA™ InTouch HMI 2020 R2


7-4 Module 7 – Introduction to QuickScript

Global Scripts
The scope of execution (where the script lives) determines when or even if data from those scripts
tags or functions is available throughout the application. Global scope means no matter where an
operator has navigated within the application, these scripts continue executing in the background,
as needed, and make their results continuously available. Global scope script types are limited to
Application scripts, Data Change scripts, Condition scripts, Key scripts, and QuickFunctions.

Application Scripts

y
Application Scripts are linked to the entire InTouch application. These scripts execute one time
when the application is started or shut down. Or run continuously while WindowViewer is in
memory.

op
There are three types of Application Scripts:
 On Startup – Executes once when the application is initially started up. Executes before
any window opens or any runtime initialization occurs. You cannot refer to ActiveX
methods, properties, or events in an On Startup script. I/O communications are initialized
after the application On Startup script executes. I/O tags or remote tagname references
cannot be referred to in an On Startup script.

C
 While Running – Executes repeatedly at the specified frequency while the application is
running. When a While Running script is selected, the Every Msec field becomes active.
The field contains the number of milliseconds that must elapse before the script executes.
The While Running script will repeatedly execute no sooner than the specified frequency,
however, the script will execute as long as WindowViewer is running.
 On Shutdown – Executes once when the application is closed. I/O tags and remote
T
tagname references will not update in an On Shutdown script. An On Shutdown script
cannot be used to startup other applications.

Condition Scripts
O

Condition scripts execute when a logical condition occurs. Condition scripts are linked to a discrete
tag or expression that equates to TRUE or FALSE. The condition can contain expressions of up to
1024 characters.
N

Since Condition scripts are executed based on a condition being met, you must specify the
condition (a discrete tag or Boolean expression) in the Condition field. The expression must
equate to a 1 (TRUE) or 0 (FALSE) result. For example, the following expression remains true for
1 minute out of every day, just prior to midnight.
$Hour == 23 AND $Minute == 59
There are four types of scripts that can be applied to a condition:
o

 On False – Executes once when the condition transitions to false


 While False – Executes repeatedly while the condition is false. Frequency of execution is
based upon the value of the Every msec field
D

 On True – Executes once when the condition transitions to true


 While True – Executes repeatedly while the condition is true. Frequency of execution is
based upon the value of the Every msec field
Both While True and While False scripts begin executing after the specified number of
milliseconds has elapsed. To cause immediate execution, create duplicate On True or On False
scripts. All four script types can be applied to the same condition.

AVEVA™ Training
Section 1 – Introduction to InTouch QuickScript 7-5

Data Change Scripts


Data Change scripts execute each time their specified tagname or tagname.field in the
Tagname[.field] field changes. A tagname must change by an amount greater than the deadband
specified in its Tagname Dictionary definition. For example, a Data Change script tied to an I/O real
temperature, may cause the Data Change script to execute thousands of times an hour, even for
unintended noise coming from the I/O source.
Data Change scripts are best used for monitoring events or less frequently changing data. For
example, a Data Change script tied to an I/O Discrete tag that monitors the start cycle on a blast

y
freezer, and would change parameters for the process automatically when the blast freezer starts.
Or a Data Change script monitors an operator initiated emergency shutdown switch and the script
clears the operational state of several key process tags or changes some animation or data
presentation behaviors based on the emergency shutdown.

op
Key Scripts
Key scripts execute on a specific key or key combinations on the keyboard. They can be used to
create global keys for the application, such as returning to a main menu window, or logging off the
operator.

C
There are three types of Key scripts:
 On Key Down – Executes once when the key is initially pressed
 While Down – Executes repeatedly at the specified frequency while the key is held down.
When While Down is selected, the Every msec field is enabled. The field contains the
number of milliseconds that must elapse before the script executes
 To execute the script immediately, create an identical On Key Down script. As long as the
T
condition or event for the While Down script is met, the script will repeatedly execute at the
specified frequency
 On Key Up – Executes once when the key is released
O
If an action script on a window is assigned to a Key that is already used in a global Key script, the
local action script overrides the global Key script.

Order of Operations for Key Scripts


N

Action scripts can have a key bound to the execution of the action script. Action scripts are local
scripts which is addressed in the following section. Because key bindings can existing in both Key
scripts and Action scripts InTouch must manage the order of operations when the same keystroke
is used in both an Action script and a Key script.
For example, the F1 key is bound to an action script on a currently open window. Additionally, the
F1 key is bound to a Key script which is handled globally by the InTouch application. InTouch
o

prioritizes the Action script on the window over the global Key script. As long as the window with
the Action script is open, pressing F1 will cause the Action script to execute, not the Key script
associated with F1. As soon as the window closes, F1 execute the Key script. If the F1 key was
linked to Help documentation, you would see local, contextual Help documentation for the
D

currently opened window. If no windows were opened, you would see generalized Help
documentation for the entire application.

AVEVA™ InTouch HMI 2020 R2


7-6 Module 7 – Introduction to QuickScript

Local Scripts
The scope of execution for all other script types including Window scripts, Action scripts, ActiveX
scripts, and Industrial Graphic scripts are local execution only. Local scripts only run from an open
window. These scripts run when the operator takes a specific action on the window. When a
window closes all scripts on that window stop executing. Local window script functionality includes
Action, Window on Show, Window on Hide, Window While Showing, Industrial Graphic
QuickScript .NET, and ActiveX scripts.

y
Action Scripts
Action scripts are similar to Key scripts, except they are associated with an object linked to a
Touch Link – Touch Pushbutton – Action. They are executed when the operator clicks or

op
presses the object or button assigned to the link.
There are 13 types of Action scripts. But they can be broken down into four simple categories
based on a simple pointing device such as a three-button Mouse. For each of the three buttons,
there are four possible states: click, double-click, held-down, and released. This represents 12 of
the Touch Action script options. The last script type executes when the mouse hovers over the
object without clicking.

C
The following Action scripts execute once when the key or button is initially pressed.
 On Left Click/Key Down
 On Right Click
 On Center Click
The following Action scripts execute repeatedly at the specified frequency while the key or button
T
is held down. When this is selected, the Every msec field is active. The field contains the number
of milliseconds that must elapse before the script executes:
 While Left/Key Down
 While Right Down
O
 While Center Down
The following Action scripts execute once when the key or button is released:
 On Left/Key Up
N

 On Right Up
 On Center Up
The following Action scripts execute when the mouse button is double-clicked. The key equivalent
feature disables when these are selected, since there is no keyboard equivalent for a mouse
button double-click action:
 On Left Double-Click
o

 On Right Double-Click
 On Center Double-Click
The following Action scripts execute one time when the cursor rests over an object. The script
D

does not trigger until the After msec field value is exceeded, this helps avoid unintentional
triggering as the mouse is being moved around the screen, only deliberately coming to rest over
the object will trigger the script. After msec is the length of time the cursor must be over the object
before the script executes. The key equivalent feature is disabled when this condition type is
selected, since there is no keyboard equivalent for moving the mouse cursor over an object.
 On Mouse Over

AVEVA™ Training
Section 1 – Introduction to InTouch QuickScript 7-7

Window Scripts
Window scripts function within a specific window.
There are three types of Window scripts:
 On Show – Executes once when the window is initially opened
 While Showing – Executes repeatedly at the specified frequency while the window is
showing. When While Showing is selected, the Every msec field becomes active. The
field contains the number of milliseconds that must elapse before the script executes. To
execute the script immediately, create an identical On Show script. As long as the

y
condition or event for the While Showing script is met, the script will repeatedly execute at
the specified frequency
 On Hide – Executes once when the window is closed. A window that is covered or hidden

op
by other windows or whose x, y location is off the display is still active and running in
memory, even if the operator cannot see its contents

ActiveX Scripts
Many ActiveX controls have events for handling things like click, double-click, mouse down, and
key press. An ActiveX Event script tied to a specific event in an ActiveX control placed on an

C
window will execute when that event occurs. You may associate one ActiveX Event script to one
event in an ActiveX control. If an ActiveX script is written in a generic way so as to be reusable, it
may be used and called from more than one ActiveX control event.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


7-8 Module 7 – Introduction to QuickScript

Working with the Script Editor


Use the script editor to create and edit scripts within InTouch WindowMaker. The following
example is for an Application script. Each type of script has its own version of the script dialog box,
with options and selections that are unique to that type of script. The title bar of the editor identifies
which type of script you are working with.

y
op
C
T
Area Description
O
1 Toolbars
2 Condition definition area
The Condition Type box provides the available execution conditions for the type of script you
are writing.
N

3 Script text window


4 Command buttons
5 Built-in script function buttons
6 MEM OLE button
The MEM OLE button in the lower right corner only appears if the Manufacturing Engineering
o

Module (MEM) is installed with the InTouch HMI installation. Clicking this button allows you to
script with MEM.
D

AVEVA™ Training
Section 1 – Introduction to InTouch QuickScript 7-9

Color Indicators for InTouch Script Elements


The InTouch script editor uses different text colors to identify different script elements. The
following table shows the text colors associated with script elements.

Element Color
Keywords Blue
Syntax highlighted while typing.
Comments (both single line and multi-line) Green

y
Syntax highlighted while typing.
Strings Purple

op
Syntax highlighted while typing.
Function names, numeric constants, Black
operators, semicolons, dim variables, alias
See descriptions for Attribute names and Reserved words.
variables, and so on
Attributes, InTouch Tags, Reference Strings Maroon, bold face
Reserved words Red, non-bold face
.NET type names Teal, non-bold face

C
Autocomplete Features
The InTouch script editor autocomplete incorporates several features for use while authoring
InTouch scripts. Autocomplete displays a context-sensitive list of options for script elements,
keywords, object and attribute names, and programmatic constructs. You can identify the context
T
from the icons displayed at the bottom of the autocomplete pop-up window. Autocomplete has the
following features:
 Provides an autocomplete tag reference in a selectable list box.
 Provides method parameter help in an autocomplete list box including context-specific
O
suggestions covering definitions, keywords, script elements, and programmatic
constructs.
 Automatic word completion of tags, dotfields, methods, programmatic constructs, and
other script elements.
N

Press Ctrl+Space to display all available autocomplete options and variables for the selected
location in the script. Autocomplete represents each scripting element with a different icon. Icons
represent keywords, operators, Variables, tags, windows, and ActiveX instances.

Accepting Autocomplete Suggestions


Insert an item at the editor caret from the autocomplete list box without an end line or tab
o

appended by doing one of the following:


 Double-click the item
 Highlight (select) the item and press the Enter key or the Tab key
D

 Type a space, period, comma, open or closed parenthesis, or other punctuation used in
the programming language (: ; [ ] = < > - + / *), and the item highlighted in the
autocomplete list box will be inserted at the editor caret with the additional character
appended.

AVEVA™ InTouch HMI 2020 R2


7-10 Module 7 – Introduction to QuickScript

Multi-level Undo and Redo in InTouch Scripting


You can selectively undo a history of changes to your script. The number of changes that can be
undone is limited only by the amount of available memory.
 Use main menu options Edit, then Undo or Ctrl+Z to undo edits. You can also use context
menu options to undo and redo.
 Use main menu options Edit, then Redo or Ctrl+Y to redo edits. You can also use context
menu options to undo and redo.
An undone change can be redone. Redo mirrors undo changes. A single undo typically is

y
comprised of sequences of typing or deleting, which can be interrupted by interaction with an
autocomplete list or by moving the cursor with the mouse, or by clicking elsewhere in the script.
All pending undo and redo actions will be lost when you save your script, switch to another script,

op
or switch condition type.

Visual Indication of InTouch Script Errors


Errors in InTouch script text are marked with a red "squiggly" underline. Hovering over the error
with the mouse cursor will display the error message as a tooltip. The tooltip error message
provides the same information as the message shown when clicking Validate. In some cases,

C
more than one error will be underlined.

Script Line Numbers


The script editor displays line numbers in the left margin.
Line numbers of up to four digits will display when the script editor is not zoomed
T

 Use the right-click context menu Go To function to go to a specific line in the script
 Delete the current line of text by pressing Ctrl+L
 You can select and drag a line of text to a different line
O

Change Bars
As a visual reference for script changes in-progress, yellow change bars on the left margin of the
script text window indicate additions and line insertions and edits.
N

Tag Definition
You can enter a new tagname in the InTouch script editor, then press Ctrl+T or click Edit on the
main menu to define a tag. The Tagname Dictionary appears so you can complete the tagname
definition.
o

Find and Replace


The InTouch script editor provides customizable find and replace functionality.
D

AVEVA™ Training
Section 1 – Introduction to InTouch QuickScript 7-11

Script Functions
A script function is a script which has been written and made available from the function list for
calling from other scripts. A script function may include arguments or parameters which must be
specified when the function is called. For example, the following shows a syntax for a function with
two parameters:
StringLeft( Text, Chars );
This example will select the number of characters specified in the Chars parameter from the left
side of the text parameter. If Text contained Mixer100_Temperature_PV, and Chars contained 8,

y
the StringLeft function would return Mixer100.
Some functions do not require parenthesis around the parameters or arguments. For example, the
Show function uses the following syntax:

op
Show “My Window”;
In this example “My Window” is a parameter required by the Show function. The Show function
opens a window at runtime.
Some functions return a result. When a function returns a result this must be captured in either a
tag or a local variable. Without assigning the return result, the script function will fail to validate and
the script will not save. Some functions which return a result can also be used in an animation

C
expression directly.

Function Help
To access help documentation for a script function, click the Help button in the script editor and
select the function you wish to look up. Help documentation for each function includes proper
T
syntax usage, details on each parameter, and examples of how to use the script function in the
script.
O
IF THEN ELSE ENDIF Statement
Branching or decision making in InTouch scripting is handled via conditions (also named condition
expressions) using a series of keywords, namely: IF, THEN, and ENDIF. Optionally, an ELSE
keyword may be used between THEN and ENDIF. These keywords are used to conditionally
N

execute a choice between two outcomes (TRUE or FALSE). The choice is made based on the
evaluation of a condition or expression placed directly between the keyword IF and the keyword
THEN in the sequence.
For example,
IF MyTagname > 8.9 THEN
o

The portion of this example between the keywords, MyTagname > 8.9 is evaluated by checking if
the part on the left side of the greater than symbol (>) is a larger quantity than the part on the right
side. Let’s say MyTagname contained a value of 10, the conditional expression would be TRUE.
The portion of the script following the THEN keyword is executed.
D

These keywords must be spelled as shown in separate words; however, they are not case
sensitive. Any of the following are the same to the InTouch script editor: IF, iF, If, and if. However,
because these are reserved keywords used for scripting, an InTouch application designer is
restricted from creating an InTouch tagname using any of these keywords. Each IF must have a
matching THEN and ENDIF; followed by a semicolon. Any statements placed after the THEN also
require a semicolon at the end of each statement.

AVEVA™ InTouch HMI 2020 R2


7-12 Module 7 – Introduction to QuickScript

The simplest form of this conditional branching functionality is illustrated by the following example:
IF UnauthorizedAccess == 1 THEN
Show “Security Alert”;
ENDIF;
In the above script, a tagname named UnauthorizedAccess is evaluated and compared to a
numeric value of 1, and if it is found to be TRUE, the script will proceed to the statement Show
“Security Alert”; which will open a window named Security Alert.

y
If the tagname UnauthorizedAccess contained any value other than 1, even a value such as
1.0001 (which is not equal to 1), and then the system skips over the statement and ends after the
ENDIF; portion of the script. IF THEN ENDIF; is the most basic form of a decision making tool.

op
The following comparison operators are also valid for conditional expressions:

< Less than


> Greater than
<= Less than or equal to
>= Greater than or equal to

C
== Equivalency ("is equivalent to")
<> Not equal to
NOT Not equal to
AND Combines logical expressions
T
OR Either logical expression is evaluated separately

Below are some examples of complex scripts using comparison operators.


O
IF THEN statement:
IF EmergencyShutdownSwitch_Reactor04 <> 0 THEN
SafetyShutdownProcedure_Reactor04 = 1;
N

ENDIF;
In the above example, if EmergencyShutdownSwitch_Reactor04 was an I/O Discrete tag which is
set to 1 whenever an operator or system in the field triggers a shutdown of Reactor 04, this script
will take action by setting a flag named SafetyShutdownProcedure_Reactor04 to a value of 1.
IF THEN statement with ELSE clause:
o

IF Temperature > (TemperatureSetpoint + TemperatureDeadband) THEN


Cooling = 1;
ELSE
D

Cooling = 0;
ENDIF;
In the above example, Cooling is shutdown when the Temperature is below the setpoint plus a
deadband.

AVEVA™ Training
Section 1 – Introduction to InTouch QuickScript 7-13

Using Program Loops


Loops allow you to execute a section of code repeatedly. The InTouch HMI only supports FOR
loops. A FOR loop works by monitoring the value of a numeric loop variable that is incremented or
decremented with each loop iteration. The loop is executed until the value of the loop variable
reaches a fixed limit.

Syntax
FOR LoopTag = StartExpression TO EndExpression [STEP ChangeExpression]

y
... statements or another FOR loop ...
NEXT;

op
 StartExpression, EndExpression and ChangeExpression together define the
number of iterations.
 StartExpression sets the start value of the loop range. EndExpression sets the
end value of the loop range.
 STEP ChangeExpression optionally sets the value by which the loop tag is
incremented or decremented during each loop iteration; if you do not specify this, a default
of 1 is used.

C
When you execute a FOR loop, the InTouch HMI:
1. Sets LoopTag to the value of StartExpression.
2. Tests whether LoopTag is greater than EndExpression. If so, the InTouch HMI exits the
loop. (If ChangeExpression is negative, the InTouch HMI tests whether LoopTag is less
than EndExpression.)
T
3. Executes the statements within the loop.
4. Increments LoopTag by the value of ChangeExpression (1 unless otherwise specified).
5. Repeats steps 2 through 4.
O

Remember the following rules when working with FOR loops:


 FOR loops can be nested. The maximum number of nesting levels depends on the
available memory and system resources.
N

 For every FOR statement, there must be a closing NEXT statement. A NEXT statement
always applies to the nearest prior FOR statement on the same nesting level.
 LoopTag must be a numeric tag (or local variable).
 StartExpression, EndExpression and ChangeExpression must be valid
expressions that evaluate to a numeric result.
 If ChangeExpression is positive, EndExpression must be greater than
o

StartExpression; if ChangeExpression is negative, StartExpression must be


greater than EndExpression. Otherwise, the loop does not start.
 To exit a loop, use the EXIT FOR statement.
D

 There is a time limit for loops.

Caution: Loop execution affects other run-time processes.

AVEVA™ InTouch HMI 2020 R2


7-14 Module 7 – Introduction to QuickScript

Forcing the End of a Loop


You can exit a loop at any time by calling the following statement:
EXIT FOR;
This statement causes script execution to continue at the statement immediately following the loop
NEXT statement.

Example

y
The following code fragment uses a loop to insert a large number of dummy records into a
database table. If there is an error inserting a record, the loop is aborted to prevent creating more
errors.

op
FOR Counter = 1 TO 1000
ResultCode = SQLInsert(ConnectionID, "BatchDetails", "BindList1");
IF ResultCode <> 0 THEN
LogMessage("Error creating records! Aborting...");
EXIT FOR;

C
ENDIF;
NEXT;

Effect of Loops on Other Run-Time Processes


While a FOR loop is executing, all other run-time processes in WindowViewer are paused. This
T
includes the following areas:
 Screen updates (animation links, value displays, trends, etc.). This means that you cannot
use FOR loops to animate objects, because no movement will occur until after the loop
has completed.
O
 I/O communications. For example, if you modify the value of an I/O tag in a FOR loop, only
the value after the final iteration is written to the I/O device.
 Other scripts, including asynchronous QuickFunctions.
N

You can avoid pausing other run-time processes by placing the FOR loop in an asynchronous
QuickFunction.

Time Limit for Loop Execution


To avoid infinite loops, there is a time limit during which FOR loops must complete execution. If a
loop does not complete execution after this time span, WindowViewer automatically terminates it
o

and writes a message about the termination to the Log Viewer.


The default time limit is 5 seconds. You can customize it by adding the following line to the
intouch.ini file in your application directory:
D

LoopTimeout=x
Replace x with the time limit in seconds.

Note: The time limit is checked only at the NEXT statement of the loop. Therefore, the first
iteration of the loop is always executed, even if it takes longer than the time limit.

AVEVA™ Training
Section 1 – Introduction to InTouch QuickScript 7-15

Examples of Loops
The following script uses a simple loop and an indirect tag to re initialize 100 tags (Tag001 to Tag100)
with a value of 0.
DIM Counter AS INTEGER;
FOR Counter = 1 TO 100
IndirectInteger.Name = "Tag" + Text(Counter, "000");
IndirectInteger.Value = 0;

y
NEXT;
The following script uses two nested loops and an indirect tag to reinitialize 1000 tags

op
(Line01_Tag001 to Line10_Tag100) with a value of 0.
DIM LineCounter AS INTEGER;
DIM TagCounter AS INTEGER;
FOR LineCounter = 1 TO 10
FOR TagCounter = 1 TO 100

C
IndirectInteger.Name = "Line" + Text(LineCounter, "00") + "_Tag" +
Text(TagCounter, "000");
IndirectInteger.Value = 0;
NEXT;
NEXT;
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


7-16 Module 7 – Introduction to QuickScript

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 19 – Opening an Application with QuickScript 7-17

Lab 19 – Opening an Application with


QuickScript

Introduction
In this lab, you will write a Key script that uses the F12 key on your keyboard to open the Microsoft
Calculator in Windows multiple times. Then, you will change the script so that if the calculator is

y
already opened, it calls the current instance when the F12 key is pressed, instead of opening a
new instance.

op
Objectives
Upon completion of this lab, you will be able to:
 Write a Key script
 Call a script function with parameters
 Add conditional branching to a script using IF THEN ELSE ENDIF keywords

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


7-18 Module 7 – Introduction to QuickScript

Create a Key Script to Open an Application


In the following steps, you will create a Key script that opens the calculator each time the F12 key
is pressed on the keyboard.
1. Close WindowViewer.
2. In the WindowMaker Scripts pane, double-click Key.

y
op
The Key Scripts dialog box appears.

C
T
O
N
o
D

AVEVA™ Training
Lab 19 – Opening an Application with QuickScript 7-19

3. In the Key area, click the Key button.

y
op
The Choose key dialog box appears.

4. In the Chose key dialog box, click F12.

C
T
In the Key field, F12 appears.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


7-20 Module 7 – Introduction to QuickScript

5. On the Condition Type drop-down list, ensure On Key Down is selected.

y
op
6. On the right side of the Key Scripts dialog box, click System.

C
T
O
N

The Choose Function dialog box appears.


7. Click StartApp.
o
D

AVEVA™ Training
Lab 19 – Opening an Application with QuickScript 7-21

StartApp is inserted into the body of the script.

y
op
8. In the body of the script, after StartApp, enter a space, followed by “calc”.
The line of script will look like the following image.
StartApp “calc”

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


7-22 Module 7 – Introduction to QuickScript

9. On the right side of the Key Scripts dialog box, click Validate.

y
op
C
A warning message appears stating Expecting semicolon.
T
O
N

10. Click OK.


Next, you will correct the script to remove the warning.
11. In the body of the script, at the end of Line 1, enter ;.
The line of script now looks like the following image.
StartApp “calc”;
o
D

12. Click Validate.


No error message appears.
13. Click OK to save and close the Key Scripts dialog box.

Note: The OK button also validates the script.

AVEVA™ Training
Lab 19 – Opening an Application with QuickScript 7-23

Test in Runtime
Next, you will test your Key script.
14. Click RUNTIME.
15. In WindowViewer, press F12 on your keyboard.
The calculator opens.

y
op
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


7-24 Module 7 – Introduction to QuickScript

16. Click the WindowViewer title bar.

WindowViewer now becomes the active Windows application and the calculator is hidden
behind WindowViewer.

y
op
C
T
17. Press F12.
A new instance of the calculator opens. Both instances can be seen on the task bar.
O
N

18. Close all instances of the calculator.


o
D

AVEVA™ Training
Lab 19 – Opening an Application with QuickScript 7-25

Modify the Key Script


Next, you will modify the Key script to prevent new instances of the calculator from opening each
time the F12 key is pressed.
19. Click Development!.
20. In the WindowMaker Scripts pane, double-click Key.
The Key Scripts dialog box appears.

y
21. Clear the body of the script.
22. In Line 1, enter IF, and press the space bar.

op
C
23. On the right side of the Key Scripts dialog box, click System.
T
The Choose Function dialog box appears.
24. Click InfoAppActive.
The InfoAppActive function is inserted in Line 1.
O
N

25. In Line 1, replace AppTitle with “Calculator”.


o

26. At the end of Line 1, delete ; and enter == 1 THEN.


27. Press Enter to add a new line.
D

AVEVA™ InTouch HMI 2020 R2


7-26 Module 7 – Introduction to QuickScript

28. In Line 2, press the Tab key.


The Tab key is used as cosmetic white space for readability. It highlights the command that will
execute when the IF statement is True.
29. Click System, and select ActivateApp.
The ActivateApp function is inserted in Line 2.

y
30. At the end of Line 2, enter a space, and enter “Calculator”;.
The text “Calculator” is marked with a red squiggly line, indicating an error. This is expected

op
because the ActivateApp function is not validated until the script is saved.
31. Press Enter to add a new line.
32. Press the Backspace key to delete the automatic tab.

C
33. In Line 3, enter ELSE.
34. Press Enter to add a new line.
T
35. In Line 4, press the Tab key.
O
36. Click System, and select StartApp.
The StartApp function is inserted into Line 4.
37. At the end of Line 4, enter a space, and enter “calc”;.
38. Press Enter to add a new line.
N
o
D

AVEVA™ Training
Lab 19 – Opening an Application with QuickScript 7-27

39. Press the Backspace key to delete the automatic tab.


40. In Line 5, enter ENDIF;.

y
Note: This script checks if the calculator is already open. If it is opened it activates the
currently-opened instance by bringing the calculator into the foreground. Lines 3-5 of the script
start a new calculator only if one is not already opened.

op
41. Click Validate.
No warning message appears.
42. Click OK.
43. Close WindowViewer.

Test in Runtime

C
Next, you will test your modified Key script.
44. Click RUNTIME.
T
45. In WindowViewer, press F12 on your keyboard.
The calculator opens.
O
46. Click the WindowViewer title bar.
WindowViewer now becomes the active application and the calculator is hidden behind
WindowViewer.
47. Press F12.
N

The activated calculator is displayed in the foreground in front of WindowViewer instead of


opening a new calculator instance. Only one instance can be seen on the task bar.
48. Close the calculator.
49. Click Development!.
o

<End of Lab>
D

AVEVA™ InTouch HMI 2020 R2


7-28 Module 7 – Introduction to QuickScript

y
op
C
T
O
N
o
D

AVEVA™ Training
y
op
C
Module 8 – Introduction to Industrial
Graphic QuickScript .NET
T
Section 1 – Industrial Graphic QuickScript.NET 8-3
O
Section 2 – ShowGraphic and InTouch Windows 8-17
Lab 20 – Creating a Scalable Window Navigation Control 8-21
Section 3 – ShowGraphic and Industrial Graphics 8-31
N

Lab 21 – Building a Mixer Browser Using ShowGraphic 8-33


Lab 22 – Creating a Context Driven Alarm Window Using ShowGraphic 8-43
o
D
8-2 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Module Objectives
 Explain differences between Industrial Graphic QuickScript .NET and QuickScript
 Explain how to use the Industrial Graphic QuickScript Editor
 Describe how to create Predefined scripts in an Industrial Graphic
 Describe how to create Named scripts in an Industrial Graphic

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – Industrial Graphic QuickScript.NET 8-3

Section 1 – Industrial Graphic QuickScript.NET


This section will provide an overview of Industrial Graphic QuickScript.NET, and describe the
features and functions that are unique to each script type. This section will also explain the
QuickScript Editor.

QuickScript.NET

y
QuickScript.NET is the name of the script language, and functionality used by Industrial Graphics
in the InTouch environment. InTouch QuickScript.NET capabilities allow you to execute commands
and logical operations based on specified criteria being met. All Industrial Graphic
QuickScript.NET scripts are event driven, such as a data change, a condition, a mouse click, or a

op
timer. You can add conditional statements, loops, and local variables to the basic scripts to create
complex effects in your application.
QuickScript.NET types include the following:
 Predefined On Show– Scripts that execute when the window on which the symbol is
embedded is opened
 Predefined While Showing – Scripts that execute periodically while the window on which

C
the symbol is embedded remains open
 Predefined On Hide – Scripts that execute when the window on which the symbol is
embedded is closed
 Named Scripts:
 Data Change – Scripts that execute each time a monitored expression changes
T
 WhileTrue – Scripts that execute periodically while an expression remains true
 WhileFalse – Scripts that execute periodically while an expression remains false
 OnTrue – Scripts that execute when an expression transitions from false to true
OnFalse – Scripts that execute when an expression transitions from true to false
O

 Action Scripts – An animation type which supports scripts that execute when a user
action is performed, such as clicking a mouse
QuickScript.NET includes library functions which act like pre-written scripts that can be called and
executed to perform additional complex functionality. These can be selected quickly by picking
N

them from a list to include in the script.


Because Industrial Graphic QuickScript.NET is event based, every script you build will require a
trigger to execute. For some scripts, the trigger is fixed by the script type you choose. For
example, the Predefined On Show script is driven by opening the window on which the symbol is
embedded. For this script type, you cannot modify the trigger behavior. On the other hand, if you
choose a Named Script, you must write an expression, either mathematical or logical, to trigger the
o

execution of the script. For example, the expression Pump == True, is a trigger that will execute
the script when the pump starts.
Some Industrial Graphic QuickScript.NET scripts execute periodically. These scripts always
D

include the word While in the name of the script type. These scripts provide a time field specified in
milliseconds for the frequency at which the script will execute. For example, a Named Script
WhileFalse, has its period field set to 1000 ms. This means as long as the expression evaluates to
False, once per second, or 1000 ms, the script will repeated execute indefinitely. As soon as the
script expression evaluates to True, script execution stops.
For all While scripts (repeating at a specified period), the script will not execute the first time until
the period has elapsed. Additionally, InTouch is not based on a scan engine with guaranteed
interval, so the only guarantee is that the script will NOT execute faster than the period specified.

AVEVA™ InTouch HMI 2020 R2


8-4 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Finally, WindowViewer will make every attempt possible to run scripts as fast as the specified time,
however, the Windows operating system is not deterministic, like a PLC so WindowViewer is
subject to the operating system behavior.

Global Scope
Because Industrial Graphic QuickScript.NET only exists inside symbols, and symbols are
associated with a window being opened in memory, therefore, these scripts cannot executed in
WindowViewer at a system-wide level. For example, you build a security logon symbol which

y
manages authentication and access to your InTouch application and place this symbol on a menu
window. If the menu window is accidentally closed, your entire application becomes unsecured
and unauthorized individuals can access any part of your application. It is therefore, not

op
recommended to perform global scope scripting using Industrial Graphic QuickScript.NET.

Local Scope
Industrial Graphic QuickScript.NET only exists inside symbols. Therefore, these scripts are local
scope execution only. Without the window on which the graphic is embedded opened, the triggers
which drive the execution of these scripts do not exist. A work-around to this behavior is to place a

C
window in a location where it cannot be closed by operator interaction or a replace type window
that may touch it. By opening this window when WindowViewer starts, this ensures that the scripts
on that window continue to run for the life of the application. However, if anything should close that
window, all Industrial Graphic QuickScript.NET scripts embedded on that window will stop.

Predefined Scripts
T
Predefined Scripts are built into Industrial Graphics The three types On Show, While Showing and
On Hide closely match the three window script types of InTouch. This is because the symbol is
embedded on the window and its own open (Show), running (Showing) and closed (Hide) status is
O
tied to the window on which it is embedded.
The three types of Predefined scripts are:
 On Show – The symbol is shown when the window is opened. This script type is typically
used to perform any setup such as initializing custom properties or tags which are required
N

for the execution of Industrial Graphic QuickScript.NET. However, any script which needs
to be executed the moment the symbol appears is appropriate for this script type.
 While Showing – As long as the window remains open in memory, the symbol is showing.
This script is typically used to monitor or modify state changes to uppdate counters,
change flags, and perform other periodic functions. While Showing scripts require a
period, or frequency, at which the script will repeatedly execute. The While Showing script
will repeatedly execute no sooner than the specified period, however, the script will
o

execute as long as the window on which the symbol is embedded remains open.
 On Hide – When the window closes, all of the symbols embedded on the window are
unloaded from memory. Prior to this, all On Hide scripts will execute. Any states of custom
D

properties or tags can be stored or modified at this point to reflect the final condition of the
symbol when it is closed.

AVEVA™ Training
Section 1 – Industrial Graphic QuickScript.NET 8-5

Named Scripts
Named Scripts are user created scripts with a predefined list of triggers. Each Named Script
requires an expression. Expressions can be as simple as a custom property or tag that is being
monitored for state change or as complicated as a mathematical formula or logical evaluation. The
trigger types for the Named Scripts are as follows:
 Data Change – Scripts that execute each time a monitored expression changes. For
example, a Data Change Script could monitor each time a lot number is increased. Data
Change scripts are ideal for relatively slower changing process values. Performance could

y
be impacted if a Data Change script were tied to a temperature sensor or other rapidly
changing data value.
 WhileTrue – Scripts that execute periodically while an expression remains true. For
example, the expression Temperature > 120 could be used to monitor when the

op
temperature exceeds 120 degrees.
 WhileFalse – Scripts that execute periodically while an expression remains false. For
example, Connection == True could be monitored to provide an alert to an operator when
a connection is lost.
 OnTrue – Scripts that execute when an expression transitions from false to true. For
example, CookieBatchStart == True could monitor the start of a cookie batch process.

C
 OnFalse – Scripts that execute when an expression transitions from true to false. For
example, an expression of Flag == True could be used to monitor any time the flag is
reset.

Action Scripts
T
Action Scripts are an animation type which supports scripts that execute when a user action is
performed, such as clicking a mouse. Action scripts have 15 trigger types. These can be
summarized as four behaviors with each mouse button: click, double-click, hold, release. The last
three are cursor hover functionality. When the cursor is floating over the graphic element, On
O
Mouse Over, when the cursor stops floating over the graphic element, On Mouse Leave, and while
the cursor is floating over the graphic element, While Mouse Over. These last three Action Script
triggers include an after period field. This field allows you to control how long to wait before
executing the script. This allows normal mouse operation without accidentally firing Action scripts.
If the delay is sufficient, the operators actions must be deliberate in order to execute the script.
N
o
D

AVEVA™ InTouch HMI 2020 R2


8-6 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Industrial Graphic QuickScript.NET Editor


Use the script editor to create and edit scripts within the Graphic Editor. Each type of script has its
own version of the script editor, with options and selections that are unique to that type of script.

y
op
C
T
Area Description
1 Script List
O
2 Expression Field
Provides the available execution conditions for the type of script you are writing.
3 Trigger Type
Drop-down list to select the method of execution.
N

4 Period
Frequency at which the script will execute. Applies only to While type scripts.
5 Toolbar
Select lists for functions, graphics, objects, and attributes, tags and custom properties.
6 Error Message Display
o

Line number and column where the error occurred in the body of the script.
7 Body of Script
Line numbered script entry field. Includes color coded key words and operators with auto-
complete functionality.
D

8 Script Erase and Validate Buttons

AVEVA™ Training
Section 1 – Industrial Graphic QuickScript.NET 8-7

Color Indicators for InTouch Script Elements


The script editor uses different text colors to identify different script elements. The following table
shows the text colors associated with script elements.

Element Color
Keywords Blue
Syntax highlighted while typing.
Comments (both single line and multi-line) Green

y
Syntax highlighted while typing.
Strings Purple

op
Syntax highlighted while typing.
Function names, numeric constants, Black
operators, semicolons, dim variables, alias
See descriptions for Attribute names and Reserved words.
variables, and so on
Attributes, InTouch Tags, Reference Strings Maroon, bold face
Reserved words Red, non-bold face
.NET type names Teal, non-bold face

C
Autocomplete Features
The script editor autocomplete incorporates several features for use while authoring Industrial
Graphic QuickScript.NET scripts. Autocomplete displays a context-sensitive list of options for
script elements, keywords, object and attribute names, and programmatic constructs. You can
T
identify the context from the icons displayed at the bottom of the autocomplete pop-up window.
Autocomplete has the following features:
 Provides an autocomplete tag reference in a selectable list box.
 Provides method parameter help in an autocomplete list box including context-specific
O
suggestions covering definitions, keywords, script elements, and programmatic
constructs.
 Automatic word completion of custom properties, element properties, tags, dotfields,
methods, programmatic constructs, and other script elements.
N

Press Ctrl+Space to display all available autocomplete options and variables for the selected
location in the script. Autocomplete represents each scripting element with a different icon. Icons
represent keywords, operators, Variables, tags, and windows.

Accepting Autocomplete Suggestions


Insert an item at the editor caret from the autocomplete list box without an end line or tab
o

appended by doing one of the following:


 Double-click the item
 Highlight (select) the item and press the Enter key or the Tab key
D

 Type a space, period, comma, open or closed parenthesis, or other punctuation used in
the programming language (: ; [ ] = < > - + / *), and the item highlighted in the
autocomplete list box will be inserted at the editor caret with the additional character
appended.

AVEVA™ InTouch HMI 2020 R2


8-8 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Multi-level Undo and Redo in Scripting


You can selectively undo a history of changes to your script. The number of changes that can be
undone is limited only by the amount of available memory.
 Use main menu options Edit, then Undo or Ctrl+Z to undo edits. You can also use context
menu options to undo and redo.
 Use main menu options Edit, then Redo or Ctrl+Y to redo edits. You can also use context
menu options to undo and redo.
An undone change can be redone. Redo mirrors undo changes. A single undo typically is

y
comprised of sequences of typing or deleting, which can be interrupted by interaction with an
autocomplete list or by moving the cursor with the mouse, or by clicking elsewhere in the script.
All pending undo and redo actions will be lost when you save your script, switch to another script,

op
or switch condition type.

Visual Indication of Errors in Script Text


Errors in InTouch script text are marked with a red "squiggly" underline. Hovering over the error
with the mouse cursor will display the error message as a tooltip. The tooltip error message
provides the same information as the message shown when clicking Validate. In some cases,

C
more than one error will be underlined.

Script Line Numbers


The script editor displays line numbers in the left margin.
Line numbers of up to four digits will display when the script editor is not zoomed
T

 Use the right-click context menu Go To function to go to a specific line in the script
 You can select and drag a line of text to a different line
O
Find and Replace
The script editor provides customizable find and replace functionality.
N
o
D

AVEVA™ Training
Section 1 – Industrial Graphic QuickScript.NET 8-9

Script Functions
A script function is a script which has been written and made available from the function list for
calling from other scripts. A script function may include arguments or parameters which must be
specified when the function is called. For example, the following shows a syntax for a function with
two parameters:
StringLeft( Text, Chars );
This example will select the number of characters specified in the Chars parameter from the left
side of the text parameter. If Text contained Mixer100_Temperature_PV, and Chars contained 8,

y
the StringLeft function would return Mixer100.
Some functions return a result. When a function returns a result this must be captured in either a
tag or a local variable if required. Without assigning the return result, the script function will fail to

op
validate and the script will not save. Some functions which return a result can also be used in an
animation expression directly.

Function Help
To access help documentation for a script function, in the function selector, click the Help button.
Help documentation for each function includes proper syntax usage, details on each parameter,

C
and examples of how to use the script function in the script.

Script Syntax
The syntax in scripts is similar to the algebraic syntax of a calculator. Most statements are
presented using the following form:
T
a = (b - c) / (2 + x) * xyz;
This statement places the value of the expression to the right of the equal sign (=) in the variable
location named “a.”
O
 A single entity must appear to the left of the assignment operator =
 The operands in an expression can be constants or variables
 Statements must end with a semicolon (;)
Entities can be concatenated by using the plus (+) operator. For example, if a data change script
N

such as the one below is created, each time the value of “Number” changes, the indirect entity
“Setpoint” changes accordingly:
Number=1;
Setpoint = "Setpoint" + Text(Number, "#");
Where the result is “Setpoint1.”
o
D

AVEVA™ InTouch HMI 2020 R2


8-10 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Documenting Scripts
Both single line and multi-line comments are supported. Single line comments start at an '
(apostrophe) in a source code line that has no matching ending ' in the line. Multi-line comments
start with a { (opening curly brace) and end with a } (closing curly brace) and can span multiple
lines as the name suggests.
Examples:
Dim A; 'This is a single line comment

y
Dim B; {This is an example
of a multi-line comment}

op
Handling White Space
Spaces and indentation can be used to improve readability, except that at least one space must
appear between adjacent identifiers, and spaces and line breaks cannot appear within identifiers
and numbers. Individual statements are distinguished by a semicolon that marks the end of a
statement. White space rules apply for space and indention. Indent using spaces, or the TAB key.
Individual statements are indicated by a semicolon marking the end of the statement.

C
IF THEN ELSE ENDIF Statement
Branching or decision making in scripting is handled via conditions (also named condition
expressions) using a series of keywords, namely: IF, THEN, and ENDIF. Optionally, an ELSE
keyword may be used between THEN and ENDIF. These keywords are used to conditionally
T
execute a choice between two outcomes (TRUE or FALSE). The choice is made based on the
evaluation of a condition or expression placed directly between the keyword IF and the keyword
THEN in the sequence.
For example,
O
IF MyTagname > 8.9 THEN
The portion of this example between the keywords, MyTagname > 8.9 is evaluated by checking if
the part on the left side of the greater than symbol (>) is a larger quantity than the part on the right
side. Let’s say MyTagname contained a value of 10, the conditional expression would be TRUE.
N

The portion of the script following the THEN keyword is executed.


These keywords must be spelled as shown in separate words; however, they are not case
sensitive. Any of the following are the same to the script editor: IF, iF, If, and if. However, because
these are reserved keywords used for scripting, an InTouch application designer is restricted from
creating an InTouch tagname using any of these keywords. Each IF must have a matching THEN
and ENDIF; followed by a semicolon. Any statements placed after the THEN also require a
o

semicolon at the end of each statement.


The simplest form of this conditional branching functionality is illustrated by the following example:
D

IF UnauthorizedAccess == 1 THEN
SecurityAlert = True;
ENDIF;

AVEVA™ Training
Section 1 – Industrial Graphic QuickScript.NET 8-11

In the above script, a custom property named UnauthorizedAccess is evaluated and compared
to a numeric value of 1, and if it is found to be TRUE, the script will proceed to the statement
SecurityAlert = True; which will set the custom property named SecurityAlert to True.
If the custom property UnauthorizedAccess contained any value other than 1, even a value such
as 1.0001 (which is not equal to 1), then the system skips over the statement and ends after the
ENDIF; portion of the script. IF THEN ENDIF; is the most basic form of decision making in a script.
The following comparison operators are also valid for conditional expressions:

y
< Less than
> Greater than
<= Less than or equal to

op
>= Greater than or equal to
== Equivalency ("is equivalent to")
<> Not equal to
NOT Not equal to
AND Combines logical expressions

C
OR Either logical expression is evaluated separately

Below are some examples of complex scripts using comparison operators.


IF THEN statement:
T
IF EmergencyShutdownSwitch_Reactor04 <> 0 THEN
SafetyShutdownProcedure_Reactor04 = 1;
ENDIF;
O
In the above example, if EmergencyShutdownSwitch_Reactor04 was a Boolean custom property
which is set to 1 whenever an operator or system in the field triggers a shutdown of Reactor 04,
this script will take action by setting a flag named SafetyShutdownProcedure_Reactor04 to a value
of 1.
N
o
D

AVEVA™ InTouch HMI 2020 R2


8-12 Module 8 – Introduction to Industrial Graphic QuickScript .NET

FOR … TO … STEP … NEXT Loop


FOR-NEXT performs a function (or set of functions) within a script several times during a single
execution of a script. The general format of the FOR-NEXT loop is as follows:
FOR <analog_var> = <start_expression> TO <end_expression> [STEP
<change_expression>];
[statements];
[EXIT FOR;];

y
[statements];
NEXT;

op
Where:
 analog_var is a variable of type Integer, Float, Real, or Double.
 start_expression is a valid expression to initialize analog_var to a value for execution of
the loop.
 end_expression is a valid expression. If analog_var is greater than end_expression,
execution of the script jumps to the statement immediately following the NEXT statement.
This holds true if loop is incrementing up, otherwise, if loop is decrementing, loop

C
termination occurs if analog_var is less than end_expression.
 change_expression is an expression that defines the increment or decrement value of
analog_var after execution of the NEXT statement. The change_expression can be either
positive or negative.
 If change_expression is positive, start_expression must be less than or equal to
end_expression or the statements in the loop do not execute.
T
 If change_expression is negative, start_expression must be greater than or equal to
end_expression for the body of the loop to be executed.
 If STEP is not set, then change_expression defaults to 1 for increasing increments, and
O
defaults to -1 for decreasing increments.
Exit the loop from within the body of the loop with the EXIT FOR statement.
The FOR loop is executed as follows:
1. analog_var is set equal to start_expression.
N

2. If change_expression is positive, the system tests to see if analog_var is greater than


end_expression. If so, the loop exits. If change_expression is negative, the system tests to
see if analog_var is less than end_expression. If so, program execution exits the loop.
3. The statements in the body of the loop are executed. The loop can potentially be exited via the
EXIT FOR statement.
o

4. analog_var is incremented by 1,-1, or by change_expression if it is specified.


5. Steps 2 through 4 are repeated.
D

Note: FOR-NEXT loops can be nested. The number of levels of nesting possible depends on
memory and resource availability.

AVEVA™ Training
Section 1 – Industrial Graphic QuickScript.NET 8-13

FOR EACH … IN … NEXT


FOR EACH loops can be used only with collections exposed by OLE Automation servers. A FOR-
EACH loop performs a function (or set of functions) within a script several times during a single
execution of a script. The general format of the FOR-EACH loop is as follows:
FOR EACH <object_variable> IN <collection_object >
[statements];
[EXIT FOR;];

y
[statements];
NEXT;

op
Where:
 object_variable is a dimmed variable.
 collection_object is a variable holding a collection object.
As in the case of the FOR … TO loop, it is possible to exit the execution of the loop through the
statement EXIT FOR from within the loop.

WHILE Loop

C
WHILE loop performs a function or set of functions within a script several times during a single
execution of a script while a condition is true. The general format of the WHILE loop is as follows:
WHILE <Boolean_expression>
[statements]
T
[EXIT WHILE;]
[statements]
ENDWHILE;
O
Where: Boolean_expression is an expression that can be evaluated as a Boolean as defined in the
description of IF…THEN statements.
It is possible to exit the loop from the body of the loop through the EXIT WHILE statement.
N

The WHILE loop is executed as follows:


1. The script evaluates whether the Boolean_expression is true or not. If not, program execution
exits the loop and continues after the ENDWHILE statement.
2. The statements in the body of the loop are executed. The loop can be exited through the EXIT
WHILE statement.
o

3. Steps 1 through 2 are repeated.

Note: WHILE loops can be nested. The number of levels of nesting possible depends on memory
and resource availability.
D

AVEVA™ InTouch HMI 2020 R2


8-14 Module 8 – Introduction to Industrial Graphic QuickScript .NET

ShowGraphic() Function
The ShowGraphic() script function allows two distinct work flows which are controlled by the
Identity property of the function. The first is: using an InTouch: prefix followed by the name of an
existing InTouch window allows the function to open that window. Additionally, the function can
change the symbol hosted by an InTouch application window. The second is: any name used for
the identity, but without the InTouch: prefix will cause the function to create a brand new popup
window hosting the called graphic. The ShowGraphic() function has a property to specify the
name of the graphic being used.

y
About the Show/Hide Graphic Functions
The Show/Hide Graphic script functions allow you to write Industrial graphic scripts to display a

op
symbol as a popup window and close the popup window.
The Show/Hide Graphic script functions are in addition to the Show/Hide Symbol animation
feature, which allows you to display a symbol as a popup window through symbol animation. The
Show/Hide Symbol animation feature remains unchanged. You can use Show/Hide Symbol
animation and the Show/Hide Graphic script functions together.
Like the Show/Hide Symbol animation feature, you can control the properties of the symbol

C
through the Show Graphic script function.
You can configure the script to specify:
 Which symbol will appear as the popup window
 Whether the window will have a title bar
 The initial position of the popup window
T
 Whether the window can be resized
 Whether the window will be modal or modeless
 The relative position of the popup window
O
 Passing the OwningObject to the symbol to display
 Values of the custom properties of the symbol

Configuring the Show/Hide Graphic Script Functions


N

When configuring this feature, include a script that contains the ShowGraphic script function to
display a symbol as a popup window at runtime. You can also include a script that contains the
HideGraphic script function.
The HideGraphic script function allows the closing of any Industrial Graphic displayed through the
ShowGraphic script function.
o

Important: The ShowGraphic script function can be used in the action script of a symbol, named
script, and predefined script. Although the system allows the inclusion of it in a server script, such
as Start Up, On Scan, Off Scan, Shut Down, and Execute, the function cannot be ran at runtime.
D

The HideGraphic script function can be called from any Industrial graphic that is being used in the
InTouch application.

AVEVA™ Training
Section 1 – Industrial Graphic QuickScript.NET 8-15

ShowGraphic() Syntax
Use the ShowGraphic() to display a graphic within a popup window.
Dim graphicInfo as aaGraphic.GraphicInfo;
graphicInfo.Identity = "<Identity>";
graphicInfo.GraphicName = "<SymbolName>";
ShowGraphic( graphicInfo );

HideGraphic() Syntax

y
Use the HideGraphic() script function to close any displayed graphic given its Identity.
HideGraphic(string identity);

op
The ShowGraphic() and HideGraphic() script functions are available in managed or published
InTouch applications only.

Runtime Behavior of the Show/Hide Graphic Functions


The Show/Hide Graphic script functions exhibit the following behavior:
 The graphic, configured with the ShowGraphic script function, behaves like a

C
ShowSymbol animation popup window, rather than an InTouch popup window.
 You can configure a symbol with both the ShowSymbol animation and ShowGraphic
together. If you run both at runtime, two popup windows open, displaying the same or
different symbols. The two popup windows are independent of each other.
 You can open and close the graphic from across symbols and across InTouch windows.
You can manage the graphic across the entire InTouch application.
T
 Unlike ShowSymbol animation, there is no parent/child relationship between the window
that opened the graphic and the graphic opened by the ShowGraphic() script function.
 You cannot use the Close Window dialog box of InTouch WindowViewer to close the
popup windows displayed by the ShowGraphic script function.
O

 Any graphic displayed by the ShowGraphic script function or ShowSymbol animation


always remains in front of InTouch windows, except InTouch popup windows. Even if you
click an InTouch window, the window remains behind these graphics.
 Enabling in-memory graphics caching in WindowViewer memory properties will keep
N

ShowGraphic and ShowSymbol animation popup symbols cached in memory. The system
tracks the order in which graphics are closed in order to determine their age. If a user-
defined in-memory limit is exceeded, the system automatically removes the oldest popup
symbols in the in-memory graphics cache, except those defined in high-priority windows.
If you display a symbol with the ShowGraphic script function or with ShowSymbol
animation, WindowViewer will perform a memory health check.
o
D

AVEVA™ InTouch HMI 2020 R2


8-16 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Behavior of ShowGraphic Windows with the Same Identity


ShowGraphic popup windows attempting to open a popup window with the same Identity exhibit
the following behavior with the predefined scripts OnHide, OnShow, and WhileShowing:
 A ShowGraphic script function within an OnShow script will be blocked, if a ShowGraphic
popup window with the same Identity is already displayed.
 A ShowGraphic script function within an WhileShowing script will be blocked, if a
ShowGraphic popup window with the same Identity is already displayed.
 A ShowGraphic script function within an OnHide script will be blocked, if a ShowGraphic

y
popup window with the same Identity is already displayed.
No error or warning messages will appear in the logger, when script execution is blocked as
described.

op
With the Graphic cache memory option enabled, calling ShowGraphic popup windows with the
same identity name, if the symbol is modal to the modal symbol behind it, calling the ShowGraphic
script function cannot change this symbol to be modeless to the current modal symbol.

Closing a Symbol
You can close a symbol, displayed using the ShowGraphic script function, by running the

C
HideGraphic or HideSelf script functions, clicking the Close Window button of the graphic popup
window, if configured, or by closing WindowViewer. You cannot close the graphic by closing the
InTouch window or the symbol that opened the graphic.
Windows opened by the ShowGraphic script function or ShowSymbol animation are loaded
dynamically and are not exposed at runtime. You cannot close these windows using the
T
WindowViewer Close Window dialog box.
O
N
o
D

AVEVA™ Training
Section 2 – ShowGraphic and InTouch Windows 8-17

Section 2 – ShowGraphic and InTouch Windows


This section will explain a scalable method to navigate an InTouch application.

Overview
Earlier in this course, you used a simple mechanism for navigating through the windows of an
InTouch application using pushbuttons with Show Window animations. This simple concept of

y
clicking a button to go to a window is easy to understand when learning InTouch for the first time,
and it works for an application that only has a few windows.
However, designs based on one pushbutton for each window in the application will likely run into

op
scalability issues as the application grows. This method may be entirely impractical for medium- to
large-sized applications without extensive management of menu windows and maintenance of
those windows. If an application had 200 windows, would you design a single large menu window
with 200 tiny buttons with labels to navigate around your application? Maybe you would create a
window with a few buttons that call up additional menu windows with more buttons. What if you
need to add new windows in the middle of your existing menu design? Would the design require
repositioning and resizing dozens of buttons to add one or more new buttons? What if the InTouch
application starts out small at the beginning of the project, but will grow to 1,000 windows after

C
many years when the project is completed? How will you maintain your navigation design? How
many windows will your menu system require and how much screen real estate will be consumed
by the layout of all these navigation buttons? Will operators be able to find things easily and
navigate quickly?
Now, you will address issues of navigation scalability and maintenance. This will be done using a
T
method that allows for the easy organization of window names using the Combo Box windows
controls. Window lists can be auto sorted, avoid duplicates, and allow the easy insertion of new
window names into the list. Navigation designs using window controls can scale from a few
windows all the way up to thousands, while using a minimum of screen real estate and keeping all
O
navigation in a single place.

Configuring Combo Box Controls


You can use one of the following combo box control types:
N

 Simple: No drop-down list; allows entry of values


 DropDown: Has a drop-down list; allows entry of values
 DropDownList: Has a drop-down list; does not allow entry of any value
You can use Combo Box controls to select an option from a foldable list. You can configure:
 Drop-down type of combo box control
o

 Width of the drop-down list


 Maximum number of items to appear in the drop-down list
You can also use properties that are specific to the Combo Box control in scripting. At runtime, you
D

can use a script , view, and modify the items in the Combo Box control; to save a list of items in the
Combo Box control to obtain the value of the currently selected item; to delete items from the list;
and to load the list into the Combo Box from a file.

AVEVA™ InTouch HMI 2020 R2


8-18 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Using a Drop-Down List to Navigate


A Menu window in your application can display a drop-down list containing window names which
can be selected by the user to navigate to the selected window in runtime. A Data Change script
monitors the selected window and automatically opens the window that has been selected. The
symbol containing the drop-down list must be linked to the Data Change script using a tag.
Because the drop-down list contains names of windows the tag that is selected must use a
message data type to store the text names of windows.

y
ShowGraphic( ) Scripting
Show Symbol animation has limitations, such as only allowing one Popup window, and requiring
fixed references to InTouch tagnames, which makes working with custom properties more

op
complicated. The ShowGraphic script function improves all of these items.
The ShowGraphic script function imitates most of the features of the Show Symbol animation. For
each Show Symbol animation feature in the Edit Animations window, there is an equivalent line of
script in the ShowGraphic script function. For example, in the Show Symbol animation, there is a
check box named Has title bar. In ShowGraphic, there is a line of script named
GraphicInfo.HasTitleBar = true;.

C
Using the ShowGraphic script function, you can design a layered application where additional
detail can be discovered by drilling down into a process. Each click brings up a window with more
detail; as you close the detailed windows, you are returned to the top level displays again. Or, you
can bring up multiple graphics arranged in rows and columns to show comparative process details
side-by-side. You can create building blocks that can be reused in many combinations of
arrangements and displays. The power of the ShowGraphic function is astounding with just a little
T
imagination.
The minimum ShowGraphic script must contain the following four lines:
Dim graphicInfo as aaGraphic.GraphicInfo;
O
graphicInfo.Identity = "<Identity>";
graphicInfo.GraphicName = "<SymbolName>";
ShowGraphic( graphicInfo );
The ShowGraphic function is really made up of two parts. The key execution part is the last line of
the script, which actually performs the task of making the popup window appear, (ShowGraphic
N

( graphicInfo); this must always be the very last line of the ShowGraphic function. The second part
is all of the other lines of script that define the popup window.
GraphicInfo is a structure that holds the definitions, configuration options, and properties that
describe the popup window. This includes: (1) identifying the popup window, (2) specifying what
graphic to show in the popup window, (3) if the popup window will be user interactive, (4) where on
the screen the popup window will appear, (5) the size of the popup window, (6) what value to set
o

for each custom property in the graphic, and (7) what additional features the popup window will
have. For example, will it have a title bar and if yes what will be the caption, will it have a close
button or not, and will it be resizable?
D

The ShowGraphic function can be called from any symbol script, including a predefined script (On
Show, While Showing, On Hide), a Named Script, or an Action Script. Within the Script Function
Browser, called from within any Symbol script editor, highlight the ShowGraphic function, and click
Help to open detailed help on the ShowGraphic function. The Help file includes detailed
enumeration tables of all the positions, sizes, and properties that can be used within the function.
The Help file also includes examples that can be copied and pasted into the script as-is.

AVEVA™ Training
Section 2 – ShowGraphic and InTouch Windows 8-19

One of the most powerful aspects of the ShowGraphic function is the CustomProperty-Value pair
array. The last portion of the script before calling the graphic, this array defines each Value,
Reference, or Expression that will be assigned to each custom property in the symbol (graphic)
being shown. This allows any symbol from the library to be shown in runtime with all of its custom
properties assigned at runtime, such as linked to InTouch tagnames.

Using the Identity Property in the ShowGraphic() Function


The Identity must be unique across the InTouch application. If you want to add the HideGraphic

y
script function, you must use the same Identity as a parameter that you have used in the
ShowGraphic script. The HideSelf script function does not have any parameters.

op
Simple use of ShowGraphic
The Identity property of the basic ShowGraphic script function, using the syntax
“InTouch:Window”, supports opening InTouch native windows. The GraphicName property
supports calling a symbol when the InTouch:Window syntax is used. Only three lines of script are
required for this simple use of ShowGraphic.

Advanced use of ShowGraphic

C
ShowGraphic supports opening symbols in runtime and dynamically linking tag references to the
symbol that appears in the popup window. Opening symbols in popup windows requires
configuring several properties, setting custom property-value pairs, and identifying the size and
location of the popup window. A minimum script to support this advanced use of ShowGraphic can
easily reach 20 or more lines of script.
T
ShowGraphic popup windows attempting to open a popup window with the same Identity exhibit
the following behavior with the predefined scripts OnHide, OnShow, and WhileShowing:
 A ShowGraphic function within an OnShow script will be blocked if a ShowGraphic popup
window with the same Identity is already displayed.
O
 A ShowGraphic function within a WhileShowing script will be blocked if a ShowGraphic
popup window with the same Identity is already displayed.
 A ShowGraphic function within an OnHide script will be blocked if a ShowGraphic popup
window with the same Identity is already displayed. No error or warning messages will
N

appear in the logger when script execution is blocked as described. With the Graphic
Cache memory option enabled, calling ShowGraphic popup windows with the same
identity name, if the symbol is modal to the modal symbol behind it, calling the
ShowGraphic function cannot change this symbol to be modeless to the current modal
symbol.
o
D

AVEVA™ InTouch HMI 2020 R2


8-20 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Use of String Concatenation Concepts in Scripting


String concatenation is a script operation that joins two strings together to form a single string.
When used in InTouch scripting, and Industrial Graphic scripting, there are three building blocks
that can be used to construct a string. These are an InTouch Message tag (string custom
property), a string literal (any text between double quotes), and a script function that returns a
string value (for example, the Text function).
An example of string concatenation is as follows.

y
$DateString + Text(Mixer100_Level_PV, “#”) + “ is the level value.”;
In the example $DateString is a system message tag, which contains the current date. Followed
by the text function, which converts the numerical tag Mixer100_Level_PV to a string and finally

op
completes the string with the string literal is the level value.This example combines three different
building blocks using string concatenation with the addition operator to form a final sentence.

C
T
O
N
o
D

AVEVA™ Training
Lab 20 – Creating a Scalable Window Navigation Control 8-21

Lab 20 – Creating a Scalable Window


Navigation Control

Introduction
In this lab, you will create the Nav symbol, which uses a Windows control to allow the operator to
navigate between different windows in the application. This scalable method of navigation uses

y
the smallest amount of screen space.

Objectives

op
Upon completion of the this lab, you will be able to:
 Build a combo box containing window names
 Use the ShowGraphic function to open native InTouch windows

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


8-22 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Build the Symbol


In the following steps, you will create the Nav symbol.
1. In the WindowMaker Training toolset, create a symbol named Nav, and open it for editing.
2. Add a custom property to the canvas as follows:
‘Static Text’ or
Name Data Type ‘Expression or Default Value Visibility
Reference’ Mode

y
WindowName String <Blank> Private

op
C
T
O
N

3. In the Tools pane, select the Combo Box tool.


o
D

4. On the canvas, draw a combo box rectangle.

AVEVA™ Training
Lab 20 – Creating a Scalable Window Navigation Control 8-23

5. In the Properties pane, name the combo box ProductionList.


6. Adjust the Width to 200.
ProductionList will look similar to the following image.

y
op
7. Double-click ProductionList, and in the Reference field, enter WindowName.
8. Check the Use Values as Captions check box.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


8-24 Module 8 – Introduction to Industrial Graphic QuickScript .NET

9. Click the Add a row [Insert] button.


10. In the Static Values and Captions area, Value column, enter the following values:
 Mixer
 KPI
 Current_Alarms
 Historical_Alarms_and_Events

y
op
C
T
O

11. In the Type drop-down list, select DropDown.


N

12. Click OK.


o
D

AVEVA™ Training
Lab 20 – Creating a Scalable Window Navigation Control 8-25

Add a Named Script with a Data Change Trigger


Next, you will create a Named script using a Data Change trigger. The script will include a
ShowGraphic script function which will open native InTouch windows when the user selects a
window name.
13. On the canvas, right-click, and select Scripts.
The Edit Scripts dialog box appears.

y
op
C
T
O

14. Click Add Script.


N
o

15. Name the script OpenWindow.


D

16. In the OpenWindow animations pane, Expression field, enter WindowName.

AVEVA™ InTouch HMI 2020 R2


8-26 Module 8 – Introduction to Industrial Graphic QuickScript .NET

17. On the Trigger drop-down list, select DataChange.


18. Click Display Script Function Browser.

y
op
C
T
The Script Function Browser dialog box appears.
O
N
o
D

AVEVA™ Training
Lab 20 – Creating a Scalable Window Navigation Control 8-27

19. In the Script Function Browser dialog box, expand Graphic Client, and select
ShowGraphic.

y
op
20. Click OK.
Four lines of script are pasted into the body of the script.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


8-28 Module 8 – Introduction to Industrial Graphic QuickScript .NET

21. In the script body, delete Line 3.


The script now has three lines.

22. In Line 2, between the quotes, delete the text <Identity>.

y
23. At the cursor position, enter InTouch:.

op
Note: “InTouch:” is required in the ShowGraphic script function to indicate what follows is a
pre-built application window. When "InTouch:" is not used, the .Identity property represents the
name Microsoft Windows uses to identify the popup window that gets created by

C
ShowGraphic.

24. In Line 2, place the cursor between the quote and semicolon, and enter + WindowName.
T
25. Click OK to validate, save, and close the script.
O

26. Save and close Nav.


27. Embed Nav in the Menu window to the right of the navigation buttons.
N
o
D

AVEVA™ Training
Lab 20 – Creating a Scalable Window Navigation Control 8-29

Test What You Have Built


Finally, you will test scalable window navigation in runtime.
28. Click RUNTIME.
29. Close the Mixer window.

y
op
30. On the Nav symbol drop-down list, select Mixer.
The Mixer window opens.

31. Test additional navigation, as desired.


32. Click Development!.
C
T
<End of Lab>
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


8-30 Module 8 – Introduction to Industrial Graphic QuickScript .NET

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 3 – ShowGraphic and Industrial Graphics 8-31

Section 3 – ShowGraphic and Industrial Graphics

This section will explain how to use advanced features of the ShowGraphic script function.

Overview
This section explains how to use advanced features of the ShowGraphic script function to popup a
window in runtime. Advanced ShowGraphic functionality includes popup window size, position,

y
behavior, and assigning custom property value pairs. At runtime the ShowGraphic script function
can be used to call a graphic from the library into a popup window that can be positioned and sized
as desired.

op
Configuration options include the ability to set the modal/modeless property. Which means the
popup window can be configured as a modal window to prevent interaction with WindowViewer
until the popup window is closed. Additional properties allow you to enable or disable the title bar,
to change the caption of the title bar, to allow the popup window to be resized, or to change the
scale of the graphic.
A powerful feature of the ShowGraphic advanced functionality is the ability to assign InTouch tags
to the custom properties of the called graphic. This enables ShowGraphic to be used as a data

C
browser. A reusable symbol can be called and the data points in the graphic changed dynamically
to point to different data sources from the field. For example, the Mixer graphic used in this course
can be called by ShowGraphic with custom property value pairs assigned to Mixer300 data. This
technique acts like a mixer browser, allowing the same graphic to be called over and over again
depending upon which mixer you want to view.
T
Runtime Behavior of the Show/Hide Graphic Functions
The Show/Hide Graphic script functions exhibit the following behavior:
O
 The graphic, configured with the ShowGraphic script function, behaves like a
ShowSymbol animation popup window, rather than an InTouch popup window.
 You can configure a symbol with both the ShowAnimation and ShowGraphic scripts
together. If you execute the two scripts at runtime, two popup windows open, displaying
the same or different symbols. The two popup windows are independent of each other.
N

 You can open and close the graphic from across symbols and across InTouch windows.
You can manage the graphic across the entire InTouch application.
 Unlike ShowSymbol animation, there is no parent/child relationship between the window
that launched the graphic and the graphic launched by the ShowGraphic() script function.
 You cannot use the Close Window dialog box of InTouch WindowViewer to close the
popup windows displayed by the ShowGraphic script function.
o

 Any graphic displayed by the ShowGraphic script function or ShowSymbol animation


always remains in front of InTouch windows, except InTouch popup windows. Even if you
click an InTouch window, the window remains behind these graphics.
D

 Enabling in-memory graphics caching in WindowViewer memory properties will keep


ShowGraphic and ShowSymbol animation popup symbols cached in memory. The system
tracks the order in which graphics are closed in order to determine their age. If a user-
defined in-memory limit is exceeded, the system automatically removes the oldest popup
symbols in the in-memory graphics cache except those defined in high-priority windows. If
you display a symbol with the ShowGraphic script function or with ShowSymbol
animation, WindowViewer will perform a memory health check.

AVEVA™ InTouch HMI 2020 R2


8-32 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Closing a Symbol
You can close a symbol, displayed using the ShowGraphic script function, by executing the
HideGraphic() or HideSelf() script functions, clicking the Close Window button of the graphic
popup window if configured, or closing WindowViewer. You cannot close the graphic by closing the
InTouch window or the symbol that launched the graphic. Windows opened by the ShowGraphic()
script function are loaded dynamically at runtime. You cannot close these windows using the
WindowViewer close window dialog box.

y
Working with Modal Windows
The ShowGraphic script function defaults to using a modeless window type. This allows

op
WindowViewer to remain interactive while the popup window is on top.
If a popup window is called using the ShowGraphic() script function with the WindowType
property set to Modal, the system cannot execute the rest of the script after the
ShowGraphic(graphicInfo); line of the script. You must close the window to allow the system to
execute the rest of the script. If you want to open multiple modal popup windows, the last popup
window will override the remaining popup windows until it is closed.

C
Assigning Custom Property Values of a Symbol
Custom properties of a symbol can be set to values when a symbol is shown by ShowGraphic()
containing the CustomProperties property. The parameters of CustomProperties are the custom
property name, assigned value, and the IsConstant Boolean flag that indicates if the custom
property value is a constant. These parameters are specified as an array of values using the
T
CustomPropertyValuePair[] array. The array index starts at 1. Use a script similar to the following
to assign values to a symbol's custom properties. In this example, "i1" is string Identity and the
symbol "S1" contains custom properties CP1 and CP2. When S1 is shown during runtime, CP1 is
assigned a constant value of 20 and CP2 is assigned the current value of the reference
O
Pump.PV.Tagname.
Dim graphicInfo as aaGraphic.GraphicInfo;
graphicInfo.Identity = "i1";
graphicInfo.GraphicName = "S1";
graphicInfo.OwningObject = "UserDefined_001";
N

graphicInfo.WindowTitle = "Graphic01";
graphicInfo.Resizable = false;
graphicInfo.CustomProperties=cpValues;
Dim cpValues [2] as aaGraphic.CustomPropertyValuePair;
cpValues[1] = new aaGraphic.CustomPropertyValuePair("CP1", 20, true);
cpValues[2] = new aaGraphic.CustomPropertyValuePair("CP2","Pump.PV.TagName",
false);
o

ShowGraphic( graphicInfo );
D

AVEVA™ Training
Lab 21 – Building a Mixer Browser Using ShowGraphic 8-33

Lab 21 – Building a Mixer Browser Using


ShowGraphic

Introduction
In this lab, you will build a mixer browser using the Mixer symbol. The Mixer symbol will be called
in a Frame window. You will add navigation for the operator to select a mixer and use the

y
ShowGraphic function to update the custom properties of the Mixer symbol to link the mixer’s
InTouch tags.

op
Objectives
Upon completion of this lab, you will be able to:
 Use ShowGraphic to reuse a graphic to point to different sets of tags

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


8-34 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Create the Mixer Browser Window


In the following steps, you will create and configure a Mixer_Browser window, from the
Content_Frame window template.
1. On the WindowMaker File menu, select New Window from Template.
2. In the Template Window Browser, double-click Content_Frame.
3. Name the window Mixer_Browser.

y
op
4. Click OK.
C
T
The new window is created and opened.
O
N
o
D

AVEVA™ Training
Lab 21 – Building a Mixer Browser Using ShowGraphic 8-35

Create the MixerBrowser Symbol


Next, you will add functionality to the Nav symbol to allow the user to select which mixer to view.
5. Open the Nav symbol for editing.
6. Add a custom property to the canvas as follows:
‘Static Text’ or
Name Data Type ‘Expression or Default Value Visibility
Reference’ Mode

y
MixerName String Mixer100 Private

op
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


8-36 Module 8 – Introduction to Industrial Graphic QuickScript .NET

7. In the Elements list, double-click ProductionList to edit animations.


8. In the Static Values and Captions area, click Add a row [Insert].
9. In the new row Value column, enter Mixer_Browser.

y
op
C
T
10. Click OK.
O
11. Duplicate the ProductionList combo box.
12. Place the duplicate below ProductionList.
N
o
D

13. Name the duplicate MixerList.


14. Double-click MixerList to edit animations.

AVEVA™ Training
Lab 21 – Building a Mixer Browser Using ShowGraphic 8-37

15. In the Reference field, enter MixerName.

y
16. In the Static Values and Captions area, delete a row so there are only four rows available,
and edit the Value column as follows:
 Mixer100

op
 Mixer200
 Mixer300
 Mixer400

C
T
17. Add a Visibility animation.
18. In the Visibility animations pane, Boolean field, enter WindowName == “Mixer_Browser”.
O
19. Ensure that the Visible When Expression is area is set to True, 1, On.
N
o

20. Click OK.


D

AVEVA™ InTouch HMI 2020 R2


8-38 Module 8 – Introduction to Industrial Graphic QuickScript .NET

21. On the Special menu, select Scripts.


22. Click the OpenWindow script, and modify the Expression as follows:
WindowName + MixerName
23. In the bottom-left corner of the Edit Scripts window, click the Hide left pane button to make the
body of the script larger.

y
Note: You may also use Ctrl + mouse wheel to change the text size in this window.

op
Next, you will modify the script clearing the contents and adding a new script.
24. Delete any existing text from the body of the script.

C
T
O
N
o
D

AVEVA™ Training
Lab 21 – Building a Mixer Browser Using ShowGraphic 8-39

25. In the script body, enter the following:

Note: You can copy and paste the script from the
C:\Training\Lab 21 - Building a Mixer Browser Using ShowGraphic file.

'+-----------------------------------------------------+
' Lab 21 - Building a Mixer Browser Using ShowGraphic
'+-----------------------------------------------------+

y
'===========================
'Named Script
'Name - OpenWindow
'Expression - WindowName + MixerName

op
'Trigger - DataChange
'===========================

Dim graphicInfo as aaGraphic.GraphicInfo;

graphicInfo.Identity = "InTouch:" + WindowName;

if WindowName == "Mixer_Browser" then

C
graphicInfo.GraphicName = "Mixer";
Dim cpValues [36] as aaGraphic.CustomPropertyValuePair;
cpValues[1] = new
aaGraphic.CustomPropertyValuePair("Agitator.EquipState", MixerName +
"_Agitator_PV", true);
cpValues[2] = new
aaGraphic.CustomPropertyValuePair("Inlet1.EquipStateActive", MixerName +
T
"_Inlet1_OLS AND NOT " + MixerName + "_Inlet1_CLS", true);
cpValues[3] = new aaGraphic.CustomPropertyValuePair("Inlet1.PV",
MixerName + "_Inlet1_Position", true);
cpValues[4] = new aaGraphic.CustomPropertyValuePair("Inlet1.PVMax",
O
MixerName + "_Inlet1_Position.MaxEU", true);
cpValues[5] = new aaGraphic.CustomPropertyValuePair("Inlet1.PVMin",
MixerName + "_Inlet1_Position.MinEU", true);
cpValues[6] = new
aaGraphic.CustomPropertyValuePair("Inlet2.EquipStateActive", MixerName +
N

"_Inlet2_OLS AND NOT " + MixerName + "_Inlet2_CLS", true);


cpValues[7] = new aaGraphic.CustomPropertyValuePair("Inlet2.PV",
MixerName + "_Inlet2_Position", true);
cpValues[8] = new aaGraphic.CustomPropertyValuePair("Inlet2.PVMax",
MixerName + "_Inlet2_Position.MaxEU", true);
cpValues[9] = new aaGraphic.CustomPropertyValuePair("Inlet2.PVMin",
MixerName + "_Inlet2_Position.MinEU", true);
cpValues[10] = new
o

aaGraphic.CustomPropertyValuePair("Outlet.EquipStateActive", MixerName +
"_Outlet_OLS AND NOT " + MixerName + "_Outlet_CLS", true);
cpValues[11] = new aaGraphic.CustomPropertyValuePair("Outlet.PV",
MixerName + "_Outlet_Position", true);
D

cpValues[12] = new aaGraphic.CustomPropertyValuePair("Outlet.PVMax",


MixerName + "_Outlet_Position.MaxEU", true);
cpValues[13] = new aaGraphic.CustomPropertyValuePair("Outlet.PVMin",
MixerName + "_Outlet_Position.MinEU", true);
cpValues[14] = new aaGraphic.CustomPropertyValuePair("Pump1.EquipState",
MixerName + "_Pump1_PV", true);
cpValues[15] = new aaGraphic.CustomPropertyValuePair("Pump2.EquipState",
MixerName + "_Pump2_PV", true);

AVEVA™ InTouch HMI 2020 R2


8-40 Module 8 – Introduction to Industrial Graphic QuickScript .NET

cpValues[16] = new aaGraphic.CustomPropertyValuePair("Pump1_CMD.Cmd",


MixerName + "_Pump1_CMD", true);
cpValues[17] = new aaGraphic.CustomPropertyValuePair("Pump2_CMD.Cmd",
MixerName + "_Pump2_CMD", true);
cpValues[18] = new aaGraphic.CustomPropertyValuePair("Level.PV",
MixerName + "_Level_PV", true);
cpValues[19] = new aaGraphic.CustomPropertyValuePair("Level.EngUnits",
MixerName + "_Level_PV.EngUnits", false);
cpValues[20] = new
aaGraphic.CustomPropertyValuePair("Level.PVRangeFullScaleMax", MixerName +

y
"_Level_PV.MaxEU", true);
cpValues[21] = new
aaGraphic.CustomPropertyValuePair("Level.PVRangeFullScaleMin", MixerName +
"_Level_PV.MinEU", true);

op
cpValues[22] = new aaGraphic.CustomPropertyValuePair("Temperature.PV",
MixerName + "_Temperature_PV", true);
cpValues[23] = new
aaGraphic.CustomPropertyValuePair("Temperature.EngUnits", MixerName +
"_Temperature_PV.EngUnits", false);
cpValues[24] = new
aaGraphic.CustomPropertyValuePair("Temperature.PVRangeFullScaleMax",
MixerName + "_Temperature_PV.MaxEU", true);

C
cpValues[25] = new
aaGraphic.CustomPropertyValuePair("Temperature.PVRangeFullScaleMin",
MixerName + "_Temperature_PV.MinEU", true);
cpValues[26] = new
aaGraphic.CustomPropertyValuePair("Temperature.AlarmMostUrgentAcked",
MixerName + "_Temperature_PV.Ack", true);
cpValues[27] = new
T
aaGraphic.CustomPropertyValuePair("Temperature.AlarmMostUrgentInAlarm",
MixerName + "_Temperature_PV.Alarm", true);
cpValues[28] = new
aaGraphic.CustomPropertyValuePair("Temperature.AlarmHiLimit", MixerName +
O
"_Temperature_PV.HiLimit", true);
cpValues[29] = new
aaGraphic.CustomPropertyValuePair("Temperature.AlarmLoLimit", MixerName +
"_Temperature_PV.LoLimit", true);
cpValues[30] = new aaGraphic.CustomPropertyValuePair("TempPen_PV",
N

MixerName + "_Temperature_PV", true);


cpValues[31] = new aaGraphic.CustomPropertyValuePair("TempPen_Min",
MixerName + "_Temperature_PV.MinEU", true);
cpValues[32] = new aaGraphic.CustomPropertyValuePair("TempPen_Max",
MixerName + "_Temperature_PV.MaxEU", true);
cpValues[33] = new aaGraphic.CustomPropertyValuePair("LevelPen_PV",
MixerName + "_Level_PV", true);
o

cpValues[34] = new aaGraphic.CustomPropertyValuePair("LevelPen_Min",


MixerName + "_Level_PV.MinEU", true);
cpValues[35] = new aaGraphic.CustomPropertyValuePair("LevelPen_Max",
MixerName + "_Level_PV.MaxEU", true);
D

cpValues[36] = new aaGraphic.CustomPropertyValuePair("Tank.Label",


MixerName, true);
graphicInfo.CustomProperties = cpValues;
endif;

ShowGraphic( graphicInfo );

AVEVA™ Training
Lab 21 – Building a Mixer Browser Using ShowGraphic 8-41

y
op
C
T
O
N
o

26. Click OK to close the Edit Scripts dialog box.


27. Save and close Nav.
D

In WindowMaker, in the Menu window, notice your Nav symbol did not update to show two
combo boxes. The symbol will be updated automatically when you go to runtime.

AVEVA™ InTouch HMI 2020 R2


8-42 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Test What You Have Built


Next, you will test the Mixer Browser and the MixerList drop-down lists.
28. Click RUNTIME.
The ProductionList drop-down list appears.
29. In the Menu window, click the Nav symbol drop-down list, and select Mixer_Browser.
The MixerList drop-down list appears.

y
op
30. On the MixerList drop-down list, select Mixer200.
The data for Mixer200 appears in the window.

C
T
O
N

31. Select other mixers as desired.


32. Click Development!.
o

<End of Lab>
D

AVEVA™ Training
Lab 22 – Creating a Context Driven Alarm Window Using ShowGraphic 8-43

Lab 22 – Creating a Context Driven Alarm


Window Using ShowGraphic

Introduction
In this lab, you will add a button to the Mixer symbol to create a popup alarm window that filters an
Alarm Client to show only alarms for the current mixer.

y
Objectives

op
Upon completion of this lab, you will be able to:
 Use ShowGraphic to create a popup Window
 Create a Popup context Alarm View
 Use HideSelf functionality
 Create an Action Script with On Left Click/Key/Touch Down Trigger

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


8-44 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Create an Alarm Popup Symbol


In the following steps, you will duplicate the CurrentAlarms symbol to create a PopupAlarms
symbol and then modify it to display in-context alarms when opened in runtime.
1. In WindowMaker, duplicate the CurrentAlarms symbol, and name the duplicate
PopupAlarms.
2. Double-click PopupAlarms to open it for editing.
3. On the canvas, delete all button elements.

y
4. Add a custom property to the canvas as follows:
‘Static Text’ or

op
Name Data Type ‘Expression or Default Value Visibility
Reference’ Mode
Query String <blank> Public

5. On the canvas, right-click, and select Scripts.


The Edit Scripts dialog box appears.

C
6. In the body of the On Show script, enter: LiveAlarms.AlarmQuery = Query;
T
O
N
o

7. Click OK.
D

AVEVA™ Training
Lab 22 – Creating a Context Driven Alarm Window Using ShowGraphic 8-45

8. Add a button at the bottom of the Alarm Client, and configure the properties as follows:

Name: OkButton
Element Style: Intensity1
Text: OK

y
op
C
9. Double-click the OK button, and add an Action Scripts animation.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


8-46 Module 8 – Introduction to Industrial Graphic QuickScript .NET

10. Configure the Action script as follows:

Trigger: On Left Click/Key/Touch Down


Body: Hideself();

Hideself( ); can be selected from the Fx browser by expanding Graphic Client.

y
op
C
T
11. Click OK.
O
12. Save and close PopupAlarms.
Next, you will modify the Mixer symbol to open the PopupAlarms symbol.
13. Open the Mixer symbol.
N

14. Add a button below Tank and configure the properties as follows:

Name: AlarmsButton
Element Style: Intensity1
Text: Alarms
o
D

AVEVA™ Training
Lab 22 – Creating a Context Driven Alarm Window Using ShowGraphic 8-47

15. Double-click AlarmsButton and add an Action Scripts animation.


16. In the script body, enter the following:

Note: You may copy and paste the script from the C:\Training\Lab 22 - Creating a Context
Sensitive Alarm Popup View file.

'+-----------------------------------------------------+
' Lab 22 - Creating a Context Sensitive Alarm Popup View

y
'+-----------------------------------------------------+

'===========================
'Alarmsbutton Action Script
'Trigger - On Left Click/Key/Touch Down

op
'===========================

Dim graphicInfo as aaGraphic.GraphicInfo;


graphicInfo.Identity = "Alarms";
graphicInfo.GraphicName = "PopupAlarms";
graphicInfo.WindowType = aaGraphic.WindowType.Modal;
graphicInfo.WindowTitle = "Alarms for " + Tank.Label;
graphicInfo.WindowRelativePosition =

C
aaGraphic.WindowRelativePosition.Window;
graphicInfo.WindowLocation = aaGraphic.WindowLocation.TopLeftCorner;
Dim cpValues [1] as aaGraphic.CustomPropertyValuePair;
cpValues[1] = new aaGraphic.CustomPropertyValuePair("Query",
"\InTouch!$System!" + Tank.Label + "*", true);
graphicInfo.CustomProperties = cpValues;
ShowGraphic( graphicInfo );
T
O
N
o
D

17. Click OK.


18. Save and close Mixer.

AVEVA™ InTouch HMI 2020 R2


8-48 Module 8 – Introduction to Industrial Graphic QuickScript .NET

Test What You Have Built


Finally, you will test the functionality of the Alarm popup window in runtime.
19. Click RUNTIME.
20. Close the Mixer_Browser window.
21. Navigate to the Mixer_Browser window.
22. In the Mixer_Browser window, click the Alarms button to call the PopupAlarms window.

y
The Alarms listed are specific to the mixer selection because the mixer selection is passed to
the AlarmQuery property of the Alarm Client.
23. Try to click anywhere in the application outside of the PopupAlarms window.

op
You cannot click behind the PopupAlarms window due to the modal window type defined in
the script.
24. In the PopupAlarms window, click the OK button to close the popup.
25. Browse to additional mixers, and try clicking the Alarms button.
26. Click Development!.

<End of Lab>

C
T
O
N
o
D

AVEVA™ Training
y
op
C Module 9 – Security
T
Section 1 – OS Security Implementation 9-3
Lab 23 – Setting Up and Using OS Security 9-13
Section 2 – Lock Down Your Application 9-29
O

Lab 24 – Locking Down Your Application 9-35


N
o
D
9-2 Module 9 – Security

Module Objectives
 Define the InTouch Security Options
 InTouch Security
 OS Security
 ArchestrA Security

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – OS Security Implementation 9-3

Section 1 – OS Security Implementation


This section will discuss how to prepare your environment for using OS security. This section will
also provide an overview of scripting for OS security.

Overview
InTouch security is a two-step process of first determining if the person attempting to use an

y
application is recognized as a valid user. The second step determines what InTouch privileges are
granted to an authenticated user.
InTouch security includes options for a variety of applications. Securing an InTouch application

op
requires both configuration and application design changes. Application designers may want to
secure the operating system, audit operators' actions, or secure the InTouch application itself. In
embedded or restricted environments, the top concern may be to limit the operator's access to other
Windows applications or the operating system. There are script functions available to restrict
access to certain keys on the Windows keyboard. There are ways to configure WindowViewer™
(View) to always run maximized and to hide its menu so that operators cannot close or minimize it.
In other instances, the primary goal of operator login is to audit the operator's actions and track these

C
actions. The InTouch Alarm and Event system may be configured to record operator actions along with a
time stamp and the name of the operator who performed the action or acknowledged the alarm, or failed to
take action or acknowledge the alarm.
In some other cases, security means restricting features or restricting access to areas of the
application based on user names or roles. This is done by setting a visibility or disable link on the
graphic, such as only allowing a button to be clicked if the operator is part of the supervisor’s group
T
with the proper training.
The operating system security type passes authentication requests to the Windows operating system
or to the domain security through Active Directory. The OS Security option allows InTouch to meet
O
security requirements in regulated industries. These specifications are established by the Food
and Drug Administration (FDA) in 21 CFR Part 11.
OS Security adds the benefits of password expiration, restricting the number of unsuccessful login
attempts, policing to restrict the strength of passwords, and the use of special characters,
encryption, and other benefits.
N

Different Authentication Security Modes


All types of InTouch security authenticate users during the logon process with a user name and
password combination. Each type of security provides a different mechanism to verify the user
name and password during the authentication process.
o

 InTouch Security
 OS Security
 ArchestrA Security
D

AVEVA™ InTouch HMI 2020 R2


9-4 Module 9 – Security

Using InTouch Security


 Applying security to your application is optional. By default, an InTouch application is not
secured. However, you can restrict which functions an operator is allowed to perform by linking
those functions to internal tags. In addition, when you establish security on your application,
audit trails can be created that associate alarms and events to the operator logged on to the
InTouch HMI.
 When you set the InTouch Security Type to InTouch, a pop-up dialog appears, suggesting
to switch to OS security mode. The dialog also appears on the launch of WindowMaker, if

y
InTouch security is used for the application. You can choose to turn off the notification.
 Security is based on operators authenticating themselves by entering a user name and
password to log on to an InTouch application. You must assign user name, password, and
access level for each operator.

op
 When you create a new application, by default, the user name is set to
 Administrator with an access level of 9999, which allows access to all security
commands. The maximum number of characters for a password is 29.
 After you add a new user name to the security list and restart WindowMaker or
WindowViewer, the default user name is automatically reset to None with an access level
of 0, which prevents access to the Configure Users command in both WindowMaker and

C
WindowViewer. However, the Administrator account and password remain and can still be
used.
 After an operator logs on to the application, access to any protected function is granted
upon verification of the operator's password and access level against the value specified
for the internal security tag linked to the function.
 For STANDALONE + Symbols applications, only users with Administrator privileges are
T
allowed to open and edit applications in InTouch WindowMaker. If a user without
administrator privileges attempts to launch InTouch WindowMaker, an error dialog box
appears, informing users that they need administrative privileges to proceed.
O
Using OS Security
 An OS security (operating system-based) authentication method inherits enforcement of
some account policies from the Windows operating system, while other policies are
enforced from the InTouch HMI. Password policies such as maximum and minimum
N

password age and minimum password length are enforced by the operating system.
 User names used during installation act as a part of the operating system. The Windows
domain must be set up with the desired account policies to enforce these standards. The
InTouch HMI enforces the inactivity time-out period.
 In the operating system-based authentication method, user names can be chosen from
the list of users associated with a Windows Network Domain or Workgroup. Each user
o

name has an assigned access level that determines the user's authorization for a given
activity. Because the operating system manages passwords internally, the InTouch HMI
does not store passwords on the node hosting the application.
D

 Operating system-based security uses the InTouch AddPermission() script function to


define and maintain a list of users and their corresponding access levels. This list, created
after the execution of the AddPermission() call, is written to disk. The file containing the
authentication details of users is not copied to NAD client nodes.
 The operator can log on to the application by executing the
 Log on menu command under Security in the WindowViewer Special menu (if the
Special menu is shown), or you can create a custom log on window with touch-sensitive
input objects that are linked to internal security tags.

AVEVA™ Training
Section 1 – OS Security Implementation 9-5

 The commands used to establish security on an application are located under


 Security on the Special menu in both WindowMaker and WindowViewer. The security
commands are used to log on and off the application, change passwords, and to configure
the list of valid user names, passwords, and access levels.
 For example, you can control access to a window, the visibility of an object, and so on, by
specifying the logged on operator's access level must be greater than 2000.

Using ArchestrA Security

y
 When you configure a node to use ArchestrA security, the InTouch HMI uses methods and
dialog boxes from Application Server for logon and logoff operations. Users are configured
on the Application Server Galaxy Repository node. For more information, see the

op
Application Server documentation.
 ArchestrA security enables you to easily define users and assign the operations they are
allowed to perform. Define security permissions in terms of the operations the users can
perform using automation objects. The basic approach consists of the following steps:
1. Define the security model.
2. Organize the automation objects according to the security model for protection.

C
3. Define the users according to the security model.
 The system administrator defines the system users by creating corresponding user
profiles. The system administrator then assigns one or more roles to each user by
selecting from a list of user roles predefined in the security model.
 If you are using InTouch with ArchestrA-based security, the maximum number of
characters for a password is 31.
T
 InTouchView users are normally authenticated by means of a password-based log-on.
 Information spread across modules and sections (hard to find = hard to use as reference
after class)
O

Comparing Authentication and Authorization


 Authentication is the process of verifying the identity of the user. Typically, operators enter
a user name and password to authenticate themselves before using an InTouch
N

application. All three types of security verify the user’s credentials during the logon
process as part of the authentication process.
 Authorization is the process of determining if an authenticated user has access to the
requested resources. Typically, access to InTouch functions is granted based upon the
user’s membership in a group or assigned access level.
o
D

AVEVA™ InTouch HMI 2020 R2


9-6 Module 9 – Security

Auditing
Tracking operator log in and log out, and tracking operator’s actions, requires enabling both
security and the InTouch Alarms and Events subsystem. When users are created to be used in
an InTouch application, audit trails can tie operators to all alarms/events that occur during the time
that they are logged in to the system. Using the .NET Alarm Client along with the Alarm DB
Logger, it is possible to search through historical events and alarms to determine who the
operator was at the time the event occurred.

y
Note: InTouch logs activities of the user who is logged in. Proper training is necessary to make sure
operators log in and out of the system during shift turnover to ensure the person performing the
activities is the person logged in.

op
Concepts in Securing an Application
InTouch provides a number of system tags and script functions that allow InTouch designers to
configure security and application behavior, or take specific actions based on security settings and
the current operator or operator role. Once a user is validated and logged in to the InTouch
application, the $Operator and $AccessLevel system tags contain information, as set by the

C
application for that operator’s user name and access level.
To log in to an InTouch application, application designers can allow users to select Special/
Security/Logon from WindowViewer, or call a script function to display a standard log in dialog
box, or present a fully customized log in window.
$AccessLevel is the tag that is normally used to secure InTouch applications. This allows
T
designers to categorize users based on experience or training without restricting the application to
specific users. Restricting access based on specific user names is difficult to maintain with user
changes through termination of employment, promotion to another department, failing to recertify
for certain tasks or responsibilities, and other reasons where the operator is no longer qualified.
O
By linking graphics, scripts, and other application features to $AccessLevel, the application
designer can restrict what operators can do within the InTouch application. For example, to disable
a pushbutton that allows an operator to navigate to a PID loop tuning window, on the button, you
can add a Disable or Visibility animation with an expression such as $AccessLevel < 5000,
where the designer has set a value of 5000 as the minimum training level and experience required
N

to tune a PID loop. In this example, junior operators who have not received their certifications
would be configured for access levels below 5000.

No Authentication
The default security setting for InTouch applications is "None." When no authentication is used,
o

$Operator and $OperatorName are both set to None and $AccessLevel is 9999. The Special/
Security options in the menu bar in View are all disabled. Also, the binary file password.bin is not
created in the application directory.
D

AVEVA™ Training
Section 1 – OS Security Implementation 9-7

OS Authentication
With OS authentication, users and groups configured in the local machine (when leaving the
domain field blank or specifying the node name of the local machine), or when using Domain
Security such as through Microsoft Active Directory, are assigned access levels using the
AddPermission() script function. There is a tight coupling of the Microsoft group name with a
specific $AccessLevel through this script function. Beyond this relationship, there is no means for
InTouch to know how your IT department or HR Department are using those groups. For example,
your HR Department may have an employment category in Active Directory named Guests and
Visitors, which an InTouch designer may choose to grant an $AccessLevel of 9000, giving them

y
administrator rights within InTouch. Beyond this association through scripting, InTouch has no
ability to check the meaning or usage of the Microsoft group. Therefore, InTouch designers must
work closely with IT and HR to establish the proper associations based on certifications,

op
experience, and training within these groups.
OS Users may be part of one or more groups; if multiple access levels are set to multiple groups, a
user logging in to the InTouch application will get the highest access level assigned by any of the
groups he/she is part of.

Note: Once the OS Security Type has been selected, the user registered during the InTouch
installation is the only user who has permission to change the Security Type.

Creating a Custom Security Log in Window

C
$OperatorEntered, $PasswordEntered, and $OperatorDomainEntered are the three tags to be
used in case a custom log in dialog box is required. The key distinction of these tags is the word
T
Entered implying these writable tags expect input to take action. Create a popup-type window and
set user touch links (user input string) to these tags. If the provided credentials are validated by
Microsoft, then $Operator, $AccessLevel, $OperatorDomain will update accordingly.
Designers may link the $OperatorEntered, $PasswordEntered, and $OperatorDomainEntered
O
system tagnames to user input objects or use them in a QuickScript to set the User Name,
Password, and Domain Name being passed to Microsoft. These are internal message (string)
type tagnames that are intended for write operation only. With OS Security, where authentication is
being done without a domain controller and is based on local machine only, authentication
$OperatorDomainEntered must be set to an empty string (blank) or using the name of the local
N

machine (from a cmd.exe prompt, type hostname and press Enter to get the local machine name).
After an operator logs on to the application, access to any protected function will be granted upon
verification of the operator's password, and access level against the value specified for the internal
security tagname will be linked to the function.
o
D

AVEVA™ InTouch HMI 2020 R2


9-8 Module 9 – Security

System Tags in InTouch Related to Security


The following system tags are available for security.

Tagname Type Valid Values Access


$AccessLevel System Integer 0-9999 Read Only
$ChangePassword System Discrete 1 or 0 Read Write
$ConfigureUsers System Discrete 1 or 0 Read Write
$InactivityTimeout System Discrete 1 or 0 Read Write

y
$InactivityWarning System Discrete 1 or 0 Read Write
$Operator System Message 16-characters max Read Only
$OperatorName System Message 131-characters max Read Only

op
$OperatorDomain System Message 16-characters max Read Only
$OperatorDomainEntered System Message 16-characters max Write Only
$OperatorEntered System Message 16-characters max Write Only
$PasswordEntered System Message 16-characters max Write Only
$VerifiedUserName System Message 16-characters max Read Only

C
Three internal security tags are used in buttons in animation link expressions or QuickScripts, and
so on. They are $Operator, $AccessLevel, and $OperatorName. These tags control whether or
not the logged-on user is allowed to perform specific functions.
For example, to make an object become visible based on the logged on users’ access level, the
following statement could be used in a Visibility animation link expression:
T
$AccessLevel >= 2000
Or, a QuickScript can be bounded by an IF statement:
IF $Operator == "DayShift" THEN
O
Show "Control Panel Window";
{and other lines that only execute for the DayShift Operator}
ENDIF;
N

You can also control an object's touch functionality based on the value of an internal security
tagname by using the Disable animation link.
For example:
o
D

In this example, when no one is logged on, the object or button is secured from tampering.

AVEVA™ Training
Section 1 – OS Security Implementation 9-9

Creating Authority Check Functionality with OS or ArchestrA Security


In regulated industries, there are instances where a change in a value must be authorized by a
person other than the operator that is logged in. This function allows you to implement a Done by/
Checked by logic in the application. The InvisibleVerifyCredentials() function combined with the
$VerifiedUserName can be used to verify the credentials of a user other than the currently logged
in user. $VerifiedUserName contains the verified user's full name if the call to
InvisibleVerifyCredentials() is successful; the return of InvisibleVerifyCredentials() is the
access level set for the user that was verified. If the call fails, then $VerifiedUserName tag will be
set to null and the return value is -1.

y
Logging in Using the Current User

op
In some designs, company policy may require each user to log in to the operating system and log
out of the operating system when switching users. In such cases, the InTouch designer may use
the LogonCurrentUser(); script function instead. This would not require displaying a separate log
in dialog box for InTouch. However, this design, depending on environment and configuration, may
require waiting for WindowViewer to start when operators are switched.

Script Functions in InTouch Related to All Security Models

C
InvisibleVerifyCredentials()
Checks to verify the credentials of the given user without logging the user in to InTouch.
Syntax
AnalogTag=InvisibleVerifyCredentials
T
( "UserId","Password", "Domain" );
Remarks
If the supplied combination of user, password, and domain are valid, the corresponding access
level associated with the user is returned as an integer; in all other cases, -1 is returned. This
O
call does not change the currently logged in user.
Set the Domain argument to blank (“”) or InTouch if the Authentication Mode is InTouch and
to Galaxy if the Authentication Mode is ArchestrA.
N

PostLogonDialog()
Brings up the InTouch Logon Dialog and returns TRUE.
Syntax
DiscreteTag=PostLogonDialog();
Remarks
o

This brings up the InTouch Logon Dialog and returns TRUE.


D

AVEVA™ InTouch HMI 2020 R2


9-10 Module 9 – Security

AttemptInvisibleLogon()
Attempts to log in to InTouch using the supplied credentials.
Syntax
DiscreteTag=AttemptInvisibleLogon
( "UserId","Password", "Domain" );
Remarks
An attempt is made to log in to InTouch using the supplied credentials. The domain is ignored if

y
the security mode is not OS. If the log in attempt succeeds, TRUE is returned and the system
tags $OperatorDomain, $OperatorName, $AccessLevel, and $Operator are updated
accordingly. If the log in attempt fails, FALSE is returned and the currently logged in user (if
any) continues to be the current user.

op
Logoff()
Logs the user out of InTouch.
Syntax
DiscreteTag=LogonOff();
Remarks

C
Logs the user off.

Script Functions Specific to Operating System Security


AddPermission()
Sets the Access Level to a particular group or user in the specified domain.
T
Syntax
DiscreteTag=AddPermission
( "Domain", "Group", AccessLevel);
O
Remarks
This is valid for OS security mode only. An attempt is made to reach the account Account on
domain Domain. If successful, a TRUE is returned and the access level AccessLevel is
assigned to the account in the internal records in InTouch for use during authorization when a
N

user logs in. In all other cases, a FALSE is returned.


The Group parameter can be any valid group or user defined in the specified Domain
parameter. It is also important to note that the access level set for each group does not have
anything to do with the rights for each group. For example, nothing prevents you from giving
the Guests group an access level of 9999 or the Administrators group an access level of 100.
o
D

AVEVA™ Training
Section 1 – OS Security Implementation 9-11

GetAccountStatus()
Used to determine when a user’s password will expire.
Syntax
GetAccountStatus( Domain, UserID );
Remarks
This is used to determine when a user’s password will expire. Return value will display the
number of days (positive value) until the user’s password expires. GetAccountStatus also

y
displays the following account status values:
Account password expired = -1
Account password will never expire = -2

op
Account locked out = -3
Account disabled = -4
Account info failed = -5
Users can write a script to display a window with either the number of days until the user’s
passcode expires or the proper message/warning that corresponds to the return value of the

C
function.
LogonCurrentUser()
Whoever is logged in to the computer will be logged in to InTouch.
Syntax
LogonCurrentUser();
T
Remarks
This script function is designed for InTouch to run in OS security mode. When the script
function is called, whoever is logged in to the computer will be logged in to InTouch.
O
QueryGroupMembership() Syntax
DiscreteTag=QueryGroupMembership("Domain","Group");
Remarks
N

This is valid for OS security mode only and applies to the currently logged in user. If a user is
currently logged in and is part of the group that is located on the domain, a TRUE is returned;
in all other cases, a FALSE is returned.

Script Functions Specific to ArchestrA Security


IsAssignedRole()
o

Used to find out if current logged in user has the indicated role.
Syntax
D

DiscreteTag=IsAssignedRole( "RoleName" );
Remarks
This is valid for ArchestrA security mode only and applies to the currently logged in user. If a
user is currently logged in and has the role RoleName assigned in the ArchestrA IDE, a TRUE
is returned; in all other cases, a FALSE is returned.

AVEVA™ InTouch HMI 2020 R2


9-12 Module 9 – Security

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 23 – Setting Up and Using OS Security 9-13

Lab 23 – Setting Up and Using OS Security

Introduction
In this lab, you will set up Operating System (OS) Security in InTouch. OS Security allows InTouch
to use Active Directory or Local Machine security to authenticate users. You will set up the user
interface for operators to log in to the application, assign InTouch access levels based on group
membership, and verify group membership.

y
Objectives

op
Upon completion of this lab, you will be able to:
 Configure a security environment with OS Security
 Use a native InTouch Application script to set up user permissions and access levels
 Use a native InTouch Data Change script to monitor user changeover
 Log in using the PostLogonDialog( ) script function in Industrial Graphics
 Log off the current user with the LogOff( ) script function in Industrial Graphics

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


9-14 Module 9 – Security

Set Up OS Security
For classrooms without a domain set up, local users and groups must be created before starting
this lab. If your instructor directs you to “Create Local Users and Groups (Non-domain
Classroom Setting Only)” on page 9-26, follow the steps there first, and then come back here to
follow the steps below. If your instructor does not direct you to Create Local Users and Groups
later in the lab, follow the steps below.
In the following steps, you will enable OS Security and create security scripts.

y
1. Close WindowViewer.
2. On the WindowMaker Special menu, select Security | Select Security Type | OS.

op
OS Security has been enabled.

C
3. In the Scripts pane, double-click Application.
T
O
N
o
D

AVEVA™ Training
Lab 23 – Setting Up and Using OS Security 9-15

The Application Scripts dialog box appears.

y
op
C
4. On the Condition Type drop-down list, select On Startup.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


9-16 Module 9 – Security

5. In the script body, enter the following:

Note: You may copy and paste the script from the following text file:
C:\Training\Lab 23 - Setting Up and Using OS Security.txt

Note: Your instructor will provide the domain name for this script.

DIM Success AS DISCRETE;

y
Success = AddPermission("CLOUD","Application Administrators", 9000);
Success = AddPermission("CLOUD","Plant Supervisors 1", 8000);
Success = AddPermission("CLOUD","Plant Operators 1", 5000);

op
C
The Application On Startup script executes when WindowViewer starts. Any modifications
made to this script after WindowViewer is launched will require WindowViewer to be restarted.
T
6. Click OK.
7. In the Tagname Dictionary, create a tag named GroupMembership.
8. Change the Type to Memory Message.
O
9. In the Initial Value field, enter None.
N
o
D

10. Click Close.

AVEVA™ Training
Lab 23 – Setting Up and Using OS Security 9-17

Monitor New User Logins


11. In the Scripts pane, double-click Data Change.

y
op
12. In Tagname[.field], enter $Operator.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


9-18 Module 9 – Security

13. In the script body, enter the following:

Note: You may copy and paste the script from the C:\Training\Lab 23 - Setting Up and
Using OS Security.txt file.

GroupMembership = "";
IF QueryGroupMembership( "CLOUD", "Plant Operators 1" ) == 1 THEN
GroupMembership = "Operator";
ENDIF;

y
IF QueryGroupMembership( "CLOUD", "Plant Supervisors 1" ) == 1 THEN
GroupMembership = "Super";
ENDIF;
IF QueryGroupMembership( "CLOUD", "Application Administrators" ) == 1 THEN

op
GroupMembership = "Admin";
ENDIF;
IF $Operator == "None" THEN
GroupMembership = "None";
ENDIF;

C
T
14. Click OK.
O
N
o
D

AVEVA™ Training
Lab 23 – Setting Up and Using OS Security 9-19

Create Security Logon Symbol


Next, you will create a symbol that will be used to call up the log on prompt, log off the current user,
and display security tags.
15. In the WindowMaker Training toolset, create a new symbol named SecurityLogon and open
it for editing.
16. Embed the Situational Awareness Library\Input\SA_NumericalEntry symbol.
17. Configure the Properties pane as follows:

y
Name: DisplayAccessLevel
Type: Output

op
EngUnits: False
QualityStatusIndicator: False
Outline: False

C
T
O
18. Substitute strings as follows:

Old New
##.## #
Label Access Level
N

19. Right-click DisplayAccessLevel and configure the custom properties as follows:

Name Default Value Visibility


LabelVisible True Public
o

PV $AccessLevel Public
D

20. Click OK.

AVEVA™ InTouch HMI 2020 R2


9-20 Module 9 – Security

21. Embed the Situational Awareness Library\Input\SA_TextEntry symbol below


DisplayAccessLevel.

y
22. Configure the Properties pane as follows:

op
Name: DisplayOperator
Type: Output
QualityStatusIndicator: False
Outline: False

C
T
O
23. Substitute strings as follows:

Old New
##.## #
N

Label Operator

24. Right-click DisplayOperator and configure the custom properties as follows:

Name Default Value Visibility


LabelVisible True Public
o

PV $Operator Public
D

AVEVA™ Training
Lab 23 – Setting Up and Using OS Security 9-21

25. On the canvas, duplicate DisplayOperator, and place the duplicate below the original.
26. Name the duplicate DisplayGroup.
27. Substitute strings, and replace Operator with Group.
28. Substitute references, and replace $Operator with GroupMembership.
29. Right-click the canvas and select Select All.
30. On the Alignment toolbar, click Align Left.

y
op
31. On the Alignment toolbar, click Make Vertical Spacing Equal.

C
The canvas will look similar to the following image.
T
32. Reposition the elements to make room on the left for buttons that will be added in the following
O
steps.
N

Next, you will create buttons to log on and log off.


33. On the left of the elements, draw a button labeled Log On, and configure it as follows:
o

Name: LogOnButton
Element Style: Intensity1
D

AVEVA™ InTouch HMI 2020 R2


9-22 Module 9 – Security

34. Double-click LogOnButton.


35. In the Edit Animations dialog box, add an Action Scripts animation with the Trigger type
configured as OnLeftClick/Key/TouchDown:

36. Click Script Function Browser .


37. In the Script Function Browser, expand InTouch.
38. Scroll down, and select PostLogonDialog.

y
op
C
T
O
N

39. Click OK.


The PostLogonDialog(); script function is entered into the script.
o
D

40. Click OK.


41. Duplicate the button, and place it below LogOnButton.
42. Name the duplicate LogOffButton.
43. Substitute strings, and replace Log On with Log Off.
44. Double-click LogOffButton.
45. In the Action Scripts animation, clear the script.

AVEVA™ Training
Lab 23 – Setting Up and Using OS Security 9-23

46. Click the Script Function Browser button.


47. In the Script Function Browser, expand Graphic Client.
48. Select Logoff.

y
op
C
T
O
49. Click OK.
The Logoff(); script function is entered into the script.
N

50. Click OK.


51. Save and close SecurityLogon.
o
D

AVEVA™ InTouch HMI 2020 R2


9-24 Module 9 – Security

52. In WindowMaker, ensure only the Menu window is opened.


53. Embed the SecurityLogon symbol on the right side of the Menu window.

y
Test in Runtime

op
Finally, you will test logging in and logging off at runtime.
54. Click RUNTIME.
The SecurityLogon symbol is displayed in the Menu window.

C
55. Click the Log On button.
The Log On dialog box opens.
T
O
N
o
D

AVEVA™ Training
Lab 23 – Setting Up and Using OS Security 9-25

56. In the Log On dialog box, enter the following:

User name: maryl


Password: ww
Domain: CLOUD

Note: Your instructor will provide the authentication information.

y
op
57. Click OK.

C
The SecurityLogon symbol will look similar to the following image.
T
O

58. Click Log Off.


The SecurityLogon symbol will look similar to the following image.
N
o

59. Click Development!.


D

<End of Lab>

AVEVA™ InTouch HMI 2020 R2


9-26 Module 9 – Security

Create Local Users and Groups


(Non-domain Classroom Setting Only)
These additional steps are for classrooms without a domain set up. You must create local users
and groups before starting this lab. Your instructor will inform you if you need to do this setup.
In the following steps, you will start Computer Management and create users.
1. Open Computer Management.

y
2. Expand Local Users and Groups.
3. Right-click Users, and select New User.

op
C
T
O
4. Configure each of the users as follows:

Note: Your instructor will provide passwords that adhere to the local security policy.
N

User name Full name Password User must change password at next logon
maryl Mary Lee unchecked
karent Karen Turner unchecked
johnj John Johnson unchecked

5. Click Close.
o

Next, you will create new local groups and assign users.
6. In Computer Management, right-click Groups, and select New Group.
D

AVEVA™ Training
Lab 23 – Setting Up and Using OS Security 9-27

7. Configure each of the groups, and add the user associated with that group as follows:

Group name Members


Application Administrators maryl
Plant Supervisors 1 karent
Plant Operators 1 johnj

8. Click Close.

y
9. Close Computer Management.
10. Return to “Set Up OS Security” on page 9-14 and continue this lab.

op
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


9-28 Module 9 – Security

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 2 – Lock Down Your Application 9-29

Section 2 – Lock Down Your Application


This section will provide an overview of the Animation Links dialog box and explain Action Script
methods you can use to secure your application. This section will also describe the function used
to enable and disable the Alt, Escape, and Windows keys.

Overview

y
Enhancing Security may begin with basic configuration options available on Special | Configure
options, including the ability to disable the menu bar or individual menu items, the Tag Viewer, or
even make WindowViewer impossible to close.

op
WindowViewer can be configured to automatically logout users based on inactivity. The Inactivity
timeout option is accessible on Special | Configure | WindowViewer. Additionally, Home
windows may be defined on Special | Configure | Home Windows so that the initial window or
windows, which appear when WindowViewer is first started do not give access to any sensitive
areas.
But the most significant power in customizing and enhancing security is done through InTouch
scripts to build sophisticated and robust applications. You may use InTouch scripts to create a

C
completely regulation compliant and secure application.
In terms of security, scripts can generally be run in two different ways:
 Event-based scripts run once when an event occurs allowing you to take immediate,
unassisted action. For example, an event-based script can run after a condition is met or
the value of a key process I/O point changes. Using I/O tagnames tied to external security
systems, such as door locks and proximity alarms, or other external security stimuli,
T
InTouch scripts can be used then to handle a wide array of standard operating procedures,
work flow, or processes insuring your people, facility, products, services, and investments
remain secure
O
 Time-based scripts run periodically to continue to keep systems running within
operational norms or where predictive measures can be taken to avert failure or downtime
InTouch provides a number of System tags and script functions that allow you to configure security
for the individual application. By combining scripts with system tags related to security, you can
add a number of powerful features to your application, monitoring special conditions, and dealing
N

with critical events for example environmental or safety issues. You can also use Touch scripts for
sophisticated operator input into the system, and apply levels of security to various functions.
o
D

AVEVA™ InTouch HMI 2020 R2


9-30 Module 9 – Security

Configuring Inactivity to Automatically Log off


You can configure your application to automatically log off the operator when there has been no
activity for a specified period of time by using the warning and timeout settings.
On the Special menu, click Configure, and then click WindowViewer, or in the Application
Explorer under Configure, double-click WindowViewer. The WindowViewer Properties dialog
box appears with the General tab active. In the Application Explorer, you can also right-click
WindowViewer, and then click Open.
In the Warning field, enter the number of seconds that can elapse with no operator activity (mouse

y
clicks or keystrokes) before the system discrete tagname $InactivityWarning is set to 1 (True).
When the Inactivity Warning is set to 0, there will not be an inactivity warning.

op
Note: You can use $InactivityWarning in a Condition QuickScript to show a window warning to
operators that they are about to be logged off the system. If the operators click the mouse, press a
key, or perform an action using any other pointing device before the specified timeout elapses, they
are not logged off. $InactivityWarning and the timer are reset.

In the Timeout field, type the number of seconds that can elapse with no operator activity (mouse
clicks or keystrokes) before the system discrete tagname $InactivityTimeout is set to 1 (True).

C
When $InactivityTimeout is true, the system sets the logged on operator name to the reserved
name None and sets the security tagname, $AccessLevel, to 0.

Note: You can use $InactivityTimeout in a Condition QuickScript to show a window telling the
operators that they have been logged off the application.
T
You can use the Timeout feature independently of the Warning feature. However, the Timeout
value must be greater than the Warning value for proper use of both system tagnames. After a
successful log in, the timers for both the warning and timeout start. For example, set
$InactivityWarning to 30 and $InactivityTimeout to 45. The operator will be logged off 15
O
seconds after the $InactivityWarning variable is set to 1.

Securing the Application


The following section explores securing the application in greater detail. As discussed in the
N

previous module, the three major aspects of security are as follows:


 Securing the Operating System
 Auditing
 Securing the Application
o
D

AVEVA™ Training
Section 2 – Lock Down Your Application 9-31

Customizing the Runtime Environment


Like WindowMaker, WindowViewer includes many options to customize your runtime environment.
For example, you can set the blinking speed for blinking objects, the system inactivity timeout and
warning values, and the windows that are automatically opened when WindowViewer is started
from its icon or its menu command.
Securing any InTouch application involves identifying ways the application can be accessed by
users in the Windows environment, but also includes remote clients attempting to retrieve data
from WindowViewer. InTouch allows you to define various options to increase the robustness and

y
to secure your application by turning off undesired menu bar entries, certain Alt, Esc, and Win key
keystrokes and key combinations, as well as operating system lockdown. You can use these
options to prevent users from performing potentially dangerous actions. In combination, these
features ensure that users do not have access to change the application environment, close the

op
application, or escape from the application to start unauthorized programs.
Secure the operating system by limiting user access to applications outside of InTouch.
Operating system security is configured from the WindowViewer Properties dialog box,
Windows Configuration tab. This is accessed on the Special menu by selecting
Configure | WindowViewer.
Here you can turn off undesired menu bar entries, certain keystrokes, and other settings to ensure

C
that users do not change the application’s environment, close the application, or escape from the
application to other programs.
Use Menus settings to show or hide different menu options within WindowViewer, hide the menu
bar, prevent the operator from switching to WindowMaker, and prevent the operator from starting
and stopping QuickScripts during runtime.
T
Use Title Bar options to hide the application's title bar in runtime.
Use Miscellaneous options to disable certain keystrokes such as Ctrl, Alt, Esc, and Win. You can
also set WindowViewer window as maximized at all times.
O
For more information please see the System Platform documentation.

Restricting User Input


N

InTouch includes the script function EnableDisableKeys() that enables/disables the Alt, Tab, or
Win keys in runtime. Disabling these keys prohibits users from switching between windows
applications or accessing the task bar. This function, combined with WindowViewer settings to
Always Maximize and hide menu bar and Windows control options, will effectively secure the
operating system.
Another common practice to hide/show the menu bar in View is to create a popup window with its
o

X,Y coordinates set to 0,-38 with a height of 38 pixels and a width equal to the display resolution
(e.g. 1280). This example uses the Microsoft Windows Server 2003 Operating System, with a
screen resolution of 1280 x 1024. Values will differ depending on the Operating System and
resolution used. Values will be -48 and +48 if XP look and feel is applied.
D

AVEVA™ InTouch HMI 2020 R2


9-32 Module 9 – Security

Auditing the Application


When a security model is applied to an InTouch application, the Alarm and Event sub-system
provides an audit trail associating users to all alarms/events that occur during the time that they
are logged onto the system.
Both the Distributed Alarm Object and the Alarm Display ActiveX control provide for displaying the
logged on Operator name.

Scripting and System Tags

y
InTouch provides a number of System tags and script functions that allow you to configure security
for the individual application. By applying security to your application, you can control specific

op
functions a user is allowed to perform by linking those functions to internal tagnames. Once a user
is validated and logged on to the InTouch application, the $Operator and $AccessLevel system
tags contain information about the user and their access level.
To log on to an InTouch application, users can select on the Special menu, Security | Logon, call
a script function to display a logon dialog box, or log on via a custom logon window.
$Operator and $AccessLevel are tags used to secure InTouch applications. These are system
tags used to control what a user has access to during runtime. For example, to disable a

C
pushbutton, assign a Disable or Visibility animation link to it with an expression, such as
$AccessLevel < 9000 or $Operator == xxx.

InTouch Authentication
InTouch authentication uses a binary password file that contains user identification, passwords,
T
and access levels. In addition, you can use Operating System authentication, ArchestrA
authentication, or no authentication at all.
In WindowMaker, access security commands are available from the Special menu, Security
options. These commands are used to log on and off the application, change passwords and to
O
configure the list of valid user names, passwords, and access levels.
You can link a User Input - Discrete button to the $ConfigureUsers tag to allow an authorized
user with an access level of equal to or greater than 9000 to display the Configure Users dialog
box. The dialog box is used to edit the security user name list.
N

When the user clicks the button, the value of the $ConfigureUsers tagname is set to 1 and the
Configure Users dialog box appears. When the user closes the dialog box, the system resets the
value to 0 (This is a system discrete tag intended for write-operation only).
If the Special menu does not display in WindowViewer, you can create a custom logon window to
allow users to log on to the application.
o

You can also link a User Input - Discrete button to the $ChangePassword tagname to show the
Change Password dialog box and allow the user to change his/her password. When the user
clicks the button, the value of the $ChangePassword tagname is set to 1 and the Change
Password dialog box appears.
D

When the user closes the dialog box, the system resets the value to 0 (This is a system discrete
tagname intended for write operation only.)
The None and Administrator names are reserved. Only the password of the Administrator may
be changed. Once you have configured user names for your application, you should change the
Administrator name's password since it will more than likely become known to most users of the
system. The Administrator default access level (9999) is the highest and allows access to
everything including the Configure Users menu command.

AVEVA™ Training
Section 2 – Lock Down Your Application 9-33

Configuring Log In and Log Off


Logging on to and logging off from an InTouch application varies by the type of security used to
protect an application. You can configure the application to automatically log off the user after
specified inactivity duration.

Log on
In addition to configuring user log on, you can configure log on options using scripts and with
system tags.

y
 Use the PostLogonDialog() script to show the InTouch Logon dialog box and return
TRUE.
Use the AttemptInvisibleLogin() to attempt logging in to InTouch using the supplied

op

credentials.
 Use System Tags $OperatorEntered, $PasswordEntered and $OperatorDomainEntered
in a script to set the user name, password, and domain name. These tags are internal
message type tags that are intended for write operation only.
If the log on is successful, the $AccessLevel system tag is set to the predefined value associated
with the user in the InTouch security user list.

C
Log Off
Use the following scripting and system tag options to configure user log off options.
There are two topics pertinent to logging out of the InTouch security system:
 Use the LogOff() script to set the current user status to the default None user.
T
 Use the $OperatorEntered = “None” System Tag when you create a custom log on
window. You can link touch-sensitive input objects and QuickScripts to this tag to set the
user name for the logon.
O
When you log off your InTouch application using the Log Off option from Special | Security, the
User Name is reset to None with an Access Level of 0.
N
o
D

AVEVA™ InTouch HMI 2020 R2


9-34 Module 9 – Security

EnableDisableKeys() Function
You can write a script to enable or disable the Alt, Escape, and Windows system keys based on
the access level of the user logging in to WindowViewer. This is one way of securing your
application and preventing operators from closing an InTouch application in WindowViewer.
The details of the function are provided below.

Category

y
View

Syntax

op
EnableDisableKeys(AltKey, EscKey, WinKey);

Parameters
AltKey
Integer to enable or disable key filters for the Alt key:

C
1 = enable filter (disable Alt key)
0 = disable filter (enable Alt key)
EscKey
Integer to enable or disable key filters for the Escape key:
1 = enable filter (disable Esc key)
T
0 = disable filter (enable Esc key)
WinKey
O
Integer to enable or disable key filters for the Windows key:
1 = enable filter (disable Win key)
0 = disable filter (enable Win key)
N

Disabling the Alt key also disables the Win+L key combination (for locking the Windows desktop).
Win+L is the shortcut for another combination of keys that involves the Alt key. Disabling the Alt
key also disables the shortcut for locking the Windows desktop.
Disabling the Esc key disables it for all actions.
Examples of the functions you would use to disable/enable the keys are shown below:
Enable All Three Keys:EnableDisableKeys(0,0,0);
o

 Disable All Three Keys:EnableDisableKeys(1,1,1);


 Disable Windows Key only:EnableDisableKeys(0,0,1);
D

In virtual environments, such as those often used for classroom instruction, keystroke
combinations involving Alt, Esc, and Win are captured by the host operating system and not
passed through to the virtual environment. This makes it impossible to properly test all key
combinations. Quite often the affected key combinations include Ctrl + Shift + Esc for launching
Task Manager or Ctrl + Alt + Delete for OS Logon and OS Logoff or the Win key for calling Start
Menu appear unaffected by lockdown features. Consistently however, the Alt key will work in
combinations such as Alt + F for the WindowViewer File menu, or Alt + S for the WindowViewer
Special menu and may be tested faithfully within all virtual classroom environments.

AVEVA™ Training
Lab 24 – Locking Down Your Application 9-35

Lab 24 – Locking Down Your Application

Introduction
In this lab you will configure automatic logoff and secure your application from unauthorized
access. When no user is logged into the application you will hide sensitive information from
unauthorized users, and restrict unauthorized access to the application using a variety of script
types. You will also modify the Menu window to hide the WindowViewer menu bar. Finally, you will

y
create a script to prevent the use of special access keys, including the Win and Alt keys.

Objectives

op
Upon completion of this lab, you will be able to:
 Configure automatic logoff
 Permit window navigation for authorized users
 Hide menu access in WindowViewer
 Select Home Windows for your application

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


9-36 Module 9 – Security

Configure Automatic Log Off


In the following steps, you will open WindowViewer Properties and configure the Automatic Log
Off settings.
1. Close WindowViewer.
2. On the WindowMaker Special menu, select Configure | WindowViewer.
3. On the General tab, Inactivity area, Timeout field, enter 20 seconds.

y
op
C
T
O
N
o
D

4. Click OK.
5. Ensure only the Menu window is open.

AVEVA™ Training
Lab 24 – Locking Down Your Application 9-37

Test Automatic Logoff in Runtime


Next, you will test what you have just configured in runtime.
6. Click RUNTIME.
7. Logon as maryl.

Note: Your instructor provided the domain name and password.

y
8. Wait 20 seconds until automatic logoff occurs.
maryl is logged off after 20 seconds.

op
Prior to the timer expiring a mouse click in any part of WindowViewer will reset the timer.
9. Click Development!.

C
Automatic logoff will be turned off to prevent it from interfering with the remaining steps in this
course.
10. Close WindowViewer.
11. Open WindowViewer Properties, and set the Timeout field to 0 seconds.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


9-38 Module 9 – Security

Create a Script to Monitor User Authorization


Next, you will configure the Home window to show when no user is logged in and restore a set of
windows when a user logs in.
12. In WindowMaker, open the Home window.
13. In the Scripts pane, expand Data Change, and double-click $Operator.
14. In the script body insert the following script in front of Line 13.

y
Note: You may copy and paste the script from the C:\Training\Lab 24 - Locking Down
Your Application.txt file.

op
Show "Home";
ELSE
Show "KPI";
Show "Mixer";
Show "Current_Alarms";
The modified script will look like the following image.

C
T
O
N
o

15. Click OK.


D

AVEVA™ Training
Lab 24 – Locking Down Your Application 9-39

Set the Home Windows


Next, you will set the Home Windows for your application.
16. In WindowMaker, open WindowViewer Properties.
17. Click the Home Windows tab, and check the Home and Menu window check boxes.

y
op
C
T
O
N
o

18. Click OK.


D

Note: The WindowViewer Home Windows feature will be tested in a future lab.

AVEVA™ InTouch HMI 2020 R2


9-40 Module 9 – Security

Test What You Have Built


Next, you will test the Home window functionality in runtime.
19. Click RUNTIME.
The Menu and Home windows display.

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 24 – Locking Down Your Application 9-41

20. Log on as maryl.


The KPI, Mixer, and Current_Alarms windows appear.

y
op
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


9-42 Module 9 – Security

21. In the Menu window, click Log Off.


The Home window appears.

y
op
22. In the Menu window, Nav combo box, select Mixer.
With no one logged in, notice the Mixer window opens. An unauthorized user can observe all
the plant processes and start and stop pumps. The ability to navigate when no one is logged in

C
is unwanted behavior. Now you will apply additional security to lock down the application.
T
O
N

23. Click Development!.


o
D

AVEVA™ Training
Lab 24 – Locking Down Your Application 9-43

Add Security to the Nav Combo Box


Next, you will add an animation to the Nav combo box so that it is disabled, unless the logged on
user has the appropriate access level.
24. In the Menu window, right-click the Nav combo box, and select Animation Links.
25. Click Disable.

y
op
C
26. In the Expression field, enter $AccessLevel < 5000.
T
27. In the Disabled State area, select On.
O
N

Note: Typically an application design would not have both a navigation combo box and
navigation buttons. But if it did, additional security would have to be added in the Menu
window to disable the SA_PageNavigation buttons such as Mixer or Alarms, but these steps
are not covered in this lab.
o

28. Click OK to save and close the Object Disabled -> Discrete Value dialog box.
29. Click OK to save and close the Animation Links dialog box.
D

AVEVA™ InTouch HMI 2020 R2


9-44 Module 9 – Security

Test What You Have Built


Next, you will test the Nav combo box functionality in runtime.
30. Click RUNTIME.
31. Try to click the Nav combo box, and notice it is disabled.
32. Log on as johnj.
33. Close the Mixer window.

y
34. In the Menu window, click the Nav combo box, and select Mixer.
The Mixer window opens.

op
35. Click Log Off.
36. On the WindowViewer File menu, select Open Window, select Mixer, and then click OK.
The Mixer window opens even though no one is currently logged on. An unauthorized user
can open windows by clicking the File menu. Next, you will apply additional security to prevent
this.
37. Click Development!.

C
T
O
N
o
D

AVEVA™ Training
Lab 24 – Locking Down Your Application 9-45

Hide the Menu Bar


Next, you will edit the Menu window to hide the WindowViewer menu bar to prevent users from
clicking on it.
38. In the Windows & Scripts pane, right-click Menu, and select Properties.
39. Configure the dimensions of the Menu window as follows:

Y Location: -40

y
Window Height: 140

op
C
T
The Popup Window Type can cover the title bar and menu bar of WindowViewer, which are
located in the negative Y location of WindowViewer. The actual height of the Title Bar and
menu bar will differ depending on the theme and resolution of the windows environment.
O
40. Click OK.
41. In the Menu window, right-click, and select Select All.
42. Press and hold the Ctrl key, and then press the Down Arrow key once to reposition all of the
graphics on the Menu window.
N

Note: The labs in this course were intentionally limited to the screen space used for the
windows in the InTouch application. In your plant you would create your windows to take
o

advantage of maximum screen size, including multiple monitors.


D

AVEVA™ InTouch HMI 2020 R2


9-46 Module 9 – Security

Test What You Have Built


Next, you will test the changes in runtime.
43. Click RUNTIME.
The WindowViewer menu bar is now hidden by the Menu window, and the mouse cannot be
used to access the File menu.
Next, you will test keyboard access.

y
Note: In virtual environments the host computer captures certain key combinations, and does not
pass these through to a virtual environment. If you are taking this course from a virtual machine,
you will need to use special shortcuts, or a virtual keyboard, to recreate these key combinations,

op
your instructor will provide these alternatives so you can test locking down keyboard access.

44. Press and hold the Alt key, and press F.


The WindowViewer File menu appears on top of the Menu window, so the application is not
secure from keyboard actions.

C
T
45. Press the Ctrl + Shift + Esc keys, and verify you can open Task Manager.
From here, you could potentially end any process, including InTouch WindowViewer.
O
N

46. Close Task Manager.


47. Click Development!.
o
D

AVEVA™ Training
Lab 24 – Locking Down Your Application 9-47

Enable or Disable Keys


Next, you will use a script function to control access to certain key stroke combinations.
48. Close WindowViewer.
49. In the WindowMaker Scripts pane, double-click Application.
50. On the Condition Type drop-down list, confirm On Startup is selected
51. In the script body, add a line to the end of the current script.

y
52. In the Functions area, click the All button.

op
C
T
53. In the Choose function list, select EnableDisableKeys.
O
N
o

EnableDisableKeys(AltKey,EscKey,WinKey); is inserted in the script field.


D

AVEVA™ InTouch HMI 2020 R2


9-48 Module 9 – Security

54. Modify the line of script as follows:

Note: You may copy and paste the script from the C:\Training\Lab 24 - Locking Down
Your Application.txt file.

EnableDisableKeys(1,0,1);

y
op
C
Note: For the EnableDisableKeys() function a value of 1 disables a key whereas a value of 0
enables a key. Therefore, EnableDisableKeys(1,0,1) disables the ALT key and the WIN key on
the keyboard.

55. Click OK.


T
O
N
o
D

AVEVA™ Training
Lab 24 – Locking Down Your Application 9-49

Next, you will create a Data Change script.


56. In the Scripts pane, right-click Data Change, and select New.
57. In Tagname[.field], replace <Tagname> with $AccessLevel.
58. In the script area, replace the script with the following:

Note: You may copy and paste the script from the C:\Training\Lab 24 - Locking Down
Your Application.txt file.

y
IF $AccessLevel >= 8000 THEN
EnableDisableKeys(0,0,0); {Administrator}
ELSE

op
IF $AccessLevel >= 5000 THEN
EnableDisableKeys(1,0,0); {Supervisor and Operator}
ELSE
EnableDisableKeys(1,0,1); {None}
ENDIF;
ENDIF;

C
T
This script enables the Alt, Esc, and Win keys when someone with an access level greater
than or equal to 8000 logs in. Users with an access level of 5000, but less than 8000, will have
access to the Win key.
O
59. Click OK.
N
o
D

AVEVA™ InTouch HMI 2020 R2


9-50 Module 9 – Security

Test What You Have Built


Finally, you will test the keyboard functionality in runtime.
60. In WindowMaker, ensure only the Menu and Home windows are open.
61. Click RUNTIME.
62. Press Alt + F.
Notice that you cannot make the File menu appear over the Menu window.

y
63. Press Ctrl + Shift + Esc.
Notice that Task Manager does not start.

op
64. Press Win.
Notice that you cannot use the keyboard to open the Start menu.
65. Log on as one or more of the users johnj, karent, or maryl and repeat the Alt + F,
Ctrl + Shift + Esc, and Win tests.

Note: Each user has access to different features. For example, karent and maryl have
different access than johnj.

C
66. Click Development!.
T
<End of Lab>
O
N
o
D

AVEVA™ Training
y
op
C
Module 10 – Application Distribution
T
Section 1 – Network Application Distribution 10-3
Lab 25 – Distributing an InTouch Application 10-7
O
N
o
D
10-2 Module 10 – Application Distribution

Module Objectives
 Explain how to configure NAD
 Explain how NAD delivers changes to the Production machine

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – Network Application Distribution 10-3

Section 1 – Network Application Distribution


This section will explain how to configure Network Application Development (NAD) and how NAD
delivers changes to the production machine.

Overview
The Application Manager is used to configure Network Application Development (NAD), which is

y
two distinct technologies. The first is the ability to use the AVEVA Application Manager to remotely
develop and edit an InTouch application that has its application directory shared. The second is
the ability of a WindowViewer client on a runtime Production node to monitor changes in a shared
InTouch master application directory. When the master application notifies clients a new

op
application is ready the changed application files are copied to a working folder on the Production
node and WindowViewer is restarted automatically.

What is NAD?
Network Application Development or NAD is an architecture that combines the best of the client-
based and server-based architectures. NAD provides automatic notification of application changes

C
and automatic distribution of the updated applications to View nodes. NAD can even be used to
automatically distribute master/slave applications.

Note: You cannot use the NAD features, if you are using WindowViewer as an NT service.

In the NAD architecture, a master copy of an application is maintained on a central network


T
location. Each View node loads that network application as they would in a server-based
architecture, but instead of running the application from the server, the application is copied to and
run from a user-defined location. This provides the client-based advantage of redundancy. In the
example below, the two View nodes both have the master application registered from the
O
development node, but actually run it from their own hard drives.
When a View node copies and runs a master application, it automatically monitors for changes in
the master copy. These changes are indicated by a flag in the master application directory. This
flag is set manually when the application developer uses the WindowMaker Special | Notify
N

Clients command while editing that application. When this flag changes, each View node has a
user-definable action that specifies the response of that node. This can range from ignoring the
flag to automatically shutting down and restarting the View node, which reloads the master
application.
o
D

AVEVA™ InTouch HMI 2020 R2


10-4 Module 10 – Application Distribution

Advantages
 Distributing the application
 Single client application to maintain
 View nodes automatically notified when application changes
 Each node defines action to take on change
 Unrestricted development of the application

y
Disadvantages
 Distributing a large, complex application takes time
 Limits flexibility of having different applications running on different nodes

op
 View is suspended while application is transferred and compiled

Configuring an InTouch Application for NAD


The Production node can be configured to handle pulling changes to the application in the
following ways:

C
Action Description
Ignore changes Causes the runtime (WindowViewer) node to ignore any
change made on the development node.
Restart WindowViewer The runtime node copies the updated master application
(if configured to do so) and then restarts WindowViewer
on the runtime node.
T
Prompt user to Restart Causes and interactive message box to appear, notifying
WindowViewer the operator that the application has changed. The
operation is asked if they want to restart WindowViewer.
Load Changes into Causes change made in the development node to
O
WindowViewer dynamically be loaded into WindowViewer. This may
affect performance for large updates.
Prompt user to load Cause an interactive message box to appear, notifying the
changes into operator that the application has changed. The operator is
WindowViewer asked if they want to load the changes to dynamically into
N

WindowViewer.
o
D

AVEVA™ Training
Section 1 – Network Application Distribution 10-5

Manual NAD Operations

When the Ignore option is used or when a prompt option is used and the user declines an update,
NAD functionality can be handled manually. NAD provides the following tools used to customize
the update behavior of an application:

Tool Description
$ApplicationChanged provides an indication when a master application has changed. This

y
tagname could be used to cause a message to appear telling the operator that the master
application has changed.
You can also use the $ApplicationChanged system tagname in a data change script to build a

op
node update notification script. This script could include launching your own dialog boxes or
closing down certain processes. RestartWindowViewer() can then be used to initiate the
shutdown process.
RestartWindowViewer() This function will shut down and restart WindowViewer. It is used to
update an application when the automatic update Network Application Development (NAD)
functions are not used. This function can be used with $ApplicationChanged to determine when
a NAD update has occurred and then provide an update of the View node by shutting down and

C
restarting WindowViewer.
When using the Notify Clients command, the operator may want to delay the update until a later
time. This function can be placed in a touch Pushbutton Action QuickScript. Therefore, an operator
can perform an automatic shutdown and restart of WindowViewer when it is convenient. This
function has generally been superseded by the ReloadWindowViewer() function which updates
the View node without shutting down Viewer.
T
ReloadWindowViewer() This function will automatically update WindowViewer. It is used to
update an application when the automatic update Network Application Development (NAD)
functions are not used. This function can be used with $ApplicationChanged to determine when
O
a NAD update has occurred and then provide an update of the View node without interrupting the
operation of that node.
When using the Notify clients command, the operator may want to delay the update until a later
time. This function can be placed in a Touch Pushbutton Action QuickScript. Therefore, an
operator can perform a dynamic update of WindowViewer when it is convenient. This function
N

effectively replaces the RestartWindowViewer() function.

Note: To use these functions, in the NAD Configuration dialog box, the When Application
Changes option must be set to: Ignore changes - do not restart. Setting this option prevents the
system from interfering with customized functions defined.
o

During application development, you can use the WindowMaker Special | Notify Clients
command to automatically update InTouch client applications. When this command is executed, a
flag is set to notify all remote View nodes that the master application has changed. These clients,
in turn, may automatically start an update process based on the parameters defined for each
D

node.

AVEVA™ InTouch HMI 2020 R2


10-6 Module 10 – Application Distribution

Application Editing Locks


InTouch applications can only be edited by one developer at a time. To prevent multiple developers
from trying to edit an application, WindowMaker locks an application during the edit session. If you
try to load an application into WindowMaker that has a lock created, you will receive a message
telling you that the application cannot be edited because it is being edited by another computer.
The name of the node editing the application will also be stated in the message.

Note: If WindowMaker is abnormally shut down with an application loaded, the APPEDIT.LOK file

y
may not be automatically deleted. However, you can manually remove the lock by deleting the
APPEDIT.LOK file from the application directory.

op
Dynamic Resolution Conversion (DRC)
Dynamic Resolution Conversion (DRC) works with other distributed features to provide
independence from screen resolution restrictions. In a NAD architecture, an InTouch application is
created and maintained on a development node and then copied to several View nodes. DRC
allows all of these nodes to view the application even if they are running at different screen
resolutions.

C
DRC enables each View node to scale the application to a number of user-defined options,
including a custom resolution. This scaling takes place while WindowViewer compiles the
application and does not require WindowMaker.

Environmental Setup Required for Production Nodes


T
Environmental dependencies such as data sources, file paths, network connections, and other
resources must be properly configured in the master application so that when the application is
distributed to the individual Production nodes, each will have access to the same resources that
O
the master application uses.
For example, if you selected Section 1, “InTouch History and Real-Time Trending,” for InTouch
Legacy history, which uses the HistData wizard, then the HistData I/O Server would have to be
running on every single Production node in order for that wizard to work.
N

Another example, each Production node instance of WindowViewer handles its own copy of alarm
information. If an operator on Production1 acknowledges an alarm, the same exact InTouch
application running on Production2 is not informed of that acknowledgment. Therefore, to
properly design a distributed alarm model, the plant would require a central WindowViewer node,
named a tag server, in order for each Production node to reflect the same alarm information.
Using a tag server, an operator on Production1 acknowledges an alarm on the tag server, and
o

Production2, which is listening to that same alarm on the tag server, will see the
acknowledgment. Detailed instructions on how to build and use a tag server are beyond the scope
of this course and are available in other learning resources, such as the help documentation.
D

AVEVA™ Training
Lab 25 – Distributing an InTouch Application 10-7

Lab 25 – Distributing an InTouch Application

Introduction
In this lab, you will configure Network Application Development (NAD) to copy your application to a
Production node, similar to what an operator would use out in the field. You will then make
changes to the application and view how those changes affect the Production node.

y
Objectives
Upon completion of this lab, you will be able to:

op
 Configure how WindowViewer will receive application updates
 Configure NAD on the Production node
 Distribute your application to the Production node
 Notify clients of changes

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


10-8 Module 10 – Application Distribution

Share the Application Folder


In the following steps, you will share the Training folder on the Engineering node, so that it can be
accessed by the Production node.
1. Open Windows Explorer, and navigate to the C: drive.
2. Right-click the Training folder, and select Properties.
The Training Properties dialog box appears.

y
3. Click the Sharing tab.

op
C
T
O
N

4. Click Share.
o
D

AVEVA™ Training
Lab 25 – Distributing an InTouch Application 10-9

The Network Access dialog box appears.

y
op
5. Click Share.

C
Note: NAD requires network discovery and file sharing to be enabled. If this Windows
feature is not enabled on your node, you will be prompted to enable it.
T
A confirmation message appears.
O
N
o
D

6. Click Done.
7. Close Windows Explorer.

AVEVA™ InTouch HMI 2020 R2


10-10 Module 10 – Application Distribution

Configure the Visualization Station


Next, you will notify clients from WindowMaker to prepare the application for distribution to the
Production node which represents a workstation used by HMI runtime users. Then, you will switch
to the Production node and configure NAD to download a copy of the application and run it.
8. On the WindowMaker Special menu, select Notify Clients | Notify Clients Now.

y
op
C
T
O

The menu option Prompt to Notify Clients on Close is a toggle that, when enabled, will
prompt you to notify clients when WindowMaker is closed.
N

9. Switch to your Production node.

Note: Your instructor will provide the steps to connect and login to the Production node.

10. On the Production node, start InTouch HMI Application Manager.


o

The AVEVA Application Manager opens.


D

AVEVA™ Training
Lab 25 – Distributing an InTouch Application 10-11

11. On the toolbar, click the Node Properties button.

y
op
The Node Properties dialog box appears.
12. Click the Enable Network Application Development option.

C
13. In the Network Application Development area, Local working directory field, enter
C:\Training\NAD.
14. For Change Mode, select Prompt user to restart WindowViewer.
T
O
N
o
D

15. Click OK.

AVEVA™ InTouch HMI 2020 R2


10-12 Module 10 – Application Distribution

16. On the toolbar, click the Find button.

y
op
C
17. In the Browse For Folder dialog box, Folder field, enter \\S01ENG\Training\InTouch
Training Application, where S01ENG is your Engineering node.

Note: Your instructor will provide the name of the Engineering node.
T
O
N
o
D

18. Click OK.

AVEVA™ Training
Lab 25 – Distributing an InTouch Application 10-13

The InTouch Training Application appears in the AVEVA Application Manager.


19. Ensure the InTouch Training Application tile is selected.

y
op
C
20. In the InTouch Training Application tile, on the Quick Access Toolbar, click the

WindowViewer button.
T
O
N

After a few moments, the application starts with Home Windows displayed.
o
D

AVEVA™ InTouch HMI 2020 R2


10-14 Module 10 – Application Distribution

Make a Change to the Application


Finally, you will change to the application on the Engineering node and notify the Production node
that there are changes. Then, you will observe the changes on the Production node.
21. Switch to the Engineering node.
22. In WindowMaker, change the background color property of the Menu window to light green.
23. Click Save All Windows.

y
24. On the Special menu, select Notify Clients | Notify Clients Now.
25. Switch to the Production node.
A message appears asking if you want to restart WindowViewer.

op
26. Click Yes.
After a few moments, WindowViewer reopens.
C
27. Verify the Menu window has a light green background.
T
28. Switch to the Engineering node.
29. In WindowMaker, change the color of the Menu window to a light blue background.
O
30. Click Save All Windows.
31. Close WindowMaker.
A message appears asking if you want to notify all NAD clients.
N
o

32. Click Yes.


D

WindowMaker closes.
33. Switch to the Production node.

AVEVA™ Training
Lab 25 – Distributing an InTouch Application 10-15

34. On the WindowViewer popup message, click Yes.

y
WindowViewer restarts and shows the Menu window changes.
35. Switch to the Engineering node.

op
<End of Lab>

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


10-16 Module 10 – Application Distribution

y
op
C
T
O
N
o
D

AVEVA™ Training
y
op
C
Module 11 – Application Maintenance
T
Section 1 – Manage Industrial Graphics 11-3
Section 2 – Convert Windows to Industrial Graphics and Frame Windows 11-5
Lab 26 – Converting Windows to Industrial Graphics and Frame Windows 11-7
O

Section 3 – Application Backup and Restore 11-13


Lab 27 – Backing Up and Restoring an InTouch Application 11-15
N
o
D
11-2 Module 11 – Application Maintenance

Module Objectives
 Describe application maintenance considerations
 Describe how to back-up and restore an InTouch application
 Explain how NAD distributes an InTouch application to a production environment
 Describe how to export and import Industrial Graphics
 Explain how to publish an InTouch application for runtime operators

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – Manage Industrial Graphics 11-3

Section 1 – Manage Industrial Graphics


This section will explain how to manage Industrial Graphics including exporting, importing, and
restoring library symbols if accidentally deleted.

Managing Industrial Graphics or Symbols


A stand alone application + symbols grants access to a powerful toolbox with multiple libraries

y
which includes Industrial Graphics or symbols. Understanding how to work with these symbols is
critical, not only to the design of an application, but to its long-term maintenance. This section will
cover key considerations in the management and maintenance of Industrial Graphics.

op
Modify or Reuse Original Library Content
If you need to make changes to original library content there are several approaches. First is to
duplicate the original symbol and provide a unique name for the duplication. This avoids a naming
conflict if you should ever reimport the original installation library. When a symbol is imported with
a naming conflict, you will be prompted to decide how to handle the conflict. One option will be to
not overwrite any symbol which is not part of the original manifest of symbol names from the

C
library. The second method is to open your custom symbol and the original symbol in two
instances of the symbol editor, and copy all or part of the original and paste into your custom
symbol. This method will get you graphics and animation as part of the paste operation, but will not
include predefined and named scripts, or custom properties. The third method is to embed the
original symbol, right click and select Embedded Symbol | Convert to Group. This will convert the
linked instance into an actual editable group element and will also attempt to add the custom
T
properties from the original symbol to your custom symbol.

A Common Misunderstanding of Cursor Focus


O

After embedding a graphic on a window in WindowMaker using the drag and drop method, though
the embedded instance has resize handles around the graphic, the actual focus in WindowMaker
is on the symbol in the Industrial Graphic Toolbox. If you press the Delete key to delete the
selected graphic, instead of deleting the graphic on the window, the original graphic from the
N

toolbox will prompt for deletion. The prompt you are deleting the wrong graphic only appears when
removing a graphic from the library. Therefore, if the focus is actually on the embedded instance
on the window, no prompt will appear to delete the graphic. If you accept the prompt and delete an
original symbol from the library that was installed with the product installer it will be removed only
from the copy of the library associated with this single InTouch application.
To restore the missing graphic use the import method described below. To avoid this problem in
o

the first place, click on the embedded instance on the window to ensure focus is on the graphic on
the window, not on the graphic in the library, before pressing the Delete key or use the right-click
context menu and select Erase which automatically places focus on the embedded instance
instead of the symbol in the Industrial Graphic Toolbox. It should be noted that the orange lock
D

symbol found on symbols from the Situational Awareness Library does not prevent these symbols
from being deleted, it only prevents symbols from being edited (the orange lock icon indicates
read-only status of the symbol).

AVEVA™ InTouch HMI 2020 R2


11-4 Module 11 – Application Maintenance

Export and Import Industrial Graphics


WindowMaker provides support for exporting and importing your Industrial Graphics. Using export
and import allows graphics from one application to be reused in another application. Additionally, a
mature starting point containing a library of all custom graphics can be imported into a new
application to save time. Or export and import can be used to manage revisions of change in file
form, to permit, for example restoring an older working version of a graphic design or it may be
used to upgrade an older library symbol with the latest.
If an original symbol is accidentally deleted from the Industrial Graphic Toolbox, a file for each of

y
the main graphic libraries called ArchestraSymbolLibrary.aaPKG and Situational Awareness
Symbol Libarary.aaPKG are located in the path - C:\Program Files
(x86)\ArchestrA\Framework\Bin. These may be used to restore a missing symbol. To import these

op
files use the WindowMaker File | Import | Industrial Graphics menu. It is never recommended to
modify any of the original library symbols in an InTouch Application. Each symbol must have a
unique name within the entire InTouch Application. If another symbol exists in the application with
the same name as an imported symbol, you will be prompted to decide how to handle the name
conflict.
To export an individual symbol or a specific toolset containing symbols, in WindowMaker from the
Industrial Graphic Toolbox simply right-click the toolset or symbol you wish to export and select

C
Export | Symbols. To import an individual symbol, in WindowMaker from the File | Import menu,
select Industrial Graphics. Importing symbols resolves name resolution conflict by always
replacing the graphic with the same name in the Industrial Graphic Toolbox with the one being
imported from the file. There is no prompt to indicate you are replacing an existing graphic, so be
cautious. By exporting individual graphics directly from the Industrial Graphics Toolbox it is
possible to import one of these files in order to replace a graphic of the same name in the library.
This technique could be used to upgrade or revert the revision of a symbol.
T
Toolsets are preserved in export and import operations, but these will not protect you from a
naming conflict as the global namespace for symbols ignores toolset names. While toolset names
are preserved aesthetically and for symbol organizational purposes during the export and import
O
operations, these however do not play any role in the naming of symbols.

Export or Import Windows Containing Industrial Graphics


N

When a window containing Industrial Graphics is imported into another InTouch application the
Industrial graphics are not imported along with the window. When this window is opened,
placeholders on the window will be shown indicating no graphic exists. Separately, the Industrial
Graphics must be exported from the original application and imported into the new application for
the graphics to appear on the imported window.
o
D

AVEVA™ Training
Section 2 – Convert Windows to Industrial Graphics and Frame Windows 11-5

Section 2 – Convert Windows to Industrial Graphics and Frame


Windows
This section will explain how to set up windows for use in Web Client.

Convert Windows to Industrial Graphics and Frame Windows


Industrial Graphics and Frame Windows provide the most flexibility and reusability of graphics and

y
layout design within InTouch For example, only Frame Windows are supported as Application
Windows in Web Client. Whereas legacy windows replace overlay and popup windows are not
supported in Web Client. Frame Windows also scale content to automatically to resolution in which

op
they are displayed. For these reasons and others, InTouch provides a means to convert legacy
windows and graphic content to Industrial Graphics in Frame Windows.

Move Legacy Applications Forward


The Convert to Industrial Graphic feature allows designers to convert any window to a Frame
Window hosting a single Industrial Graphic. For example, a legacy popup window containing

C
hundreds of legacy lines, rectangles, and ellipses, can be converted into a Frame Window with
popup mode and a single hosted symbol which consolidates all of the independent lines,
rectangles and ellipses.

Convert to Industrial Graphics


T
The conversion tool in the WindowMaker File menu called Convert to Industrial Graphic, allows
the conversion of one or more windows to a Frame Window with a single hosted symbol. The
process creates a new toolset in the Industrial Graphic Toolbox the first time it is used. This toolset
has an identical name to your InTouch application. This toolset will contain the converted window
O
content in symbols identical to the name of the window that was converted. Additionally, the
converted window was backed up in its original unconverted form in the Backup Windows folder
located in the Windows & Scripts pane.
During the conversion, a progress window shows an outline of all the steps take to perform the
N

conversion. Additionally, a conversion report link found in the progress window contains details of
any error messages, problems, or issues that occurred during conversion. A common problem
with converting legacy windows is that they contain ActiveX controls which cannot be converted.
The window will still convert, leaving a blank space in the resulting symbol where the ActiveX
control was. Another common problem is that a symbol of the same name as your window already
existed in the Industrial Graphic Toolbox. This will prevent conversion. There are two workarounds.
First, you can rename the window you are converting and try again. Second, you can rename the
o

symbol that already exists in the Industrial Graphic Toolbox and try again.
D

AVEVA™ InTouch HMI 2020 R2


11-6 Module 11 – Application Maintenance

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 26 – Converting Windows to Industrial Graphics and Frame Windows 11-7

Lab 26 – Converting Windows to Industrial


Graphics and Frame Windows

Introduction
In this lab, you will convert two legacy windows and their contents into Frame Windows hosting
Industrial Graphics.

y
Objectives

op
Upon completion of this lab, you will be able to:
 Convert a window using Convert to Industrial Graphic

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


11-8 Module 11 – Application Maintenance

Convert to Industrial Graphic


You will convert the KPI and Menu windows using the Convert to Industrial Graphic feature.This
feature converts all of the graphics on a window, including both legacy graphics and Industrial
Graphics, into a single Industrial Graphic.
1. On the task bar, click WindowViewer.
WindowViewer maximizes.
2. In WindowViewer, click Development!.

y
WindowMaker opens.
3. On the File menu, select Convert to Industrial Graphic.

op
C
T
O

The Windows to Convert dialog box opens.


N
o
D

AVEVA™ Training
Lab 26 – Converting Windows to Industrial Graphics and Frame Windows 11-9

4. Select KPI and Menu.

y
op
5. Click OK.

C
The Converting Windows to Symbols dialog box appears and displays the progress of the
conversion.
T
O
After conversion is complete, the following dialog box appears.
N
o
D

AVEVA™ InTouch HMI 2020 R2


11-10 Module 11 – Application Maintenance

6. Click View Details.

y
op
The windows were converted successfully.
7. Click the Window Conversion Report link.
The Window Conversion Report Dialog window appears.

C
8. Scroll to the bottom of the report and observe the table in the Windows Conversion
Information area shows no warnings and no errors for both windows.
T
O
N
o
D

The conversion report will inform you of any graphic elements that could not be converted and
the reason for this. This is particularly useful when converting legacy graphics containing
ActiveX controls, which cannot be converted to Industrial Graphics.
9. Close the Window Conversion Report Dialog window.
10. Click Close to close the Converting Windows to Symbols dialog box.

AVEVA™ Training
Lab 26 – Converting Windows to Industrial Graphics and Frame Windows 11-11

Both the KPI and Menu windows rapidly open, then close. This process creates new KPI and
Menu windows, backs up the original windows, and names them KPI_bak and Menu_bak.
This conversion also creates a new toolset in the Industrial Graphics Toolbox named
InTouch Training Application, which contains the new KPI and Menu symbols.
11. In the Industrial Graphic Toolbox, expand the InTouch Training Application toolset, and
observe that the KPI symbol and the Menu symbol have been added to the library.

y
op
12. Collapse the InTouch Training Application toolset.

C
13. In the Windows & Scripts pane, observe that your original windows have been renamed to
KPI_bak and Menu_bak and have been moved to the Backup Windows folder.
Additionally, the new KPI and Menu windows have been created and converted to frame
windows.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


11-12 Module 11 – Application Maintenance

14. Open the KPI window.


15. In the KPI window, click on the graphic.
The new Frame Window contains a single symbol hosted by the Frame Window. The single
symbol is made up of both the SA_ColumnChart_Pairs and SA_BulletGraph symbols. A
Quick Access Toolbar appears at the top of the window with the following shortcuts:

 Edit Symbol

y
 Save Window

 Save Window As

op
 Delete Window

C
T
O
N
o
D

16. Close the KPI window.

<End of Lab>

AVEVA™ Training
Section 3 – Application Backup and Restore 11-13

Section 3 – Application Backup and Restore


This section will explain how to back up your Stand-alone + Symbols InTouch application. This
section will go on to explain how to restore a Stand-alone + Symbols InTouch application.

Backing Up an Application
Backing up a Stand-alone + Symbols InTouch application is as simple as copying your InTouch

y
application folder with all subfolders and files to a new location.
The primary method of backing up an InTouch application starting InTouch HMI 2020 is the Export
as Template tool in AVEVA Application Manager. This Export as Template tool creates a .aaPKG

op
file which contains the entire InTouch application and all supporting information. As a single file
backup, it is very convenient for transporting from one computer to another or copying to a
permanent archive. Note: for large applications, this process can take an excess of 10 minutes.
The .aaPKG file is version specific, however the import process to restore the backup will
automatically migrate the application to the latest version of InTouch if that is necessary.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


11-14 Module 11 – Application Maintenance

Restoring an Application
Restoring an application requires the InTouch application folder to be accessible by AVEVA
Application Manager. The format of the source application could be one of three things. First, the
application folder itself may be manipulated in its native form. Second, the application could be in a
self-extracting .exe from the application publisher tool. Third, the application could be Export As
Template which creates a .aaPKG file.
For example, if you have configured InTouch Historical Logging to record .LGH and .IDX files in a
path outside the InTouch application folder, these files will need to be copied to the new location or

y
made accessible in their old location. Another example is the Template Maker file which stores
template definitions for creating Super Tags in InTouch. Please consult user documentation for
details.

op
Applications can be reused anywhere AVEVA Application Manager is installed. It is considered a
good practice to restore your application as a separate application and not to overwrite the existing
application. Once you have verified that the restored application functions properly, you can then
delete the original application, if desired.
To restore an exported application, click Import on the AVEVA Application Manager toolbar, then
find the .aaPKG file on disk and start the import.

C
T
O
N
o
D

AVEVA™ Training
Lab 27 – Backing Up and Restoring an InTouch Application 11-15

Lab 27 – Backing Up and Restoring an


InTouch Application

Introduction
In this lab, you will back up your application to a local path. You will then restore the backup.

y
Objectives
Upon completion of this lab, you will be able to:

op
 Back up an InTouch application
 Restore an InTouch application

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


11-16 Module 11 – Application Maintenance

Back Up the Application


In the following steps, you will use the AVEVA Application Manager’s Export As Template feature
to create a file-based backup of your application.
1. Close WindowMaker.
The prompt asking you to notify the NAD clients appears.
2. Click No to close the prompt.

y
op
WindowMaker closes.
3. Close WindowViewer.

C
4. Open AVEVA Application Manager as an Administrator.
T
O
N
o
D

AVEVA™ Training
Lab 27 – Backing Up and Restoring an InTouch Application 11-17

The AVEVA Application Manager dialog box appears.

y
op
C
5. Ensure the InTouch Training Application is selected.
6. Click Export As Template.
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


11-18 Module 11 – Application Maintenance

The Export InTouch Application dialog box appears.


7. Navigate to C:\Training and ensure the file name is InTouch Training Application.
8. Click Save.

y
op
The export operation begins. C
T
O
N

Once the export is complete, the file InTouch Training Application.aaPKG appears in the
C:\Training folder.

You have now successfully backed up your InTouch application.


o

9. Close the File Explorer window.


D

AVEVA™ Training
Lab 27 – Backing Up and Restoring an InTouch Application 11-19

Restore the Application


Next, you will restore an InTouch Training application from the backup file using the AVEVA
Application Manager.
10. In the AVEVA Application Manager, click Import.

y
op
The Create New Application - Select an application for import dialog box appears.
11. Click File.

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


11-20 Module 11 – Application Maintenance

The Open dialog box appears showing C:\Training.


12. Select InTouch Training Application.aaPKG and click Open.

y
op
C
After a moment, the application tile appears.
T
O
N
o
D

AVEVA™ Training
Lab 27 – Backing Up and Restoring an InTouch Application 11-21

13. Click Next.

y
op
C
The Create New Application - Enter Application Details dialog box appears.
14. In the Application Name field, enter Restored Training Application.
T
15. In the Directory Name field, enter Restored Training Application.
16. In the Description field, enter Restored Training Application.
17. Click Finish.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


11-22 Module 11 – Application Maintenance

The import operation begins.

y
op
C
The import operation continues for a few moments.
T
Once the import operation is complete, the imported application tile is created.
O
N
o
D

AVEVA™ Training
Lab 27 – Backing Up and Restoring an InTouch Application 11-23

Test the Restored Training Application


Next, you will launch the restored training application in WindowMaker, and then switch to
WindowViewer to prove the application was backed up and restored successfully.
18. Double-click the Restored Training Application tile to open WindowMaker.

y
op
C
T
19. In the Windows to Open dialog box, ensure Home and Menu are selected.
O
N
o
D

20. Click OK.


21. Click RUNTIME.

AVEVA™ InTouch HMI 2020 R2


11-24 Module 11 – Application Maintenance

22. Log on as maryl.


The authorized user automatically opens the KPI, Mixer, and Current_Alarms windows.

y
op
C
Your application has been restored. Observe animations, security, IO data, alarms, and history
are all working in the restored application.
T
O
N
o
D

AVEVA™ Training
Lab 27 – Backing Up and Restoring an InTouch Application 11-25

Add a Thumbnail to Your InTouch Training Application Tile


In the following steps, you will capture an image of the running application to use as a thumbnail in
the original Training Application tile in AVEVA Application Manager. Since the original and the
restored applications are identical, a screen capture of WindowViewer will work for the thumbnail
of the original application.
23. Ensure WindowViewer is displayed and you are logged in as maryl.
24. Press Ctrl Alt and + (use the + key on the numeric keypad) to capture a screenshot of your
desktop to the Windows Clipboard.

y
Note: There are many ways to capture a screenshot in a Windows environment. Your
instructor can provide details because most of the other methods will capture a screenshot of

op
your host computer and not the desktop of your virtual machine or Remote Desktop Protocol
(RDP) session as is typically used in a training classroom.

Next, you will use Microsoft Paint to save your screenshot.


25. Open Paint.
Paint opens.

C
26. On the Paint toolbar, click Paste.
T
O
An image of your application appears in Paint.
27. Click the Save button.
N
o
D

AVEVA™ InTouch HMI 2020 R2


11-26 Module 11 – Application Maintenance

The Save As dialog box appears.


28. Navigate to C:\Training\InTouch Training Application.
29. In the File name field, enter AppThumbnail.

y
op
30. Click Save.
31. Close Paint.
32. Close WindowViewer. C
T
33. Close WindowMaker.
The prompt asking you to notify the NAD clients appears.
O
N

34. Click No to close the prompt.


WindowMaker closes.
o
D

AVEVA™ Training
Lab 27 – Backing Up and Restoring an InTouch Application 11-27

35. Open AVEVA Application Manager.


The AVEVA Application Manager dialog box appears.
36. Click to select the InTouch Training Application tile.

y
op
C
T
37. In the InTouch Training Application tile, on the Quick Access bar, click Change Thumbnail.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


11-28 Module 11 – Application Maintenance

The Open dialog box appears.


38. Navigate to C:\Training\InTouch Training Application.
39. Select the AppThumbnail file.

y
op
40. Click Open.

C
The tile’s thumbnail has now been updated.
T
O
N
o
D

41. Double-click the InTouch Training Application tile to open WindowMaker.


42. In the Windows to Open dialog box, click Cancel.

<End of Lab>

AVEVA™ Training
y
op
C
Module 12 – Web Client
T
Section 1 – Web Client 12-3
Lab 28 – Using the Web Client 12-11
O
N
o
D
12-2 Module 12 – Web Client

Module Objectives
 Describe the Web Client features and dependencies
 Explain how to enable the Web Client
 Explain to use the Web Client fast switch
 Explain security for Web Client access and read/write function

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – Web Client 12-3

Section 1 – Web Client

This section will describe the Web Client features and dependencies.

Overview
The InTouch Web Client feature (Web Client) allows you to view Application Windows (must be
Frame Window type) used within an InTouch HMI application on any HTML5-supported web

y
browser. A built-in web server enables web browsers to access Application Windows.

op
C
T
O

Web Client Application Windows


Web Client will convert all Frame Windows in your application and make them available from the
Web Client Navigation menu. Additionally, when you open Web Client, if Home windows are
N

configured and the Home windows are Frame Windows, your Home windows will be displayed.
Any application navigation configured, such as buttons to show windows or scripting using
ShowGraphic(), ShowHome, or Show script functions, these will behave normally as if they were
in WindowViewer. For example, Replace window functionality behaves normally in Web Client by
closing any window the Replace window touches. When using this with ShowGraphic(), the
identity property using InTouch:WindowName syntax, will properly identify the XY and width and
o

height of the window for replace purposes. However, if the identity property does not used the
InTouch: syntax, which causes it to create a brand new popup window in the Web Client, this
window will act like a regular popup window by displaying on top of the other windows.
D

AVEVA™ InTouch HMI 2020 R2


12-4 Module 12 – Web Client

Enable Web Client


By default, the Web Client will be disabled to secure systems where no decision has been made to
enable a web server on the installation machine. You must have administrative privileges to enable
or disable the Web Client. The Web Client is enabled from the AVEVA Application Manager on
runtime nodes. On development nodes, the Web Client can be enabled by using the Fast Switch,
Web Client, in WindowMaker.
This tool in the AVEVA Application Manager represents the Web Client enabled:

y
op
Web Client Fast Switch

C
When using the Web Client with InTouch HMI, WindowViewer must be running to provide data for
the Web Client. On development workstations, for InTouch HMI, starting WindowViewer with the
Runtime Fast Switch will do the following:
 Enables the Web Client fast switch in WindowMaker
Starts WindowViewer, which provides data for Web Client animations
T

Once WindowViewer is running, to support the data and animations required by Web Client, the
Web Client may be started by clicking the Web Client Fast Switch. On development workstations,
for InTouch HMI, starting Web Client with the Web Client Fast Switch will do the following:
O
 Starts the InTouch iData Service - provides data and animations for Web Client
 Enables the InTouch Web Server - converts Application Windows to HTML5 and responds
to web browsers requesting access to Web Client
 Hosts the Web Client web page, Web Client navigation, and responds to user write
N

operations
o
D

AVEVA™ Training
Section 1 – Web Client 12-5

Web Client Page


The InTouch Web Client page provides various options to inform and organize the user experience
using icons on the page. The following table describes these options.

y
op
C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


12-6 Module 12 – Web Client

y
op
C
T
O
N
o
D

AVEVA™ Training
Section 1 – Web Client 12-7

Behavior of the Web Client Home Button


For InTouch applications, in WindowMaker you can use the Home Windows tab to set up windows
that will appear by default in WindowViewer. These settings will impact, which Application Window
appears on the web client by default when it is launched. For an InTouch HMI application, if Home
Windows are configured, the Home Windows are displayed by default. Clicking the Home icon will
display the Home Windows.

Symbol Changes Reflected Automatically

y
Graphic-related changes are made using the Symbol Editor, and those changes are automatically
refreshed in the browser. However, changes in Quality and Status Style, Element Style, and
Formatting Styles (for InTouch HMI) are propagated only after making the following graphic

op
changes or re-launching WindowViewer.
 Content of a symbol used on an Application Window is updated and saved
 A symbol used on an Application Window is created, imported, or deleted
 A symbol used on an Application Window is moved to a different toolset folder

Known Limitations

C
A number of features common to InTouch HMI applications are not yet supported by the Web
Client. For example, no ActiveX or .NET controls, are supported at this time. For example, the
.NET Historian Client Trend Control is not supported. For a detailed list and description of known
limitations with Web Client consult the following documentation: from the Start menu, select
AVEVA Documentation to expand the folder and locate InTouch HMI Web Client Browser Guide.
This opens a PDF titled Viewing InTouch Application Graphics in a Web Browser.)
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


12-8 Module 12 – Web Client

Licensing the Web Client

Single Session Mode


Without a license installed, Web Client permits a single session use. This will usually allow you to
connect a single browser to the InTouch Web Server, even permitting more than one tab to be
opened, which is considered part of the same session. Without a license, a second browser would
not be able to access the Web Server. For full unrestricted use of Web Client, you need a valid
Web Server license to login and view Application Windows from a web browser. the License

y
Server decision making is assigned on a first come first serve basis as follows:
 If a valid license is unavailable and the first session license has been acquired, the Web Client will 
notify the user that no licenses are available.

op
 The Web Server allows sessions a grace period if the Web Server has acquired an unlimited 
license, but subsequently loses the license.

Licensing the Web Client for InTouch Application Windows


You need a valid InTouch Web Server license to login and view application graphics from a web
browser. Licensing also extends to hosting application graphics on external websites. For detailed

C
information on licensing, see the AVEVA Enterprise Licensing help. The Web Server provides two
types of licenses:
 The InTouch Web Server Unlimited Read‐Only license will allow you to connect to unlimited 
sessions for viewing application graphics in a web browser.
 The InTouch Web Server Unlimited ReadWrite license will allow you to connect to unlimited 
sessions for viewing and interacting with application graphics in a web browser.
T
License Status Change
If the Web Server has acquired a valid license but then failed to renew the license, the Web Client
O
will be in Grace Period mode. A notification message will be displayed in the notification page. The
message will be logged every time Web Client attempts and fails to renew the license.
N
o
D

AVEVA™ Training
Section 1 – Web Client 12-9

Acquiring a License
Acquiring the license is a two-stage process. After the Web Server starts up, it will first
Authenticate the user and then determine the user’s Authorization. If anonymous access has been
enabled then the authentication step is bypassed and Web Client is launched in a Read -Only
mode with the 'Guest' user. Authentication:
 Web Client supports Windows authentication. The web server will validate if the user is
part of either the "aaInTouchUsers" or the "aaInTouchRWUsers" to be authenticated to
use the Web Client. Both the user groups will be created during installation. For a remote

y
authentication server, the domain user groups must be created on the server.
 The login user at the time of Web Client installation will be automatically added to both
user groups.

op
Additional users can be added later. After adding the new user to the group, the new user must log
off and then re-login for the change to take effective. Authorization:
 After the user is authenticated, the web server will attempt to acquire the ReadWrite
license.
 If a ReadWrite license is not available, then it will attempt to acquire the Read-Only
license.
 If a ReadOnly license is not available, then the web client will operate in a Single Session

C
Mode.

Read-Only and ReadWrite Modes


The Web Client supports two types of modes: ReadWrite and Read-Only. In the ReadWrite mode,
the user can:
T
 Write to external references such as Application Server attributes or InTouch tags.
 Acknowledge alarms with details of the operator. 
You can access the Write and Alarm Ack capability if both the following conditions are met:
O
 The Web Server has acquired the Unlimited ReadWrite license. 
 The user logged in to Web Client session is part of the aaInTouchRWUsers user group.
If ReadWrite mode is not available, then the Web Server attempts the Read-Only mode. The user
can access the Read-Only mode only if:
N

 The Web Server has acquired the Unlimited ReadWrite license, but the user logged in does not 
belong to the Web Client aaInTouchRWUsers user group, or
 The Web Server has acquired the Unlimited ReadOnly license, or 
 The Web Server does not acquire any license and this web client session is the first client session.
In the Read-Only mode, the client session cannot write to external references or acknowledge
o

alarms.
D

AVEVA™ InTouch HMI 2020 R2


12-10 Module 12 – Web Client

y
op
C
T
O
N
o
D

AVEVA™ Training
Lab 28 – Using the Web Client 12-11

Lab 28 – Using the Web Client

Introduction
In this lab, you will use the Web Client fast switch to enable the Web Client server and open your
Home windows, display and navigate to Application Windows in a browser.

y
Objectives
Upon completion of this lab, you will be able to:

op
 Use the Web Client fast switch to open the Web Client in the default web browser
 View Application Windows
 Navigate Application Windows
 Visualize and acknowledge alarms in Web Client
 Write to an IO Tag in Web Client by commanding a pump to start or stop
 Enable Web Client on the production node

C
T
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


12-12 Module 12 – Web Client

Enable and Start the Web Client


In the following steps, you will start WindowViewer to ensure there will be data and animations for
the Web Client.
1. In WindowMaker, click RUNTIME to open WindowViewer.
2. Click Development!.
3. Click the WEB CLIENT fast switch.

y
op
Due to security, the InTouch Web Client services are disabled by default. You will need to
authorize the services to start.
4. Click Yes to authorize the startup of the Web Client services.

C
After a few moments, the Web Client displays the Home Windows in your default web
T
browser. The examples that follow, use the Google Chrome browser.
O
N
o
D

The Menu application window and the Home application window are displayed. The Maintain
Aspect Ratio property is not applied automatically to Applications Windows in Web Client,
therefore, the carousel is displayed in its native size and not stretched by disabling aspect
ratio. This behavior is expected.

AVEVA™ Training
Lab 28 – Using the Web Client 12-13

Navigate Application Windows


Next, you will use the navigation buttons in the Menu window(SA_PageNavigation symbols) to
open the Mixer and Current_Alarms Application Windows.
5. Click the Mixer navigation button.

y
op
C
T
The Mixer application window appears.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


12-14 Module 12 – Web Client

6. Click the Alarms navigation button.

y
op
C
T
O
The Alarms application window appears. Similar to the carousel, the alarm client is displayed
in its native size and not stretched by disabling aspect ratio. This behavior is expected.
There is no navigation button for the KPI application window. You will use an alternative
navigation method in Web Client to open the KPI application window.
N

7. Click the Web Client Navigation menu.


o
D

AVEVA™ Training
Lab 28 – Using the Web Client 12-15

8. Expand Windows and select KPI.

y
op
C
T
The KPI Application Window opens.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


12-16 Module 12 – Web Client

Perform Alarm Acknowledgment and Write Operations


Next, you will use the Quick Access menu in the Current_Alarms application window to perform
an alarm acknowledgment.
9. In the Current_Alarms Application Window, hover over the alarm client to display the Quick
Access Bar.

y
op
C
10. On the Quick Access Bar, click Ack All.
T
O
N

The Ack Comment dialog box opens.


11. In the Comment field, enter Ticket Issued.
o
D

12. Click OK to acknowledge all alarms.

AVEVA™ Training
Lab 28 – Using the Web Client 12-17

All alarms have been acknowledged.

y
op
Next, you will use a pump command button to override a pump.
13. In the Mixer window, stop a running pump.

C
T
O

The pump stops and the trend level flatlines.


N

14. Start the pump again.


o
D

AVEVA™ InTouch HMI 2020 R2


12-18 Module 12 – Web Client

Show Unsupported Features in Web Client


Next, you will use a troubleshooting feature of Web Client to view a list of unsupported features for
the current symbol. The Unsupported Features button is only available from the development
node.
15. In the Current_Alarms window, click the Unsupported Features button.

y
op
A list of features not yet supported appears.

C
T
O
N

16. Click the X in the top-right corner of the Unsupported Features window to close the window.
o
D

AVEVA™ Training
Lab 28 – Using the Web Client 12-19

Enable Web Client on the Production Node


Next, you will navigate to the production node, enable the Web Client, and then view the InTouch
Training Application on the production node.
17. Navigate to the production node.
18. Close WindowViewer.
19. Start InTouch HMI Application Manager.

y
20. In the AVEVA Application Manager, click WEB CLIENT.

op
C
T
The WEB CLIENT properties appear.
O
N
o
D

AVEVA™ InTouch HMI 2020 R2


12-20 Module 12 – Web Client

The Web Server for InTouch HMI Web Client icon displays the state of the Web Client
services in Microsoft Windows. The icon status shows a red indicator identifying that the
services are currently disabled.

y
op
21. Click the Web Server for InTouch HMI Web Client button.

C
The Web Client services are started. The icon shows a green arrowhead indicating the
services are currently enabled.
T
22. In the AVEVA Application Manager, click INTOUCH.
O
N
o
D

AVEVA™ Training
Lab 28 – Using the Web Client 12-21

Recall Web Client obtains its data and animations from WindowViewer. Next, you will start
WindowViewer.
23. Right-click the InTouch Training Application tile and click WindowViewer.

y
op
C
T
After a few moments, WindowViewer starts.
O
24. After WindowViewer starts, navigate to the engineering node.
25. In your web browser, open a new tab.
26. In the address bar, enter http://s01prod/intouchweb and press Enter.
N

From your web browser on the engineering node, you are now viewing the InTouch application
windows running on the production node.

<End of Lab>
o
D

AVEVA™ InTouch HMI 2020 R2


12-22 Module 12 – Web Client

y
op
C
T
O
N
o
D

AVEVA™ Training

You might also like