You are on page 1of 239

ClearSCADA - Basic Training

System Integration Training Notes

om
.c
Version 3.06 June 2011

ng
co
an
th
o ng
du
u
cu

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Issue Details

Issue Date Author Comments

1 1/3/05 D Fraser Initial version

Added new sections and reviewed


2 8/6/05 D Fraser
content after initial course.

2.01 28/6/05 D Fraser Further review after training course

2.02 26/7/05 D Fraser Further review – typos and

om
clarifications.

2.03 26/8/05 J Dunbar Adaption to SCADAPack 32 RTU

.c
(Note: Ch 11 and 13 remain
SCADAPack ES specific)

ng
2.041 4/11/05 I Metcalfe General Changes to document and
co removal of DNP Enet telemetry
chapter

2.05 19/1/06 D Fraser Minor updates. Addition of new


an

introduction content from I


Metcalfe. Included use of symbol
th

library. Expansion of Templates


and Instances topic and rework of
ng

logic exercise to suit.

2.06 14/3/06 D Fraser Includes page to show how to load


o

new example projects in 2005 R0.


du

Also added pages to show how to


setup communications using DNP3
over TCP as opposed to serial
u

connection. This then allows


cu

course to be run using both


communications types.

2.07 4/6/06 D Fraser Included Chapter 1 course outline.

3.00 24/5/07 C Wright Updated for ClearSCADA 2007


release.
D Fraser
Reviewed Introduction to ViewX
chapter.

3.01 22/6/07 D Fraser (B Updated based on feedback.


Hosken)

3.02 18/9/08 D Fraser Minor corrections and updated for


ClearSCADA 2009 R1. Included

Version 3.06 June 2011 ClearSCADA System Integration i

CuuDuongThanCong.com https://fb.com/tailieudientucntt
feedback from Brad Hosken.

3.03 29/9/08 D Fraser Minor corrections based on


feedback from Brad Hosken.

3.04 27/04/09 D Fraser Updates to redundancy chapter.


Updated image in installation
chapter.
Added set responsible user and
system commands to alarm
redirection chapter.

3.05 1/6/10 D Fraser Updates for ClearSCADA 2010 R1

om
3.06 5/17/11 A Farooq Updated to new Schneider fonts
Added Contact page

.c
Added Modbus Communication
section to Chapter 4

ng
co Corrected Parameter table 6.1.3
an
th
o ng
du
u
cu

Version 3.06 June 2011 ClearSCADA System Integration ii

CuuDuongThanCong.com https://fb.com/tailieudientucntt
References
ClearSCADA Online Help

om
.c
ng
co
an
th
o ng
du
u
cu

Version 3.06 June 2011 ClearSCADA System Integration iii

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Contacts
ClearSCADA Technical Support

Available: Monday to Friday 8:00am - 6:30pm Eastern Standard Time


Direct Worldwide: (613) 591-1943
Toll free within North America: 1-888-226-6876
Fax: (613) 591-1022
Email: technicalsupport@controlmicrosystems.com

om
.c
ng
co
an
th
o ng
du
u
cu

Version 3.06 June 2011 ClearSCADA System Integration iv

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Table of Contents
Issue Details .................................................................................................................. i 
References ................................................................................................................... iii 
Contacts ....................................................................................................................... iv 
Table of Contents .......................................................................................................... i 
1  Course Outline ................................................................................................ 1-1 
2  Installation....................................................................................................... 2-1 
2.1  Restarting the Server .................................................................................. 2-6 
3  Introduction to ViewX ...................................................................................... 3-1 
3.1  ViewX Main Components ............................................................................ 3-2 
3.2  Database Objects ........................................................................................ 3-8 

om
3.3  Displaying and Controlling Mimics ............................................................ 3-16 
3.4  Displaying and Controlling Trends ............................................................ 3-19 
3.5  Displaying and Controlling Lists ................................................................ 3-23 

.c
3.6  Using the Online Help ............................................................................... 3-28 
4  A First Configuration ....................................................................................... 4-1 

ng
4.1  Organising Your Database .......................................................................... 4-1 
4.2  Configure Outstation and Points ................................................................. 4-4 
co
4.3  Configure and Test Outstation Points........................................................ 4-19 
4.4  Create a Mimic .......................................................................................... 4-22 
5  Animating Mimics ............................................................................................ 5-1 
an

5.1  Draw the Reservoir...................................................................................... 5-2 


5.2  Animate the Reservoir ................................................................................. 5-3 
th

5.3  Draw the Pump ........................................................................................... 5-7 


5.4  Animate the Pump ....................................................................................... 5-8 
ng

5.5  Completing the Mimic ................................................................................ 5-12 


5.6  Exercises................................................................................................... 5-13 
o

5.7  Exercises (Advanced) ............................................................................... 5-13 


du

6  Embedded Mimics & Animated Symbols ........................................................ 6-1 


7  User Commands ............................................................................................. 7-1 
u

7.1  Pick Actions ................................................................................................. 7-1 


cu

7.2  Hyperlinks ................................................................................................... 7-7 


8  Trends............................................................................................................. 8-1 
8.1  Trace Types ................................................................................................ 8-2 
8.2  Trend Types ................................................................................................ 8-2 
8.3  Current and Historic Traces ........................................................................ 8-3 
8.4  Raw Historic Analog Trace .......................................................................... 8-6 
8.5  Exercises..................................................................................................... 8-8 
8.6  Manipulating the Trend Appearance ........................................................... 8-9 
8.7  Processed Historic Traces ........................................................................ 8-11 
9  Templates and Instances ................................................................................ 9-1 
9.1  Creating Templates ..................................................................................... 9-1 
9.2  Property Overrides ...................................................................................... 9-4 
9.3  Creating Group Instances ........................................................................... 9-5 
9.4  Template Configuration Propagation ........................................................... 9-7 
9.5  Completing the Reservoir ............................................................................ 9-8 

Table of Contents i

CuuDuongThanCong.com https://fb.com/tailieudientucntt
9.6  Exercises................................................................................................... 9-10 
10  Structured Text Logic .................................................................................... 10-1 
10.1  Prepare Database Objects ........................................................................ 10-1 
10.2  Executing the Logic Program .................................................................... 10-4 
10.3  Debug the Logic Program ......................................................................... 10-6 
11  Security ......................................................................................................... 11-1 
11.1  User Accounts ........................................................................................... 11-1 
11.2  User Groups .............................................................................................. 11-5 
11.3  Permissions ............................................................................................... 11-6 
11.4  Operator Document Stores ..................................................................... 11-12 
12  ClearSCADA WebX Client ............................................................................ 12-1 
12.1  WebX Menus ............................................................................................. 12-4 
12.2  Live Configuration Availability ................................................................. 12-10 

om
12.3  Exercises................................................................................................. 12-11 
13  System Configuration.................................................................................... 13-1 
13.1  Server Configuration ................................................................................. 13-1 

.c
13.2  ViewX Configuration ................................................................................ 13-11 
14  System Architectures .................................................................................... 14-1 

ng
14.1  Backup Your Database ............................................................................. 14-2 
14.2  Configuring a Main-Standby Pair .............................................................. 14-4 
co
14.3  Server Synchronisation ............................................................................. 14-7 
14.4  Configuring Client Connections ................................................................. 14-9 
14.5  Exercises................................................................................................. 14-13 
an

14.6  Exercises (Advanced) ............................................................................. 14-13 


14.7  Restoring the Database........................................................................... 14-14 
th

15  Reports ......................................................................................................... 15-1 


15.1  ODBC DSN ............................................................................................... 15-1 
ng

15.2  Point List ................................................................................................... 15-4 


15.3  Exercises................................................................................................... 15-8 
o

15.4  Exercises (Advanced) ............................................................................... 15-8 


du

15.5  Report Properties ...................................................................................... 15-9 


15.6  Scheduling Reports ................................................................................. 15-15 
15.7  Changing the Look of Your Report .......................................................... 15-18 
u

15.8  Creating More Complex Reports ............................................................. 15-19 


cu

15.9  Creating a Report to Display Historic Records ........................................ 15-20 


15.10  Exercises................................................................................................. 15-25 
15.11  Exercises (Advanced) ............................................................................. 15-25 
16  Client Side Scripting ..................................................................................... 16-1 
17  Communications Diagnostics........................................................................ 17-1 
17.1  Driver Telnet Sessions .............................................................................. 17-1 
17.2  Driver Logs ................................................................................................ 17-4 
17.3  DNP3 Translator ....................................................................................... 17-6 
17.4  Exercises................................................................................................. 17-12 
17.5  Exercises (Advanced) ............................................................................. 17-12 
18  Alarm Redirection ......................................................................................... 18-1 
18.1  Configuring ClearSCADA to Send Emails ................................................. 18-3 
18.2  Configure the Email Action ........................................................................ 18-4 
18.3  Configure the Redirection.......................................................................... 18-5 

Table of Contents ii

CuuDuongThanCong.com https://fb.com/tailieudientucntt
18.4  Redirection Trip Characters ...................................................................... 18-7 

[Blank Page]

om
.c
ng
co
an
th
o ng
du
u
cu

Table of Contents iii

CuuDuongThanCong.com https://fb.com/tailieudientucntt
1 Course Outline
This course aims to provide an introduction to configuring systems using
ClearSCADA. Due to the feature rich nature of ClearSCADA, it is impossible to
exhaustively cover every aspect of the software, and so the focus is to provide
sufficient understanding of the product to allow a user to investigate features not
covered during this course.

This training manual should be used in conjunction with the materials presented by
the course instructor.

Each chapter concludes with a number of exercises. It is expected that everyone will
do the exercises once the step by step worked examples have been completed. In

om
addition, some chapters contain a number of Advanced Exercises. Not everyone will
get to complete these as the course moves on to the next chapter. In this case, it is
suggested that the participant complete these exercises at a later date.

.c
Throughout this manual, the following conventions are used:


ng
Options that the user should select are shown in Bold text.
co
 Helpful tips and hints are provided in the way of Notes. An example note is
an

shown below for reference.


th

Note: When new groups are created, they already contain a Mimic named Default. This
mimic is set as the Default Mimic of the new Group.
o ng

 Text in italics will describe what the participant should expect to see after
du

performing the step described in the exercise.


u
cu

Chapter 1 – Course Outline 1-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
2 Installation
Installing ClearSCADA is similar to installing any other windows based software
package. The following pages will take you through the simple process of installing
the product.

Note: Please ensure that any software firewalls are disabled while ClearSCADA is installed.
They can be turned on again once the installation has completed.

om
To install ClearSCADA:

1. Insert the CD into your PC.

.c
The following screen will be displayed.

ng
co
an
th
o ng
du
u
cu

2. Select the Install ClearSCADA option.

The install process will begin and after some preliminary checks and installation
of program prerequisites, the following dialog will be displayed.

Chapter 2 – Installation 2-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Note: Instructions on the installation process can be found by clicking on the “Upgrade &
Installation Guide” button.

om
.c
ng
co
an

3. Click Next to continue.


th

4. Select I Accept the Terms in the Licence Agreement and click Next
ng

The following dialog will be displayed.


o
du
u
cu

Chapter 2 – Installation 2-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5. Enter User Name and Organisation and click Next to continue.

Note that this information is used purely for local machine registration purposes
and is not required in the product.

om
.c
ng
co
an
th

6. Select the Full (Recommended) installation option.


ng

The Full (Recommended) option installs a default set of features, along with the
o

ClearSCADA example projects. The features installed will be used during this
du

training course.

The following screen will be displayed.


u
cu

Chapter 2 – Installation 2-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
ng
7. Set the User Name as Admin and the password as password then click Next
co
to continue.

The Super User account is similar to the local Administrator account on a


an

Windows PC. This account gives full access into the system and should rarely
be used. Keep this username and password secret in the same way you would
th

keep a Windows username and password.


ng

8. On the next screen, click Install to begin installation.


o

The file copying process may take a few minutes. When the installation has
du

completed, select Finish, and the following dialog will be displayed.


u
cu

Chapter 2 – Installation 2-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
The dialog will show the process of installing the Example Projects, starting the
server and ViewX client ready for use.

Installing ClearSCADA has now been completed and we are ready for an introduction
to the product…

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 2 – Installation 2-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
2.1 Restarting the Server
If your system is offline at any stage during the course (this will happen if the licence
expires), you can restart the server using the Service Manager.

1. On your desktop (or in the Start menu), double-click on the ClearSCADA


Service Manager icon to run the ClearSCADA Service Manager.

om
.c
ng
co
2. Ensure the ClearSCADA Server option is highlighted in the Service field and
select the Start button.
an

After a short time, the ClearSCADA Server will start. The icon for the server
will be displayed in the Windows Task Bar.
th

3. Close the ClearSCADA Service Manager.


ng

We will discuss the main features of ViewX in the next section, but before we
o

progress:
du

1. Right-click on the red rectangle that contains two numbers towards the bottom
of the ViewX screen.
u
cu

This is the Alarm Enunciator and when you right-click on it, a context-sensitive
menu is displayed.

2. From the context-sensitive menu, select the Disable Bell option. This turns the
alarm bell sound off.

Usually, the alarm bell is enabled, as it is a useful signal to operators that an alarm
condition has been reported and needs their attention. So why are we asking you to
disable it? If you leave the alarm bell on, its constant beeping will really irritate you as
you work through the other sections.

Chapter 2 – Installation 2-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
3 Introduction to ViewX
ClearSCADA provides two client-side interfaces for communication between a
ClearSCADA server and a client: ViewX and WebX. These clients run on computers
that access the ClearSCADA database via a network connection. The clients do not
store the database; they connect to it. The ClearSCADA server is used to store the
ClearSCADA database.

ViewX is the primary client application and is used to configure and view most aspects
of the system. The first thing you will notice is some similarities with the standard
Windows Explorer user interface: an explorer bar on the left, toolbars and menus
across the top, and a status bar at the bottom. The section above the status bar is the
alarm banner, and the remaining space is the document display area. These are

om
illustrated in the diagram below:

.c
Menus Toolbars Document Display Area

ng
co
an
th
o ng
du
u
cu

Explorer Bar
Alarm Banner

Chapter 3 – Introduction to ViewX 3-1


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.1 ViewX Main Components
The main components of the ViewX interface are the Menus, Toolbars, Explorer Bar,
Alarm Banner, Document Display Area, and Status Bar.

3.1.1 Menus
The menus are displayed at the top of the ViewX window and provide access to many
of the ViewX features. The menus are dynamic—the menus and options change
depending on the items on display in ClearSCADA.

om
.c
ng
co
an
th

The menus and options shown above are available when there are no items displayed
ng

in the ViewX document display area. These are the basic menus and include:
o

 File – Includes printing options, the access options for local and external
du

files, logging on and off and exiting ViewX.


 Edit – Includes the editing functions that allow you to change content of the
u

database (and so rarely used by operators).


cu

 View – Allows you to change the ViewX functions which are visible. Also
used to access basic features such as Alarm lists (F9), Events lists (F10)
and Full Screen mode (F11).
 Window – Includes the options that allow you to manipulate the document
displays shown in ViewX.
 Help – Provides access to ‘About’ information and the ClearSCADA Help
documentation.

Other menus and options are made available when you access certain displays and
modes, for example, the Arrange menu is available when you are configuring a Mimic
(a graphical display).

Chapter 3 – Introduction to ViewX 3-2


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.1.2 Toolbars
Toolbars are sets of icons that you can use to access specific features. Typically, they
provide fast access to the same features as the menu options described above.
Toolbars can be dragged from the toolbar area to any area within ViewX as ‘floating’
toolbars.

ViewX includes 6 toolbars, but the initial functionality is provided by two toolbars: the
Operate toolbar and the Navigate toolbar. To begin with, we will examine the features
of the Operate toolbar (we will look at the Navigate toolbar later in the training course).

The Operate Toolbar provides access to general ViewX functionality, including:

om
.c
1 2 3 4 5 6 7 8 9 10

ng
Item 1: Navigate forward/Navigate back buttons allow you to navigate to the previous
and next documents you viewed in a sequence.
co
Item 2: Home page allows you to navigate to a predetermined Home document,
an

typically a Mimic (graphical display).


th

Item 3: Displays Alarm and Event lists for the system.


ng

Item 4: Favorites is a unique area for you to store specific views of database
documents. This can be used to provide fast access to those displays that you
o

access on a regular basis.


du

Item 5: Sets the Explorer Bar in ViewX to display the Database Bar, which provides
access to the items in the database.
u
cu

Item 6: Sets the Explorer Bar in ViewX to display the Queries Bar, which provides
access to the SQL Queries lists, for example, a list of all database points.

Item 7: Sets the Explorer Bar in ViewX to display your Operator Documents Store, a
special area that contains database items that you can configure, even if you are not
usually able to configure items due to your user account permissions.

Item 8: Display the Area of Interest Bar. This facility allows you to configure each
system alarm with an area that can be used to simplify filtering and management of
alarms. This facility is turned off by default and may be greyed out in your toolbar.

Item 9: Allows you to print the current document on display.

Item 10: Allows you to toggle between the normal and full screen display modes.

Chapter 3 – Introduction to ViewX 3-3


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.1.3 Explorer Bar
The Explorer Bar provides different views of the ClearSCADA database. Users with
full access permissions can set the Explorer Bar to show the Database Bar (which
contains the individual database objects), Favorites Bar, Queries Bar, OPC Data Bar
or OPC Historic Bar. Operator level users are typically restricted to viewing the
Database Bar, Favorites Bar, Queries Bar and Operator Documents Bar.

From the Database Bar, you


can access properties and

om
functions for each database
object in ClearSCADA.

.c
The Database Bar is both an
engineering tool and

ng
operations tool but is generally
only used for more advanced
co
operators.
an

The Queries Bar provides


th

access to lists, Data Grids and


database tables. The Queries
ng

display data that matches


specific criteria e.g. all points
o

or communications channels.
du

SQL (Structured Query


Language) is used to query
u

the database for the data that


cu

is displayed in the Query lists,

The Favorites Bar shows your


favorite displays. You can
save links to Mimics, lists and
other displays in your
Favorites. The links can then
be used for fast access to
those displays.

Favorites are individual to


each user and can be
organized as required.

Chapter 3 – Introduction to ViewX 3-4


CuuDuongThanCong.com https://fb.com/tailieudientucntt
The Operator Documents Bar
displays your operator
document store; a special area
that can be used to store
Trends that you can configure,
even if your user account does
not have the Configure
Database permission.

The various Explorer Bars are important, as they are the initial interface to the

om
database. They are used extensively when creating and configuring the system, but
are used less when operating the system. Advanced operators may use the
Database Bar for group operations such as filtering event lists, or acknowledging

.c
alarms.

ng
We will discuss the use and operation of the Explorer Bars later in the course.
co
3.1.4 Alarm Banner
an

The Alarm banner is the primary alarm display in ViewX. All alarms from the system
are reported in the Alarm Banner which is normally located at the bottom of the ViewX
th

display, just above the Status bar.


o ng
du
u
cu

1 2 3

The Alarm banner has three areas:

Item 1: Allows you to close the banner (depending on the permissions of your user
account).

Item 2: The alarm enunciator turns red when a new alarm is raised. It shows the total
number of alarms (bottom number) and total number of unacknowledged alarms (top
number) on the system.

Item 3: The alarm list shows the alarms for the system and provides information about
the alarms, including:

Chapter 3 – Introduction to ViewX 3-5


CuuDuongThanCong.com https://fb.com/tailieudientucntt
 Severity - indicates the importance of the alarm.
 Time - the time at which the alarm was raised.
 System - the name of the system on which the alarm was raised. This field is
only displayed when connected to multiple servers from ViewX.
 Source - the full name of the object with which the alarm is associated.
 Message - A short description of the cause of the alarm.
 Category - indicates the type of alarm.
 Suppressed Alarm Count - shows the number of alarms that have been
suppressed by this alarm.

All active, unacknowledged alarms are displayed in the Alarm Banner. They are
sorted according to their severity level and alarm status, and they are also colored to
indicate their status (the color scheme is configured by users with high level security

om
permissions).

The alarms in the Alarm Banner can be handled via the context-sensitive menu for

.c
each Alarm (displayed when you right-click on an alarm).

ng
co
an
th
o ng
du

The context-sensitive menu provides functionality to respond to the alarm and to


u

locate the database object that is associated with the alarm. We will discuss alarms in
cu

more detail later in the course.

Chapter 3 – Introduction to ViewX 3-6


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.1.5 Document Display Area
The Document Display Area is the main part of the ViewX interface and is where the
various ViewX displays are shown. These include:

 Mimics - The main graphical displays that can show both static and dynamic
representations of your system. They provide access to the actions and
controls that you will need to perform your tasks.

 Trends - Plot the values of a point (or multiple points) on a Trend Graph with
an X-Axis and at least 1 Y-Axis. Trends are used to compare values over
periods of time and to determine patterns in the data, for example, to
determine at what times a point’s value is ‘high’.

om
 Lists - Used to display many types of useful information, including the property
values of specific objects, alarm lists, event lists and object queries. The lists

.c
often provide access to the actions and controls that you will need to perform
your tasks and also allow you to compare various different values.

ng
 Property Forms - Display the properties associated with database objects.
co
You can use the property Forms to modify the property settings for database
objects (depending on your user account permissions).
an

3.1.6 Status Bar


th

The Status Bar is positioned along the bottom of the ViewX window. It provides extra
status information concerning ViewX and the ClearSCADA Database, including:
ng

 System status information.


o

 Currently logged in ser name.


du

 Most recently logged event.


u
cu

Chapter 3 – Introduction to ViewX 3-7


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.2 Database Objects
Each database object represents a ClearSCADA display, a program, a device in the
‘real world’ such as an outstation, or an internal feature such as a group or user
account.

For each object in the database, there is an object menu. The object menu contains
options that correspond to the actions available for that object. You can access the
object menu from almost any ClearSCADA display that contains a representation of
the object (Trends being the notable exception).

The options that are available on the object menu will vary according to the type of
database object, the access permissions allocated to your user account and the

om
current state of the object. A system administrator will grant permissions to your
account that define which features of the ClearSCADA system you can access.
Usually, your permissions relate to your role in the ClearSCADA environment.

.c
To access an object menu from the Database Bar:

ng
1. Expand the content of the Database Bar by using the (+) or (-) icons
co
2. Right-click on a database object to display a context-sensitive menu.
an
th
o ng
du
u
cu

The context-sensitive menu is the object menu for the object you have selected (the
object menu for an internal analog point is shown above) and contains options for
many of the standard actions and controls relating to that database object. The
options are divided into sections, with the top section containing object information
options and the bottom section containing object action options.

Chapter 3 – Introduction to ViewX 3-8


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.2.1 Object Information
The type of object on display affects the type of information that is available from the
object menu. For example, the object menu for a database point includes options to
display a Trend, whereas the object menu for an outstation object has the option to
display a list of the outstation’s points.

Listed below are the standard options that apply for nearly all types of database
object:

 View (Status Display)


 Notes
 Display Events

om
 Display Alarms

.c
3.2.1.1 View (Status Display)
Every object in your ClearSCADA database has its own status display (also referred to

ng
as its View window or View dialog). You can access the View dialog for an object by
selecting the View option from the object menu.
co
The View dialog provides information about the current status of the selected object
and is particularly useful when debugging the ClearSCADA system.
an
th
o ng
du
u
cu

Chapter 3 – Introduction to ViewX 3-9


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.2.1.2 Notes
You can add or modify a note that is associated with a database object. Notes are
useful ways of providing other users with additional information about the object. You
can also use notes to act as a simple reminder to yourself.

To view, create or amend the notes for an object, select the Notes option from the
object menu. This displays the Notes dialog which you can use to enter a text note for
the object.

om
.c
ng
co
an

Whenever notes are added to an object, ClearSCADA records the user and the time
the note was made. This is displayed when the Notes dialog is next opened. The
th

background color of this object also changes to indicate that a Note has been added.
We will discuss colors in a later section.
ng

3.2.1.3 Display Events


o

ClearSCADA has an event journal that records all events for all objects. By selecting
du

the Display Events option from the object menu, you display a list of all the events
associated with that relevant database object over a defined time period. By default, a
u

24 hour period is displayed.


cu

We will examine the event list in more detail later in the course.

Chapter 3 – Introduction to ViewX 3-10


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.2.1.4 Display Alarms
You can view a list of all of the alarms associated with a specific object by selecting
the Display Alarms option on the object menu for that object. The Alarm List that is
displayed shows only those alarms that have been reported for the selected object.

om
.c
3.2.2 Object Actions
The second section of the object menu contains options for the actions that can be

ng
performed on the object. The actions differ according to the type of object and the
functionality that is available for that object.
co
Some of the most common actions are those used for responding to alarms, in
particular:
an

 Acknowledge Alarm
th

 Acknowledge with Comment


 Response
ng

 Enable/Disable Alarm
o
du

3.2.2.1 Acknowledge Alarm


You can use the Acknowledge Alarm action to notify the system and other users that
u

you are responding to a raised alarm. When you acknowledge an alarm,


cu

ClearSCADA logs an event in the Event Journal. After acknowledging an alarm, you
will need to make efforts to diagnose the cause of the alarm and action a solution that
will clear the alarm.

If you select the Acknowledge Alarm action for a group object, you automatically
acknowledge all alarms for that group, including the alarms in sub groups.

3.2.2.2 Acknowledge with Comment


The Acknowledge with Comment action works in the same way as the Acknowledge
Alarm action, except that it allows you to add a text comment, similar to a note, for the
alarm. This comment is inserted in the Event Journal entry for the alarm and can be
read by other users.

Chapter 3 – Introduction to ViewX 3-11


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.2.2.3 Response
The Response action allows you to create an alarm comment without having to
acknowledge an alarm. This is useful when you have information about the alarm but
are not in a position to acknowledge it.

The alarm response comment that you make will be entered in the Event Journal
where other users can read it and the alarm will be highlighted in alarm lists to indicate
that a response is available for that alarm.

3.2.2.4 Enable/Disable Alarms


The Disable Alarms action allows you to prevent alarms being reported for the
selected object. If you select the Disable Alarms action for a group object, alarms will

om
not be reported for all objects within the group. Disabling alarms is often useful during
the testing of ClearSCADA systems, or where scheduled maintenance is being
performed and where alarms are expected.

.c
ClearSCADA can be configured to add a time limit to the Disable Alarms action so that

ng
the alarms are enabled automatically after a time period which can be fixed system-
wide, or configured by the user when they disable the alarm.
co
The Enable Alarms action allows alarms to be reported for the object and is only
available when the object’s alarms are disabled.
an
th

3.2.3 Using the Object Menu


ng

To use the features of the Object Menu:


o

1. Open the Opening Page mimic by right clicking on the mimic in the Database
du

Bar and selecting Display from the object menu displayed.


u

2. On the Mimic, select the Projects button to display a Logon dialog.


cu

If you are already logged on as the Eng or Sales user, you will not be prompted
for this logon and will instead proceed directly to the Projects Overview mimic.
You may need to open the alarm banner if you are logged on as the Eng user
by using the option in the View menu.

3. Select the Logon Sales button to log on to the system as the ‘Sales’ user.

Chapter 3 – Introduction to ViewX 3-12


CuuDuongThanCong.com https://fb.com/tailieudientucntt
The following mimic will be displayed.

om
.c
ng
co
an
th
ng

4. For one of the active alarms displayed in the alarm banner, right click on the
alarm.
o
du

A context sensitive menu will be displayed.


u
cu

Chapter 3 – Introduction to ViewX 3-13


CuuDuongThanCong.com https://fb.com/tailieudientucntt
5. Select the Locate in Database Explorer option.

The Database Bar expands automatically, revealing the location of the Runtime
Alarm object with which the alarm is associated. The object is highlighted.

om
.c
ng
co
an

6. Display the object menu for the object by right-clicking on the object in the
th

Database Bar.
o ng
du
u
cu

Chapter 3 – Introduction to ViewX 3-14


CuuDuongThanCong.com https://fb.com/tailieudientucntt
7. Investigate the following options from the object menu:

a. View
b. Display Events (repeat after acknowledging the alarm)
c. Notes...
d. Display Events
e. Display Alarms
f. Acknowledge Alarms
g. Acknowledge with Comment
h. Reset Process Count

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 3 – Introduction to ViewX 3-15


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.3 Displaying and Controlling Mimics
ClearSCADA supports graphical displays (Mimics) that can show dynamic and static
data. Mimics can contain graphical elements, text, and can integrate with other
features such as Trends, lists, and other Mimics.

om
.c
ng
co
an
th

Mimics are excellent user-interfaces as they can provide access to a wide range of
ng

displays and features as well as presenting information in a graphical format that is


easy to interpret.
o
du

When working with Mimics, you will need to use:


u

 The Navigate Toolbar


cu

 Pick Actions
 Embedded Displays.

Chapter 3 – Introduction to ViewX 3-16


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.3.1 Navigate Toolbar
You can use the Navigate toolbar to magnify a Mimic, move the Mimic within the
display area, display pre-defined views of a Mimic, and lock the Mimic so that it retains
its original dimensions.

The Navigate toolbar contains:

1 2 34 5 6 7

om
Item 1 - Mimic Zoom - Specify a percentage or a predefined size at which the mimic
should be displayed.

.c
Item 2 – Zoom In/Out – Increase or decrease the level of magnification.

ng
Item 3 – Zoom Box - Select a specific area of the Mimic to magnify.
co
Item 4 – Pan - Reposition the Mimic in the display area (useful when the Mimic is
larger than the display area).
an

Item 5 – Zoom Lock - Set the Mimic to retain its original dimensions.
th

Item 6 – Mimic Navigator - Navigate the Mimic using a magnified selection window.
ng

Item 7 – Defined View - Display a configured view of the Mimic. Mimics can be set to
o

have Views (areas of the Mimic shown at specific levels of magnification).


du
u

3.3.2 Pick Actions


cu

A pick action is an action that can occur in a system that is tied to a particular mimic
item. When you click on this item, the specific pick action is performed. For example,
a button can be configured to navigate from one page to another.

There are many different types of pick actions, including pick actions that act as
hyperlinks to other Mimics and displays, pick actions that provide access to
customized menus and pick actions that perform controls on real I/O points.

You can identify a pick action area on a Mimic by the cursor changing from an arrow
to a pointing finger icon when the cursor is positioned over a pick action area. This
behavior and the icons used are the same as internet browsers such as Internet
Explorer.

Chapter 3 – Introduction to ViewX 3-17


CuuDuongThanCong.com https://fb.com/tailieudientucntt
When you position the cursor over a pick action area on a Mimic, a brief description of
the pick action may be displayed in a ToolTip (this is dependent on a description being
defined in the pick action’s configuration).

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 3 – Introduction to ViewX 3-18


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.4 Displaying and Controlling Trends
We will cover Trends in much more detail later in the course; however this section will
provide a brief overview in using the trends in the system.

Trends allow ClearSCADA to display point data and system data plotted on graphs.
The Trends are versatile and can be used for comparing values or examining the data
for noticeable patterns.

om
.c
ng
co
an
th
ng

There are two types of Trend in ClearSCADA:


o
du

 Trend objects - These are system-specific Trends that have been configured as
part of your ClearSCADA database configuration. They are listed as objects in your
u

database in the same way as Mimics (you can see the Trend objects by looking in
cu

the Database Bar). Trend objects can display multiple traces and may show
current and historic data simultaneously.

 Default Trends - These are Trends generated on the fly by ClearSCADA when
displayed from a points’ Object Menu. You can display a default Trend for any
point in your database, and may plot:

 Current Data - The current data values for the point.


 Historic Data - Historic data for the point (either raw values or processed
data if Historic Logging is enabled).

We will discuss historic data trending in much more detail later in the course.

Chapter 3 – Introduction to ViewX 3-19


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.4.1 Trend Layout

om
.c
ng
co 4
an
th
ng

2 3
o
du

A Trend is divided into four main areas.

Item 1: Y-Axis and Title - The Y-Axis represents the range of values for the data
u

displayed on the Trend. You can zoom in and out on a particular part of the Y-Axis by
cu

using the scroll buttons on your mouse.

Item 2: Key - This is a list of all the data points represented on the Trend. Each set of
data plotted on the Trend is represented by a trace entry in the Key.

Item 3: X-axis - The time line of the Trend is represented by the X-Axis and the
amount of time that you can see on the X-Axis when viewing a Trend is called the
interval. The interval can be configured or you can use the navigation features to
shorten or lengthen the amount of time shown in a single interval.

Item 4: Trace and Markers - Each database object that has its data plotted on the
Trend is represented by a Trace and a series of markers. Each Trace is colored
differently so that it is easy for you to compare the values of different objects. The
markers on the Traces are also colored, and each marker represents a data value and
its associated timestamp.

Chapter 3 – Introduction to ViewX 3-20


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.4.2 Navigating a Trend
When you have displayed a Trend, you can manipulate it by using the features on the
Navigate toolbar.

1 2 3 4

Item 1: Zoom In / Out Buttons - Shortens or lengthens the time represented on the X-

om
Axis, causing values to be shown in greater detail or less detail.

Item 2: Zoom Box – Allows you to select a specific area of the Trend and then

.c
magnify it (show the values in greater detail over a shorter amount of time on the X-
Axis).

ng
Item 3: Pan Button – Allows you to ‘grab’ the Trend and ‘drag’ it forwards or
backwards along the X-Axis timeline.
co
Item 4: Previous / Next Interval - Moves the Trend forwards and backwards along the
an

timeline in defined periods of time (the current interval).


th

3.4.3 Using Trends


ng

To use the available trend features to investigate a Default Historic trend:


o

1. In the Database Explorer, navigate to the analog point


du

Presentation.Maintain.NTMon.CPU2

2. Right click on the point and select Display Historic Trend from the object
u

menu.
cu

A trend is opened that displays the values for the ‘CPU’ point that have been
stored in the historic database.

3. Position the mouse cursor over the x-axis and zoom in on the trace by scrolling
your mouse wheel.

Note that the zoom position is determined by the location on the axis of the
mouse cursor. If you zoom in with the cursor at 9am, then the trend will show
more detail around 9am.

4. Zoom in on the y-axis by position the cursor over the y-axis and scrolling the
mouse wheel.

Chapter 3 – Introduction to ViewX 3-21


CuuDuongThanCong.com https://fb.com/tailieudientucntt
5. Zoom in to the trend such that only a minute or two is on display.

Note that the trend scrolls to the left with time. This is referred to as continuous
mode which allows the trend to track updates to the trend data and moves the
trend along accordingly.

6. Right click on the x-axis and deselect the Continuous option.

Note that the trend position no longer moves with time.

We will look at some of the other Trend features in much more detail later in the

om
course.

.c
ng
co
an
th
o ng
du
u
cu

Chapter 3 – Introduction to ViewX 3-22


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.5 Displaying and Controlling Lists
ViewX is capable of displaying a wide variety of information in a list. The list displays
are useful as they allow you to compare a range of property values from many
different database objects, and most lists also provide access to the object menus.

3.5.1 List Types


There are many different types of list, including:

 Lists of database objects

om
.c
ng
co
an

 Lists of historic data


th
o ng
du
u
cu

 Event Lists

All lists, with the exception of the Alarm list, use Structured Query Language (SQL) to
populate the lists with data from the database. The Alarm list uses OPCAE (OPC
Alarm and Events) to provide the alarm data.

Chapter 3 – Introduction to ViewX 3-23


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Some lists can be accessed from object menus, for example, you can access the
Event list for an object from its object menu. However, ClearSCADA also includes
lists that you can access from the Queries Bar in the Explorer Bar.

Lists from the Queries Bar are built-in lists of database objects (there are lists for most
types of database object as well as a list of all database objects). They provide
information about the property values of various types of database objects and this
information is dynamic; it updates as you view the list. You can use the filtering and
sorting features of the lists to control what information is shown in the list.

3.5.2 Filtering Lists

om
You can filter a list so that it only contains data that matches specified criteria.

To filter a Queries list or Events list, you can use the Filter Columns window.

.c
ng
co
an
th
o ng
du

1. Display the Event List by clicking on the Events symbol (E) on the ViewX
toolbar.
u
cu

2. Select the Items menu and choose the Filter option.

You could also right click on the list and select Filter, or press F7 to display the
filter dialog directly.

3. Click the Add button and configure the settings as shown in the following
screen.

This will display the event list filtered to show only those events generated this
hour, rather than the default of the previous 24 hours.

Chapter 3 – Introduction to ViewX 3-24


CuuDuongThanCong.com https://fb.com/tailieudientucntt
You can use the filter dialog to add other filters, edit or remove existing filters, and
even apply advanced filters by defining the filter in SQL.

om
.c
3.5.3 Filtering Alarm Lists
The alarm filter dialog operates in a different way to the list filter dialog described

ng
above, though it has the same purpose.
co
an
th
o ng
du
u
cu

To use the Alarm Filter dialog:


1. Display the Alarm List by clicking on the Alarm List symbol (A) on the ViewX
toolbar.

Chapter 3 – Introduction to ViewX 3-25


CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. Select the Items menu and choose the Filter option.

You could also right click on the list and select Filter, or press F7 to display the
filter dialog directly.

3. Change the State selection to Unacknowledged Uncleared and Click OK.

The alarm list will change to only display the “unacknowledged and uncleared”
alarms (shown in flashing red).

4. Right click on the Alarm list and select Remove Filter.

om
Note that all alarms are again displayed in the list.

.c
Note: Filtering is also available on the alarm banner by right clicking on the banner and
selecting the Filter option.

ng
co
3.5.4 Sorting a List
an

ClearSCADA includes a sorting feature that allows you to control the order of the data
shown in a list. Sorting a list can make it easier to view and interpret the values shown
th

in the list.
ng

You can sort the list directly by clicking on the column headings. This will toggle that
column between ascending and descending sort criteria.
o
du

You can use the sort dialog for multi-column sorting:

1. Display the list that you want to sort.


u
cu

2. Select the Items menu, then the Sort option.

Alternatively, press the F8 function key or right-click on the list and select the
Sort option from the context-sensitive menu. The following dialog will be
displayed.

Chapter 3 – Introduction to ViewX 3-26


CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
You will notice the default sorting for alarm lists is the alarm State, Severity and
then Time.

.c
3. Select the Time entry in the list and use the Move Up button to move it to the
top of the list.

ng
The order of the entries in the list determines the order in which the sorting is
co
applied.

4. Click OK.
an

Note that the default sort order of the alarm list and banner is changed.
th
ng

3.5.5 Exercises
o

1. Using the Points list from the Queries Bar, display a list of all points whose
du

FullName Contains the word Oil.

2. Add another filter item to this list to only display points whose Value is greater
u

than or equal to 10.


cu

3. Open the historic list for the point Presentation.Maintain.NTMon.CPU2. Filter


the list to display historic updates where the value is greater than 50 and data
includes all updates for today.

Chapter 3 – Introduction to ViewX 3-27


CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.6 Using the Online Help
ClearSCADA help is context sensitive. This means that wherever you are in the
product, you can simply press F1 to go to help that is relevant for the tool you are
using.

For example, to find out how to configure state descriptions for a digital point, you
would click in one of the state description fields and press F1. This would take you
the online help for configuring digital point descriptions.

The online help file is displayed by pressing F1 or by selecting Contents from the Help
menu in ViewX. It is also available as a link in the Control Microsystems ClearSCADA
start menu folder.

om
The online help is divided into a number of sections as shown below.

.c
The small red star indicates that this version contains new content in that folder.
Simply drill down to view the new topics.

ng
co
an
th
o ng
du

Welcome to ClearSCADA – an introduction to the Help system and how to use its
features.
u

What’s New in ClearSCADA – describes all the new features and other improvements
cu

in this version of ClearSCADA.

Tutorial – provides a product ‘walk through’ to help new users become familiar with
ClearSCADA.

ViewX and WebX clients – an overview of how to use ViewX and Web clients from an
operations point of view.

Core Reference – contains details of core features of the product. This is broken into
the following sections for clarity:
a) Core Configuration – configuring core database objects.
b) Core point configuration – point configuration relevant to all point types.
c) Alarms
d) Alarm Redirection – describes how to configure SMS and pager messaging,
email redirection etc.

Chapter 3 – Introduction to ViewX 3-28


CuuDuongThanCong.com https://fb.com/tailieudientucntt
e) Lists
f) Mimics
g) Trends
h) X-Y Plots
i) Expressions – a guide to the types of expressions that can be used in areas
such as mimic animations.
j) Logic – how to use the IEC 61131-3 logic engine.
k) QueryPad
l) Scripting
m) Server Administration
n) Server Status Tool
o) Client Administration
p) Security

om
q) Database – provides an overview of the ClearSCADA database itself.

.c
Note: The ClearSCADA documentation is expanded as new features are added to the
product. The list above is indicative only showing the main documentation topics in the Core
Reference Section.

ng
co
Driver Reference – an overview of drivers in ClearSCADA. This is divided into:
a) Advanced Drivers – more complex drivers containing features such as
an

PSTN support and data time-stamping.


b) Simple Drivers – generally polled protocols with no support for PSTN.
th

c) Others – other drivers such as ICMP (pinging) and Crystal Reports


ng

Technical Reference – guides that describe the ODBC/SQL and automation interfaces
in ClearSCADA.
o
du

For more details on the use of the ClearSCADA help system, please refer to the
Welcome to ClearSCADA Help section of the online help.
u
cu

Chapter 3 – Introduction to ViewX 3-29


CuuDuongThanCong.com https://fb.com/tailieudientucntt
4 A First Configuration
For the following chapters, you will need to be logged onto the system to perform
configuration action. Ensure you are logged on by following these steps:

To login using ViewX:

1. From the File menu, select the Log On option.

2. In the Username field, enter the username Eng.

3. Click the OK button.

om
Note: If you were able to successfully logon to the system, you will see the username Eng
displayed in the status bar at the bottom of the screen.

.c
ng
4.1 Organising Your Database co
You should organise your database so that the tree-structure is logical and user-
friendly. This allows you (and other users) to locate items quickly.
an

Organising your database is achieved through the use of Groups. Each Group can
contain other database items, including other Groups. This allows you to create a
th

multi-level tree-structure in the Database Bar. The structure of the database can best
be thought of as similar to the hierarchical folder structure found in Windows.
ng

All items are created in the database using the same mechanism. Follow the steps
o

below to create a new Group, a Mimic and RTU Communications objects. In


du

ClearSCADA, an RTU is referred to as an outstation; however these terms may be


used interchangeably in this training manual.
u
cu

To create a new group:

1. Right-click on the System in the Database Bar.

2. On the Context Sensitive menu, select the New option. This displays a list of
creatable objects in the database. Select the Group option followed by Group.
This adds a new Group to the tree-structure.

3. Name the new Group Training

Note: When new groups are created, they already contain a Mimic named Default. This
mimic is set as the Default Mimic of the new Group.

Chapter 4 – A First Configuration Issue 1 4-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Following the same process used to create the group, create and name the following
objects in the groups specified.

Note: SCADAPack 350 supports both Modbus and DNP protocols. In the table below, select
the appropriate protocol that you wish to work with during the training. If you are unsure
which one to use, please ask your instructor.

The Base Group is the name of the group where you should create the object. The
Object Type is the type of object to create in the Base Group and the Object Name is

om
the name that you should give to the objects you create.

.c
Base Group Object Type Object Name

ng
Training Group Reservoir
DNP3 Direct Channel or
co
Training SCADAPack Modbus Direct Channel
Channel
DNP3 Direct Outstation Set or
an

Training SCADAPack Modbus Direct Set


Outstation Set
th

DNP3 Direct Outstation or


Reservoir SCADAPack Modbus Direct Outstation
ng

Outstation
Reservoir Group Pump 1
o

DNP3 Analog Input Point or


du

Reservoir SCADAPack Modbus Analog Level


Input Point
DNP3 Binary Input Point or
u

Pump 1 SCADAPack Modbus Digital Running


cu

Input Point
DNP3 Binary Output Point or
Pump 1 SCADAPack Modbus Digital Start
Output Point

Chapter 4 – A First Configuration Issue 1 4-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
Note: Crosses on the object indicate a configuration error related to that object. The crosses
are updated as objects are saved or when the F5 function key is pressed (assuming that the
error has been cleared). Note that the F5 key will refresh the Database Bar and alphabetically

ng
organise the database. When you open the properties of an object with a configuration error,
the error will be displayed at the bottom of the properties form. Double clicking on the error
co
will move the cursor to the field which is causing the error.
an
th
o ng
du
u
cu

Chapter 4 – A First Configuration Issue 1 4-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
4.2 Configure Outstation and Points
Each database object has a large number of properties that define how the object
behaves. Most objects have some properties that are common to all types of objects
and other properties that are specific to that type of object. For example, a channel
has some properties that are common to outstations, points, and other objects as well
as other properties that are only available to channels (or that particular type of
channel).

You can modify the properties of an object by using the settings on the object’s
configuration Form.

To access the configuration Form for an object:

om
1. Right-click on the object in the Database Bar.

.c
2. Select the Properties option to display the object’s Form.

ng
Note: You can also display the properties form of an object by double clicking on the object in
co
the Database Bar.
an
th
o ng
du
u
cu

Outstation Form

Each Form consists of a number of tabs, each containing a variety of fields that
correspond to the properties of the object. By changing the settings in these fields,
you can alter the behavior of the object.

Chapter 4 – A First Configuration Issue 1 4-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
For each object we created in the last section, we need to now set the properties to
enable RTU communications. We will start with the Channel.

Note: There are two sections below describing how to connect to the RTU using either serial
or Ethernet communications for the appropriate Protocol. Please use the relevant section. If
you are unsure which one to use, please ask your instructor.

4.2.1 Serial Channel


If you are connecting to the RTU using a serial connection, then follow the steps in
this section. If you are using an Ethernet connection to the RTU, proceed to section
4.2.2.

om
The channel object specifies the type of communications that will be used to connect

.c
to the device, along with some timing parameters. A single channel can be used to
communicate with multiple RTU’s, depending on the type of communications used.

ng
Section 4.2.1.1 will cover the settings and configurations for the DNP3 protocol and
section 4.2.1.2 will cover Modbus protocol. Please continue with the relevant section.
co
4.2.1.1 DNP3
an

To configure the DNP3 Direct Channel:


th

1. Open the properties form of Training.Channel by right clicking on the channel


ng

object in the Database Bar and selecting the properties option.


o

2. On the Channel tab, put the channel In Service.


du
u
cu

By ticking or clearing the In Service field and then saving the change, you
dynamically enable or disable this object in the database.

Chapter 4 – A First Configuration Issue 1 4-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Note: To determine the function of a specific property, hover the cursor over the property on
the Form – a ToolTip will be displayed. The ToolTip contains a short description of the
property. When you select the property, the ClearSCADA status bar at the bottom of the
display will show the actual property name and its data type.

3. Ensure that Time Zone is set to Coordinated Universal Time (UTC).

Advanced drivers in ClearSCADA allow the selection of either local time or UTC
time. This is the time used at the outstation for time stamping events, and in
some cases it is also used for time based control sequences. It is also the time
used when ClearSCADA sets the outstation’s clock. Using UTC time allows for
a common time base across an entire system and simplifies the handling of
daylight savings times.

om
.c
Note: In all places in this course, if specific properties are not mentioned, do not change them
from their default values.

ng
4. On the Connection tab, configure the following settings:
co
Connection Type – Serial
Port – Select an available port on your PC
an

Note – If using a full null modem cable set the Flow Control to RTS/CTS.
th

Your instructor will tell you the Baud Rate required for connecting to your RTU.
o ng
du
u
cu

These settings define the connection between the channel in ClearSCADA and
the DNP3 device that is connected to the system.

Chapter 4 – A First Configuration Issue 1 4-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Note: You need to ensure that the baud rate defined on the channel matches the baud rate
configured in the RTU. SCADAPack RTUs default to 9600 baud.

5. On the Scan Parameters tab, configure the Line Speed to 57600.

The line speed is used internally by ClearSCADA drivers to help calculate


delays in responses to sent messages. On slower lines (such as serial
connections), message timeouts are automatically extended to allow for
increased transmissions times.

om
.c
6. Save the Channel form by selecting the Save icon from the toolbar.

You will note that the configuration error cross in the Database Bar disappears

ng
since there are no configuration errors on this object.
co
4.2.1.2 Modbus
an

To configure the SCADAPack Modbus Direct Channel:


th

1. Open the properties form of Training.Channel by right clicking on the channel


object in the Database Bar and selecting the properties option.
ng

2. On the Channel tab, put the channel In Service.


o
du
u
cu

By ticking or clearing the In Service field and then saving the change, you
dynamically enable or disable this object in the database.

Chapter 4 – A First Configuration Issue 1 4-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Note: To determine the function of a specific property, hover the cursor over the property on
the Form – a ToolTip will be displayed. The ToolTip contains a short description of the
property. When you select the property, the ClearSCADA status bar at the bottom of the
display will show the actual property name and its data type.

3. Ensure that Time Zone is set to Coordinated Universal Time (UTC).

Advanced drivers in ClearSCADA allow the selection of either local time or UTC
time. This is the time used at the outstation for time stamping events, and in
some cases it is also used for time based control sequences. It is also the time
used when ClearSCADA sets the outstation’s clock. Using UTC time allows for
a common time base across an entire system and simplifies the handling of

om
daylight savings times.

.c
Note: In all places in this course, if specific properties are not mentioned, do not change them
from their default values.

ng
co
4. On the Connection tab, configure the following settings:

Connection Type – Serial


an

Port – Select an available port on your PC


Note – If using a full null modem cable set the Flow Control to RTS/CTS.
th

Your instructor will tell you the Baud Rate required for connecting to your RTU.
o ng
du
u
cu

These settings define the connection between the channel in ClearSCADA and
the Modbus device that is connected to the system.

Chapter 4 – A First Configuration Issue 1 4-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Note: You need to ensure that the baud rate defined on the channel matches the baud rate
configured in the RTU. SCADAPack RTUs default to 9600 baud.

5. On the Scan Parameters tab, configure the Line Speed to 57600.

The line speed is used internally by ClearSCADA drivers to help calculate


delays in responses to sent messages. On slower lines (such as serial
connections), message timeouts are automatically extended to allow for
increased transmissions times.

om
.c
6. Save the Channel form by selecting the Save icon from the toolbar.

ng
You will note that the configuration error cross in the Database Bar disappears
since there are no configuration errors on this object.
co
an

4.2.2 Ethernet Channel


th

If you are connecting to the RTU using an Ethernet connection, then follow the steps
in this section. If you are using a serial connection to the RTU, follow the steps
ng

outlined in the previous section (4.2.1).


o

The channel object specifies the type of communications that will be used to connect
du

to the device, along with some timing parameters. A single channel can be used to
communicate with multiple RTU’s, depending on the type of communications used.
u

Section 4.2.2.1 will cover the settings and configurations for the DNP3 protocol and
cu

section 4.2.2.2 will cover Modbus protocol. Please continue with the relevant section.

4.2.2.1 DNP3

To configure the DNP3 Direct Channel:

1. Open the properties form of Training.Channel.

2. On the Channel tab, put the channel In Service.

Chapter 4 – A First Configuration Issue 1 4-9

CuuDuongThanCong.com https://fb.com/tailieudientucntt
By ticking or clearing the In Service field and then saving the change, you
dynamically enable or disable this object in the database.

om
.c
Note: To determine the function of a specific property, hover the cursor over the property on

ng
the Form – a ToolTip will be displayed. The ToolTip contains a short description of the
property. When you select the property, the ClearSCADA status bar at the bottom of the
co
display will show the actual property name and its data type.
an

3. Ensure that Time Zone is set to Coordinated Universal Time (UTC).


th

Advanced drivers in ClearSCADA allow the selection of either local time or UTC
time. This is the time used at the outstation for time stamping events, and in
ng

some cases it is also used for time based control sequences. It is also the time
used when ClearSCADA sets the outstation’s clock. Using UTC time allows for
o

a common time base across an entire system and simplifies the handling of
du

daylight savings times.


u
cu

Note: In all places in this course, if specific properties are not mentioned, do not change them
from their default values.

4. On the Connection tab, configure the following settings:

Connection Type – Network


TCP/IP Type – UDP
Merge Connections - Yes
Listen Port Enabled – Yes
Listen Port Number – 20000 (this is the default UDP port on which
ClearSCADA will listen for incoming messages)

Chapter 4 – A First Configuration Issue 1 4-10

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
These settings define the connection between the channel in ClearSCADA and

.c
the DNP3 device that is connected to the system.

ng
5. On the Scan Parameters tab, configure the Line Speed to 1024000.
co
The line speed is used internally by ClearSCADA drivers to help calculate
delays in responses to sent messages. On slower lines (such as serial
an

connections), message timeouts are automatically extended to allow for


increased transmissions times.
th
o ng
du

6. Save the Channel form by selecting the Save icon from the toolbar.
u
cu

You will note that the configuration error cross in the Database Bar disappears
since there are no configuration errors on this object.

4.2.2.2 Modbus

To configure the Modbus Direct Channel:

7. Open the properties form of Training.Channel.

8. On the Channel tab, put the channel In Service.

Chapter 4 – A First Configuration Issue 1 4-11

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
By ticking or clearing the In Service field and then saving the change, you
dynamically enable or disable this object in the database.

.c
ng
Note: To determine the function of a specific property, hover the cursor over the property on
the Form – a ToolTip will be displayed. The ToolTip contains a short description of the
co
property. When you select the property, the ClearSCADA status bar at the bottom of the
display will show the actual property name and its data type.
an
th

9. Ensure that Time Zone is set to Coordinated Universal Time (UTC).


ng

Advanced drivers in ClearSCADA allow the selection of either local time or UTC
time. This is the time used at the outstation for time stamping events, and in
o

some cases it is also used for time based control sequences. It is also the time
du

used when ClearSCADA sets the outstation’s clock. Using UTC time allows for
a common time base across an entire system and simplifies the handling of
daylight savings times.
u
cu

Note: In all places in this course, if specific properties are not mentioned, do not change them
from their default values.

10. On the Connection tab, configure the following settings:

Connection Type – Network


TCP/IP Type – TCP

Chapter 4 – A First Configuration Issue 1 4-12

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
These settings define the connection between the channel in ClearSCADA and
the Modbus device that is connected to the system.

ng
co
11. On the Scan Parameters tab, configure the Line Speed to 1024000.

The line speed is used internally by ClearSCADA drivers to help calculate


an

delays in responses to sent messages. On slower lines (such as serial


connections), message timeouts are automatically extended to allow for
th

increased transmissions times.


o ng
du
u

12. On the Modbus tab, configure the Protocol Type to TCP.


cu

This defines the Modbus protocol being used with the device

13. Save the Channel form by selecting the Save icon from the toolbar.

You will note that the configuration error cross in the Database Bar disappears
since there are no configuration errors on this object.

Chapter 4 – A First Configuration Issue 1 4-13

CuuDuongThanCong.com https://fb.com/tailieudientucntt
4.2.3 Establishing Communications
To establish communications to the Outstation, both the Set and Outstation objects
also need to be configured.

Section 4.2.3.1 will cover the settings and configurations for the DNP3 protocol and
section 4.2.3.2 will cover Modbus protocol. Please continue with the relevant section.

4.2.3.1 DNP3
To establish communications to the Outstation, both the Set and Outstation objects
also need to be configured.

For the Outstation Set object named Training.Set, configure the following:

om
.c
Tab Property Setting

Outstation Set In Service Yes

ng
Channel co Training.Channel

If using SCADAPack E-Series, 30000


DNP3 DNP3 Local Address
Other SCADAPack RTUs, 100
an
th

Note: Where the field on the form has a browse button next to it (small button with three
dots), ClearSCADA will display a dialog listing all the instances of the required object type for
ng

selection rather than having to type the information in manually each time.
o
du

For the Outstation object named Outstation, configure the following:


u

Tab Section Property Setting


cu

Outstation n/a In Service Yes

n/a Outstation Set Training.Set

RTU DNP3 address as provided


DNP3 n/a Address
by instructor

Integrity (Class
0) Polling Interval 10 Seconds (or 10S)

Chapter 4 – A First Configuration Issue 1 4-14

CuuDuongThanCong.com https://fb.com/tailieudientucntt
If you are using an Ethernet connection to the RTU, you will also need to configure the
following:

Tab Section Property Setting

Network n/a Network Single Network

RTU IP Address as provided by


n/a Host Address
instructor

n/a Port 20000

Now we need to verify that the communications to the device are working correctly.

om
The simplest way to verify this is through the use of the Outstation View dialog. To
display the View dialog:

.c
1. Right click on the Outstation object in the Database Bar.

ng
2. On the Context Sensitive menu, select the View Status option.
co
an
th
o ng
du
u
cu

The View Status dialog for the DNP3 outstation object will display status information
such as Protocol Alarms, Communications State, Message Statistics, etc.

If the communications to the device is successful, the State field should be shown as
“Healthy, Multidrop”. If communications are not Healthy, Multidrop then View the
status for the other objects in the hierarchy of the communications settings (Set and
Channel) to determine if these objects are in a healthy state.

Chapter 4 – A First Configuration Issue 1 4-15

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Check that you have configured the channel and set as described in the previous
sections. If you have configured them correctly and the outstation is still not healthy,
ask your course instructor for assistance.

4.2.3.2 Modbus
To establish communications to the Outstation, both the Set and Outstation objects
also need to be configured.

For the Outstation Set object named Training.Set, configure the following:

Tab Property Setting

om
Outstation Set In Service Yes

.c
Channel Training.Channel

10

ng
(Arbitrary value set for each group of
Modbus Set Address co SCADAPack or Generic Modbus controllers
that communicate via a particular direct
channel)
an
th

Note: Where the field on the form has a browse button next to it (small button with three
dots), ClearSCADA will display a dialog listing all the instances of the required object type for
selection rather than having to type the information in manually each time.
o ng

For the Outstation object named Outstation, configure the following:


du

Tab Section Property Setting


u
cu

Outstation n/a In Service Yes

n/a Outstation Set Training.Set

RTU MB address as provided by


SCADAPack n/a Address
instructor

Chapter 4 – A First Configuration Issue 1 4-16

CuuDuongThanCong.com https://fb.com/tailieudientucntt
If you are using an Ethernet connection to the RTU, you will also need to configure the
following:

Tab Section Property Setting

Network n/a Network Single Network

RTU IP Address as provided by


n/a Host Address
instructor

n/a Port 502

Now we need to verify that the communications to the device are working correctly.

om
The simplest way to verify this is through the use of the Outstation View dialog. To
display the View dialog:

.c
3. Right click on the Outstation object in the Database Bar.

ng
4. On the Context Sensitive menu, select the View Status option.
co
an
th
o ng
du
u
cu

The View Status dialog for the Modbus outstation object will display status information
such as Protocol Alarms, Communications State, Message Statistics, etc.

If the communications to the device is successful, the State field should be shown as
“Healthy, Multidrop”. If communications are not Healthy, Multidrop then View the
status for the other objects in the hierarchy of the communications settings (Set and
Channel) to determine if these objects are in a healthy state.

Chapter 4 – A First Configuration Issue 1 4-17

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Check that you have configured the channel and set as described in the previous
sections. If you have configured them correctly and the outstation is still not healthy,
ask your course instructor for assistance.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 4 – A First Configuration Issue 1 4-18

CuuDuongThanCong.com https://fb.com/tailieudientucntt
4.3 Configure and Test Outstation Points
The next step is to configure the DNP3 points so that ClearSCADA can retrieve data
from the RTU points and store it accordingly. The points will also allow you to send
controls to the corresponding points in the outstation.

The Running point is a binary input point reporting whether the pump is running or
stopped. The Level point is an analog input point reporting the level of the water in
the reservoir. The Start point allows a user to send Start and Stop commands to the
RTU (turning on and off a binary output on the RTU).

For the Binary Input point named Running, configure the following settings:

om
Tab Section Property Setting

Binary Point n/a In Service Yes

.c
n/a Outstation Training.Reservoir.Outstation

ng
n/a Point Number 1

States State 0 Description Stopped


co
State 1 Description Running
an

State 0 Severity Event, Low


th

State 1 Severity Event, Low

Trend Update Rate 1 second (or 1S)


ng

Logged Data Historic Data Filter Static and Event Data


o
du

Historic n/a Enabled Yes

Trend / List Use Raw Data Yes


u
cu

Whenever we create objects in the database, it is good practice to verify that they are
operating as expected

Verify that the point is updating as expected using the points View dialog.

Chapter 4 – A First Configuration Issue 1 4-19

CuuDuongThanCong.com https://fb.com/tailieudientucntt
For the Binary Output point named Start, configure the following settings:

Tab Section Property Setting

Binary Point n/a In Service Yes

n/a Outstation Training.Reservoir.Outstation

n/a Point Number 1

Trend Update Rate 1 second (or 1S)

Historic n/a Enabled Yes

om
Trend / List Use Raw Data Yes

Control Actions Action 1 Enabled Yes

.c
Action 2 Enabled Yes
Action 1
Stop

ng
Description
Action 2
Start
Description
co
Update point on
n/a Yes
successful action
an
th

Verify that the controls work as expected by using the Control option available on the
object menu (right click on the point).
ng

Verify that the point is updating as expected on the outstation and by using the points
o

View dialog.
du
u
cu

Chapter 4 – A First Configuration Issue 1 4-20

CuuDuongThanCong.com https://fb.com/tailieudientucntt
For the Analog Input point named Level, configure the following settings:

Tab Section Property Setting

Analog Point n/a In Service Yes

n/a Outstation Training.Reservoir.Outstation

n/a Point Number 1

Alarm Limits High High Limits 80, Alarm, Critical

High Limits 60, Alarm, High

om
Low Limits 40, Alarm, Medium

Low Low Limits 20, Alarm, Low

.c
32768
Scaling Raw Full Scale Check with your instructor as your
full scale may be different.

ng
Formatting Units
co %

Format 0.00

Trend Update Rate 1 second (or 1S)


an

Logged Data Historic Data Filter Static and Event Data


th

Historic n/a Enabled Yes


ng

Trend / List Use Raw Data Yes


o
du

Verify that the point is updating as expected using the points View dialog.
u
cu

Chapter 4 – A First Configuration Issue 1 4-21

CuuDuongThanCong.com https://fb.com/tailieudientucntt
4.4 Create a Mimic
The first Mimic that we create will contain outstation communications status as well as
the status for each of the points we configured. The image below shows the mimic we
are going to create.

om
.c
ng
Open the mimic Training.Reservoir.Default in design mode by double-clicking on it
in the Database Bar. co
an

The design button on the toolbar will indicate that the mimic is in design mode. You
th

may also see the grid dots on the mimic and a pink colored box in the status bar.
ng

The mimic grid is a tool designed to help alignment of drawn objects and is only
available in design mode.
o
du

Display Communication Status


One of the properties of the Outstation object is named StateDesc. This property is
u

used to indicate the current state of communications to the device. This is the field we
cu

verified in the View dialog to check that our communications to the outstation was
working as expected.

To display the outstation state description on the mimic:

1. Ensure the Mimic Training.Reservoir.Default is on display and in design


mode.

2. Drag the Outstation object from the ClearSCADA Data Bar onto the mimic.

3. From the displayed menu, select the State option.

Chapter 4 – A First Configuration Issue 1 4-22

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
The Healthy, Multidrop text will be displayed on the mimic in a text box.

.c
Note: The drag menu displayed above provides a shortcut method to displaying the most
common object properties. These common properties provide the user with information about
the status of the object.

ng
co
4. Put the mimic into run mode by clicking on the Design button on the tool bar.
an

5. Hover the mouse over the text box and you will notice that the cursor changes
to a hand.
th

The hand indicates that there is a Pick Action available on this object.
ng

6. Click on the object and from the Object Menu, select the Refresh option.
o
du

When the refresh method is selected, ClearSCADA will initiate a poll of the
outstation. As you call the Refresh method, examine the lights on the RTU to
verify that ClearSCADA has communicated with the RTU.
u
cu

7. Disconnect the serial or Ethernet (depending on your connection) from the RTU
port and verify that the communications state changes to Failed. A
communication Failed alarm should also be shown in the alarm banner and
alarm list. This information is also logged in the event list.

Note that the color of the communication status changes. This color indicates
that the object is bad quality – in this case, communications have failed. The
color also indicates things such as alarm conditions, alarms disabled and local
overrides.

8. Replace the cable and verify that communications return to Healthy, Multidrop.

As the state returns to Healthy, Multidrop, the color should now indicate an
unacknowledged, cleared alarm.

Chapter 4 – A First Configuration Issue 1 4-23

CuuDuongThanCong.com https://fb.com/tailieudientucntt
9. Acknowledge the alarm from the object menu.

The color should now indicate the normal state.

To test the operation of the points:

1. Drag the Name of the three points onto the mimic.

2. Next to the name of the Binary points, display the State of the point.

3. Next to the Analog point Level, display the Value – Formatted Value.

om
Note: The Formatted Value is a property of Analog points (FormattedValue) that returns a
string made up of the units appended to the current value (with a space in between).

.c
4. Add headings to the mimic using the text tool in the Mimic Editing toolbar. The

ng
text tool icon is shown below. co
an

The mimic you have created should look similar to the one shown below.
th
o ng
du
u
cu

5. Ensure the mimic is in run mode.

6. Turn On and Off Binary Input 1 on the RTU and verify that the mimic updates
with correct values.

7. Open the Historic Trend from the Running object menu and verify that multiple
changes of the switch within a single poll period are all logged in the
ClearSCADA Historic database.

8. Verify that state changes are logged in the event list as expected.

Chapter 4 – A First Configuration Issue 1 4-24

CuuDuongThanCong.com https://fb.com/tailieudientucntt
9. Using the Start object menu, verify that controls to this point result in output
relay being operated.

10. Verify that the Analog Input point can be changed and ClearSCADA logs the
changes in the Historic database for the Level point.

11. Verify in the Event List that alarms are generated as the analog value passes
the configured alarm limits.

12. Disconnect the communications cable to the RTU.

13. Manipulate the inputs to the RTU.

om
14. Reconnect the RTU and verify that inputs made while the communications were
disconnected are reflected in the ClearSCADA database.

.c
Note: Handling of historic time-stamped data is natively supported in the ClearSCADA
software. Since DNP3 supports the transmission of time-stamped data, this allows the

ng
ClearSCADA historian to log all event type data received from the RTU. This includes
alarming from historic time-stamped data.
co
an
th
o ng
du
u
cu

Chapter 4 – A First Configuration Issue 1 4-25

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5 Animating Mimics
In this chapter, we will draw and animate a reservoir. In this mimic, the level of the
reservoir will move up and down based on the value of the analog input to the RTU,
and the pump will change color to indicate whether it is stopped or running.

The final mimic will look similar to the image below.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 5 – Animating Mimics Issue 1 5-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5.1 Draw the Reservoir
Use the drawing tools to draw a reservoir on the Training.Reservoir.Default mimic.

1. Using the Polygon drawing tool, draw a tank similar to the picture shown below.

om
.c
2. Draw a rectangle over the top of the tank that will be used to show the level in
the tank as shown below. You will need to change the color to differentiate

ng
between the two shapes. co
an
th
o ng
du

3. Select the front rectangle and send it to the back so that the tank outline is on
top.
u
cu

Note: Arrangement tools can be found in both the Context Sensitive menu available when
right-clicking on the object, and in the Arrange Menu.

Chapter 5 – Animating Mimics Issue 1 5-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5.2 Animate the Reservoir
Simply drawing a set of objects on a mimic does not provide much benefit unless the
objects can indicate the status of what is really happening to the physical device. In
this section we will update the reservoir to indicate the water level.

Mimic elements can be animated to control their behavior. An animation is a property


of a mimic element, which may be dynamically altered according to values of
database object properties.

In this section of the course, we will be animating the Reservoir to indicate the water
level by a change in size. Not surprisingly, this is referred to as a size animation.

om
Before you begin to animate the reservoir, we are going to discuss two important
concepts that relate to animations:

.c
Each object in the ClearSCADA database is referenced by its location in the
hierarchy, i.e. the Level point is known as ‘Training.Reservoir.Level’. Each folder level

ng
is separated by a ‘.’ in the same way that folder levels in Microsoft Windows are
separated by a ‘\’. This means that multiple objects in the database can be named the
co
same thing, assuming that they are contained in different folders.

Quotations
an

Any string placed in an animation enclosed in double quotes will be evaluated. For
example, entering the string “.Level.FullScale” will return the value of the Full Scale
th

property of the Level point. All animations related to database properties will be within
double quotes.
ng

Any text placed within single quotes is considered a static string, i.e. it does not
o

change.
du

Relative and Absolute Addresses


u

When using the objects in an animation, either a relative or an absolute address can
cu

be used. An absolute address contains the full path name for the object.

A relative reference uses a notation where the point is named relative to the location
of the calling animation. For example, if we were to call the FullScale property of the
Level point from the mimic Training.Reservoir.Default, the following would be used –
“.Level.FullScale”.

Notice the ‘.’ in the animation. The first dot means to start in the current group. Any
subsequent dot means go up one further level in the group hierarchy. In our case, if
we had a point named ‘Test’ in the root of our system, a relative address from the
mimic Training.Reservoir.Default would be “...Test.FullScale”. The first dot means to
start in the Reservoir group. The second dot means go up one level (to the Training
group) and the third dot means go up one more level again (which is the root of the
system).

Chapter 5 – Animating Mimics Issue 1 5-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Now that you are familiar with the concepts of quotations and relative and absolute
addresses, you can begin to create your size animations.

5.2.1 Size Animations


To implement the size animation, perform the following steps:

1. Select the rectangle that forms the water part of the reservoir.

Note: To select elements, which are hidden behind each other, select the front item and use
Alt – Double Click. This will select the item behind the one, which is currently selected.

om
2. Right click on the selected rectangle and select Animations from the Context
Sensitive menu displayed.

.c
The following window will be displayed.

ng
co
an
th
o ng
du
u

The animations window allows you to associate the properties of a mimic


cu

element with the values of database object properties. For example, you can
associate the Value property of a text box with a point such that the text box
will show the current value of a point in the database (and will update
automatically each time the point value changes).

3. Select the SizeMax animation. This represents the maximum size of the
rectangle (the size at which it was drawn).

4. Select the Edit button to display the expressions window (or double click the
SizeMax animation).

The Expressions dialog below will be displayed.

Chapter 5 – Animating Mimics Issue 1 5-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
5. Select the browse button next to the expression field to display a Context
Sensitive menu. Select the OPC Tag option.

ng
Note: Browse buttons are indicated by buttons with three dots. All browse buttons provide
co
access to a browse dialog that you can use to search the system for the property or value you
require.
an

The OPC Tag browser window is displayed. This window allows you to browse
th

through every object and its associated properties in the ClearSCADA


database for use in an expression.
o ng
du
u
cu

Chapter 5 – Animating Mimics Issue 1 5-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Use the browse window to locate and select the FullScale property of the
‘Level’ point (the FullScale property tag is within the $Config branch of tags as
it is a configuration setting).

The FullScale property is the highest permitted value for the point (as
configured on the point form).

Note: Terminology…
Object – any item within the database.
Property – one of the fields associated with an object.
Tag (OPC Tag) – the combination of the object and property separated by a ‘.’.

om
Close the dialogs to return to the animations window. Note that the expression

.c
entered in the SizeMax field is “.Level.FullScale”.

7. Repeat steps 3-6, only this time associate the SizeMin animation with the

ng
ZeroScale property. co
The SizeMin animation associates the point minimum value with the minimum
size for the rectangle.
an

8. Repeat steps 3-6, only this time associate the SizeVal animation with the
th

CurrentValue property. In step 4, tick the Fast Updates tick box.


ng

Note: You will not find this in the $Config branch.


o
du

The SizeVal animation sets the rectangle size to relate to the current value of
the point (between the min and max value).
u
cu

The Fast Updates tick box tells the server to update the client at a faster update
rate for the Tags referenced in this animation. This will be covered in more
detail in a later section.

9. Close the animations window and open the properties dialog for the rectangle.

10. On the displayed dialog, set the Dynamic Sizing Direction to Bottom to Top.

Chapter 5 – Animating Mimics Issue 1 5-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
This sets the rectangle to resize from the bottom upwards, so that the higher
the value, the taller the rectangle will be.

11. Place the mimic in Run Mode and verify that the water level in the reservoir
changes as the Level Analog input is adjusted.

5.3 Draw the Pump


When you install ClearSCADA, a range of symbols are available in the symbol library.
Over the next few exercises we will show examples of how these pre-built symbols
can be used to generate objects in ClearSCADA.

This exercise will look at using one of the predefined pump symbols to animate our

om
mimic. To add a pump to the mimic, perform the following steps:

1. Display the Mimic ‘Symbol Library.Symbol Library Index’ in Run mode.

.c
2. On the ‘Symbol Library Index’ Mimic, click on the Pumps group. This acts as a

ng
hyperlink to another Mimic that contains all of the pump symbols.
co
3. Click on the pump symbol named ‘Pump A1’.

The group structure in the Database Bar is expanded and the Pump A1 Mimic
an

is highlighted.
th

4. Open the ‘Pump A1’ Mimic in Design mode.


ng

5. Right-click on the pump symbol in the ‘Pump A1’ Mimic and select the Copy
option from the context-sensitive menu.
o
du

6. Return to the ‘Reservoir’ Mimic, right-click in the design area and then select
the Paste option from the context-sensitive menu.
u
cu

A copy of the ‘Pump A1’ symbol is added to the ‘Reservoir’ Mimic.

7. Position the pump symbol as required.

8. Close the ‘Pump A1’ Mimic.

Chapter 5 – Animating Mimics Issue 1 5-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5.4 Animate the Pump
The next stage in drawing our mimic is to animate the pump to reflect whether it is
running or stopped.

In this section, we will be animating the pump to indicate the state by a change in
color. To do this, we will use the Flow Chart Editor.

5.4.1 Flow Chart Editor for Animations


The flow chart editor provides a graphical way of building complex animations. In its
simplest form, the flow chart editor provides two alternate returned values depending
on the value of a single input value. For example, the pump will be red when running

om
and green when stopped. In other systems, the pump may be red when stopped and
green when running.

.c
For more complex arrangements, one result may be returned based on the
combination of a number of inputs which are related by a complex expression. For

ng
example, if the pump is running and the pump is in fault, then make the pump flashing
red. co
All these things can be achieved using animations. The simplest way to configure the
animations is to use the flow chart editor.
an

To configure the pump color to indicate pump run status, follow the steps below:
th

1. Right click on the pump symbol on the mimic and select Animations.
ng

2. For the PolyFill -> FillColor animation, select the Flowchart button
o
du

The three sets of groupings in the animation list (Button…, Poly… and Text…)
are used in place of the simple Fill, Font, Pen and Line groups. This is to
u

provide individual control of the properties of these items when the group may
cu

contain multiple types of objects.

In this case, the pump is made up of multiple objects, and so the PolyFill group
is used.

The following screen will be displayed.

Chapter 5 – Animating Mimics Issue 1 5-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
3. Right Click on the ‘0’ box and from the context menu select Insert.

ng
4. Double click on the decision block (the one containing the text TRUE) and in
co
the window displayed, browse to find the Running point.

This is the decision point that evaluates which result should be returned. If the
an

expression in this block is evaluated as TRUE, then the result returned will be
th

the box along the True path. Similarly, when the expression is evaluated as
FALSE, the result returned will be the box along the False path.
ng

Note that in this case we have used the point itself rather than an individual
property of the point. This is because when no property is specified for a point
o

value, it returns the default property which is the value of the point.
du

5. Double click the box to the right of the decision box.


u
cu

The Expression window is displayed.

6. Select the Browse button to the right hand side of the window and choose
Color. From the displayed color chart, choose Red.

Chapter 5 – Animating Mimics Issue 1 5-9

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
Note that the expression RGB( 255, 0, 0 ) is automatically entered into the expression
window for you. If you know the specific color reference it can be added manually if

ng
required. co
Note: More colors are available by clicking on the three dots on the bottom right hand corner
of the color chart. The dialog then displayed allows the full range of RGB colors to be
an

selected (over 16 million colors).


th

7. Click OK to close the Expression window.


ng

Note that the Flowchart changes to indicate the color returned on the True
o

branch is Red as show in the image below.


du
u
cu

8. Repeat Steps 5-7 to select the False state to display Green.

Chapter 5 – Animating Mimics Issue 1 5-10

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
9. Click OK to close the flowchart editor.

ng
You can see that the animation has been filled in for us based on the flowchart.
co
The decision tree we just developed relates to the expression:

iif(“.Pump 1.Running”, RGB(255,0,0), RGB(0,255,0))


an
th

The iif statement returns a value based on the evaluation of its expression field.

The structure of this statement is as follows:


ng

iif(expression, TRUE value, FALSE value)


o

In this example, if the current state of the Running point is TRUE, then the color
du

will be red (RGB(255,0,0)). If the current state is FALSE, then the color will be
green (RGB(0,255,0))
u
cu

If you know the format of the statement and the results that you require, there is
no reason that you cannot enter the statement directly.

10. Put the mimic in Run mode and verify that the pump changes color when you
toggle the Running point.

11. Note that the pump has tinges of red at the extremities of the object. Repeat
steps 1-10 so that the pump gradient fills are also animated based on the digital
input.

Note that the animation of interest is GradColour.

12. Verify that the entire pump symbol now animates as expected.

Chapter 5 – Animating Mimics Issue 1 5-11

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5.5 Completing the Mimic
Using the skills learned so far complete the mimic so that it looks similar to the one
shown below.

om
.c
ng
co
an
th
o ng
du

Note: Holding down the Alt key while dragging objects will disable the snap to grid
functionality.
u
cu

Chapter 5 – Animating Mimics Issue 1 5-12

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5.6 Exercises
1. Display on the mimic, the time that each point was last updated. This is
available as a standard option when dragging and dropping the points onto the
mimic.

2. Create a tooltip on the pump that shows the current state of the pump i.e.
Stopped or Running.

5.7 Exercises (Advanced)


1. Modify the tooltip on the pump such that the text shows the following:

om
Pump State is Running OR Pump State is Stopped.

2. Analyse the animations used in the text fields on the mimic. Which animations

.c
are used by default when dragging an item onto a mimic? What does each of
these animations do?

ng
3. Change the color of the water in the reservoir such that it turns brown when
below 15%.
co
an
th
o ng
du
u
cu

Chapter 5 – Animating Mimics Issue 1 5-13

CuuDuongThanCong.com https://fb.com/tailieudientucntt
6 Embedded Mimics & Animated Symbols
ClearSCADA allows you to use Mimics that you have already drawn as part of other
Mimcs. The process of adding an existing Mimic to a Mimic that is being drawn is
called ‘embedding a Mimic’.
Embedded Mimic

om
.c
ng
co
an
th
ng

Mimics can contain embedded


o

Mimics, Trends, graphics, lists etc.


du
u

When you embed a Mimic, the embedded version of the Mimic has the same
cu

appearance as the original version of the Mimic and provides most of the functionality
of the original Mimic too. So, if you create a Mimic that shows outstations and has
various animations in place and then embed this on another Mimic, the embedded
version will also show outstations and have the same animations in place.

An embedded version of a Mimic inherits its appearance and much of its functionality
from its parent (the original version of the Mimic). So when you make changes to the
parent Mimic, the changes are automatically applied to all embedded versions of the
Mimic.

An animated symbol is a Mimic that is created specifically for the sole purpose of
being embedded on other Mimics throughout the system. Typically, animated symbols
represent common types of hardware, plant and other equipment. The original symbol
Mimics are not associated with any particular database objects; the embedded
versions of the symbols will be associated with various objects when they are

Chapter 6 – Embedded Mimics & Animated Symbols 6-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
configured. For example, a single, generic pump symbol could be created that can be
used for every pump in the system. This provides the benefits of only having to create
one pump item, and then being able to embed it multiple times on Mimics throughout
the system.

In this section, you will learn how to embed an animated symbol to use in place of the
pump symbol that your Mimic currently uses.

6.1.1 Animated Pump


In this exercise you will replace the pump created on your Mimic with an animated
symbol. You will also learn how to use parameters so that you can quickly create
animations for each embedded version of the symbol.

om
Parameters are user-defined properties for symbols, similar to the animation
properties of Mimic items. The main difference between parameters and animation

.c
properties is that the parameters are set up on the original symbol Mimic but are not
associated with any particular objects in the database. When the symbol Mimic is

ng
embedded on another Mimic, the embedded version of the symbol can have its
parameters associated with specific database objects (so the parameters act like
co
animation properties for the embedded symbol, except that they can be associated
with database objects much more quickly). This provides an easy way of configuring
a symbol so that it has all the animation configuration in place on the original version
an

and only requires minimal configuration to associate each embedded version of the
symbol with different database objects.
th

1. Copy the pump components from the Training.Reservoir.Default Mimic into


ng

your PC’s clipboard (Highlight all objects using mouse and select Ctrl-C).
o

2. Create a new group named Training.Symbols.


du

3. Create a new mimic in the Symbols Group and name it Animated Pump.
u

4. Open the mimic, and paste in the pump components from the
cu

Training.Reservoir.Default mimic.

You will notice that the pump is purple in color. The purple indicates bad
quality in ClearSCADA. Since the animations that were on our pump are now
no longer valid, the pump color is modified to indicate the configuration error.

If you open the Animations window on the pump, you will see that there is a red
cross next to the color animations to indicate that they are invalid.

5. Select Edit -> Parameters.

The following dialog should be displayed – initially blank.

Chapter 6 – Embedded Mimics & Animated Symbols 6-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
ng
6. Select Add.
co
an
th
o ng
du

7. Enter Point as the Name, and ensure that the Group box is ticked and click
OK.
u
cu

The Group box allows us to create a group of properties that ClearSCADA can
auto configure, rather than the user needing to manually configure each
parameter manually. In this case, the parameter names MUST match the
name of an object property.

8. Select Add again, enter CurrentState as the Name and the Parent should be
set to Point. Select OK to close the dialog.

CurrentState is the name of the property for a digital point that returns the value
of the point (1 or 0).

9. Select Add again, enter CurrentStateDesc as the Name and the Parent should
be set to Point. Select OK to close the dialog.

Chapter 6 – Embedded Mimics & Animated Symbols 6-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
CurrentStateDesc returns the state of the point as a string. It returns either
State 0 or State 1 description depending on the current state of the point. We
will use this property in a later exercise.

10. Close the Parameters dialog.

11. Open the pump object Animations. For the PolyFill -> FillColour animation,
select the Flow Chart Box.

The following window will be displayed.

om
.c
ng
co
an
th
ng

12. Open the decision box and change “.Pump 1.Running” to


"Parameter:Point.CurrentState".
o
du

The simplest way to do this is to open the decision box, browse to the Point
menu alongside the OPC Tag menu and select the CurrentState option.
u
cu

By changing the decision box, you are setting the pump symbol so that it can
be animated by a parameter rather than a specific animation property. The
parameter can then be associated with any database object in the system.

Chapter 6 – Embedded Mimics & Animated Symbols 6-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Note: The name of this “Point” menu is dependent on the name of the ‘Group’ created in the
parameters. The options available under this group match the names of the parameters that
you created.

13. Repeat step 11 for the GradColour animation.

Note that the pump now turns green. The animation is now valid and the
parameter value evaluates to 0 since it has not yet been connected. The 0
value returns green animations.

14. Save and Close the animated pump symbol.

om
15. Open the Training.Reservoir.Default mimic.

.c
16. Delete the pump we created in the first exercise.

ng
17. Click on the Animated Pump mimic in the Symbols group in the Database
Explorer and drag it onto the mimic in place of the original pump.
co
18. From the menu displayed, select the Embedded Mimic option.
an

19. Select the embedded pump symbol so it is highlighted.


th

20. Select the Training.Reservoir.Pump 1.Running point from the Database Bar
ng

and drag the point onto the selected pump.


o

21. From the menu that is displayed, select the option Point -> Configure All.
du

This associates the Pump 1 Running point with the parameter configured on
the symbol. In this case, the CurrentState point property is automatically
u

matched with the parameter we created of the same name.


cu

Chapter 6 – Embedded Mimics & Animated Symbols 6-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Any other parameters with the same name as object properties (of the Pump
Running point) would be auto configured at this point.

22. Test that the pump colors animate as expected.

6.1.2 Exercises
1. Add a second pump to the mimic. For this second pump, tie it to Binary Input 2
on the RTU.

Note: copy the Pump 1 group and rename it Pump 2. Change the DNP point

om
addresses to match the next available RTU inputs.

Verify that both pumps operate independently and work as expected.

.c
2. Create a new animated pump symbol that has the colored pump symbol as well

ng
as some text below the pump showing the current state of the pump. The text
can be animated from the parameter CurrentStateDesc. Embed this symbol
co
on the Reservoir mimic for the first two binary inputs as shown in the image
below.
an
th
o ng
du
u
cu

Chapter 6 – Embedded Mimics & Animated Symbols 6-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
6.1.3 Analog Display
In this exercise, we will create a standard analog display box to ensure consistency
each time we display an analog number on the mimic.

To create the Analog display:

1. Create a new mimic called Animated Analog Display in the Symbols Group.

2. Create the following parameters with Point as the Parent:

Note: Default values allow you to see how the animation will look during configuration and
before you associate the parameter with a database property.

om
.c
Parent Parameter Default Value

Point Background 16777215

ng
Point Foreground co
Point Blink

Point CurrentValue
an

Point CurrentValueFormatted ###.## EU


th

Point CurrentStateDesc
ng

Point ObjectLink
o

Point ZeroScale
du

Point FullScale
u
cu

3. Create a text box on the mimic and set the fill type to Solid.

Chapter 6 – Embedded Mimics & Animated Symbols 6-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
4. Assign the animations as described in the table below.

Animation Value

Fill.FillColour “Parameter:Point.Background”

Pen.FillColour “Parameter:Point.Foreground”

Pen.Blink “Parameter:Point.Blink”

Value “Parameter:Point.CurrentValueFormatted”

PickParam "Parameter:Point.ObjectLink"

om
PickType 1

.c
PickParam and PickType can be used to dynamically change the pick action
that will be run on when the mimic item is clicked on. This can also be done

ng
using scripting (to be discussed later)
co
Note: More detail on PickParam and PickType can be found in the Animations Reference in
the ClearSCADA online help.
an
th

5. Add a rectangle to go around the text box as an outline i.e. no fill.


ng

6. Save and close the mimic Animated Analog Display.


o

7. Embed the mimic Analog Display onto the Training.Reservoir.Default mimic


du

and use this to replace the Level value currently displayed on the mimic under
the reservoir.
u

8. Adjust the Level point input such that you can verify the value is updating and
cu

the colors are changing as expected due to alarm conditions.

9. Verify the correct operation of the object menu.

Chapter 6 – Embedded Mimics & Animated Symbols 6-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Exercises (Advanced)
1. Modify the Analog Display animated symbol to include a tooltip that shows
something like – Range is 0 -> 100, where 0 and 100 are derived from the point
properties ZeroScale and FullScale.

Hint: This will require another animation to be configured on the animated


symbol.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 6 – Embedded Mimics & Animated Symbols 6-9

CuuDuongThanCong.com https://fb.com/tailieudientucntt
7 User Commands
7.1 Pick Actions
You can associate mimic items with pick actions. A pick action is an action that is
executed when a user clicks on the mimic item on which the action has been
configured. For example, a button could be configured that runs a pick action to start
a pump, or open a circuit breaker. The mimic item on which the action is configured is
known as the pick point.

The function categories available when configuring a pick action are as follows:

 Object Menus – these are the menus that provide built-in features on

om
database objects.
 Hyperlink – this allows a mimic item to provide a link to another mimic in the
system.

.c
 Method – allows execution of methods on database objects.
 Script – allows custom script to be written to do custom actions.

ng
 Registry – allows writing values to the registry for temporary storage.
 ViewX Command – provides the ability to run commands that control the
co
ViewX and/or WebX client environment
 System Command – allows the execution of a command by the operating
an

system
 Menu – provides the ability to create a custom menu consisting of any of the
th

options listed above.


ng

In this section we will use methods, object menus, ViewX commands and the custom
menu functionality.
o
du

7.1.1 Configure Pump Controls


In this section of the course, we will configure buttons that allow us to start and stop
u

the pump.
cu

To configure the pump control buttons:

1. Make a copy of the Training.Reservoir.Default mimic in the Database Bar and


rename the copy to Training.Reservoir.PickActions.

This will allow us to keep a copy of the original mimic created in the first
exercise.

2. Open the mimic PickActions in design mode.

3. Draw a button on the mimic and label it Start

4. Copy the Start button and rename the caption to Stop.

Chapter 7 – User Commands 7-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
The image below is an example of what we will be configuring.

5. Right click on the Start button and select the Pick Action Wizard

om
The screen below will be displayed.

.c
ng
co
an
th
o ng
du
u
cu

Chapter 7 – User Commands 7-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Since we wish to run a method to control a point, select the Method option and
click Next.

The screen below will be displayed.

om
.c
ng
7. Browse for the Pump 1.Start point, set the Aggregate to Control and the
co
Method name to Control and click Next.
an

The following screen will be displayed.


th
o ng
du
u
cu

8. Double click on the row with the name Action. This displays the Expression
dialog, which allows you to pre-configure the value for the point control.

Enter the value 1 to start the pump (or turn on the output).

Chapter 7 – User Commands 7-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Note: If parameters are not preconfigured, the user will be prompted for the values to use
each time the action is called. If multiple parameters are required, and some of these are
preconfigured, the user will be prompted to provide values for those parameters that are not
preconfigured.

9. Select Next to continue.

10. Select Next again.

This field (Pick Action Comment) can be used to display a message in the
status bar when the mouse hovers over the pick point. If this field is left blank
(which it usually is), ViewX will auto generate a hint for the user.

om
11. Select Finish to end the wizard.

.c
12. Set the mimic into run mode and verify that pressing the start button causes the
correct binary output on the RTU to turn on.

ng
13. Repeat for the Stop button to turn off the binary output.
co
14. If you had time to configure the second pump above, create buttons for the
an

second pump as well.


th

7.1.2 Configure a Custom Menu


ng

In this exercise we will configure a custom menu to provide a range of controls and
options relating to our mimic.
o
du

Using the pick action wizard menu option, configure the following menu on a new
button named Site Menu:
u

1. A Pump Controls sub menu containing Start and Stop commands for the
cu

Pump Start point

2. An RTU Controls sub menu containing a command that will poll the RTU on
demand.

Note: The name of the Method on the Outstation that is used to poll an RTU is "Refresh".

3. A ViewX menu containing options to exit ViewX and start the help system.

Chapter 7 – User Commands 7-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
4. An Object Menu's sub menu, containing links to object menu's for the points.

In this step you should add three separate actions to the Object Menu’s
submenu so that the points Pump1.Running, Pump 1.Start and Level each
have their own object menu in the submenu.

5. Insert separators between each sub menu title.

Note: When moving through the wizard for menu items, you will have the opportunity to
configure an expression to control the availability of the option. This can be used to remove
the option from the menu under certain conditions. To have the option always available,
simply leave it blank and click Next. See the screenshot below for an example.

om
.c
ng
co
an
th
o ng
du

The completed menu is shown in the image below.


u
cu

Chapter 7 – User Commands 7-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
7.1.3 Exercises
1. Create a single ‘Operate’ button that controls starting and stopping the pump.

Hint: You will need to call the control action for the output point and set the
argument value using an iif expression that changes based on the current value
of the output.

2. On the Operate button, change the button caption such that the text says ‘Start’
when the output is off and ‘Stop’ when the output is on.

3. Configure the Site Menu button such that the only options displayed on the
object menu for the Pump 1.Running point are “View”, “Display Alarms” and

om
“Display Current/Historic Trend”.

.c
ng
co
an
th
o ng
du
u
cu

Chapter 7 – User Commands 7-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
7.2 Hyperlinks
You can edit a mimic so that it contains hyperlinks to other displays. This is useful for
providing access to related displays from a single mimic. Hyperlinks in ClearSCADA
are the same as hyperlinks in the internet environment – they provide a means of
linking from one mimic to another.

When a user selects the hyperlink, another display is shown. The display that is
shown is referred to as the ‘target’ and the mimic that contains the original hyperlink
(the hyperlink to the target) is referred to as the ‘source’.

For this exercise, we will create an ‘Overview’ mimic that contains hyperlinks to other
mimics, forms and alarm and event lists, both filtered and unfiltered.

om
There are many different ways of configuring hyperlinks. In these exercises, we will
look at three mechanisms for creating hyperlinks in the system.

.c
ng
Note: The target displays are only shown if the user that selects the hyperlink has a User
account with permissions to view the target display. For example, if an operator level user
selects a hyperlink to the configuration Form of a point, the Form will either not be displayed
co
or will be displayed with read only permissions only (operator level users should not be able to
configure database items).
an
th

The mimic below shows an example of how the mimic might look after completing the
following exercises.
o ng
du
u
cu

Chapter 7 – User Commands 7-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
7.2.1 Drag and Drop Hyperlinks
The simplest method to configure a hyperlink in ClearSCADA is to drag the target
mimic onto the mimic where you wish to create the link. In this case, ClearSCADA will
automatically create the pick action to perform the hyperlink action, as well as the
value animation of the text box that specifies the text to display in the text box.

To configure an Overview mimic and some simple hyperlinks:

1. Create a new mimic in the Training group named Overview and open the
mimic in Design mode.

2. Select the Training.Reservoir.Default mimic in the ClearSCADA Database


Explorer Bar.

om
This will be the target mimic for the hyperlink.

.c
3. Drag the mimic onto Overview and select Hyperlink from the displayed menu.

ng
A hyperlink text box will be displayed on the Overview mimic.
co
4. Repeat this process for some of the mimics configured in the training.

5. Place the mimic in run mode and verify that each hyperlink is functioning as
an

expected.
th

Note: The back arrow on the toolbar can be used to return to the page previous to the one
ng

currently being displayed.


o
du

6. Repeat the process for points and other objects in the database.

7. Place the mimic in run mode and verify that other objects will create links to
u

their configuration forms.


cu

Chapter 7 – User Commands 7-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
7.2.2 Copy Shortcut Hyperlinks
The second method of configuring hyperlinks is to Copy a Shortcut. Whenever any
object is on display in the ViewX window, you can select the Copy Shortcut option
from the Edit menu. Right click on the destination mimic and select paste. A hyperlink
will be added to the mimic.

To add hyperlinks for event and alarm lists to the Overview mimic:

1. Select the All Alarms icon from the toolbar.

A window containing all system alarms should be displayed. If there are no


alarms, increase the value of the analog input to generate a Level alarm.

om
2. From the Edit menu, select Copy Shortcut.

.c
3. On the Overview mimic, right click and select paste.

ng
A hyperlink to the alarm list will be displayed.
co
4. Place the mimic into run mode and verify that the hyperlink works as expected.

5. Repeat the process for an event list, which has been filtered to show events
an

for objects with the word Pump in the name and in the default time range.
th

Hint: Try using ‘Is Like’ and the filter %Pump% in the filter dialog for the Source
field in the list (Press F7).
ng

6. Create a hyperlink to a list showing all points in the system.


o
du

7. Verify that all hyperlinks work as expected.


u
cu

Chapter 7 – User Commands 7-9

CuuDuongThanCong.com https://fb.com/tailieudientucntt
7.2.3 Pick Action Wizard Hyperlinks
The final and perhaps most obvious method of configuring hyperlinks is to use the
pick action wizard to manually link to the required object.

To add hyperlinks using the pick action wizard:

1. Add a button (or text box, or any other kind of mimic item)

2. Right click on the item and select Pick Action Wizard.

3. Select Hyperlink from the list of options and then Next.

om
The following window is displayed.

.c
ng
co
an
th
o ng
du
u

4. Using the browse button, select any object in the database.


cu

5. Finish the pick action wizard, place the mimic in run mode and verify the correct
behavior of the link.

Chapter 7 – User Commands 7-10

CuuDuongThanCong.com https://fb.com/tailieudientucntt
7.2.4 Exercises
1. Rename some of the drag and drop hyperlinks. What happens when you save
the mimic? Why?
2. Configure the hyperlink linking to the alarm list to "Open as Inset". What does
this do?
3. Create a hyperlink to a text document on the local machine.

7.2.5 Exercises (Advanced)


1. Create a hyperlink to a list that shows the FullName and
CurrentValueFormatted of all points in the system.
2. Create a hyperlink to a web page on the local machine. Try http://localhost.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 7 – User Commands 7-11

CuuDuongThanCong.com https://fb.com/tailieudientucntt
8 Trends
ClearSCADA has a number of advanced features, one of which is an integrated data
historian. The historian functionality is tied in to the point configuration such that
enabling historic logging on a point is simply a matter of ticking a box on the point
configuration form (as seen in our first configuration exercise).

om
.c
One fundamental feature of the ClearSCADA historian is that data is not ‘sampled’.
When you configure a trend in many systems, you define the rate at which data is

ng
entered into the trend system. For example, you could tell the system to log one
record every 30 seconds. This means you may have many entries logged for points
co
where the value does not change. Further to this, you will miss any changes that
occurred in between the sample periods. ClearSCADA, on the other hand, only logs
an

data when it needs to. So if a point value changes ten times in a second, then all ten
changes are logged. If the value does not change for a year, then no values are
th

logged for that point. This makes the storage of data in ClearSCADA much more
efficient and thus less space is typically required to store the data.
ng

The ClearSCADA historian also contains support for data compression through
o

reduced logging of information such that data is only logged as required. This has the
du

benefit that if a point is not changing by significant amounts, extra values are not
logged in the database that are not required to completely describe the history of the
point.
u
cu

We have seen in previous sections of the course that ClearSCADA provides a


mechanism to configure and view trend information directly from the point object
menu. A Trend object allows the pre-configuration of trace information, time scales,
axis information and a range of other look and feel options.

In this section of the course, we will provide an introduction to the process of creating
trends, as well as information on how to configure and maintain trend objects.

Chapter 8– Trends 8-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
8.1 Trace Types
The trace is the actual line of data that is displayed on the trend. Trend objects may
display multiple traces.

ClearSCADA provides three trace types:

 Current trace – displays data from the time that the trend was opened, up to
the current time while ever the trend is still open.
 Raw Historic Trace – displays actual raw data records stored in the
ClearSCADA historian.
 Processed Historic Trace – displays processed data. Calculations are
performed on the raw data in the historian and the trace shows the result of
the calculations.

om
8.2 Trend Types

.c
There are two types of trend that can be displayed in ClearSCADA:

ng
 Trend objects—these are system-specific trend objects that have been configured
by high-level users as part of your ClearSCADA database configuration. They are
co
objects in the database that are used in a similar way to mimics.
an

Trend objects can display multiple traces and may show current and historic data
simultaneously.
th

 Default Trends—These Trends are populated as required when the trend options
ng

are selected from the point Object Menu. The configuration of the trends is not
stored as an object in the database. The way that the trend is displayed is setup in
o

the point configuration.


du
u
cu

Chapter 8– Trends 8-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
8.3 Current and Historic Traces
In this first exercise, we will be looking at the behavior of both current and raw historic
traces.

To create a trend object and display a current trace:

1. Create a new group in the Training group and name it Trends

2. In the Trend group, create a new Trend named Pumps

3. Open the trend in design mode.

om
4. Drag the point Training.Reservoir.Pump 1.Running onto the trend.

The following dialog will be displayed.

.c
ng
co
an

5. Select the Current Trace option.


th

Note that a new trace will be added to the trend, and a new entry will be visible
in the key at the bottom of the trend.
o ng
du
u
cu

Chapter 8– Trends 8-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Open the properties of the Running trace by right-clicking on the trace in the
trend key (at the bottom of the trend) and selecting Edit…

The following dialog will be displayed.

om
.c
ng
co
an
th
ng

This dialog is used to configure the appearance and behavior of the selected
trace.
o
du

Source – defines which point in the database is being used as the data for the
trend.
u
cu

Label – the label field is the name of the trace used in the trend key. This is set
by default to the FullName of the point. Note that this field is an expression – it
uses single quotes for strings and double quotes for property evaluations.

Advanced Source Configurations – allows configuration of multiple source


traces and other advanced trace manipulation.

Trace – these settings describe the appearance of the trace.

Line – line color and line style.

Markers – the size, style and maximum number of markers to be shown.

Chapter 8– Trends 8-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
7. Set the Trace Style to Step Last.

Note that the way the line is drawn changes on the trace (as new values are
received).

8. Close the trace editor dialog and verify that the trace is recording 1 second
values, or on state change as specified by the Interval/Change Update
property.

To display a raw historic trace:

1. Drag the Pump 1.Running point onto the Trend and select the Raw Historic

om
option.

What do you notice about the time scale of the data that is displayed?

.c
2. Toggle the switch that controls Pump 1.Running (binary input 1) and verify that

ng
all changes to the physical switch are reflected in the trend.
co
How does the raw historic trace compare to the current trace? Why are they
different?
an
th
o ng
du
u
cu

Chapter 8– Trends 8-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
8.4 Raw Historic Analog Trace
To examine the behavior of the raw historic trace:

1. Configure a new Trend object in the Trends group named Level Trend.

2. Create a raw historic trace for the Level point on the trend window just created.

3. Turn on the Count field in the trend key by right clicking on the key and
selecting the Columns option.

The following dialog will be displayed.

om
.c
ng
co
an
th
o ng
du

The Columns in the key can be modified to display summary information about
the data on display.
u
cu

4. Tick the Count box and select OK. This adds a column to the key that displays
the number of records being displayed for each trace.

Chapter 8– Trends 8-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5. Control the Level input on the RTU to create a number of historic records over
a two to three minute period.

These records will be used as the basis for performing some historic
calculations.

You should end up with something similar to the following image.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 8– Trends 8-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
8.5 Exercises
1. Determine what the "Extend Trace to Now" feature does. Where would this be
useful?

2. On the trace dialog investigate the use of the markers limit field.

3. Investigate the use of the Trace point limits field.


Hint: Look at the notation in the key when the point limit is exceeded.
Your instructor will explain this functionality.

4. Looking at the types of data displayed below, describe how and where you
might use the trace styles Line and Step Last.

om
.c
ng
co
Line Mode Step Last
an
th

5. What is the effect of the continuous setting on the x-axis?

6. What is the difference between the trace settings for a current trace with the
ng

trace update selection of Interval or Interval/Change?


o
du
u
cu

Chapter 8– Trends 8-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
8.6 Manipulating the Trend Appearance
Once you have selected the data you wish to display on the trend, and have
configured the traces, there are a number of options that allow you to determine the
appearance of the trace.

A user is able to configure general trend settings such as background color, trend
titles and fonts as well as x and y-axis settings such as time spans, colors, labels and
number of markers.

In the following exercise we will have a brief look at some of the features controlling
the trend appearance. Detailed information on the available features can be found in
the online help ‘Guide to Trends’ section.

om
To configure the trend general appearance properties:

.c
1. Configure a new trend named Appearance Settings and display a raw historic
trace for the Training.Reservoir.Level point.

ng
2. With the trend in Design mode, right click on the trend and select the Edit
co
Properties option.

The following dialog will be displayed.


an
th
o ng
du
u
cu

Chapter 8– Trends 8-9

CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Use the settings available to set the title to display the name of the trend. Make
sure that your configuration allows for the title to change if someone changes
the name of the trend object itself in the Database Bar.

Hint: Use a property of the trend itself.

Note: Database objects should always be closed in the view area when they are renamed. If
a mimic is open and objects contained on the mimic are renamed, the server will re-reference
those objects in the background. Saving the open mimic onto the server again will break
these changed links.

om
8.6.1 Exercises

.c
1. Configure the trend so that it has a black background, white text and a yellow
trace.

ng
2. Configure the trace so that it uses a y-axis on the right hand side of the trend
and the label on the right y-axis shows Level (%) in vertical text.
co
3. Change the units on the Level point to be metres. Does the label on the right y-
an

axis change as well? If not, configure it so that the label will change if either
the point name or units changes.
th
o ng
du
u
cu

Chapter 8– Trends 8-10

CuuDuongThanCong.com https://fb.com/tailieudientucntt
8.7 Processed Historic Traces
The ClearSCADA historian provides the capability to perform calculations on raw
historic data sets. A processed historic trace allows the user to display the results of
these calculations on a trend.

To configure a processed historic trend:

1. Drag the Training.Reservoir.Level point onto the Level trend as a processed


historic trend.

2. Ensure the trace is a different color to the raw historic trace,

om
3. Zoom in on the area of the trend with lots of entries you just added.

What do you notice about the two traces?

.c
The processed historic trace defaults to an interpolated algorithm which will

ng
essentially just join the dots to provide a trace almost the same as the raw
historic trace. co
an
th
o ng
du
u
cu

Chapter 8– Trends 8-11

CuuDuongThanCong.com https://fb.com/tailieudientucntt
4. For the processed trace, open the trace properties and set Trace Interval to
5S, and the Trace Style to Step Last.

This means that our processed calculations will be every 5 seconds.

om
.c
ng
co
an
th
ng

5. Click the Advanced Source Configuration button to display the following dialog.
o
du
u
cu

Chapter 8– Trends 8-12

CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Select the Level point and click Edit.

The following dialog will be displayed.

om
7. Select the Max algorithm.

The Algorithm field determines the calculation that will be performed on the raw

.c
historic data. In our case we want to see the maximum value of the trace
calculated every 5 seconds.

ng
8. Close the editor and view the displayed traces.
co
The segment of the trend shown below shows the processed historic trace
(stepped) indicating the maximum value of the raw samples within that 5
an

second sample period.


th
o ng
du
u
cu

Chapter 8– Trends 8-13

CuuDuongThanCong.com https://fb.com/tailieudientucntt
8.7.1 Exercises
1. Vary the Level input over a known range. For example, allow the input to move
between approximately 20 and 80. Use ClearSCADA to determine the exact
maximum and minimum values over the time period.

2. For the previous exercise, change the processed historic trace for Maximum to
use a Bar graph style rather than a line.

3. What is the effect of the multiplier and x and y offset fields?

om
8.7.2 Exercises (Advanced)
1. Turn on Gap Detect with a value of 2 minutes. What is the effect? Where

.c
would this be useful?

ng
co
an
th
o ng
du
u
cu

Chapter 8– Trends 8-14

CuuDuongThanCong.com https://fb.com/tailieudientucntt
9 Templates and Instances
Templates (or Group Templates as they are sometimes called) and Instances are one
of the most important database configuration and organisation features of
ClearSCADA. You can use them to significantly reduce the amount of configuration
required to setup your system and also reduce the amount of maintenance required
when making alterations to the configuration settings.

The Group Template is, as the name implies, a template for configuration of objects in
the database. There are two methods that you can use to create a Group Template

 You can create an entirely new Group Template item and populate the
items within the template.

om
 You can convert an existing group of configuration into a Group Template.

.c
In the following pages, we will use the Reservoir configuration to create configuration
based on templates and instances.

ng
co
9.1 Creating Templates
We will start by creating a new reservoir group and then adding our items to this
an

group. In this exercise we will build and test our configuration before converting that
group to a template.
th

To create the required configuration:


ng

1. Create a group named Templates in the Training group. Note that this is a
o

normal group with a name of “Templates”, not a group template.


du

2. Make a copy of the Reservoir.Pump 1 group and place the copy in the
Templates group.
u
cu

3. Ignore the configuration errors, and rename the group to Pump.

4. Configure the Running and Start points with a Point Number of 3.

The red crosses should disappear as they no longer clash with previously
assigned addresses.

5. On the Templates.Pump.Default mimic, embed the animated pump symbol


created earlier, and tie this to the Running point within the new Pump template
group.

Chapter 9 – Templates and Instances Issue 1 9-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Right click on the embedded animated pump and select Properties.

The following screen will be displayed.

om
.c
ng
co
an
th

7. Untick the relative tick-box so that absolute addressing is used.


ng

Note: Mimic references that reference items outside the template, should always use
o

absolute references.
du
u

8. Put the mimic into run mode and test that the point state description and pump
color updates as expected.
cu

9. Add buttons to the mimic to Start and Stop the pump.

Chapter 9 – Templates and Instances Issue 1 9-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
10. Verify that the start and stop buttons toggle the state of Binary Output 3.

The mimic and database structure created are shown below.

om
.c
Now that we have created and tested our pump configuration, we will convert this to a

ng
template so we can reuse it.

To create the template:


co
1. Right click on the Training.Templates.Pump group.
an

2. Convert it to a template by selecting Convert To -> Group Template


th

The Pump folder should turn red to indicate it is a template.


o ng
du

Group Template
u
cu

Chapter 9 – Templates and Instances Issue 1 9-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
9.2 Property Overrides
Property Overrides allow you to override the configuration settings that are defined in
a Group Template. This allows Group Instances to take their configuration from a
Template and still allow some properties to be altered to be unique.

A property override defines which properties of the objects in the instance, make that
instance unique. Each property that has overrides enabled can be altered from within
the Group Instances. If not enabled, the property will be tied to the template for its
value.

For the pump, we need to configure property overrides such that we can set the point
addresses as well as specify the outstation to which the point is attached. That way

om
we can use the pump template throughout our system irrespective of the site at which
the pump is located.

.c
To configure property overrides on the Pump template:

ng
1. Select the Property Overrides option from the Pump template object menu.
co
The following dialog will be displayed.
an
th
o ng
du
u
cu

2. Expand the Running Folder and the Binary point folder, and ensure that the
OutstationId and PointNumber fields are ticked.

This means that each time we instantiate the template, we can make the point
number and outstation unique for that instance.

Some properties are overridden by default e.g. PointNumber and OutstationId.


This is done by ClearSCADA as these are often different from point to point.

3. Repeat step 2 for the Start point

Chapter 9 – Templates and Instances Issue 1 9-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
9.3 Creating Group Instances
Now that you have a Group Template, you need to create an instance that can refer to
the Group Template for its configuration. The Group Instance will use the
configuration in the Group Template as the basis for the configuration of ‘live’
database items.

Before we create instances of the pump, we will first create the framework for our new
Reservoir.

1. In the templates group, create a new group named Reservoir.

2. On the object menu for the Reservoir group, select the New Instance option
and select the Pump template.

om
A new folder will be created. The folder is green to indicate a group instance.

.c
3. Name the instance Pump 1.

ng
If an error appears on the instance in the Database Explorer, press the F5 key
to refresh the explorer bar and clear the error.
co
an
th
ng

Instance
o
du
u
cu

4. Open the Running point within the instance and note that the PointNumber
and Outstation fields are available to modify.

The properties that are ‘Greyed out’ are tied explicitly to the parent template
and cannot be changed. The fields displayed with a white background
(Outstation and Point Number) are the only properties by default that can be
different to the template. Every other property matches the template exactly.

5. Open the Default mimic from within the Pump 1 template instance and verify
that the status and controls update as expected.

Note that the default point addresses of 3 for the Running and Start points is
still valid.

Chapter 9 – Templates and Instances Issue 1 9-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Note: When property overrides are enabled within a template, the default values in the
instance are the values configured in the template for those properties.

We will now create a second instance of the pump template.

1. Following the steps outlined above, create a second instance named Pump 2.

2. Modify the point addresses such that there is no clash of addresses (use DNP
point address 4).

3. Verify the behavior of the Pump 2 instance.

om
.c
ng
co
an
th

Instances
g
on
du
u
cu

Chapter 9 – Templates and Instances Issue 1 9-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
9.4 Template Configuration Propagation
Templates are extremely powerful tools in that they can be used to very quickly
replicate similar configurations throughout a system. One other feature of templates
and instances not yet covered is the automatic propagation of configuration from the
template to the instance.

Configuration modified in the template is immediately and automatically copied out to


the instances. This means that where potentially hundreds of changes may be
required, the updates can occur through one simple change in the template. This
feature alone can save countless hours of development time.

To demonstrate the propagation of configuration:

om
1. Open the mimic Training.Symbols.Animated Pump in design mode.

.c
2. Modify the animations for FillColour and GradColour such that the pump is blue
when on and pink when off.

ng
3. Open the Templates.Pump.Default mimic and verify that the colors have
co
propagated from the animated pump to the embedded pump in the template.

4. Open the Default mimics in the two pump instances and verify that the behavior
an

of the pumps has changed to represent our new pump colors.


th

5. In the pump template, create a new trend object showing the Raw Historic
trace of the Running input.
ng

6. Verify that each pump instance has the new trend configured for its running
o

input and that the trace displayed on each trend is pointed to the correct input.
du
u
cu

Chapter 9 – Templates and Instances Issue 1 9-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
9.5 Completing the Reservoir
The interesting thing to note when using templates and instances is that we can
duplicate almost any type of object. So a pump template could contain items such as:

- point configurations
- communications information
- reports
- trends
- mimics
- popup windows detailing status information
- etc…

om
Everything required to fully define a device can be incorporated into the template
itself. This means that when we need items related to the device, we can link or use
them directly within the standard configuration of the system. For example, to create

.c
an overview mimic of our reservoir, we would use the pump symbols created within
the pump template itself.

ng
As a result of this type of configuration, system development is simplified as adding
co
new objects or devices to the system is an error free process of using objects defined
within existing templates, which have been developed and tested numerous times
before.
an

To complete our reservoir group, we will use the objects created within the template
th

instances to create a summary page for the new reservoir that looks similar to the
image shown below.
o ng
du
u
cu

Chapter 9 – Templates and Instances Issue 1 9-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
The first step in completing this configuration is to create and configure the required
database objects.

1. Make a copy of the Level point in the Training.Reservoir group and copy it
into the group Training.Templates.Reservoir.

It will be shown with a configuration error due to conflicting addresses with the
original point.

2. Modify the point configuration such that the point uses analog input 2 on the
RTU.

om
The error should be cleared on the point.

.c
Now that all the objects are created in the appropriate location, configure the mimic as
follows.

ng
1. Open the mimic Training.Templates.Reservoir.Default in design mode.
co
2. Copy the tank items from the mimic Training.Reservoir.Default onto the new
mimic.
an

3. Verify that the tank animates as expected by changing the second analog input
th

configured above.
ng

Note how the animation is working based on the Level point created in the
section above. This is due to the fact that we used relative references on the
o

size animations for the tank level. This relative reference now finds the new
du

level point in the same relative location to the mimic as the old Level point.

4. Embed the pump default mimics from Pump 1 and Pump 2 onto the mimic
u

Training.Templates.Reservoir.Default.
cu

5. Arrange the page as shown in the mimic above.

Chapter 9 – Templates and Instances Issue 1 9-9

CuuDuongThanCong.com https://fb.com/tailieudientucntt
9.6 Exercises

1. Examine the use of nested templates by converting the group


Training.Templates.Reservoir into a template. Create an instance of this
template and verify its operation.

2. Is the point address and outstation ID of each point available to be configured


in an instance of the reservoir template? Why or why not? Where would this
be useful?

3. In our example, the outstation object is not included in the template. When
would it be included? Why?

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 9 – Templates and Instances Issue 1 9-10

CuuDuongThanCong.com https://fb.com/tailieudientucntt
10 Structured Text Logic
Structured Text (ST) is a high level language developed for use in industrial control
applications. You can use Structured Text Programs to perform calculations and
define the behavior of values within the database.

In the following pages, we will create a structured text program that monitors the input
states of our pumps created in the previous chapter. The program will reset that Start
Command output when it detects that the pump running feedback has turned on after
the command is issued.

10.1 Prepare Database Objects

om
In this exercise we will add a new logic program to our pump template so that each
pump in the system has the reset functionality.

.c
To create a New Structured Text Program:

ng
1. Create a ST program in the Pump template (New -> Logic -> Structured Text
Program) co
2. Name the program ResetStartCmd.
an

3. Double-click on the ResetStartCmd Structured Text Program in the template to


display the Structured Text Program window in Design Mode.
th

The following program window will be displayed.


o ng
du
u
cu

Chapter 10– Structured Text Logic 10-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
The top part of the window is where you enter the program code. The bottom
part of the window is called the output window and is where messages are
displayed, for example, error messages when the program does not compile.

4. Enter the following program into the program window.

PROGRAM ResetStartCmd

VAR
StartCommand AT %M(.Start) : BOOL;
Running AT %M(.Running) : BOOL;

om
END_VAR

IF StartCommand AND Running THEN

.c
StartCommand := 0;
END_IF;

ng
END_PROGRAM co
The PROGRAM part of the line indicates the start of the Structured Text
an

Program.
th

The ResetStartCmd part of the line is the identifier. The identifier names the
element within the program, and usually describes the purpose of the program.
ng

It must be an alphanumeric string that begins with a letter. It cannot contain


adjacent underscore characters or spaces.
o
du

The Statements between the VAR and END_VAR are the variable declarations
– they tell the ST program which objects and properties in the database should
be used in this program. The variable declaration defines the name that the ST
u

program will use, the object in the database and the data type. Note that the
cu

object referenced can be any object and any property in the database.

Everything leading up to END_PROGRAM is the body of the code. In this


case, the code says that the server should turn off the Start Command if it is
currently on and the Running feedback is active.

The END_PROGRAM statement marks the end of the ST program.

Chapter 10– Structured Text Logic 10-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5. Save the logic program and verify that the message window indicates
successful compilation. The ClearSCADA server will not run the code unless
the validation of the code is successful.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 10– Structured Text Logic 10-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
10.2 Executing the Logic Program
When you have created a Logic program, you need to define how often the server
executes the program, and what conditions must be in place for the execution to take
place. To do this, you need to define the Execution settings on the Logic Form.

To display the Logic Form:

1. Right-click on the ResetStartCmd logic program in the pump template.

2. From the context sensitive menu choose Properties to display the Logic Form.

The following form will be displayed.

om
.c
ng
co
an
th
o ng
du
u
cu

3. Configure the Execution method to use On Input Processed.

On Input Processed tells the logic program to run each time the inputs are
processed, which happens when they change. Any point object can be
processed. The program could also be run On Interval, but this would require
more system resources as the program would be running every ten seconds.

Chapter 10– Structured Text Logic 10-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Note: Only the Running input will trigger this program to run. The Start point is referenced as
a read/write variable in the logic program (%M VAR declaration) and is both read from, and
written to in the program. If the Start point was also used as a trigger for this program, the
execution would trigger from the Start point, possibly update the Start point which triggers the
program, which could update the Start point and so on. For this reason, variables which are
being read from AND written to will be excluded from On Input Processed calculations.

4. Expand the Pump 1 instance within the Reservoir in the Database Explorer.

5. Verify that the logic program has been propagated to the instance.

om
6. On the pump mimic in the instance, click the Start button and verify that the
correct output is turned on.

.c
7. Turn on the corresponding Running input switch and verify that the output is
turned off by the logic program.

ng
co
an
th
o ng
du
u
cu

Chapter 10– Structured Text Logic 10-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
10.3 Debug the Logic Program
ClearSCADA logic provides full support for debugging logic code and for stepping
through ST logic programs to verify program flow.

ViewX provides debugging features that allow you to step through each executable
statement in your program. Use the debugging features to determine what the
program is doing—this may contrast to what you intended the program to do.

Because we are configuring a logic program in a template (which will never actually
run within the template itself), debugging must be performed on the logic program
within one of the instances.

om
To debug the program:

1. Open the logic program in the Pump 1 instance.

.c
The statement ‘Program Executing’ should be displayed in the messages window.

ng
2. Click on the program line IF StartCommand AND Running THEN and
co
press the F12 key to insert a breakpoint on this line.

This means that each time ClearSCADA tries to execute this line of the program, it
an

will stop and wait for you to tell it what to do.


th

A breakpoint will show as a red dot in the left hand margin of the code as shown in
the image below.
o ng
du
u
cu

Chapter 10– Structured Text Logic 10-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Select the Debug menu item and choose Start Debugging from the drop down
menu.

You should see the red dot highlighted by a yellow arrow. The yellow arrow
indicates that the code execution has arrived at the breakpoint and is waiting for
user intervention.

om
.c
ng
4. From the Debug menu, select the Variables option.
co
The following dialog should be displayed.
an
th
o ng
du
u

5. Use the Step Into feature (F8) to step through the code and verify using the
cu

yellow indicator and the variables display that the code executes as expected.

6. Close the variables window, stop debugging and remove the breakpoint when
you are finished.

Chapter 10– Structured Text Logic 10-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
11 Security
Security of a SCADA system is a key requirement to ensure that unauthorised users
are not permitted access to areas of the system where they are not entitled to be. The
ClearSCADA security model is based on users and user groups being assigned
permissions to operate on objects in the database. In this way, security is object
based rather than action based as security is related to the object being operated on
rather than on the action being initiated.

The benefit of this approach is in the consistency provided when the same security
model is applied across the system as objects are used. When an action is initiated
on an object, the objects security settings are compared to the security settings of the
logged in user to determine whether that user has the required permissions to perform

om
the action they are attempting. Further to this, all ClearSCADA menus are context
sensitive meaning that only those options that fit within the user’s permissions are
made available. For example, if a user does not have the necessary permissions to

.c
control an object, then the Control option will not be shown on any object menus they
will see in the system.

11.1 User Accounts


ng
co
Each user account has a feature set that is selected on the ViewX tab of the user
an

Form. The feature set enabled determines how ViewX will appear to the user when
they are logged on to the system. For example, a user account can be configured to
th

provide access to display and control features but not configuration features.

The feature set enabled in the user account determines the behavior of ViewX
ng

including things such as toolbar availability, configuration options on object menus.


So a user who is not granted configuration permission in their user account will not be
o

able to configure objects even if the permission in the point configuration allows them
du

those rights. The feature is not enabled in ViewX; therefore the user will not be able
to configure any objects.
u
cu

In this exercise we will configure three user accounts allowing three different feature
sets in their account settings.

To configure user accounts:

1. Create a new group named Security in the Training group (Training.Security)

2. In this group, create users Operator and Engineer with the settings as
described in the table below.

Note that the User database object can be found in the ‘Other’ section.

Chapter 11–Security 11-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Note: If a security setting is not listed in the table below, do not change the setting from its
default value.

Tab Section Property Operator Engineer

General n/a Home Page Overview -

n/a Confirm Actions Yes No

dd MMM yyyy dd MMM YY


Regional Settings Date Format

om
HH:mm:ss HH:mm:ss.SSS

English
English (United

.c
Locale (United
States)
States)

ng
ViewX General Multi Document Interface No Yes
co
Can Close ViewX No Yes

Double Click Edits Documents No Yes


an

Double Click Shows Properties No Yes


th

Operational Operate Yes Yes


ng

View Alarms Yes Yes

View Events Yes Yes


o
du

Operator Document Store - -

Configuration View Configuration No Yes


u
cu

Configure Database No Yes

Configure Options No Yes

Configure Documents No Yes

Configure Local Files No No

Alarm Banner / List Allow Bell Disable No Yes

Disable Bell By Default No Yes

Can Move Banner No No

Can Resize Banner No Yes

Can Remove Banner No Yes

Chapter 11–Security 11-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Banner Filter Timeout 5M 0

Explorer Bars Database Yes Yes

Operator Documents Yes Yes

OPC Data No Yes

Favourites Yes Yes

Queries Yes Yes

Area of Interest No No

OPC Historic No Yes

om
Toolbars Operate Yes Yes

File Yes Yes

.c
Navigate Yes Yes

ng
Mimic No Yes

Alignment No Yes
co
Debug No Yes
an
th

3. From the File menu, select the Log On option.


ng

The following dialog will be displayed.


o
du
u
cu

4. Enter the username Operator.

Note the following changes to the ViewX application.


- The user is automatically taken to the defined home page
- The Tools, Insert and Arrange menus are no longer available
- Only the File, Navigate and Operate Toolbars are available
- The Exit option is removed from the File Menu, and the close “Cross”
has been disabled
- Local files are not available from the File Menu or toolbar

Chapter 11–Security 11-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
- The design button is disabled
- The object menus on mimics and in the ClearSCADA Data Bar are
significantly shorter as functions have been removed
- The alarm banner cannot be removed
- The alarm bell cannot be disabled
- Double clicking on an object no longer opens it in edit mode
- There is no way to configure any object in the database including
creating new objects
- The time and date format used in the alarm banner and event journal
matches the user account setting
- OPC Toolbars are not available

5. Logon as the user Engineer and verify the following changes to ViewX.

om
- No home page is displayed on logon
- ViewX can be closed

.c
- The alarm banner can be removed
- Object menus contain additional options for more in depth use of the

ng
system however the “New” option is not available to create objects in
the database. co
- The time and date format used in the alarm banner and event journal
matches the user account setting
an
th
o ng
du
u
cu

Chapter 11–Security 11-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
11.2 User Groups
User groups are used to allocate permissions to several users simultaneously. By
setting permissions on a user Group basis, you significantly reduce the amount of time
it takes to set up the permissions for user accounts that require exactly the same
permissions as other user accounts. For example, if you need all engineer user
accounts to have exactly the same permissions, it is quicker to allocate the
permissions to an engineer user group rather than allocate them to each individual
account.

For this exercise we will create two user groups and use these groups to allocate
permissions.

om
To configure user groups and assign users to groups:

1. Log in as the user Eng.

.c
We have not yet given our Engineer user permissions in the database to create

ng
objects so we need to use the existing Eng user.
co
2. Create two new User Groups in the Security group named Op Group and
Eng Group.
an

3. Open the Operator user properties and attach the user to the Op Group.
th

The image below shows the configuration to be modified.


o ng
du
u
cu

4. Repeat step 3 and attach the user Engineer to the user group Eng Group.

Chapter 11–Security 11-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
11.3 Permissions
Each item in the database has its own security window which you can use to restrict
access to the item and its features as required. You can also choose to apply the
security settings of the item to any ‘child’ items, for example, you can set the security
permissions for a group and choose to also apply them to all items within that group.

Permissions are hierarchical. This means that you can setup security on a group and
by default these settings will apply to all objects in the group. If a specific object in the
database has no security settings configured, it will look up the tree until it finds a
parent folder which has security configured. It will then take these settings for itself. If
security is set on a group, and then set on an object within a group, the settings on the
object within the group will take precedence.

om
The permissions for all items are grouped into categories. On the security window,
there are checkboxes for each category — tick a checkbox to grant the relevant

.c
permission, or untick it to remove the permission.

ng
We will configure the permissions in the system such that operator level users have a
lower level of features available on most objects and will not be able to see the
Security folder. Engineers will be configured with full access.
co
To configure the database security:
an

1. Right click on the Root object in the database and select Security.
th

The root object is at the top of the database explorer.


o ng
du
u
cu

Chapter 11–Security 11-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
The Security permissions dialog will be displayed.

om
.c
ng
co
an
th
ng

The bottom section of the dialog displays the different security categories
available in ClearSCADA. Each action that can be performed fits within one of
o

these categories. The database schema (to be discussed later) can be used to
du

see the permissions for each method.

Unticking these options for the selected user or user group in the top section
u

removes that permission for that user on the selected objects or group of
cu

objects.

The three existing rows are the security settings configured for the
ClearSCADA Example Projects.

Note: Do not click on OK until step 6 below. If you do, you may lock yourself out of the
database by removing security permissions to do things yourself. In this case you will need to
log in as the Super User configured during the installation process to change the user security
such that one configured user has appropriate access.

Chapter 11–Security 11-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. Click the Add button.

The following dialog will be displayed.

om
.c
ng
3. Select the Op Group and click OK. co
This will add this user group to the permissions dialog to allow us to configure
the permissions in the system of users in the Op Group user group.
an

The Display Users tick box at the bottom of the dialog allows individual users to
th

be added to the permissions dialog from where you can configure individual
user permissions as opposed to group permissions.
ng

4. Select the Op Group group and select the Read, Browse, Control,
o

Acknowledge Alarms and View Alarms.


du

Note: You can deselect all options by unticking the Read permission. Then add in the
u

required options.
cu

Chapter 11–Security 11-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5. Add the Eng Group group and configure it with full permissions.

The security settings should match the dialog below.

om
.c
ng
co
an
th
ng

6. Close the security dialog by clicking on OK.


o
du

Note: As a general rule, when you configure security on a group in the database, all security
options should be available to at least one of the users or user groups. In other words, each
u

security permission should be enabled for at least one user so that everything can be done by
cu

logging on to the system under one of the defined user accounts.

We will also configure the Security folder such that any user account in Op Group
cannot browse the folder in the ClearSCADA Database Explorer Bar. This restricts
users from viewing the way that security in the database is structured i.e. user
accounts and groups that are available, unless they are specifically enabled to modify
security for the system.

To remove browse permissions on the Security Folder:

1. Open the Security permissions dialog on the Security folder

Chapter 11–Security 11-9

CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. Untick the box Inherit Permissions From Parent.

This allows a different set of permissions to be configured on this group.

3. For both the Everyone user and the Op Group user group, remove Browse
permissions.

See the completed security dialog below.

om
.c
ng
co
an
th
o ng
du

We will now test our security settings to see the effect that the permissions
u

configuration has had.


cu

To test the security configuration:

1. Log on as the user Operator.

2. Verify that the Security group cannot be seen in the ClearSCADA Database
Explorer Bar and that only those permissions configured on the Op Group user
group are available on all other database objects.

3. Log off the user Operator.

4. Verify that the Security group cannot be seen in the ClearSCADA Database
Explorer Bar and that only those permissions configured on the Everyone user
are available. Controls should not be available.

Chapter 11–Security 11-10

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5. Log on as the user Engineer.

6. Verify that all features are available on all folders.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 11–Security 11-11

CuuDuongThanCong.com https://fb.com/tailieudientucntt
11.4 Operator Document Stores
ClearSCADA provides a feature where groups can be created in the database (named
Operator Document Stores) that can be used for users without configuration
permissions to create trend objects.

In most systems, security is configured such that operator level users do not have
configuration permissions in the database, or the ViewX feature ‘Configure Database’
enabled and so are not able to create or modify trends. Now since trends are a key
operation tool, this can be a problem, however this can be overcome through the use
of the operator document store.

The document store allows users without configuration options enabled in their user

om
profile to create and modify trends within their user profile, on the condition that they
have configuration permissions on the Operator Document Stores themselves in the
database.

.c
The document store is set up on a user and group level allowing each user the ability

ng
to use up to five different stores in the database and to share those stores with other
users in the database. co
To configure the document stores:
an

1. Create a new group named Document Stores in the Training group


th

(Training.Document Stores).
ng

2. In the group Training.Document Stores, create the following Operator


Document Stores (the document Store object can be found in the Group
o

group).
du

Eng Group Store


Op Group Store
u

Eng Store
cu

Op Store

Eng Group Store and Op Group Store will be made available to all users who
are members of those user groups. Eng Store and Op Store will be used
specifically for the individual users.

Chapter 11–Security 11-12

CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Open the properties of the user group Security.Eng Group. On the User
Group tab, configure the Operator Document Store to point at
Training.Document Stores.Eng Group Store.

This will provide all users of the Eng Group user group access to Eng Group
Store.

4. Similarly for the user group Security.Op Group, configure the Operator
Document Store to point at Training.Document Stores.Op Group Store.

5. For the users Engineer and Operator, configure their Operator Document
Stores (on the ViewX tab) to point to Eng Store an Op Store respectively.

om
6. For the document store Eng Group Store, configure the security settings such
that only members of the Eng Group have full access as shown in the image

.c
below.

ng
co
an
th
o ng
du
u
cu

7. Configure the Eng Store such that only user Engineer has full access to the
store. Other users should be removed.

Note that you will need to tick the Display Users option when adding the
Engineer user.

Chapter 11–Security 11-13

CuuDuongThanCong.com https://fb.com/tailieudientucntt
8. Configure Op Group Store so that both the Op Group user group and Eng
Group has full access.

Eng Group is given full access as this group has system administrator rights in
the database and should be given security and configuration permissions for
ongoing maintenance.

om
.c
ng
co
an
th
o ng
du

9. Configure the Op Store such that the user Operator and the user group Eng
Group have full access to the store.
u

Eng Group is given full access as this group has system administrator rights in
cu

the database and should be given security and configuration permissions for
ongoing maintenance.

10. Log on as the user Operator.

11. Using the Operate toolbar, display the Operator Documents Data Bar.

12. Double click on the system name in the Operator Documents bar to obtain a
view of all available Operator Document Stores.

Something similar to the following should be displayed.

Chapter 11–Security 11-14

CuuDuongThanCong.com https://fb.com/tailieudientucntt
This image shows that the Operator Document Stores available for the user
Operator are as expected – Op Group Store and Op Store.
Op Group Store is available since the Operator user is a member of the Op
User Group.
Op Store is the document store available for the Operator User.

om
13. Right click on the Op Group Store and from the menu displayed, create a New
Trend named AI1 Trend.

.c
This is available even though the Operator user does not have the ability to

ng
perform configuration based on their user profile.
co
14. Display the trend in Design mode and add a trace to show the point
Training.Reservoir.Level as a raw historic trace.
an

You can add a trace by right clicking in the Key area at the bottom of the trend.
th

15. Configure the trend title as required.


ng

16. Log on to the system as the user Engineer.


o

17. With the Operator Documents Bar on display, verify that the Engineer user
du

does not have access to the operator store and operator group store through
the Operator Document Stores Database Bar.
u

Note that members of the Eng group can still see the stores through the
cu

standard Database Bar as they have full rights to maintain the group
.
18. Modify the Engineer user account such that the Engineer user is also a
member of the Op Group user group.

19. Logon again as the user Engineer (to reload security profile) and verify that the
Op Group Store is now available.

20. Verify that the trend created by the user Operator is now available in a shared
group store for the Engineer user.

Chapter 11–Security 11-15

CuuDuongThanCong.com https://fb.com/tailieudientucntt
12 ClearSCADA WebX Client
The WebX client is used as a zero configuration client application to connect to the
ClearSCADA database. The ClearSCADA server contains a built-in web server that
does not require any additional software for it to run. The WebX client requires the
use of Internet Explorer 6 (or above). IE 7 or 8 is recommended.

All components required to display data in the web environment are automatically
downloaded from the ClearSCADA web server, making the server truly ‘zero
configuration’.

WebX is a versatile client application, designed to provide remote operator-level


access to your ClearSCADA system. It provides similar operational functionality to

om
ViewX, allowing you to view Mimics, Trends etc., and use them to interact with your
ClearSCADA system. However, you should use ViewX to configure your
ClearSCADA system and work with Crystal Reports.

.c
Note that WebX is designed for local area use. For remote use or connections to

ng
ClearSCADA servers on slow links, use ViewX. ViewX has been optimized for these
types of connections to give better performance and use significantly lower bandwidth.
co
In the following pages, we will investigate the most useful WebX client functions.
an

To open the WebX client:


th

1. Start Internet Explorer.


o ng
du
u
cu

Chapter 12–ClearSCADA WebX Client 12-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. In the address bar of Internet Explorer, type the following:

https://localhost

The following screen should be displayed.

om
.c
ng
co
an
th
o ng
du
u
cu

The ClearSCADA web server uses a self signed certificate on installation.


While this will work, it is recommended that for an installed server, a web server
certificate should be purchased from a certificate issuing authority such as
Verisign.

Chapter 12–ClearSCADA WebX Client 12-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Click the Continue to this Website (not recommended) link.

The following screen will be displayed.

om
.c
ng
co
an
th
o ng

Note: ClearSCADA provides a non-secure port for access into the ClearSCADA system.
du

This interface is read-only (from ClearSCADA 2010 R1). All operational access should use
the secure https interface.
u
cu

4. Click the Log On button from the header and enter the username Eng.

5. Click Log On.

You should be redirected back to the home page. The username Eng should
be shown in the grey status bar (to the right of All Rights Reserved). You
should see additional options in the menu at the top of the screen.

Chapter 12–ClearSCADA WebX Client 12-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
12.1 WebX Menus

You will notice there are nine buttons that appear across the top of the page.

The WebX menu buttons provide access to the various displays that are available in
WebX. When you select one of the menu buttons, a specialized page dedicated to
that area of the system is displayed.

 The Home button returns you to the start page. If logged in as a named user
and that user has a home page defined, then the users home page will be
displayed.

om
 The Database button allows you to browse the structure of the database and
navigate to objects in the database.
 The Documents button displays trends configured in the users Operator

.c
Document Store.
 The All Alarms button displays the alarm list.

ng
 The All Events button displays the event list.
 The Lists buttons is equivalent to the Queries Bar in ViewX.
co
 The Favorites button displays a list of Faorites configured for the logged in
user.
an

 Diagnostics displays system status information; allowing users to remotely


analyse and diagnose the server.
th

 Log On allows a user account to be logged on to the web client.


ng

12.1.1 Home
o

The Home button allows you to access the homepage. This will be either the default
du

home page, the default system page (as defined in the Root group’s configuration in
ViewX), or the home page for the user (as defined in their user account configuration
in ViewX).
u
cu

12.1.2 Database
The Database button allows navigation of the database hierarchy. When clicking on
the Database button, the ClearSCADA web server builds up a dynamic list of the
objects available in the database, starting at the highest level. When clicking on a
group at the highest level, the objects in those groups can then be seen.

The Database hierarchy will look similar to the screen shown below.

Chapter 12–ClearSCADA WebX Client 12-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
ng
co
an

The Database view can be used to navigate to and display mimics and examine
object properties in the same way as using the View dialog in ViewX.
th

To use the Database view:


ng

1. Navigate through the system to display the point Training.Reservoir.Pump


o

1.Running.
du

The following information will be displayed.


u
cu

2. Verify that the statistics in the web client match up with those shown in the View
Status dialog in ViewX.

Chapter 12–ClearSCADA WebX Client 12-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Toggle the first binary input and by refreshing the page in Internet Explorer,
verify that the statistics on the point are updated.

4. Navigate in the hierarchy of the database to the mimic Overview.

5. Verify that hyperlinks, objects menus etc work as expected.

12.1.3 All Alarms


The All Alarms option allows users to interact with ClearSCADA alarms in the same
way as in ViewX. Fundamentally, the operation of the alarms in ViewX and WebX is

om
the same except that audible alarms are not available in the WebX client.

1. Open the All Alarms page.

.c
2. Verify that the alarms shown in the WebX client alarm banner match the alarms

ng
in the ViewX alarm banner.
co
3. Acknowledge an alarm in WebX and verify that the alarm is acknowledged in
ViewX.
an
th
o ng
du
u
cu

Chapter 12–ClearSCADA WebX Client 12-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
12.1.4 All Events
The All Events option allows users to interact with the ClearSCADA event list in the
same way as in ViewX. Fundamentally, the operation of the events in ViewX and
WebX is the same.

1. Open the All Events page.

Something similar to the following image should be displayed.

om
.c
ng
co
an
th
o ng
du

2. Verify that the events list is the same as that shown in ViewX.
u
cu

3. Add a comment to an event in WebX and verify that the comment is added into
the event list in ViewX.

12.1.5 Exercises
1. Sort the list by Source and then Time using the Sort option available by right
clicking on the list.

2. Filter the list so that only the last one hour of events is shown.

3. Fail the RTU communications. Verify that the event is logged and then filter the
event list to show all “Communications state – “ messages.

Chapter 12–ClearSCADA WebX Client 12-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
12.1.6 Lists
The Lists section allows the display and manipulation of lists in the WebX client in the
same way as in ViewX.

1. Open the Lists page.

The following page should be displayed.

om
.c
ng
co
an
th
o ng
du
u
cu

2. Use the points list to display a list of all points in the Training Group.

Chapter 12–ClearSCADA WebX Client 12-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
12.1.7 Diagnostics
The Diagnostics page allows you to verify server operation, view log files, initiate
telnet sessions to the server and drivers and perform general diagnostic functions.
This is the same information that is available by right clicking on the server icon in the
Windows Task Bar and selecting Status.

To use the Diagnostics page:

1. Log on as the Engineer user.

The Diagnostics button should become available.

om
2. Open the diagnostics page.

A page similar to that shown below should be displayed.

.c
ng
co
an
th
o ng
du
u
cu

3. Use the options available to determine the following:


a) The version number (or “Build Number”) of ClearSCADA running on your
system.

b) Which “Logging” options are enabled by default?

c) The number of bytes in the “Historian” used for a raw historic record and an
event journal record, and how many of each of these records is in the
database.

Chapter 12–ClearSCADA WebX Client 12-9

CuuDuongThanCong.com https://fb.com/tailieudientucntt
12.2 Live Configuration Availability
The WebX client is a true ‘Zero Configuration’ client. This means that changes made
to the ClearSCADA database are available in the web client immediately without any
further actions being required. For example, when you modify a mimic, the only thing
required to make that change available to the WebX clients is to click the Save button.
For a user currently viewing that page in Internet Explorer, all they need to do is click
the Refresh button (or navigate to that page). Simple property modifications on
database objects (such as changing a point description) will be pushed to clients
immediately.

To investigate the online configuration changes in the WebX client:

om
1. In ViewX, create a new group named WebX Client in the Training group.

2. In the WebX client, browse through the Database to find the new group and

.c
mimic.

ng
co
an
th
o ng
du

3. Click on the name of the mimic to display the actual mimic. In this case, click
on the link for the Default mimic.
u
cu

Verify that the mimic appears blank as expected.

4. Open the mimic WebX Client.Default in ViewX for editing.

5. Draw a circle on the mimic and drag the state of Training.Reservoir.Pump


1.Running onto the mimic.

6. Save the mimic in ViewX.

7. Refresh the mimic in WebX and verify that the changes are available
immediately.

Chapter 12–ClearSCADA WebX Client 12-10

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
8. In the properties of the point Training.Reservoir.Pump 1.Running, change
the Off State Description to ‘Not Running’.

.c
Verify that the state description changes in WebX without needing to refresh

ng
the page in Internet Explorer.
co
12.3 Exercises
1. If all the training machines are on a network, connect to someone else’s
an

ClearSCADA server using the WebX client.


th

2. From a list of objects, toggle the state of Training.Reservoir.Pump 1.Start.


o ng
du
u
cu

Chapter 12–ClearSCADA WebX Client 12-11

CuuDuongThanCong.com https://fb.com/tailieudientucntt
13 System Configuration
With any system such as ClearSCADA, there will be a number of settings which
control the behavior of the product. In this chapter, we will examine some of the key
places where ClearSCADA is setup, and look at the impact of these settings on how
ClearSCADA functionality is presented to the user.

Up to this point, we have looked at the behavior of individual objects which have been
created in the ClearSCADA database. Each of these objects has a range of
properties controlling its operation and appearance. There are however, settings that
control the use of the product itself.

There are two major places where settings are configured in ClearSCADA. Perhaps

om
not surprisingly, those two places are in the server and the ViewX client. Server
configuration settings tend to relate to system wide operation i.e. how ClearSCADA
behaves either on the server or when any client connects to it. ViewX settings are

.c
more concerned with the look and feel, and operation of the local ViewX client. Some
of these settings allow individual users to have their clients customised in certain ways

ng
that makes it easier for them to retrieve the information they require.
co
Some of the server based settings are configured in the server configuration tool,
while some settings are system wide and apply to all servers in the system. These
are stored within the database itself and automatically propagated to all servers in the
an

system. These system wide settings are often configured from within the ViewX client.
th

In this section, we will not exhaustively cover all the available options as they are
covered in depth in the System Administrators Guide in the Online Help. We will
ng

however, examine some of the more interesting settings to see what impact their use
has on ClearSCADA.
o
du

13.1 Server Configuration


u

Server configuration relates to those features that impact how either the server itself
cu

runs, or all clients connected to that server.

The majority of server configuration settings are configured through the server
configuration dialog. The configuration tool for the server can be displayed by right
clicking on the server icon in the Windows Task Bar and selecting Configuration.

Chapter 13–System Configuration 13-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
The server configuration is broken up into six main sections

ng
 Database Configuration – Configures settings that effect individual items in the
database.
co
 Global Parameters – affect the behavior of the server in relation to data, historic
settings and communications. Individual communications driver settings are
an

also in this section.


 Historic Configuration – defines the settings that control the behavior of the
th

built-in historian including event journal, historic data and configuration


changes.
 SQL Query Configuration – configures links to external databases, historic
ng

views and general SQL query parameters.


o

 System Configuration – settings related to product features and their behavior.


du

In this section, we will look at three of the available settings:


 Alarm Disable Times
u

 Extra event list fields


cu

 Custom Database Fields

13.1.1 Alarm Disable Times


When an alarm is disabled, it means any alarm condition raised on that point will not
be displayed in the alarm lists. The Foreground color property of the point will indicate
it is in the alarm disabled state and so the color of the point on mimics will be shown
as a dusty pink color. This color can be changed from the color palette if required –
see Core Reference Manuals in the Online Help for further details.

This feature allows ClearSCADA alarms to be setup such that the disabling
functionality can be used in one of four ways – not allowed, disabled until manually re-
enabled, disabled for a fixed duration or disabled for a user defined variable duration.

Chapter 13–System Configuration 13-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
In this exercise, we will setup our alarms to disable for a user defined variable duration
time period.

To configure a variable duration alarm disable:

1. Open the Server Configuration dialog by right clicking on the server icon in the
Windows Task Bar and selecting Configuration.

2. Open the System Configuration – Alarms section.

3. Configure the Disable Alarms section as shown in the image below.

om
.c
ng
co
Note that the system name in the left hand tree view of the Server
an

Configuration dialog turns red to indicate that a change has been made.
th

4. Right click on the system name in the left hand tree view and click Apply
Changes from the displayed menu.
ng

5. In ViewX, open the mimic Training.Reservoir.Default.


o
du

6. From the object menu of point Training.Reservoir.Pump 1.Running, select


Disable Alarms.
u

The following dialog should be displayed.


cu

7. On this dialog, set a disable time of 2 minutes.

Verify that the color of the point on the mimic changes to the disabled alarms
color.

Chapter 13–System Configuration 13-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
ng
co
Verify that the View dialog indicates that the alarm has been disabled and the
time that the alarm is to be re-enabled.
an

Verify that on the next minute boundary, 3 minutes after disabling the point, that
th

the point becomes enabled.


ng

13.1.2 Extra Event Journal Fields


o

The ClearSCADA event journal records information about events occurring with the
du

ClearSCADA system. This can be information being read from devices in the field
(PLCs or RTUs), or it could be user actions such as configuration changes, alarm
u

acknowledgements or set point changes. For each record stored, there are a number
cu

of fields stored in the database to ensure a complete transaction record is maintained.

ClearSCADA provides facilities where the field displayed in the event journal in ViewX
and WebX can be configured for each system. In this example, we will add two
additional fields to the event journal:

 The Alarm Receipt time that shows the time the data was received by
ClearSCADA (not the timestamp of the data from the RTU)
 The Alarm State Description that records the name of the alarm action that
occurred causing the event to be logged. This can be used to put together a
filtered event journal showing alarm related events.

1. In the Server Configuration Dialog, open the System Configuration – Events


section.

Chapter 13–System Configuration 13-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
The following screen should be displayed.

om
.c
2. In the Available Columns section, select AlarmStateDesc and press Add ->.

ng
3. In the Available Columns section, select ReceiptTime and press Add ->.
co
4. Right click on the system name in the left hand tree view and click Apply
Changes from the displayed menu.
an

5. Display the Event Journal in ViewX.


th

Note that there are two new columns displayed.


o ng
du

13.1.3 Exercises
1. Create an alarm summary page by filtering the event journal to show all records
u

where the AlarmStateDesc is not empty. Create a hyperlink to this list on your
cu

Overview mimic.

2. For the point Training.Reservoir.Pump 1.Running, review the event journal


RecordTime and ReceiptTime fields.

Hint: Use the object menu on the Reservoir mimic to get the pre-filtered list.

Are the times the same?


Why or why not?
What happens if you toggle the Running input on the RTU when the comms
cable is unplugged from the RTU?

Chapter 13–System Configuration 13-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
13.1.4 Custom Database Fields
While the ClearSCADA database is a complex relational database representing the
class hierarchy of the database objects, it is possible to add user defined (or custom)
database fields into the database schema for any use that is required. The benefit of
custom database fields is that they can be configured to use the standard look and
feel of other properties in the database. They can also be configured if required, to
hide the user interface such that it is purely an internal object property.

With the standard custom database fields, when a field is added to a table,
ClearSCADA will automatically add that field into the properties of objects based on
that table. For example, if you add a field named AssetID based on the CDBPoint
table, each point object in the database will have a new OPC property named
AssetID. This property is available through every interface of ClearSCADA as if it was

om
built into the product. One of the configuration options on the custom field is to
determine its form location. This setting specifies the position on the object property
form that the field will appear.

.c
Another setting determines where the database field should be stored. Data in the

ng
Configuration stream is stored along with all other configuration data in the
ClearSCADAConfig.dat file. This file is saved to disk from memory once a minute, but
co
only if data within the file has changed. Data in the Data stream is stored with other
data such as point values, state information etc. The file is saved from memory to disk
once a minute. It is normal to store data in the data stream if it changes frequently.
an

The Dynamic stream is used for data that does not need to be retained. For example,
if you are constantly calculating the values of the custom field, then it may not be
th

necessary to save it to disk. In this case it would go in the Dynamic stream.


ng

In this section we will create a custom database field to store a comment relating to
each of our database points.
o
du
u
cu

Chapter 13–System Configuration 13-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
To create a custom database field:

1. Right click on the Root Group in ViewX and select the Edit Metadata option.

The Metadata window will be displayed.

om
.c
ng
co
an

2. Click the Add button.


th
o ng
du
u
cu

Chapter 13–System Configuration 13-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Select the Search Key option and click OK.

The following dialog will be displayed.

om
.c
ng
co
an

4. Configure the new field as follows and click OK.


th

Field Name – PointComment


ng

Table – CDBPoint
Row - 2
o

Column - 2
du

Size – 40
View Info Dialog Title - Comment
u

Leave other fields as their default values.


cu

5. Click OK.

Now that the field has been created we need to create the label that will be next
to the field on the form.

Note: For metadata, fields and labels are configured independently. This allows the use of
fields without labels, and labels on forms without fields.

Chapter 13–System Configuration 13-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Select the Labels tab at the top of the form.

om
.c
7. Click the Add button.

ng
co
an
th
o ng
du
u

8. Configure the new field as follows and click OK.


cu

Label – Comment
Table – CDBPoint
Row - 2

Leave other fields as their default values.

9. Click OK to accept the changes and OK to close the Metadata form.

Chapter 13–System Configuration 13-9

CuuDuongThanCong.com https://fb.com/tailieudientucntt
10. Open the Training.Reservoir.Pump 1.Running point in ViewX and display the
new Point tab.

11. Enter a comment of First Binary Input (Pump running) and save the form.

12. Open the mimic Training.Reservoir.Default and display the comment on the

om
mimic by dragging from the OPC Data Bar.

13. Modify the point properties to display a different comment and verify that the

.c
mimic updates as expected.

ng
co
13.1.5 Exercises
an

1. Open a points list from the Queries Bar and limit the search using the filter
dialog to show only those records where the PointComment field is not blank.
th

2. Open the OPC Data Bar and verify that the property you created is available for
point objects in your database.
ng

3. Create a custom field called AssetID that applies to CDBObject. What objects
o

in the database have access to this field and what tab in the properties form
du

does it appear on.


u
cu

Chapter 13–System Configuration 13-10

CuuDuongThanCong.com https://fb.com/tailieudientucntt
13.2 ViewX Configuration
The ViewX settings allow control of the look and feel of the local users ViewX display.
There are three main areas that can be controlled through ViewX:
 Default settings for new database objects eg. Mimics and trends
 Basic look and feel issues such as startup modes, alarm banner look and feel
and list options.
 Data update rates

13.2.1 ViewX Look and Feel


There are a number of settings available to change the look and feel of ViewX object
menus, alarm banner and lists. Most of these features are fairly straight forward.

om
Investigate the use of these features by performing the following exercises.

.c
13.2.2 Exercises
1. Using the Alarm Banner tab in the Tools – Options dialog, setup the alarm

ng
banner such that it has a black background and uses text with a 10 pt font.
co
2. Set the sort order of the alarm banner so it is sorted by time first, then severity.
an

3. Create a custom 12 point menu and verify that object menus on the mimics
reflect the changes.
th

4. Remove all toolbar access from the guest user and verify that none are
ng

available when all users are logged out of the system.

5. Set the clock format and verify that the system time is displayed on the status
o

bar.
du
u
cu

Chapter 13–System Configuration 13-11

CuuDuongThanCong.com https://fb.com/tailieudientucntt
13.2.3 Data Update Rates
The transfer of data from server to client is handled using the OPC protocol. OPC is a
protocol designed for use in the process control environment and is based on the
principles of pushing data required to those clients that require it rather than having
clients poll for data. This has the benefit of making the use of bandwidth between
client and server much more efficient as only points that have changed are sent to the
clients.

om
.c
ng
co
an
th
o ng
du
u
cu

The Update Rates section shown in the dialog above allows each client to be tuned to
obtain the best performance possible based on the available link speed. For example,
on a high speed Ethernet link, it makes sense to have low update rates so that the
client is notified very quickly in the event of data changes. On slower links, such as
dial up, you would set the update rates such that the data was updated only once
every couple of seconds rather than multiple times per second.

There are two different update rates available which are used in different places by
default in ClearSCADA. A user can select between normal and fast update rates each
time an animation is configured. You may remember when configuring animations on

Chapter 13–System Configuration 13-12

CuuDuongThanCong.com https://fb.com/tailieudientucntt
the first day of the course, that the animation dialog contained a tick box labelled Fast
Updates. (as shown in the image below) This tick box tells the server to update ViewX
at the fast update rate for any OPC tags used in this animation. Most animations will
use the normal rate as a 1 second update will be sufficient. However the arrangement
when dragging objects onto the mimic is that the value animation will default to Fast
Updates so that the value updates very quickly.

om
.c
ng
co
To see the behavior of the Update Rates:
an

1. Create a new group in the database named Update Rates.


th

2. In the group, create a new Random Generator named SineWave.


ng

Random Generators are available in the “Other” group.


o

3. Set the SineWave object so that it has a Scan Rate of 0.25S.


du

4. On the mimic Update Rates.Default, display the SineWave value.


u

How quickly would you expect the value to be updating?


cu

5. Open the server configuration and browse to the Global Parameters –


Advanced section.

The field named Interest Update Rate is used to determine how often the
server will check for changes in value to send to clients. In our case, the fast
update rate is set to 500ms and the server interest update rate is set to 250ms,
so we would expect to see approximately 2 updates per second.

Note: Reducing the Server Interest Update Rate can have a negative impact on the
performance of the server as it will need to work harder to detect changes to database points.
It should be noted that the default setting for this field is appropriate for most applications and
will generally not require change.

Chapter 13–System Configuration 13-13

CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Add an operator note to the sine wave value on the mimic.

How long does it take to bring up the color indication?


How long would you expect it to take?

7. In ViewX, change the fast update rate to 5 seconds.

Does the screen update rate refresh as expected?

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 13–System Configuration 13-14

CuuDuongThanCong.com https://fb.com/tailieudientucntt
14 System Architectures
ClearSCADA supports true server redundancy. Redundancy is handled on the server
database level meaning that once data and/or configuration is stored in the
ClearSCADA database, it is automatically redundant.

ClearSCADA databases are duplicated in all respects so that all current data, historic
data and events, reports and configuration is seamlessly transferred to the standby
server to provide a “mirror image” in the case of a server failure. Since redundancy is
handled on a per server basis, expanding your system is simple. All that is required is
to plug in a second server and configure each server to look at each other for
redundant information transfer.

om
Each redundant pair of servers (or up to triple redundancy), is referred to as a system.
Each server in the system will run the same database and will be synchronised to
each other server in the system.

.c
Up to this point of the course, we have used the client connection that was configured

ng
for us automatically on install of the system. However, ViewX can connect to up to 64
systems at any one time and can make all data available for each of these systems
co
available to be shared in mimics, trends and alarm lists. The client connection can be
configured to auto switch between redundant servers in a system, and connect to any
one of those servers as a ‘preferred server’.
an

In this section of the course, we will set up a redundant system and examine its
th

behavior, as well as looking at the way in which the ViewX client is able to connect to
those servers. Before we commence this section on redundancy, the first thing we will
ng

do is backup up our existing database so that we do not inadvertently overwrite it or


lose any of our configuration performed during this course.
o
du
u
cu

Chapter 14– System Architectures 14-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
14.1 Backup Your Database
We first need to make sure that Windows Explorer allows you to view hidden files:

1. Open Windows Explorer.

2. From the Tools menu, select Folder Options.

3. On the View tab, ensure that the option Show Hidden Files and Folders is
enabled.

4. Click OK to apply the changes.

om
To backup our entire database (including history).

.c
1. Ensure that there are no objects open in ViewX that require saving.

ng
2. Open the server configuration dialog and browse to the section System
Configuration – Location. co
The following screen will be displayed
an
th
o ng
du
u
cu

The Location tab describes the locations of our database components. This
includes all configuration, current data values, events, history and reports.

On Windows Vista and Windows 7, the default path for all the components is:

Chapter 14– System Architectures 14-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
C:\ProgramData\ControlMicrosystems\ClearSCADA\Database.

For earlier operating systems such as XP, the default path is

C:\Documents and Settings\All Users\Application


Data\ControlMicrosystems\ClearSCADA\Database.

Each specific database component described is in a subdirectory of that default


path.

3. Take note of the path where your database is stored.

4. Shutdown the ClearSCADA server by right clicking on the server icon and

om
selecting Shutdown Server.

The server icon will flash red to indicate that it is in the shutting down state.

.c
Wait for this icon to disappear before proceeding.

ng
5. Open Windows Explorer and make a copy of the folder you identified in step 2.
co
You should end up with a new folder in the same location that contains a copy
of your existing database.
an

For example,
th

C:\ProgramData\ControlMicrosystems\ClearSCADA\Database_Backup.
ng

C:\Documents and Settings\All Users\Application


Data\ControlMicrosystems\ClearSCADA\Database_Backup.
o
du

Note: It is critical here that you do this step or you run the risk of losing all the configuration
we have done so far this week. Since redundancy is server based, whichever server is
u

started first will be the server whose configuration is kept. So be careful!


cu

Copying this folder will mean we have a backup of the database to restore once
we have finished this section on redundancy.

6. Restart the ClearSCADA Server.

Chapter 14– System Architectures 14-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
14.2 Configuring a Main-Standby Pair
Main standby is the simplest form of redundancy in any SCADA system. Main-
standby is simply two servers which are essentially a mirror image of each other. One
server operates as main at all times and the other server will be in the standby state.
Only the main server will be communicating with the field devices (such as
PLCs/RTUs). The role of the standby server is to run in the standby state and ensure
that the database retained on the standby server is up to date in the event of a failure
of the main server. At this point, the standby server will become main and start to
communicate with field devices.

In a main standby arrangement, the two servers run identical databases. There is
fundamentally no difference in the database between configuration, current values,

om
events, historic data and reports. Each of these data types is simply more data in the
database and is transferred across the main-standby link to ensure complete
redundancy. So all data received from real devices is transferred automatically to

.c
redundant servers. Similarly for configuration, changes made on one server are sent
to the other server automatically. Once transferred to the standby server(s), the data

ng
is then available to any clients connected to the standby server.

To configure a server for redundancy:


co
1. Find a partner for redundancy by pairing up with one of the other people doing
an

the course.
th
o ng
du
u
cu

Chapter 14– System Architectures 14-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. Open the server configuration dialog and browse to the section System
Configuration – Partners.

The following screen will be displayed.

om
.c
ng
co
an
th
o ng
du
u

3. There are only two configuration fields that need to be configured on each
cu

server to enable redundancy. Configure those settings according to the


following table:

Parameter Setting

Type Hot-Standby Pair

Standby A Name / IP Address IP Address of your partners computer

When you Apply Changes, you will be prompted to restart your server. Shut
down both servers as prompted.

Chapter 14– System Architectures 14-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
4. Restart the server that will be Main first.
Wait for the server to be running in the Main state.

Note: The server that is running first will maintain its configuration. The second server’s
database will be deleted and completely synchronised to the main server.

5. Start the second server.

If all is running as expected, the second server should go into the synchronising
state and then into standby.

You can view the state of a running server by looking at the color of its icon, as

om
well as by viewing the tooltip that can be seen by hovering over the icon n the
status bar. The state colors for the server are described in the following table:

.c
Color State

ng
Dark Blue co Main

Light Blue Standby

Yellow Synchronising
an

Green Starting
th

Red (Flashing) Shutting down


ng

Pink Configuration Error


o

The Configuration Error state can be displayed for a number of reasons such
du

as missing drivers and no database available. For complete details of the


reason for the error, right click on the server icon and select the message at the
top of the list. Specific details will then be provided in a dialog presented to the
u

user.
cu

6. Have a look at the database on each of the machines and verify that they are
the same.

7. Look at the event lists on the two servers. Are they the same? Do events
generate from actions on the standby server display on the main and vice
versa?

8. Ensure that communications to the RTU are active and vary the AI1 so that
some events are generated on the historic trend for the point.

9. Verify that the trend and alarm information is displayed as expected on the
client connected to the standby server.
What do you notice about the data display? Can you explain this?

Chapter 14– System Architectures 14-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
14.3 Server Synchronisation
When a main server is shut down, all the roles of the main server will be assumed by
the standby server on detection of the shutdown (or failure).

Since the databases will synchronise between servers both in real time and on a
server restart, we can verify the operation of the synchronisation between servers
after shutting down and restarting servers.

In this section, we will examine the behavior of ClearSCADA redundancy.

1. Verify that both servers are running as a redundant pair.

2. Identify your servers as Server A and Server B, selecting the current MAIN

om
server as Server A. These arbitrary labels will be used in the exercises below.

3. Verify that Server A is communicating with the RTU and accepting events from

.c
both Binary Input 1 and Analog Input 1.

ng
4. Shutdown Server A.
co
5. Verify that Server B takes over from Server A. Verify that Server B is
communicating with the RTU and accepting events from both Binary Input 1
and Analog Input 1.
an
th

Note: This will only be possible if you are using an Ethernet connection to a common RTU.
Unsurprisingly, if the serial cable is plugged into a server which is not MAIN, then comms will
ng

not be available.
o
du

6. While Server A is shutdown, delete the database on Server A by deleting the


folder location you identified in section 14.1.
u
cu

Note: Delete the current database, NOT your backup.

7. Restart Server A.

Chapter 14– System Architectures 14-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
8. On startup the server icon on Server A will be pink. Right click on the server
and select Start Database.

The following dialog will be displayed.

om
9. Select Start Database and verify that Server B will synchronise the database to

.c
the completely blank standby Server A.

This functionality of synchronising a completely blank database is used in two

ng
main areas – extension of the system to add new servers and re-synchronising
a database after a machine failure or replacement. The functionality means
co
that the system administrator only has to configure the server for redundancy
and then sit back and wait for the synchronisation to take place.
an

10. Ensure that the configuration, trends and events on the servers are the same.
th
o ng
du
u
cu

Chapter 14– System Architectures 14-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
14.4 Configuring Client Connections
Connecting our ViewX client to a server that resides on the same machine is a simple
process of starting ViewX. ViewX checks if there is a server available on the local
machine, and if there is, it connects to it and creates the registration for future use.
This however does not mean we could not have performed this process manually.

Whether we connect to a single server on our local machine, multiple servers, or just a
server on someone else machine the process is the same. A client ‘registration’ is
required, that tells ViewX what is required to connect to the servers in the system.

In this exercise, we will configure a client connection that talks to both servers in our
system and changes over automatically on the failure of one of the servers.

om
To configure the client registration:

.c
1. From the Control Microsystems ClearSCADA group in the Windows Start
Menu, select the Configure Connections option.

ng
The following dialog will be displayed.
co
an
th
o ng
du
u
cu

Chapter 14– System Architectures 14-9

CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. Click on the Add button to create a new redundant client connection.

The following dialog will be displayed.

om
.c
ng
co
3. Set the System Name to any string you choose. The name is simply the
identification used in ViewX.
an
th

Note: While the system name can be any string, on projects using embedded objects such as
trends, lists and alarms should use consistency in the system names. This is due to the fact
ng

that the system name is used to define the location of the information included in these
embedded objects.
o
du

4. On the Node A tab, set the Node Name to 127.0.0.1.


u

The Node Name is simply the network address of the server. If you are using
cu

DNS, you can use the server name, but a better approach is to use the IP
Address. This means that ClearSCADA is not dependent on Windows to
resolve the name into an IP Address for communications transfer.

5. On the Node B tab, set the Node Name to the IP address of your partner’s
computer.

6. Click OK to register the connections.

7. Close ClearSCADA Client.

Now that we have configured a redundant connection, we can open ViewX and
examine the behavior of our client connections.

Chapter 14– System Architectures 14-10

CuuDuongThanCong.com https://fb.com/tailieudientucntt
1. Restart ViewX to enable the new connections.

Notice that there are now two systems available in the Database Bar.

om
.c
ng
co
2. Verify that both ViewX clients are connected to the main server.
an

By default, ViewX will connect to the Main server if it is available. This behavior
th

can be overridden to connect to a preferred server using Node Costs.


ng

3. Shut down the Main server and verify that the clients switch automatically to the
standby server.
o
du

4. Restart the server and notice that the clients remain connected to the same
machine.
u

5. Modify the client registration so that connection to the local server i.e.
cu

127.0.0.1, uses a node cost of 5 and the other server uses a node cost of 6.

The Node Cost is a hard coded number used on a per connection basis that
tells ViewX which server to attempt to connect to first. The server connection
with the lowest cost will be used first, and if that connection is unavailable, then
ViewX will connect to the other server.

6. Restart ViewX and note that both clients are connected to their local servers.

7. Shutdown and then restart each server in turn and note the behavior of each of
the clients.

8. In the client registration, enable the Compress option to each server.

Chapter 14– System Architectures 14-11

CuuDuongThanCong.com https://fb.com/tailieudientucntt
The Compress option enables compression of the data transfer between client
and server. This simply ‘zips’ the data being transferred at the client before
being unzipped at the server for client to server comms and vice versa. This is
typically used on slower speed links.

9. Restart ViewX and see if there is any noticeable difference in the speed of
connections.

Would you expect to see any changes?

10. Use the Server Links tab in the Server Status dialog to try and determine the
amount of data compression used between your client and the server.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 14– System Architectures 14-12

CuuDuongThanCong.com https://fb.com/tailieudientucntt
14.5 Exercises
1. Connect to another computer in the room and verify that you can see their
database.

2. Make some changes to a database on another machine. What do you notice


about the logon dialog options when you choose File – Log On?

3. Try and work out who made modifications to your system and what those
modifications are.

4. Try and make a change to a system so the user of that system cannot see the
change you made. Be sneaky!

om
14.6 Exercises (Advanced)

.c
1. What happens when you disconnect the cable between two servers?

ng
2. How can you work out which server will become main and which will become
standby after a main-main situation? Test your theory.
co
3. What does the server setting ‘Arbitration Priority’ do?
an

4. What does the server setting ‘Action On Isolated’ do? When might this feature
be used? Test this functionality.
th
o ng
du
u
cu

Chapter 14– System Architectures 14-13

CuuDuongThanCong.com https://fb.com/tailieudientucntt
14.7 Restoring the Database
The final step in this section is to turn off redundancy and restore the original
configuration we were using prior to investigating redundancy.

To restore the database:

1. In the Server Configuration, set the redundancy type to Lone Server.

2. Shutdown the server as required.

3. Delete the current database folder identified in section 14.1.

om
4. Rename the backup folder made in section 14.1.

As described previously, the location of your files depends on the operating

.c
system. For example, for Windows XP, rename

ng
C:\ Documents and Settings\All Users\Application
Data\ControlMicrosystems\ClearSCADA\Database_Backup
co
to
an

C:\ Documents and Settings\All Users\Application


Data\ControlMicrosystems\ClearSCADA\Database.
th

The name you rename the folder to, should be the same name as the folder
ng

deleted in Step 3.
o

5. Restart the server and verify it is running correctly and all data from your
du

original database is available as expected.


u
cu

Chapter 14– System Architectures 14-14

CuuDuongThanCong.com https://fb.com/tailieudientucntt
15 Reports
Reports in ClearSCADA are typically generated using Crystal Reports, though
standard, open interfaces allow reporting using any OPC or ODBC compliant client
application. Applications other than Crystal Reports generate reports external to
ClearSCADA, whereas ClearSCADA contains everything required to run and display
reports within the ClearSCADA application.

Crystal Reports is a package specifically designed for creating reports using standard
ODBC interfaces. The following sections will introduce some of the concepts of using
ClearSCADA and Crystal Reports. This chapter is not an exhaustive course on report
generation, but servers as an introduction to the integration between ClearSCADA
and Crystal Reports.

om
15.1 ODBC DSN

.c
Since Crystal Reports is just an ODBC client of the ClearSCADA database, we need
to configure an ODBC DSN (Data Source Name) using the ClearSCADA Database

ng
Driver. co
To configure the ClearSCADA DSN:
an

1. Open the Server Configuration dialog by right clicking on the server icon and
selecting Configuration.
th

2. Navigate to the Global Parameters – Crystal Reports section.


ng

The following information can be seen.


o
du
u
cu

3. Configure the DSN as ClearSCADA and click the setup button.

The Windows ODBC DSN dialog will be displayed as below.

Chapter 15 – Reports 15-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
ng
4. If no ClearSCADA DSN exists on the System DSN tab, then we need to add a
System DSN. Click the Add button, select the Control Microsystems
co
ClearSCADA Driver and configure the DSN as in the following window.
an
th
o ng
du
u
cu

The name field is an arbitrary name used for the database connection. The
name in this case must match the name of the DSN for Crystal Reports we
defined in the server configuration dialog – in this case “ClearSCADA”.

The System will list the available connections to ClearSCADA databases as


defined in the Configure Connections dialog. The same mechanism is used

Chapter 15 – Reports 15-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
regardless of whether the ClearSCADA database is on the same machine or
remote to the client.

Local Time determines whether or not ClearSCADA returns all data in local
time format. If left unticked, ClearSCADA will return all times in UTC.

The Login username and password should be left blank and configured on
each report as required. If users are configured at this point, any user can
connect to the database without needing valid user accounts as the DSN would
already have a valid DSN as part of the configuration.

5. Close all ODBC DSN windows and return to the ClearSCADA Server
Configuration dialog.

om
With changes to the DSN used by Crystal Reports, it is necessary to restart the
Crystal Reports driver to have it pick up the change.

.c
To restart the Crystal Reports driver:

ng
1. Open the server status by right clicking on the server icon and selecting Status.
co
2. From the General section on the left hand side, select the Modules list.
an

The following window will be displayed.


th
o ng
du
u
cu

3. Right click on the CrystalReports driver, and from the displayed menu, select
the Restart option.

You will see the state of the driver change from Running, to Starting and then
Running. (It may be too quick to notice the change)

4. Close the status dialog.

Chapter 15 – Reports 15-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
15.2 Point List
As an introduction, we will begin by creating a simple report that lists all the point
objects in our system, along with their current value and the time that they were last
updated.

To create the report:

1. Create a new group in the database named Training.Reports.

2. Create a new Crystal Report object in the Reports group in the Training group
and name it Point List.

om
The Crystal Report option can be found under the ‘Other’ section.

3. Double click on the report in the ViewX Database Bar to open the report inside

.c
the Crystal Reports Development Environment.

ng
The window shown below is the Crystal Reports application which can be used
to create, modify and view reports before they are saved into ClearSCADA.
co
an
th
o ng
du
u
cu

Chapter 15 – Reports 15-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
4. From the Database menu, select Database Expert.

The following dialog will be displayed allowing selection of the tables to be used
for the report.

om
.c
ng
co
an
th
o ng

5. Expand the ClearSCADA connection under “My Connections” to view the list of
du

available tables.
u

The tables are categorized into logical sections according to their table owner.
cu

Chapter 15 – Reports 15-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Expand the Core group and double click on the table CDBPoint.

CDBPoint should be displayed in the right hand side of the window.

om
7. Click OK and the table will be added to the report.

.c
The table detail can be viewed through the use of the Field Explorer on the

ng
right hand side of the Crystal Reports window.
co
an
th
o ng
du
u

8. Open the Database Fields in the Field Explorer and drag the FullName and
cu

CurrentValueFormatted properties into the Details section of the main report.

The image below shows what may be seen.

Chapter 15 – Reports 15-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
9. View a preview of the report in Crystal by clicking the Print Preview icon on the
toolbars.

- Print Preview

10. When you are happy with the report, click the save icon and close the Crystal
Report.

The report is automatically saved as an object inside the ClearSCADA


database. There is no longer any requirement to use the actual Crystal
Reports software unless you wish to change the configuration of the report
itself.

om
11. From the report Object menu in ViewX, select Generate Report.

.c
12. Use the status bar, event list or view dialog to verify that generation was
successful and once it is complete, select Display from the report object menu
to display the report.

ng
13. Verify that the values shown for points in the report match the values of the
co
points in the database.
an

14. Close the report.


th

15. Change the value of one or more of the points on the outstation. Regenerate
the report and verify that the values in the report change as expected.
ng

16. On the mimic Training.Reports.Default, display the current status of the


o

Crystal Reports as well as buttons to Generate and Display the report.


du

Note that Generate is a method, while to display the report you will need to
hyperlink to it.
u
cu

You should see something similar to the image shown below.

Chapter 15 – Reports 15-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
15.3 Exercises
1. From the report which is displayed, export the report to a pdf document.

2. Modify the report to include the time the point was last updated and the quality
of each data value.

15.4 Exercises (Advanced)


1. Insert a page number that appears on the bottom of each page of the report.

2. Add a comment to the report such as “End Of Report” that appears at the very
end of the report after all data is displayed.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 15 – Reports 15-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
15.5 Report Properties
The report object in ClearSCADA, like other objects, contains a number of properties
that control its behavior. There are a number of these properties we will look at to
demonstrate the functionality of the reporting interface.

15.5.1 Report User


As described previously, a ClearSCADA DSN should never contain a username and
password that provides access into the ClearSCADA database. This opens up a
mechanism whereby unauthorized users may be able to gain access to the system
when this was not what was intended.

om
When security is implemented on a system such that Read permissions are removed
from the Everyone user on objects in the database, Crystal Reports (and other
external interfaces) will not be able to read data out of the system as they will not have

.c
the necessary permissions to view that information.

ng
ClearSCADA report objects provide a report user where a user will be connected to a
Crystal Report that has sufficient permissions to view the required information. When
co
the report is generated, the credentials of the report user are passed to the server to
logon to the database with sufficient permissions to retrieve the required information.
This allows the general DSN to be locked down, while still allowing the report to obtain
an

the information it needs.


th

To demonstrate this functionality, we first need to remove read permissions from the
Everyone user in our database such that our reports will fail to generate any real data.
ng

The engineer user created in the security chapter will be used to authenticate the
connection into ClearSCADA for our report.
o
du

To setup the report user:


u

1. On the Root object in the database, open the Security dialog.


cu

2. Remove the Everyone user and click OK.

3. Ensure no users are logged in to ViewX.

4. Try to open the tree to view the contents of the database.

You should be prompted for a username and password since the Everyone
user does not have Read permissions on the database.

5. Log on as the user Engineer and try to generate the report.

How much data is in the report?


Does this match up with the security settings configured?

Chapter 15 – Reports 15-9

CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Configure the report properties to attach the user Engineer to the report.

7. Regenerate the report and display it.

Notice that the data is now available.

om
Typically systems will have security setup such that a report user is required.
In many cases, a specific user account is setup that has read permissions and
little else that is used for report generation.

.c
8. Reset the security on the Root group such that the Everyone user has Read,

ng
Browse and View Alarms permissions.
co
15.5.2 Historic Life
an

One issue often encountered with the generation and manipulation of reports is how to
th

store them once they have been generated so that they can be referred to at a later
date. ClearSCADA contains a built in feature to allow the historic storage of reports.
This storage can last for a configurable period of time and automatically stores each
ng

report on each redundant server in the system. For example, in a main-standby


redundant pair of servers, old reports are stored on both servers so that data is not
o

lost in the event of a failure of a computer.


du

Historic life is on a per report basis, so if the report you have generated is only one off,
u

‘snapshot’ type data with no historic requirement, then this feature is not needed. But
cu

for those reports where history is important, this feature makes it easy.

To make use of the reports historic life:

1. On the properties of the report, display the Historic tab.

Chapter 15 – Reports 15-10

CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. Tick the Enabled box.

3. Set the Life to 1W.

This tells ClearSCADA to maintain in history 1 week of reports and then discard
them once they are older than this window.

4. Generate the report. Do not display it.

5. Change the state of the Running input on the outstation.

This will update the value of the point the next time that the report is generated.

om
6. Generate the report again.

.c
7. Display the report and notice the dialog that is displayed.

ng
co
an
th
o ng
du
u
cu

Once a report with historic storage enabled has been generated more than
once, ClearSCADA automatically tracks when it was generated during that
period and makes each of those reports available to users of the system.

So wherever the users sit in relation to the server, all reports are available for
viewing.

8. View each of the reports and verify the point modified is reflected correctly in
the displayed report.

Chapter 15 – Reports 15-11

CuuDuongThanCong.com https://fb.com/tailieudientucntt
15.5.3 Exporting of Reports
Native Crystal Reports functionality allows for exporting of reports to numerous
formats. Some of these include:

 Adobe Acrobat PDF


 HTML
 Microsoft Word
 Microsoft Excel
 Other ODBC databases
 RTF Document
 CSV Document
 And others…

om
It also provides support for exporting to disk and to mail clients. The benefit of this is

.c
that the data format and the destination of the data can be combined to do some very
simple, but very powerful functions that is very difficult to achieve in some other
SCADA systems.

ng
In this section we will configure a report that is exported to a location on our computer
co
in pdf format.
an

To export the report in pdf format:


th

1. In the report properties, display the Export Format tab.


o ng
du
u
cu

2. Select the Adobe Acrobat format.

Chapter 15 – Reports 15-12

CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Display the Export Destination tab and configure the settings as per the image
below.

4. Save the report configuration.

om
5. On the report object menu, select the Export Report option now available.

.c
6. Verify that the report is exported as expected.

It is possible to take this further such that when a report is exported, trip characters

ng
are used to auto generate the filename to avoid files being generate with the same
name and overwriting old reports.
co
See the section “Specify a Trip Sequence for a Report Object” in the online help for
an

full details on the use of trip characters.


th

To configure the report export destination using trip characters:


ng

1. Open the report properties to the Export Destination tab.


o
du

2. Set the File Name to


c:\ClearSCADA Reports\Report_%DyyyMMdd%_%THHmmss%.pdf
u
cu

3. Verify that the file is exported using the current date and time in the filename.

Chapter 15 – Reports 15-13

CuuDuongThanCong.com https://fb.com/tailieudientucntt
15.5.4 Viewing Reports in WebX
ClearSCADA provides a facility whereby the latest generated report can be viewed in
WebX in the same way it can be viewed in ViewX. This is enabled by turning on the
“Generate for WebX” option in the report properties.

om
Once enabled, ClearSCADA will create a pdf version of the report each time the
report is generated. This report can then be displayed in WebX either through the

.c
object menu, a hyperlink or through the database explorer.

ng
15.5.5 Exercises co
1. Enable the Generate for WebX option and verify that the latest report is
available for viewing in WebX.
an

2. Create a mimic hyperlink that links to the latest report. Verify that it works in
ViewX and WebX.
th
o ng
du
u
cu

Chapter 15 – Reports 15-14

CuuDuongThanCong.com https://fb.com/tailieudientucntt
15.6 Scheduling Reports
It is typical to build reports into a system that need to be generated according to some
schedule. In ClearSCADA this is simple to do using a schedule object. A schedule
allows you to tie a generate, print or an export of a report to a specific time of day, day
of week etc so that the ClearSCADA server will automatically run the report as
appropriate without any further user interaction.

To schedule automatic report handling:

1. Create a new schedule object in the Reports group and name it Report
Schedule.

om
The Schedule object can be found in the Other section.

2. Double click on the schedule to open it up for editing.

.c
The following screen will be displayed.

ng
co
an
th
o ng
du
u
cu

The top section of the schedule allows for defining what times to run specific
actions at. The bottom section is used to define which actions will be run at
those times.

3. Drag the Point List report onto the schedule and into the bottom section of the
window.

Chapter 15 – Reports 15-15

CuuDuongThanCong.com https://fb.com/tailieudientucntt
4. From the window displayed, select the Export Report method and press OK.

om
.c
ng
co
5. In the top section of the window, double click on the times where you want the
report to be exported.
an

Configure a time in the next couple of minutes so you can verify that the report
th

exported as expected.
ng

You can add more than one time to the schedule and more than one action that
will run at each time.
o
du
u
cu

Chapter 15 – Reports 15-16

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Note: Schedules can be used to automatically run any method on any object in the database.
For example, you may communicate with an RTU based on a schedule, or run some IEC logic
to perform some calculations periodically. You could use it to do something as simple as
acknowledging alarms. Any Method on any object is available.

6. Verify that the report exports at the time configured on the schedule.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 15 – Reports 15-17

CuuDuongThanCong.com https://fb.com/tailieudientucntt
15.7 Changing the Look of Your Report
Since not everyone wants their report to look the same, Crystal Reports provides a set
of tools that allows the user to create reports with their own custom look and feel.
While this can be done down to the last detail, one of the simplest ways to do this is to
use the built in templates provided in Crystal. These templates cover a range of styles
and allow the look of the report to be changed very quickly.

To configure the report to use a template:

1. Open the Point List report for editing in Crystal Reports

2. In the Report menu, select the Template Expert.

om
The following window will be displayed.

.c
ng
co
an
th
o ng
du
u
cu

3. From the list of available templates, choose a style that suits your report and
click OK.

4. Save the report and display it in ClearSCADA.

The built in templates in Crystal Reports allow you to quickly change the look
and feel of a report. Crystal Reports allows you to configure your own report
templates so that you can very quickly obtain your corporate look and feel,
while maintaining consistency across all your reports.

Chapter 15 – Reports 15-18

CuuDuongThanCong.com https://fb.com/tailieudientucntt
15.8 Creating More Complex Reports
ClearSCADA contains a number of tools designed to make reporting of historic data
easier and less time consuming. Some of these include:

 Historic Aggregates
 Data grids
 Data Tables
 Historic Views
 Historic Tags
 Historic calculations

As far as reporting is concerned, the most useful tools are the historic views, historic

om
aggregates and data grids.

.c
Historic aggregates form part of the OPC Historic Data Access (HDA) standard which
is the standard upon which the ClearSCADA historian is built. A historic aggregate
allows you to perform complex data calculations on existing data sets without needing

ng
to create more points at the PLC/RTU level of your system. Each of the features
described above makes use of historic aggregates.
co
Historic views allow a user to configure a pseudo table in the database which
an

performs specific calculations on data in the database over a specific period of time.
For example, you may configure a historic view that returns a recordset containing the
th

maximum daily value of all analogs in the system. This is very useful as it means that
the report does not need to do any calculations, but it is more inefficient in that it will
ng

calculate the aggregate for all historic points in the database.

A very useful feature is the Data Grid. The data grid essentially allows you to create a
o

table in the database where you have complete control over the format of the table
du

and the contents of each cell in that table. For example, you can configure a data grid
that shows summary information for a specific range of points in the database. This
u

table could show fields such as a five minute average, a one hour average and an
cu

hourly maximum. The report that needs to be configured to show this data will be very
simple as all it needs to do is show all records from a data grid with no manipulation of
the data required. The data grid is stored as part of the configuration of the database,
so is best used in conditions where the table definition does not change frequently.

Data tables are similar to the data grid but are stored as part of the ClearSCADA data.
For this reason they are designed to be used when the data in the table is added to,
removed or modified more frequently. Data tables can stores large numbers of
records in any format that you choose. Unlike the data grid, the data table holds on
static records i.e. you cannot use an expression in a cell to perform some calculation.
The data table is populated using standard SQL statements, which could be called
from logic, client side scripts, ODBC client applications, external applications etc.

Chapter 15 – Reports 15-19

CuuDuongThanCong.com https://fb.com/tailieudientucntt
15.9 Creating a Report to Display Historic Records
ClearSCADA historian stores all historic records in a table named CDBHistoric. Each
record is 32 bytes in length and is referenced in the database by a unique identifier
field named Id. The Id field links the historic records to the CDBPoint and CDBObject
tables to obtain full object names and other required characteristics.

When querying historic data records, an SQL database table join is required to obtain
data from both tables i.e. the name of the point from CDBPoint and the actual historic
records from the table CDBHistoric. ClearSCADA supports joins, and so Crystal
Reports is able to use an ‘INNER JOIN’ to obtain the required information.

To create a report to display historic data records:

om
1. Create a new report in the Reports group named Historic Data.

.c
2. Open the report for editing and select the tables CDBPoint and CDBHistoric.

ng
co
an
th

3. Click OK and the following screen is displayed.


o ng
du
u
cu

Chapter 15 – Reports 15-20

CuuDuongThanCong.com https://fb.com/tailieudientucntt
The screen above shows the relationship between the two tables. The Id field
of the CDBHistoric table is joined to the Id field of the CDBPoint table. It is this
link that makes the join possible.

The nice thing about Crystal Reports is that we do not have to worry about this
join in any way. Crystal Reports automatically handles the link and formatting
the SQL query so that the link is effectively transparent to the user.

4. Place the CDBPoint.FullName, CDBHistoric.FormattedValue and


CDBHistoric.RecordTime fields in the Details section of the report.

om
.c
ng
co
When querying time based records eg. Historic data, ClearSCADA expects that
data to be constrained by time to ensure that the servers are not trying to run
an

reports that will impact on the performance of the server.


th

We will also limit the historic data shown in the report to points within the
Training group.
ng

5. From the Report menu, click the Select Expert -> Record.
o
du
u
cu

Chapter 15 – Reports 15-21

CuuDuongThanCong.com https://fb.com/tailieudientucntt
The Select Expert allows us to quickly set search criteria to limit the search
results of our query. In this case, we will use the select expert to constrain the
time range of data returned by the query.

6. From the drop down list on the tab CDBHistoric.RecordTime, select Is Greater
Than.

7. In the new field that appears to the right of the drop down, enter the time for
Midnight on the first day of this course.

om
.c
ng
co
an
th

8. Click in the box at the bottom of the dialog and you will see the expression for
ng

filtering the query for a specific time range appear.


o
du
u
cu

Chapter 15 – Reports 15-22

CuuDuongThanCong.com https://fb.com/tailieudientucntt
9. Click the <New> tab.

The following dialog is displayed.

om
.c
10. Select the CDBPoint.FullName field and click OK.

ng
11. On the CDBPoint.FullName tab of the Select Expert, select Starts With from
co
the drop down.
an

12. Enter Training in the new field to the right of the drop down and select the Add
button to include this option.
th
o ng
du
u
cu

Chapter 15 – Reports 15-23

CuuDuongThanCong.com https://fb.com/tailieudientucntt
13. Click in the box at the bottom of the dialog to view the two completed filters.

14. Click OK to close the Select Expert.

15. Click on the print preview button to see the results of the query.

16. Save the report and verify its operation inside ViewX.

om
17. Add some more historic records to the database and rerun the report. Verify

.c
that the new data is added to the system.

ng
co
an
th
o ng
du
u
cu

Chapter 15 – Reports 15-24

CuuDuongThanCong.com https://fb.com/tailieudientucntt
15.10 Exercises
1. Constrain the query in the previous report to only show historic records for the
point Training.Reservoir.Level.

15.11 Exercises (Advanced)


1. Add a parameter to the report that allows the user in ViewX to specify the times
for which historic data is retrieved.

Hint: Add a New Parameter Field to the report in the Field Explorer.

Note: The following exercises require Microsoft Excel. If you do not have

om
Excel, wait for your instructor to move onto the next chapter.

2. Use the Import External Data functionality to display a complete object list.

.c
Note: In Office 2007, use the Data -> Other Data Sources -> From Microsoft
Query option.

ng
3. Add a new object to the database and refresh the list in Excel to verify that the
new object is added to the list.
co
4. Filter the list such that only objects within the Training group are displayed.
an

5. Use the query wizard in Excel to display the historic records for the point
th

Training.Reservoir.Pump 1.Running.
o ng
du
u
cu

Chapter 15 – Reports 15-25

CuuDuongThanCong.com https://fb.com/tailieudientucntt
16 Client Side Scripting
Client side scripting is a feature in ClearSCADA that allows finer control of the
ClearSCADA user interface than is provided by the built in functionality. Scripting
provides a mechanism where pick actions (as seen in the pick action wizard) can be
called from code written by the end user to provide the exact interface required.

The scripting engine is based on VBScript meaning that the language is relatively well
known, and large amounts of supporting documentation are available.

Scripting is executed on the client side, meaning it is executed on that machine


running ViewX or the web client. There is full support for the scripting interface in the
ClearSCADA web client. Script lives on the mimic, meaning it is stored on the server

om
as part of the mimic object, but executed client side when the mimic is displayed.

The scripting engine provides a number of objects that can be used for server

.c
interaction, some of which we will use in this exercise. Functionality is also provided
to create custom menus, forms, call any methods in the database, configure

ng
hyperlinks, run ViewX commands, run system commands and read and write values to
and from the registry.
co
Scripting can be called in two major ways – either as a named function or as a code
fragment. In this section, we will execute controls using both code fragments and
an

defined functions.
th

16.1.1 Code Fragments


ng

Before any scripts can be used, scripting must be enabled on the mimic.
o

To enable scripts on a mimic:


du

1. Copy the mimic Training.Pick Actions and rename it to Scripts (leave it in the
u

same group).
cu

2. Open the mimic Scripts in design mode.

Chapter 16 – Client Side Scripting Issue 1 16-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Double click on the mimic

The form below is displayed.

om
.c
ng
co
an
th

4. Set the Script Enabled tick box to Ticked.


ng

This will enable scripting on this mimic


o
du

Now that scripts have been enabled, we can write some script that will start and stop
u

our pump. We will start by writing a simple code fragment, and then expand that to a
cu

more complicated function that can be debugged and stepped through to find any
problems.

The idea of a code fragment is to allow very simple function calls to be made. Since
code fragments can’t be debugged, it is important to keep the code fragment simple to
avoid errors, which can be more difficult to find. Defined functions are used when
more complicated code is required.

1. Add a button to the mimic in place of the existing Start and Stop buttons.

2. Set the caption on the button to Start/Stop (Script)

Chapter 16 – Client Side Scripting Issue 1 16-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Right click on the button an select Pick Action Wizard

The following screen is displayed

om
.c
ng
co
4. Select Script and click on Next.
an

The following screen is displayed.


th
o ng
du
u
cu

Chapter 16 – Client Side Scripting Issue 1 16-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5. Select Execute Code Fragment as the Mode and enter the following code
extract in the Code box.
if Server.GetOPCValue(".Pump 1.Start") =1 then
Server.SetOPCValue ".Pump 1.Start", 0
else
Server.SetOPCValue ".Pump 1.Start", 1
end if

The functions Server.GetOPCValue and Server.SetOPCValue are


ClearSCADA specific functions.

Server.GetOPCValue(TagName) - returns the value of the object property


TagName. TagName can be a property of any object in the database.

om
Server.SetOPCValue TagName, Value - sets the object property TagName to

.c
Value.

ng
co
an
th
o ng
du
u
cu

Note: In vbscript, brackets are only used for function parameters when a value is being
returned from the function call.

6. Click Next to continue, Next again and Finish to complete the pick action.

7. Put the mimic into run mode and verify the correct operation of the button.

If Pump Start is off, Pump Start should be turned on. If it is currently on, it
should be turned off.

Chapter 16 – Client Side Scripting Issue 1 16-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
16.1.2 Defined Functions
As well as writing ad-hoc code in a code fragment, it is also possible to write a
reusable VBScript function into which parameters can be passed to define its
operation.

1. With the mimic in design mode, right click on the mimic, and from the displayed
context sensitive menu, select Edit Script... to display the script editing
environment.

The window below is displayed.

om
.c
ng
co
an
th
o ng

2. Enter the following text into the script editor.


du

sub ConditionalControl(sPointName)
if Server.GetOPCValue(sPointName) = 0 then
u

iConfirm = MsgBox("Start the pump?", vbOKCancel, "Confirm")


if iConfirm = 1 then
cu

Server.SetOPCValue sPointName, 1
end if
else
Server.SetOPCValue sPointName, 0
end if
end sub

Note that the use of “.Pump 1.Start” has been replaced with the parameter
sPointName. sPointName will be passed into the function by the Pick Action
Wizard.

Chapter 16 – Client Side Scripting Issue 1 16-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
3. Save the script and close the script editor.

ng
If there are any errors indicated when the script is saved, resolve the errors. If
co
necessary, talk to your instructor.
an

The script itself is now complete. The next step is to configure a pick action that will
th

actually call the script function to execute.


ng

To call the script:

1. Create a second button on the mimic and enter the caption Start / Stop
o

(Function).
du

2. Configure a Script pick action on the button with settings as shown below.
u
cu

Chapter 16 – Client Side Scripting Issue 1 16-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
The Permission field is used to associate a security permission with the calling
of the script action. A user will be permitted to execute this command if they
have Configure permission on the mimic on which the script resides.

3. Click Next.

The following will be displayed.

om
.c
ng
co
an
th

4. For the sPointName parameter, pass in ".Pump 1.Start.FullName" which is


ng

the evaluation of the point name in the database. This is the preferred method
as it will cope with any changes in the point name in the database.
o
du

5. Click Next to continue, Next again and Finish to complete the pick action.

6. Save the mimic and put it into run mode. Verify the correct operation of the
u

button.
cu

If Pump Start is off, Pump Start should be turned on if OK is selected on the


dialog shown below. If the user selects Cancel, no controls should be sent to
the RTU.

If Pump Start is on, Pump Start should be turned off without confirmation.

Chapter 16 – Client Side Scripting Issue 1 16-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Note: This code was used as an example to show how scripting can be used. ClearSCADA
contains built in functionality to accept operator confirmations on each point in the database.
Further information on this functionality can be found in the online help.

If a second pump was configured, the same code could be called using a
different point name as the parameter.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 16 – Client Side Scripting Issue 1 16-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
17 Communications Diagnostics
ClearSCADA provides an enhanced set of driver diagnostic tools to make debugging
of communications issues much simpler. The diagnostic tools are a function of the
driver executable. The features available consist of a telnet service to see live
diagnostic information, driver logs and a driver log translator that displays the driver
protocol information in plain English.

In the following sections, we will look at these tools in the context of the DNP3
protocol we have been using to connect to the outstation.

17.1 Driver Telnet Sessions

om
In this section we will use telnet to monitor communications information between
ClearSCADA and the outstation.

.c
To enable Telnet on the driver:

ng
1. From the Training.Channel object menu, select Enable Telnet.
co
The following dialog will be displayed.
an
th
o ng
du
u

2. Select OK. Leave Port at 0 so that ClearSCADA will auto assign the telnet port
cu

number to be used.

Chapter 17 – Communications Diagnostics 17-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. From the channel View Status dialog, determine the port on which the telnet
server has been enabled.

om
.c
ng
co
an

4. From the Windows Run command, enter the string telnet 127.0.0.1 <port>,
without the angled brackets and with the port number found on your View
th

Status dialog.
ng

In the example above, the command would be telnet 127.0.0.1 50768


o
du

Note: On Windows 7, telnet is not enabled by default. It can be turned on by adding


Windows components through the Programs section of the Control Panel.
u
cu

Chapter 17 – Communications Diagnostics 17-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5. Once the telnet session is open, within a short period of time you should start to
see communications between the outstation and ClearSCADA.

A typical session would look like the following window.

om
.c
ng
co
an

6. Hit the ‘m’ key to display the menu. This menu can be used to filter the display
to only selected outstation communications messages.
th

This window is useful for simple diagnostics such as whether or not


ng

ClearSCADA is attempting to communicate, and/or whether the RTU is


responding. Unless you are familiar with the actual DNP3 protocol on a byte
o

level, this is not very useful for detailed diagnostics.


du

7. Hit the ‘q’ key to quit the telnet session. Then exit from the command session.
u
cu

Chapter 17 – Communications Diagnostics 17-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
17.2 Driver Logs
The information that is displayed in the telnet session is also available in saved driver
logs. ClearSCADA provides two different types of communications logs that can be
used in different situations.

Comms logging provides a record of all incoming and outgoing valid packets. IO
logging provides a record of all communications on the channel, whether it is valid or
not. The IO log may contain messages such as Rejected where invalid bytes are
discarded.

To enable driver comms logging:

om
1. On the object menu of the Training.Channel, select both the Enable Comms
Logging and Enable IO Logging options.

.c
2. Open the Server Status dialog and navigate to the General - Modules page.

ng
3. Right click on the DNP3 driver entry, and select Logging...

4. Click on the Configuration tab.


co
The following screen will be displayed.
an
th
o ng
du
u
cu

5. Note the File Base path – this is where the log files for the DNP3 driver are
stored.

The last part of the File base, in this case DriverDNP3, indicates that driver log
files for the DNP3 driver will have a filename starting with DriverDNP3 for easy
identification.

Chapter 17 – Communications Diagnostics 17-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. After a period of time, look in the folder location described in File base for
DNP3 log files.

7. Open the files and examine the contents of the logging that ClearSCADA is
doing.

The log file contents will be similar to the logging shown in the telnet session. It
obviously requires a level of understanding of the driver protocol itself.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 17 – Communications Diagnostics 17-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
17.3 DNP3 Translator
The ClearSCADA driver translator provides a means where ClearSCADA will take
complex driver logs containing raw driver bytes, and translate this information into a
html document which displays the communications interactions in a simple, easier to
understand format.

The driver translator is available for all Advanced Drivers, and each is configured as
described in the following steps.

Note: Some drivers have additional options that should be used when translating. For
example the SCADAPack Modbus driver has additional switches for EXTENDED addressing

om
modes. Run the driver at the DOS command line with the /? switch to see all available
options.

.c
It is recommended to use the Translator Picker Utility for translating ClearSCADA
Comms and IO logs. Information on the setup of this utility can be found in the

ng
Control Microsystems Resource Centre. Your instructor will provide the Translator
Picker Utility for use in this course.
co
17.3.1 Setting up the Translator for Windows 2000/XP/2003
an

To configure the driver translators for ClearSCADA:


th

1. Copy the TranslatorPicker.exe utility received from your instructor onto your
ng

PC. The following location is recommended:


o

“C:\Program Files\Control Microsystems”


du

2. In Windows Explorer, select the Tools -> Folder Options menu option.
u

3. Open the File Types tab.


cu

Chapter 17 – Communications Diagnostics 17-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
4. Select the LOG file type and click Advanced.

om
.c
5. Create a new action named Translate (Default)

ng
6. In the Application path, browse to the file TranslatorPicker.exe and then
append the string
co
/TRANSLATE "%1" /OPEN
an

Note the spaces between each of the three elements.


th

The complete string should look like the following:


ng

"C:\Program Files\Control Microsystems\TranslatorPicker.exe" /TRANSLATE


o

"%1" /OPEN
du

7. Close the Window.


u

8. Repeat Step 4 and 5, only this time create a new action named Translate
cu

(Options) and append /OPTIONS to the end of the application path string.

The complete string should look like the following:

"C:\Program Files\Control Microsystems\TranslatorPicker.exe" /TRANSLATE


"%1" /OPEN /OPTIONS

9. Close the windows until you are back to the Windows Explorer window.

Chapter 17 – Communications Diagnostics 17-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt
17.3.2 DNP3 Translator for Windows Vista/7/2008
To configure the driver translators for ClearSCADA:

1. Copy the TranslatorPicker.exe utility received from your instructor onto your
PC. The following location is recommended:

“C:\Program Files\Control Microsystems”

2. Download Nirsoft file types manager from


http://www.nirsoft.net/utils/file_types_manager.html

Your instructor should be able to supply this file.

om
3. Run ‘FileTypesMan.exe’

.c
ng
co
an
th
o ng
du
u
cu

4. Scroll down the list of extensions to find the ‘log’ extension. You may need to
create it if it doesn’t exist.

5. Select the ‘log’ extension and select the Actions -> New Action menu item to
add a new action.

6. Fill in the details as per the screen below.

Action Name – Translate (Default)


Menu Caption - Translate (Default)

Chapter 17 – Communications Diagnostics 17-8

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Command Line – "c:\Program Files\Control Microsystems\TranslatorPicker.exe"
/TRANSLATE "%1" /OPEN

om
.c
ng
7. Add a second new action to the log extension as follows.
co
Action Name – Translate (Default)
Menu Caption - Translate (Default)
an

Command Line – "c:\Program Files\Control Microsystems\TranslatorPicker.exe"


/TRANSLATE "%1" /OPEN /OPTIONS
th
o ng
du
u
cu

To allow the Translator options to be specified:

1. Locate TranslatorPicker.exe in Windows Explorer.

2. Right click on the executable file and select Properties.

Chapter 17 – Communications Diagnostics 17-9

CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Select Compatibility tab and tick Run this program as an administrator.

om
.c
ng
co
an
th
o ng
du
u
cu

Chapter 17 – Communications Diagnostics 17-10

CuuDuongThanCong.com https://fb.com/tailieudientucntt
17.3.3 Using the Translator to Analyze DNP3 Logs
Once the translators are configured, it is very simple to translate any comms or IO log
that has been created.

1. Browse to the comms and IO logs you found in section 17.2. Right click on one
of the logs and select Translate (Default).

An html document will open with the translated log.

The translator creates two sections in the log. The first section (at the bottom
of the file) is a summary of communications. This provides a quick reference to
all the messages that occurred between the outstation and ClearSCADA. All

om
the frames are hyperlinked to link to the detail of the particular frame. The
image below shows an extract of the comms summary section.

.c
ng
co
an
th
o ng
du
u
cu

The second section of the translated log (at the top of the log file) provides
much more detail on the content of each frame that is transmitted. This
provides information such as the size of the data transfer, the raw bytes, the
station address, the transmitted and/or received messages, CRCs and
message headers. Each message provides a hyperlink to the next message in
the sequence. All event data is shown in tabular form in the received message
to verify event integrity as well as current values for class 0 polls.

Chapter 17 – Communications Diagnostics 17-11

CuuDuongThanCong.com https://fb.com/tailieudientucntt
om
.c
ng
co
an

2. Taking note of the current time, disconnect the comms cable to the outstation
and wait for the communications status to fail. Translate the DNP3 driver log
th

and using the comms summary in the log, determine the messages that were
transmitted between ClearSCADA and the outstation.
o ng

17.4 Exercises
du

1. Disconnect the connection to the outstation. Trigger binary input 1 three or four
times such that some events are generated. Reconnect the cable, translate the
u

DNP3 driver logs and verify that the events in the event list for that point match
cu

the event information shown in the driver log.

17.5 Exercises (Advanced)


1. Verify that the timeouts and retries specified in ClearSCADA matches what is
seen in the translated driver log when communications is broken.

Chapter 17 – Communications Diagnostics 17-12

CuuDuongThanCong.com https://fb.com/tailieudientucntt
18 Alarm Redirection
Alarm Redirection is a facility in ClearSCADA allowing alarm conditions to be the
trigger for some other action to occur. In the most common applications, alarm
conditions would be sent to a pager device or mobile telephone via SMS. While this
functionality is supported natively in ClearSCADA, alarm redirection encompasses
more than just mobile devices.

Alarm redirection is a facility which allows any alarm condition to trigger different
actions:
 Pager/SMS message
 Email message
 Change alarm priority

om
 Database Methods
 System commands
 Set alarm responsibility

.c
The Pager/SMS message will send a message in one of two ways:

ng
 Using the TAP or UCP service provided by your local phone service provider.
 Using a GSM modem connected to the server to send SMS message directly to
co
a mobile phone.
an

In either case, messages can be customised to include information required for that
alarm condition using trip characters that substitute for an actual property value. We
th

will look at trip characters in more detail in the following exercises.


ng

Email messages can be sent by ClearSCADA to notify a user of an alarm condition


occurring. ClearSCADA is able to send and receive emails using POP3 for receipt
o

and SMTP for sending. Through the use of alarm views, ClearSCADA can embed
du

actual mimics inside emails, providing the same functionality within the email client as
is available through the WebX client. Once again, trip characters can be used to
provide customisation of a single email action object to allow for multiple alarms.
u
cu

Change alarm priority actions allow for a change in the priority of a triggering alarm if
no action occurs within a certain time period. This can either be by changing the
alarm to a new (fixed) priority level or by raising the priority by a certain number of
levels.

Note: Changing an alarm priority does not cause new alarm redirections to be generated. It
simply escalates the priority of current alarms in the system.

A method action allows any method on any object in the database to be triggered as
the result of an alarm condition. This will take the form of one of the preconfigured
actions on an object, but also allows for IEC logic to be executed as required to
perform calculation on datasets as alarm conditions occur. One very simple example
of a method action is in the case where a snapshot report is exported each time

Chapter 18 – Alarm Redirection 18-1

CuuDuongThanCong.com https://fb.com/tailieudientucntt
certain alarm conditions occur (Export method). This can be used to provide someone
in the system with a snapshot report of all those conditions that may have contributed
to the alarm.

System commands allow operating system commands to be executed in response to


an alarm condition occurring. This is useful where an external application may be
triggered to manipulate or move data as a result of the alarm.

An alarm can be assigned to a workstation or specific user once it is activated. This


allows an alarm to be the specific responsibility of a particular user, or of a user
logged into a particular workstation in the system. User based alarming is useful for
alarms that require actions to be executed by a certain level of user, where
workstation based alarms are useful in control room environments where alarm

om
management is handled in the control room at particular consoles.

Alarm redirections are hierarchical. Redirections can be configured on a single object

.c
in the database, or on a group level. If they are configured on a group level, they are
automatically used for each object in that group. When checking for an alarm

ng
redirection, the object will first look at its own configuration, and will then continue
checking up the tree to the Root group until it finds any configured alarm redirections
co
which it may need to apply.
an
th
ng

Basic redirection support allows for redirections to be triggered based on the following:
 Trigger type – whether the alarm redirection can be manually initiated by users
o

or only triggers as a result of the alarm condition occurring.


du

 Trigger state – what alarm state triggers this redirection


 Severity range – what alarm range must the point fall within to trigger the
u

redirection.
 Direction – determines if the alarm should be redirected when going toward
cu

normal or away from normal (or both).


 Abort state – what alarm state causes the redirection to be aborted eg. The
alarm is acknowledged
 Time range – during what time of day should this redirection occur.

Once the redirection is triggered, it then waits the delay period before executing the
action.

More advanced redirection options allow for calendar based redirection, where days of
the week and the types of days eg. Public holidays, determine the redirections that will
occur.

In the following exercises, we will configure an email redirection to notify us when the
binary input 1 turns on and when the analog input 1 rises above 60%.

Chapter 18 – Alarm Redirection 18-2

CuuDuongThanCong.com https://fb.com/tailieudientucntt
18.1 Configuring ClearSCADA to Send Emails
The first step in allowing emails to be sent for alarm conditions is to make sure that an
email server and client account is correctly configured. Before starting the following
exercises, work with your instructor to configure email accounts for your ClearSCADA
server and your user who will receive the emails. Ensure that both accounts work by
using an email program such as Outlook Express to send emails between your two
accounts and other members of the class.

Before we can send an email as an alarm redirection, we need to configure


ClearSCADA to be able to send emails. The email settings as a server setting and so
we configure the settings as follows:

om
1. Open the Server Configuration dialog

2. Navigate to System Configuration – E-Mail

.c
ng
co
an
th
o ng
du
u
cu

3. Configure the settings as specified in the following table.

Section Parameter Setting

Outgoing Mail Server IP Address as provided by your instructor

Name ClearSCADA Server

Email Address your_server@csmail.com

4. Apply the changes and close the Server Configuration Dialog.

Chapter 18 – Alarm Redirection 18-3

CuuDuongThanCong.com https://fb.com/tailieudientucntt
5. Open the properties of the Engineer user, and on the Contact Information
tab, set the Email Contact 1 address to be the email address supplied by the
instructor. (eg: your_user@csmail.com)

The server now knows how to send the emails and our user now has an
address of where those emails should be sent.

18.2 Configure the Email Action


Before we can send an email or configure the redirection, we need to determine what
the contents of the email should be and then configure an email action to contain
those details.

om
To create an email action:

.c
1. Create a new group in the database named Training.Redirection.

ng
2. In the Redirection group, create an E-Mail Action and name it Email.
co
The Email Actions can be found in the Alarm Redirection Actions Group.

3. For the properties of the email, configure the following settings:


an
th

Property Setting

To Training.Security.Engineer
ng

Subject Reservoir Pump 1 Running is On


o

Message Binary Input ‘Pump 1 Running’ is on.


du
u
cu

Note: Redirections can be sent to individual users, a group of users or a duty user from a
user roster. This roster allows the redirection to be sent to the person currently responsible
for the alarm rather than a fixed user or large group of users.

Chapter 18 – Alarm Redirection 18-4

CuuDuongThanCong.com https://fb.com/tailieudientucntt
18.3 Configure the Redirection
Now that we have an action configured, we can attach this to a particular alarm
condition.

1. Open the point Training.Reservoir.Pump1.Running and configure the first


redirection on the Redirection tab with the following settings.

Property Setting

Enabled Yes

Trigger Type Auto

om
Trigger State Unacknowledged Uncleared

Action Training.Redirection.Email

.c
Low Severity Low

ng
High Severity Critical

Direction Either
co
Delay 30S
an

Abort State Acknowledged


th

Active From 0:00

Active To 0:00
o ng
du
u

Enabled – enables the redirections on this object


cu

Trigger Type – allows for automatic redirection, manual redirection or a


combination of both automatic and manual.
Trigger State – configures this redirection so that it is active only when the point
alarm condition is active and unacknowledged.
Action- the email action we previously configured
Low & High Severity – this action will be triggered for the full range of alarm
severities. If the point had many independent alarm limits, we could configure
this so only a certain range of critical alarms redirected. If the action was
configured on a group, only those objects in the group with alarms of a
sufficiently high severity would be redirected.
Direction – determines whether the redirection should be sent when the alarm
is going towards the normal state or away from it or is sent in both directions.
Delay – wait 30s after the trigger state becomes true before performing the
redirection.
Abort State – abort the redirection if a user has acknowledged the alarm.

Chapter 18 – Alarm Redirection 18-5

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Active Times – run the redirection all day.

2. Save the configuration and close the point configuration form.

3. Modify the point Training.Reservoir.Pump1.Running such that the Running


(On) State is a High Severity alarm and the Off State is not alarmed or
evented.

Note: It is not necessary to configure the point with an alarm and event for the two states.
ClearSCADA will automatically generate an event any time that the point state moves into or
out of an alarm condition. By setting the off state to event, you will create duplicate entries in
the event journal.

om
4. Open the Server Status dialog and view the Alarm Redirections tab.

.c
ng
co
an
th
o ng
du
u
cu

Note: If the Alarm Redirections window is blank after triggering the alarm, review your
configuration to ensure that the user has been configured with an email address to which the
email should be sent.

5. Toggle the state of the Running input.

Verify that the redirection appears on the status dialog with a timer counting
down from 30s

6. Acknowledge the alarm in ClearSCADA and verify that it disappears from the
redirection list.

7. Control the point so that the alarm is cleared and then regenerated.

Chapter 18 – Alarm Redirection 18-6

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Verify that when the timer expires, an email is sent to the appropriate email account.
Use Outlook Express to verify this.

18.4 Redirection Trip Characters


Thankfully the process for sending large numbers of alarm redirections is not such that
you set up an email redirection per point. Using trip characters, we can replace the
specific point text entered into the subject and message fields of the email action with
codes that get replaced as the email is generated.

For a complete list of available trip characters, look in the online help and navigate in
the contents to the Core Reference – Alarm Redirection section.

om
To configure an email action using trip characters:

.c
1. Open the Email action configured in the previous section.

ng
2. In the subject field, enter the text %ASource% is %OCurrentStateDesc%.
co
3. In the message field, enter the text %OName% is %OCurrentStateDesc%.

4. Save the configuration.


an

5. Regenerate the alarm and verify that the message looks the same as in our
th

hard coded email.


ng

18.4.1 Exercises
o

1. Configure the point Training.Reservoir.Level to send an email (using the same


du

email action) when the value goes above 60%.


u

2. Generate an email action where the action shows the name of outstation to
cu

which the point is connected.

18.4.2 Exercises (Advanced)


1. Generate an email action that displays both the time the alarm condition was
true and the time it was received by the ClearSCADA server.

Chapter 18 – Alarm Redirection 18-7

CuuDuongThanCong.com https://fb.com/tailieudientucntt

You might also like