Sunteți pe pagina 1din 38

4 A First Configuration

For the following chapters, you will need to be logged onto the system to perform
configuration action. Ensure you are logged on by following these steps:
To login using ViewX:
1. From the File menu, select the Log On option.
2. In the Username field, enter the username Eng.
3. Click the OK button.
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.

4.1 Organising Your Database


You should organise your database so that the tree-structure is logical and userfriendly. This allows you (and other users) to locate items quickly.
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
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.
All items are created in the database using the same mechanism. Follow the steps
below to create a new Group, a Mimic and RTU Communications objects. In
ClearSCADA, an RTU is referred to as an outstation; however these terms may be
used interchangeably in this training manual.
To create a new group:
1. Right-click on the System in the Database Bar.
2. On the Context Sensitive menu, select the New option. This displays a list of
creatable objects in the database. Select the Group option followed by Group.
This adds a new Group to the tree-structure.
3. Name the new Group Training
Note: When new groups are created, they already contain a Mimic named Default. This
mimic is set as the Default Mimic of the new Group.

Chapter 4 A First Configuration

Issue 1

4-1

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
the name that you should give to the objects you create.

Base Group

Object Type

Object Name

Training

Group

Reservoir

Training

Training

Reservoir
Reservoir
Reservoir

Pump 1

Pump 1

Chapter 4 A First Configuration

DNP3 Direct Channel or


SCADAPack Modbus Direct
Channel
DNP3 Direct Outstation Set or
SCADAPack Modbus Direct
Outstation Set
DNP3 Direct Outstation or
SCADAPack Modbus Direct
Outstation
Group
DNP3 Analog Input Point or
SCADAPack Modbus Analog
Input Point
DNP3 Binary Input Point or
SCADAPack Modbus Digital
Input Point
DNP3 Binary Output Point or
SCADAPack Modbus Digital
Output Point

Issue 1

Channel

Set

Outstation
Pump 1
Level

Running

Start

4-2

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
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
will move the cursor to the field which is causing the error.

Chapter 4 A First Configuration

Issue 1

4-3

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 objects
configuration Form.
To access the configuration Form for an object:
1. Right-click on the object in the Database Bar.
2. Select the Properties option to display the objects Form.
Note: You can also display the properties form of an object by double clicking on the object in
the Database Bar.

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

Chapter 4 A First Configuration

Issue 1

4-4

For each object we created in the last section, we need to now set the properties to
enable RTU communications. We will start with the Channel.
Note: There are two sections below describing how to connect to the RTU using either serial
or Ethernet communications for the appropriate Protocol. Please use the relevant section. If
you are unsure which one to use, please ask your instructor.

4.2.1 Serial Channel


If you are connecting to the RTU using a serial connection, then follow the steps in
this section. If you are using an Ethernet connection to the RTU, proceed to section
4.2.2.
The channel object specifies the type of communications that will be used to connect
to the device, along with some timing parameters. A single channel can be used to
communicate with multiple RTUs, depending on the type of communications used.
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.
4.2.1.1

DNP3

To configure the DNP3 Direct Channel:


1. Open the properties form of Training.Channel by right clicking on the channel
object in the Database Bar and selecting the properties option.
2. On the Channel tab, put the channel In Service.

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

Chapter 4 A First Configuration

Issue 1

4-5

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

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


Advanced drivers in ClearSCADA allow the selection of either local time or UTC
time. This is the time used at the outstation for time stamping events, and in
some cases it is also used for time based control sequences. It is also the time
used when ClearSCADA sets the outstations clock. Using UTC time allows for
a common time base across an entire system and simplifies the handling of
daylight savings times.
Note: In all places in this course, if specific properties are not mentioned, do not change them
from their default values.

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


Connection Type Serial
Port Select an available port on your PC
Note If using a full null modem cable set the Flow Control to RTS/CTS.
Your instructor will tell you the Baud Rate required for connecting to your RTU.

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

Chapter 4 A First Configuration

Issue 1

4-6

Note: You need to ensure that the baud rate defined on the channel matches the baud rate
configured in the RTU. SCADAPack RTUs default to 9600 baud.

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


The line speed is used internally by ClearSCADA drivers to help calculate
delays in responses to sent messages. On slower lines (such as serial
connections), message timeouts are automatically extended to allow for
increased transmissions times.

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
since there are no configuration errors on this object.
4.2.1.2

Modbus

To configure the SCADAPack Modbus Direct Channel:


1. Open the properties form of Training.Channel by right clicking on the channel
object in the Database Bar and selecting the properties option.
2. On the Channel tab, put the channel In Service.

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

Chapter 4 A First Configuration

Issue 1

4-7

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

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


Advanced drivers in ClearSCADA allow the selection of either local time or UTC
time. This is the time used at the outstation for time stamping events, and in
some cases it is also used for time based control sequences. It is also the time
used when ClearSCADA sets the outstations clock. Using UTC time allows for
a common time base across an entire system and simplifies the handling of
daylight savings times.
Note: In all places in this course, if specific properties are not mentioned, do not change them
from their default values.

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


Connection Type Serial
Port Select an available port on your PC
Note If using a full null modem cable set the Flow Control to RTS/CTS.
Your instructor will tell you the Baud Rate required for connecting to your RTU.

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

Chapter 4 A First Configuration

Issue 1

4-8

Note: You need to ensure that the baud rate defined on the channel matches the baud rate
configured in the RTU. SCADAPack RTUs default to 9600 baud.

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


The line speed is used internally by ClearSCADA drivers to help calculate
delays in responses to sent messages. On slower lines (such as serial
connections), message timeouts are automatically extended to allow for
increased transmissions times.

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
since there are no configuration errors on this object.

4.2.2 Ethernet Channel


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
outlined in the previous section (4.2.1).
The channel object specifies the type of communications that will be used to connect
to the device, along with some timing parameters. A single channel can be used to
communicate with multiple RTUs, depending on the type of communications used.
Section 4.2.2.1 will cover the settings and configurations for the DNP3 protocol and
section 4.2.2.2 will cover Modbus protocol. Please continue with the relevant section.
4.2.2.1

DNP3

To configure the DNP3 Direct Channel:


1. Open the properties form of Training.Channel.
2. On the Channel tab, put the channel In Service.

Chapter 4 A First Configuration

Issue 1

4-9

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

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

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


Advanced drivers in ClearSCADA allow the selection of either local time or UTC
time. This is the time used at the outstation for time stamping events, and in
some cases it is also used for time based control sequences. It is also the time
used when ClearSCADA sets the outstations clock. Using UTC time allows for
a common time base across an entire system and simplifies the handling of
daylight savings times.
Note: In all places in this course, if specific properties are not mentioned, do not change them
from their default values.

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


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

Chapter 4 A First Configuration

Issue 1

4-10

These settings define the connection between the channel in ClearSCADA and
the DNP3 device that is connected to the system.
5. On the Scan Parameters tab, configure the Line Speed to 1024000.
The line speed is used internally by ClearSCADA drivers to help calculate
delays in responses to sent messages. On slower lines (such as serial
connections), message timeouts are automatically extended to allow for
increased transmissions times.

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
since there are no configuration errors on this object.
4.2.2.2

Modbus

To configure the Modbus Direct Channel:


7. Open the properties form of Training.Channel.
8. On the Channel tab, put the channel In Service.

Chapter 4 A First Configuration

Issue 1

4-11

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

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.

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


Advanced drivers in ClearSCADA allow the selection of either local time or UTC
time. This is the time used at the outstation for time stamping events, and in
some cases it is also used for time based control sequences. It is also the time
used when ClearSCADA sets the outstations clock. Using UTC time allows for
a common time base across an entire system and simplifies the handling of
daylight savings times.
Note: In all places in this course, if specific properties are not mentioned, do not change them
from their default values.

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


Connection Type Network
TCP/IP Type TCP

Chapter 4 A First Configuration

Issue 1

4-12

These settings define the connection between the channel in ClearSCADA and
the Modbus device that is connected to the system.
11. On the Scan Parameters tab, configure the Line Speed to 1024000.
The line speed is used internally by ClearSCADA drivers to help calculate
delays in responses to sent messages. On slower lines (such as serial
connections), message timeouts are automatically extended to allow for
increased transmissions times.

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


This defines the Modbus protocol being used with the device

13. Save the Channel form by selecting the Save icon from the toolbar.
You will note that the configuration error cross in the Database Bar disappears
since there are no configuration errors on this object.

Chapter 4 A First Configuration

Issue 1

4-13

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:

Tab

Property

Setting

Outstation Set

In Service

Yes

Channel

Training.Channel

DNP3 Local Address

If using SCADAPack E-Series, 30000


Other SCADAPack RTUs, 100

DNP3

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.

For the Outstation object named Outstation, configure the following:


Tab

Section

Property

Setting

Outstation

n/a

In Service

Yes

n/a

Outstation Set

Training.Set

n/a

Address

RTU DNP3 address as provided


by instructor

Integrity (Class
0) Polling

Interval

10 Seconds (or 10S)

DNP3

Chapter 4 A First Configuration

Issue 1

4-14

If you are using an Ethernet connection to the RTU, you will also need to configure the
following:
Tab

Section

Property

Setting

Network

n/a

Network

Single Network

n/a

Host Address

RTU IP Address as provided by


instructor

n/a

Port

20000

Now we need to verify that the communications to the device are working correctly.
The simplest way to verify this is through the use of the Outstation View dialog. To
display the View dialog:
1. Right click on the Outstation object in the Database Bar.
2. On the Context Sensitive menu, select the View Status option.

The View Status dialog for the DNP3 outstation object will display status information
such as Protocol Alarms, Communications State, Message Statistics, etc.
If the communications to the device is successful, the State field should be shown as
Healthy, Multidrop. If communications are not Healthy, Multidrop then View the
status for the other objects in the hierarchy of the communications settings (Set and
Channel) to determine if these objects are in a healthy state.
Chapter 4 A First Configuration

Issue 1

4-15

Check that you have configured the channel and set as described in the previous
sections. If you have configured them correctly and the outstation is still not healthy,
ask your course instructor for assistance.
4.2.3.2
Modbus
To establish communications to the Outstation, both the Set and Outstation objects
also need to be configured.
For the Outstation Set object named Training.Set, configure the following:

Tab

Property

Setting

Outstation Set

In Service

Yes

Channel

Training.Channel

Set Address

10
(Arbitrary value set for each group of
SCADAPack or Generic Modbus controllers
that communicate via a particular direct
channel)

Modbus

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.

For the Outstation object named Outstation, configure the following:


Tab

Section

Property

Setting

Outstation

n/a

In Service

Yes

n/a

Outstation Set

Training.Set

n/a

Address

RTU MB address as provided by


instructor

SCADAPack

Chapter 4 A First Configuration

Issue 1

4-16

If you are using an Ethernet connection to the RTU, you will also need to configure the
following:
Tab

Section

Property

Setting

Network

n/a

Network

Single Network

n/a

Host Address

RTU IP Address as provided by


instructor

n/a

Port

502

Now we need to verify that the communications to the device are working correctly.
The simplest way to verify this is through the use of the Outstation View dialog. To
display the View dialog:
3. Right click on the Outstation object in the Database Bar.
4. On the Context Sensitive menu, select the View Status option.

The View Status dialog for the Modbus outstation object will display status information
such as Protocol Alarms, Communications State, Message Statistics, etc.
If the communications to the device is successful, the State field should be shown as
Healthy, Multidrop. If communications are not Healthy, Multidrop then View the
status for the other objects in the hierarchy of the communications settings (Set and
Channel) to determine if these objects are in a healthy state.

Chapter 4 A First Configuration

Issue 1

4-17

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.

Chapter 4 A First Configuration

Issue 1

4-18

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:
Tab

Section

Property

Setting

Binary Point

n/a

In Service

Yes

n/a

Outstation

Training.Reservoir.Outstation

n/a

Point Number

States

State 0 Description

Stopped

State 1 Description

Running

State 0 Severity

Event, Low

State 1 Severity

Event, Low

Trend

Update Rate

1 second (or 1S)

Logged Data

Historic Data Filter

Static and Event Data

n/a

Enabled

Yes

Trend / List

Use Raw Data

Yes

Historic

Whenever we create objects in the database, it is good practice to verify that they are
operating as expected
Verify that the point is updating as expected using the points View dialog.

Chapter 4 A First Configuration

Issue 1

4-19

For the Binary Output point named Start, configure the following settings:
Tab

Section

Property

Setting

Binary Point

n/a

In Service

Yes

n/a

Outstation

Training.Reservoir.Outstation

n/a

Point Number

Trend

Update Rate

1 second (or 1S)

n/a

Enabled

Yes

Trend / List

Use Raw Data

Yes

Actions

Action 1 Enabled

Yes

Action 2 Enabled

Yes

Historic

Control

Action 1
Description
Action 2
Description
n/a

Update point on
successful action

Stop
Start
Yes

Verify that the controls work as expected by using the Control option available on the
object menu (right click on the point).
Verify that the point is updating as expected on the outstation and by using the points
View dialog.

Chapter 4 A First Configuration

Issue 1

4-20

For the Analog Input point named Level, configure the following settings:
Tab

Section

Property

Setting

Analog Point

n/a

In Service

Yes

n/a

Outstation

Training.Reservoir.Outstation

n/a

Point Number

Alarm Limits

High High Limits

80, Alarm, Critical

High Limits

60, Alarm, High

Low Limits

40, Alarm, Medium

Low Low Limits

20, Alarm, Low

Scaling

Raw Full Scale

32768
Check with your instructor as your
full scale may be different.

Formatting

Units

Format

0.00

Trend

Update Rate

1 second (or 1S)

Logged Data

Historic Data Filter

Static and Event Data

n/a

Enabled

Yes

Trend / List

Use Raw Data

Yes

Historic

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

Chapter 4 A First Configuration

Issue 1

4-21

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.

Open the mimic Training.Reservoir.Default in design mode by double-clicking on it


in the Database Bar.

The design button on the toolbar will indicate that the mimic is in design mode. You
may also see the grid dots on the mimic and a pink colored box in the status bar.
The mimic grid is a tool designed to help alignment of drawn objects and is only
available in design mode.

Display Communication Status


One of the properties of the Outstation object is named StateDesc. This property is
used to indicate the current state of communications to the device. This is the field we
verified in the View dialog to check that our communications to the outstation was
working as expected.
To display the outstation state description on the mimic:
1. Ensure the Mimic Training.Reservoir.Default is on display and in design
mode.
2. Drag the Outstation object from the ClearSCADA Data Bar onto the mimic.
3. From the displayed menu, select the State option.

Chapter 4 A First Configuration

Issue 1

4-22

The Healthy, Multidrop text will be displayed on the mimic in a text box.
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.

4. Put the mimic into run mode by clicking on the Design button on the tool bar.
5. Hover the mouse over the text box and you will notice that the cursor changes
to a hand.
The hand indicates that there is a Pick Action available on this object.
6. Click on the object and from the Object Menu, select the Refresh option.
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.
7. Disconnect the serial or Ethernet (depending on your connection) from the RTU
port and verify that the communications state changes to Failed. A
communication Failed alarm should also be shown in the alarm banner and
alarm list. This information is also logged in the event list.
Note that the color of the communication status changes. This color indicates
that the object is bad quality in this case, communications have failed. The
color also indicates things such as alarm conditions, alarms disabled and local
overrides.
8. Replace the cable and verify that communications return to Healthy, Multidrop.
As the state returns to Healthy, Multidrop, the color should now indicate an
unacknowledged, cleared alarm.

Chapter 4 A First Configuration

Issue 1

4-23

9. Acknowledge the alarm from the object menu.


The color should now indicate the normal state.

To test the operation of the points:


1. Drag the Name of the three points onto the mimic.
2. Next to the name of the Binary points, display the State of the point.
3. Next to the Analog point Level, display the Value Formatted Value.
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).

4. Add headings to the mimic using the text tool in the Mimic Editing toolbar. The
text tool icon is shown below.

The mimic you have created should look similar to the one shown below.

5. Ensure the mimic is in run mode.


6. Turn On and Off Binary Input 1 on the RTU and verify that the mimic updates
with correct values.
7. Open the Historic Trend from the Running object menu and verify that multiple
changes of the switch within a single poll period are all logged in the
ClearSCADA Historic database.
8. Verify that state changes are logged in the event list as expected.

Chapter 4 A First Configuration

Issue 1

4-24

9. Using the Start object menu, verify that controls to this point result in output
relay being operated.
10. Verify that the Analog Input point can be changed and ClearSCADA logs the
changes in the Historic database for the Level point.
11. Verify in the Event List that alarms are generated as the analog value passes
the configured alarm limits.
12. Disconnect the communications cable to the RTU.
13. Manipulate the inputs to the RTU.
14. Reconnect the RTU and verify that inputs made while the communications were
disconnected are reflected in the ClearSCADA database.
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
ClearSCADA historian to log all event type data received from the RTU. This includes
alarming from historic time-stamped data.

Chapter 4 A First Configuration

Issue 1

4-25

5 Animating Mimics
In this chapter, we will draw and animate a reservoir. In this mimic, the level of the
reservoir will move up and down based on the value of the analog input to the RTU,
and the pump will change color to indicate whether it is stopped or running.
The final mimic will look similar to the image below.

Chapter 5 Animating Mimics

Issue 1

5-1

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.

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
between the two shapes.

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

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

Chapter 5 Animating Mimics

Issue 1

5-2

5.2 Animate the Reservoir


Simply drawing a set of objects on a mimic does not provide much benefit unless the
objects can indicate the status of what is really happening to the physical device. In
this section we will update the reservoir to indicate the water level.
Mimic elements can be animated to control their behavior. An animation is a property
of a mimic element, which may be dynamically altered according to values of
database object properties.
In this section of the course, we will be animating the Reservoir to indicate the water
level by a change in size. Not surprisingly, this is referred to as a size animation.
Before you begin to animate the reservoir, we are going to discuss two important
concepts that relate to animations:
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
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
same thing, assuming that they are contained in different folders.
Quotations
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
property of the Level point. All animations related to database properties will be within
double quotes.
Any text placed within single quotes is considered a static string, i.e. it does not
change.
Relative and Absolute Addresses
When using the objects in an animation, either a relative or an absolute address can
be used. An absolute address contains the full path name for the object.
A relative reference uses a notation where the point is named relative to the location
of the calling animation. For example, if we were to call the FullScale property of the
Level point from the mimic Training.Reservoir.Default, the following would be used
.Level.FullScale.
Notice the . in the animation. The first dot means to start in the current group. Any
subsequent dot means go up one further level in the group hierarchy. In our case, if
we had a point named Test in the root of our system, a relative address from the
mimic Training.Reservoir.Default would be ...Test.FullScale. The first dot means to
start in the Reservoir group. The second dot means go up one level (to the Training
group) and the third dot means go up one more level again (which is the root of the
system).

Chapter 5 Animating Mimics

Issue 1

5-3

Now that you are familiar with the concepts of quotations and relative and absolute
addresses, you can begin to create your size animations.

5.2.1 Size Animations


To implement the size animation, perform the following steps:
1. Select the rectangle that forms the water part of the reservoir.
Note: To select elements, which are hidden behind each other, select the front item and use
Alt Double Click. This will select the item behind the one, which is currently selected.

2. Right click on the selected rectangle and select Animations from the Context
Sensitive menu displayed.
The following window will be displayed.

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


element with the values of database object properties. For example, you can
associate the Value property of a text box with a point such that the text box
will show the current value of a point in the database (and will update
automatically each time the point value changes).
3. Select the SizeMax animation. This represents the maximum size of the
rectangle (the size at which it was drawn).
4. Select the Edit button to display the expressions window (or double click the
SizeMax animation).
The Expressions dialog below will be displayed.

Chapter 5 Animating Mimics

Issue 1

5-4

5. Select the browse button next to the expression field to display a Context
Sensitive menu. Select the OPC Tag option.
Note: Browse buttons are indicated by buttons with three dots. All browse buttons provide
access to a browse dialog that you can use to search the system for the property or value you
require.

The OPC Tag browser window is displayed. This window allows you to browse
through every object and its associated properties in the ClearSCADA
database for use in an expression.

Chapter 5 Animating Mimics

Issue 1

5-5

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

Close the dialogs to return to the animations window. Note that the expression
entered in the SizeMax field is .Level.FullScale.
7. Repeat steps 3-6, only this time associate the SizeMin animation with the
ZeroScale property.
The SizeMin animation associates the point minimum value with the minimum
size for the rectangle.
8. Repeat steps 3-6, only this time associate the SizeVal animation with the
CurrentValue property. In step 4, tick the Fast Updates tick box.
Note: You will not find this in the $Config branch.

The SizeVal animation sets the rectangle size to relate to the current value of
the point (between the min and max value).
The Fast Updates tick box tells the server to update the client at a faster update
rate for the Tags referenced in this animation. This will be covered in more
detail in a later section.
9. Close the animations window and open the properties dialog for the rectangle.
10. On the displayed dialog, set the Dynamic Sizing Direction to Bottom to Top.

Chapter 5 Animating Mimics

Issue 1

5-6

This sets the rectangle to resize from the bottom upwards, so that the higher
the value, the taller the rectangle will be.
11. Place the mimic in Run Mode and verify that the water level in the reservoir
changes as the Level Analog input is adjusted.

5.3 Draw the Pump


When you install ClearSCADA, a range of symbols are available in the symbol library.
Over the next few exercises we will show examples of how these pre-built symbols
can be used to generate objects in ClearSCADA.
This exercise will look at using one of the predefined pump symbols to animate our
mimic. To add a pump to the mimic, perform the following steps:
1. Display the Mimic Symbol Library.Symbol Library Index in Run mode.
2. On the Symbol Library Index Mimic, click on the Pumps group. This acts as a
hyperlink to another Mimic that contains all of the pump symbols.
3. Click on the pump symbol named Pump A1.
The group structure in the Database Bar is expanded and the Pump A1 Mimic
is highlighted.
4. Open the Pump A1 Mimic in Design mode.
5. Right-click on the pump symbol in the Pump A1 Mimic and select the Copy
option from the context-sensitive menu.
6. Return to the Reservoir Mimic, right-click in the design area and then select
the Paste option from the context-sensitive menu.
A copy of the Pump A1 symbol is added to the Reservoir Mimic.
7. Position the pump symbol as required.
8. Close the Pump A1 Mimic.

Chapter 5 Animating Mimics

Issue 1

5-7

5.4 Animate the Pump


The next stage in drawing our mimic is to animate the pump to reflect whether it is
running or stopped.
In this section, we will be animating the pump to indicate the state by a change in
color. To do this, we will use the Flow Chart Editor.

5.4.1 Flow Chart Editor for Animations


The flow chart editor provides a graphical way of building complex animations. In its
simplest form, the flow chart editor provides two alternate returned values depending
on the value of a single input value. For example, the pump will be red when running
and green when stopped. In other systems, the pump may be red when stopped and
green when running.
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
example, if the pump is running and the pump is in fault, then make the pump flashing
red.
All these things can be achieved using animations. The simplest way to configure the
animations is to use the flow chart editor.
To configure the pump color to indicate pump run status, follow the steps below:
1. Right click on the pump symbol on the mimic and select Animations.
2. For the PolyFill -> FillColor animation, select the Flowchart button
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
provide individual control of the properties of these items when the group may
contain multiple types of objects.
In this case, the pump is made up of multiple objects, and so the PolyFill group
is used.
The following screen will be displayed.

Chapter 5 Animating Mimics

Issue 1

5-8

3. Right Click on the 0 box and from the context menu select Insert.
4. Double click on the decision block (the one containing the text TRUE) and in
the window displayed, browse to find the Running point.
This is the decision point that evaluates which result should be returned. If the
expression in this block is evaluated as TRUE, then the result returned will be
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.
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
value, it returns the default property which is the value of the point.
5. Double click the box to the right of the decision box.
The Expression window is displayed.
6. Select the Browse button to the right hand side of the window and choose
Color. From the displayed color chart, choose Red.

Chapter 5 Animating Mimics

Issue 1

5-9

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
required.
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
selected (over 16 million colors).

7. Click OK to close the Expression window.


Note that the Flowchart changes to indicate the color returned on the True
branch is Red as show in the image below.

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


Chapter 5 Animating Mimics

Issue 1

5-10

9. Click OK to close the flowchart editor.


You can see that the animation has been filled in for us based on the flowchart.
The decision tree we just developed relates to the expression:
iif(.Pump 1.Running, RGB(255,0,0), RGB(0,255,0))
The iif statement returns a value based on the evaluation of its expression field.
The structure of this statement is as follows:
iif(expression, TRUE value, FALSE value)
In this example, if the current state of the Running point is TRUE, then the color
will be red (RGB(255,0,0)). If the current state is FALSE, then the color will be
green (RGB(0,255,0))
If you know the format of the statement and the results that you require, there is
no reason that you cannot enter the statement directly.
10. Put the mimic in Run mode and verify that the pump changes color when you
toggle the Running point.
11. Note that the pump has tinges of red at the extremities of the object. Repeat
steps 1-10 so that the pump gradient fills are also animated based on the digital
input.
Note that the animation of interest is GradColour.
12. Verify that the entire pump symbol now animates as expected.

Chapter 5 Animating Mimics

Issue 1

5-11

5.5 Completing the Mimic


Using the skills learned so far complete the mimic so that it looks similar to the one
shown below.

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

Chapter 5 Animating Mimics

Issue 1

5-12

5.6 Exercises
1. Display on the mimic, the time that each point was last updated. This is
available as a standard option when dragging and dropping the points onto the
mimic.
2. Create a tooltip on the pump that shows the current state of the pump i.e.
Stopped or Running.

5.7 Exercises (Advanced)


1. Modify the tooltip on the pump such that the text shows the following:
Pump State is Running OR Pump State is Stopped.
2. Analyse the animations used in the text fields on the mimic. Which animations
are used by default when dragging an item onto a mimic? What does each of
these animations do?
3. Change the color of the water in the reservoir such that it turns brown when
below 15%.

Chapter 5 Animating Mimics

Issue 1

5-13

S-ar putea să vă placă și