Professional Documents
Culture Documents
om
.c
Version 3.06 June 2011
ng
co
an
th
o ng
du
u
cu
CuuDuongThanCong.com https://fb.com/tailieudientucntt
Issue Details
om
clarifications.
.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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
feedback from Brad Hosken.
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
References
ClearSCADA Online Help
om
.c
ng
co
an
th
o ng
du
u
cu
CuuDuongThanCong.com https://fb.com/tailieudientucntt
Contacts
ClearSCADA Technical Support
om
.c
ng
co
an
th
o ng
du
u
cu
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
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
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
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
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
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:
.c
The following screen will be displayed.
ng
co
an
th
o ng
du
u
cu
The install process will begin and after some preliminary checks and installation
of program prerequisites, the following dialog will be displayed.
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
4. Select I Accept the Terms in the Licence Agreement and click Next
ng
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
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.
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.
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
The file copying process may take a few minutes. When the installation has
du
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
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.
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
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.
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
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
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).
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).
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
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
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 10: Allows you to toggle between the normal and full screen display modes.
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
or communications channels.
du
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
1 2 3
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:
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
locate the database object that is associated with the alarm. We will discuss alarms in
cu
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
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
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.
Listed below are the standard options that apply for nearly all types of database
object:
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
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
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
We will examine the event list in more detail later in the course.
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
Enable/Disable Alarm
o
du
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.
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.
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
1. Open the Opening Page mimic by right clicking on the mimic in the Database
du
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.
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
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
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
om
.c
ng
co
an
th
Mimics are excellent user-interfaces as they can provide access to a wide range of
ng
Pick Actions
Embedded Displays.
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
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.
om
.c
ng
co
an
th
o ng
du
u
cu
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
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:
We will discuss historic data trending in much more detail later in the course.
om
.c
ng
co 4
an
th
ng
2 3
o
du
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
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.
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
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.
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.
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
om
.c
ng
co
an
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.
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.
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
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.
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
You could also right click on the list and select Filter, or press F7 to display the
filter dialog directly.
The alarm list will change to only display the “unacknowledged and uncleared”
alarms (shown in flashing red).
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
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.
.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
2. Add another filter item to this list to only display points whose Value is greater
u
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
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.
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
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
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
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.
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.
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
Outstation
Reservoir Group Pump 1
o
Input Point
DNP3 Binary Output Point or
Pump 1 SCADAPack Modbus Digital Start
Output Point
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
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.
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.
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.
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
By ticking or clearing the In Service field and then saving the change, you
dynamically enable or disable this object in the database.
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.
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.
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.
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
By ticking or clearing the In Service field and then saving the change, you
dynamically enable or disable this object in the database.
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.
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:
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.
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.
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
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
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
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
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
Note: In all places in this course, if specific properties are not mentioned, do not change them
from their default values.
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
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
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
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.
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.
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.
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
ng
Channel co Training.Channel
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
Integrity (Class
0) Polling Interval 10 Seconds (or 10S)
CuuDuongThanCong.com https://fb.com/tailieudientucntt
If you are using an Ethernet connection to the RTU, you will also need to configure the
following:
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.
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:
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
If you are using an Ethernet connection to the RTU, you will also need to configure the
following:
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.
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
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
.c
n/a Outstation Training.Reservoir.Outstation
ng
n/a Point Number 1
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.
CuuDuongThanCong.com https://fb.com/tailieudientucntt
For the Binary Output point named Start, configure the following settings:
om
Trend / List Use Raw Data 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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
For the Analog Input point named Level, configure the following settings:
om
Low Limits 40, Alarm, Medium
.c
32768
Scaling Raw Full Scale Check with your instructor as your
full scale may be different.
ng
Formatting Units
co %
Format 0.00
Verify that the point is updating as expected using the points View dialog.
u
cu
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
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.
2. Drag the Outstation object from the ClearSCADA Data Bar onto the mimic.
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.
CuuDuongThanCong.com https://fb.com/tailieudientucntt
9. Acknowledge the alarm from the object menu.
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
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.
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.
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
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.
om
.c
ng
co
an
th
o ng
du
u
cu
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.
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.
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
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).
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.
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
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).
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
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
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.
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.
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:
.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
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
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.
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
In this case, the pump is made up of multiple objects, and so the PolyFill group
is used.
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
6. Select the Browse button to the right hand side of the window and choose
Color. From the displayed color chart, choose Red.
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
Note that the Flowchart changes to indicate the color returned on the True
o
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:
The iif statement returns a value based on the evaluation of its expression field.
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.
12. Verify that the entire pump symbol now animates as expected.
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
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.
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
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
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
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.
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
your PC’s clipboard (Highlight all objects using mouse and select Ctrl-C).
o
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.
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.
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.
11. Open the pump object Animations. For the PolyFill -> FillColour animation,
select the Flow Chart Box.
om
.c
ng
co
an
th
ng
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.
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.
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.
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
20. Select the Training.Reservoir.Pump 1.Running point from the Database Bar
ng
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
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.
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.
.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
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.
1. Create a new mimic called Animated Analog Display in the Symbols Group.
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
ng
Point Foreground co
Point Blink
Point CurrentValue
an
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.
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
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
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.
om
.c
ng
co
an
th
o ng
du
u
cu
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
In this section we will use methods, object menus, ViewX commands and the custom
menu functionality.
o
du
the pump.
cu
This will allow us to keep a copy of the original mimic created in the first
exercise.
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
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.
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
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).
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.
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
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
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.
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.
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
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
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
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.
1. Create a new mimic in the Training group named Overview and open the
mimic in Design mode.
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
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
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:
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
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.
1. Add a button (or text box, or any other kind of mimic item)
om
The following window is displayed.
.c
ng
co
an
th
o ng
du
u
5. Finish the pick action wizard, place the mimic in run mode and verify the correct
behavior of the link.
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.
om
.c
ng
co
an
th
o ng
du
u
cu
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
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.
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.
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
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.
om
4. Drag the point Training.Reservoir.Pump 1.Running onto the trend.
.c
ng
co
an
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
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…
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.
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.
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
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.
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.
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.
om
.c
ng
co
an
th
o ng
du
u
cu
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.
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
6. What is the difference between the trace settings for a current trace with the
ng
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.
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.
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
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.
om
3. Zoom in on the area of the trend with lots of entries you just added.
.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
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.
om
.c
ng
co
an
th
ng
5. Click the Advanced Source Configuration button to display the following dialog.
o
du
u
cu
CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Select the Level point and click Edit.
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
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.
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
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
1. Create a group named Templates in the Training group. Note that this is a
o
2. Make a copy of the Reservoir.Pump 1 group and place the copy in the
Templates group.
u
cu
The red crosses should disappear as they no longer clash with previously
assigned addresses.
CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Right click on the embedded animated pump and select Properties.
om
.c
ng
co
an
th
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
10. Verify that the start and stop buttons toggle the state of Binary Output 3.
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.
Group Template
u
cu
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.
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.
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.
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.
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).
om
.c
ng
co
an
th
Instances
g
on
du
u
cu
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.
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
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
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
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
9.6 Exercises
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
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.
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
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.
PROGRAM ResetStartCmd
VAR
StartCommand AT %M(.Start) : BOOL;
Running AT %M(.Running) : BOOL;
om
END_VAR
.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
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.
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
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.
2. From the context sensitive menu choose Properties to display the Logic Form.
om
.c
ng
co
an
th
o ng
du
u
cu
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.
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
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:
.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
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
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.
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.
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
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.
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.
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.
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
Banner Filter Timeout 5M 0
Area of Interest No No
om
Toolbars Operate Yes Yes
.c
Navigate Yes Yes
ng
Mimic No Yes
Alignment No Yes
co
Debug No Yes
an
th
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
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:
.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
4. Repeat step 3 and attach the user Engineer to the user group Eng Group.
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
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
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.
CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. Click the Add button.
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
Note: You can deselect all options by unticking the Read permission. Then add in the
u
required options.
cu
CuuDuongThanCong.com https://fb.com/tailieudientucntt
5. Add the Eng Group group and configure it with full permissions.
om
.c
ng
co
an
th
ng
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
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.
CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. Untick the box Inherit Permissions From Parent.
3. For both the Everyone user and the Op Group user group, remove Browse
permissions.
om
.c
ng
co
an
th
o ng
du
We will now test our security settings to see the effect that the permissions
u
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.
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.
CuuDuongThanCong.com https://fb.com/tailieudientucntt
5. Log on as the user Engineer.
om
.c
ng
co
an
th
o ng
du
u
cu
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
(Training.Document Stores).
ng
group).
du
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.
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.
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.
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.
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
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.
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’.
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. In the address bar of Internet Explorer, type the following:
https://localhost
om
.c
ng
co
an
th
o ng
du
u
cu
CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Click the Continue to this Website (not recommended) link.
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.
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.
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
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.
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
1.Running.
du
2. Verify that the statistics in the web client match up with those shown in the View
Status dialog in ViewX.
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.
om
the same except that audible alarms are not available in the WebX client.
.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
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.
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.
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.
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.
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.
om
2. Open the diagnostics page.
.c
ng
co
an
th
o ng
du
u
cu
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.
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.
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
7. Refresh the mimic in WebX and verify that the changes are available
immediately.
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
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
Server configuration relates to those features that impact how either the server itself
cu
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.
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
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.
CuuDuongThanCong.com https://fb.com/tailieudientucntt
In this exercise, we will setup our alarms to disable for a user defined variable duration
time period.
1. Open the Server Configuration dialog by right clicking on the server icon in the
Windows Task Bar and selecting Configuration.
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
Verify that the color of the point on the mimic changes to the disabled alarms
color.
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 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
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.
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
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.
Hint: Use the object menu on the Reservoir mimic to get the pre-filtered list.
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
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
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.
om
.c
ng
co
an
CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Select the Search Key option and click OK.
om
.c
ng
co
an
Table – CDBPoint
Row - 2
o
Column - 2
du
Size – 40
View Info Dialog Title - Comment
u
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.
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
Label – Comment
Table – CDBPoint
Row - 2
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
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
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
5. Set the clock format and verify that the system time is displayed on the status
o
bar.
du
u
cu
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
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
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.
CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Add an operator note to the sine wave value on the mimic.
om
.c
ng
co
an
th
o ng
du
u
cu
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
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:
3. On the View tab, ensure that the option Show Hidden Files and Folders is
enabled.
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:
CuuDuongThanCong.com https://fb.com/tailieudientucntt
C:\ProgramData\ControlMicrosystems\ClearSCADA\Database.
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
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
Copying this folder will mean we have a backup of the database to restore once
we have finished this section on redundancy.
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.
the course.
th
o ng
du
u
cu
CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. Open the server configuration dialog and browse to the section System
Configuration – Partners.
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
Parameter Setting
When you Apply Changes, you will be prompted to restart your server. Shut
down both servers as prompted.
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.
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
Yellow Synchronising
an
Green Starting
th
The Configuration Error state can be displayed for a number of reasons such
du
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?
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.
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
7. Restart Server A.
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.
om
9. Select Start Database and verify that Server B will synchronise the database to
.c
the completely blank standby Server A.
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
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. Click on the Add button to create a new redundant client connection.
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
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.
Now that we have configured a redundant connection, we can open ViewX and
examine the behavior of our client connections.
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
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.
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.
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
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.
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
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.
om
4. Rename the backup folder made in section 14.1.
.c
system. For example, for Windows XP, rename
ng
C:\ Documents and Settings\All Users\Application
Data\ControlMicrosystems\ClearSCADA\Database_Backup
co
to
an
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
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
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”.
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
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)
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.
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
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Expand the Core group and double click on the table CDBPoint.
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
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.
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
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
Note that Generate is a method, while to display the report you will need to
hyperlink to it.
u
cu
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.
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
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.
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
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
You should be prompted for a username and password since the Everyone
user does not have Read permissions on the database.
CuuDuongThanCong.com https://fb.com/tailieudientucntt
6. Configure the report properties to attach the user Engineer to the report.
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
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.
CuuDuongThanCong.com https://fb.com/tailieudientucntt
2. Tick the Enabled box.
This tells ClearSCADA to maintain in history 1 week of reports and then discard
them once they are older than this window.
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.
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:
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Display the Export Destination tab and configure the settings as per the image
below.
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
3. Verify that the file is exported using the current date and time in the filename.
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
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.
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.
.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.
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
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
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.
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.
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.
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
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.
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.
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
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.
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
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
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
9. Click the <New> tab.
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
13. Click in the box at the bottom of the dialog to view the two completed filters.
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
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.
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
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.
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
Before any scripts can be used, scripting must be enabled on the mimic.
o
1. Copy the mimic Training.Pick Actions and rename it to Scripts (leave it in the
u
same group).
cu
CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Double click on the mimic
om
.c
ng
co
an
th
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.
CuuDuongThanCong.com https://fb.com/tailieudientucntt
3. Right click on the button an select Pick Action Wizard
om
.c
ng
co
4. Select Script and click on Next.
an
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
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.
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.
om
.c
ng
co
an
th
o ng
sub ConditionalControl(sPointName)
if Server.GetOPCValue(sPointName) = 0 then
u
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.
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
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
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.
om
.c
ng
co
an
th
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 on, Pump Start should be turned off without confirmation.
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
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.
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.
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
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.
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
7. Hit the ‘q’ key to quit the telnet session. Then exit from the command session.
u
cu
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.
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...
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.
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
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
1. Copy the TranslatorPicker.exe utility received from your instructor onto your
ng
2. In Windows Explorer, select the Tools -> Folder Options menu option.
u
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
"%1" /OPEN
du
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.
9. Close the windows until you are back to the Windows Explorer window.
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:
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.
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
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
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).
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.
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
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
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
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.
om
management is handled in the control room at particular consoles.
.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
redirection.
Direction – determines if the alarm should be redirected when going toward
cu
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%.
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.
om
1. Open the Server Configuration dialog
.c
ng
co
an
th
o ng
du
u
cu
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.
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.
Property Setting
To Training.Security.Engineer
ng
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.
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.
Property Setting
Enabled Yes
om
Trigger State Unacknowledged Uncleared
Action Training.Redirection.Email
.c
Low Severity Low
ng
High Severity Critical
Direction Either
co
Delay 30S
an
Active To 0:00
o ng
du
u
CuuDuongThanCong.com https://fb.com/tailieudientucntt
Active Times – run the redirection all day.
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.
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.
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.
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%.
5. Regenerate the alarm and verify that the message looks the same as in our
th
18.4.1 Exercises
o
2. Generate an email action where the action shows the name of outstation to
cu
CuuDuongThanCong.com https://fb.com/tailieudientucntt