E3tutorial Developer Enu
E3tutorial Developer Enu
1
Presentation
This tutorial works as a support material for the training module for executing and
programming E3. With it, you will follow the course's content. During the classes, feel free to
practice what you have learned and to share your questions with our instructor. In this
training, we will present you a case study that simulates a real application, a supervisory and
control system.
1.1 Elipse
Elipse software is a genuine Brazilian company, focusing in the production of supervisory
software for industrial automation; we began operating in Porto Alegre in the beginning of the
1990s.
Our first product was Elipse 21, a software program written for the DOS platform, which was
known for being both easy to operate and compatible with different manufacturers.
In 1996, our company released the first version of Windows Elipse, which later became Elipse
SCADA. Since then, this software had about 3,500 installed copies in Brazil.
In 2000, Elipse started developing E3, the third generation of company's supervisory software.
Since it was first commercially released in 2001, there had been about 500 licenses of this
software installed; E3 has been used in several systems, such as Operation Centers of power
companies, industrial plants with many different purposes, telemetry and energy control
systems, automation and building control, mining, and others.
1.2 E3 Modules
The first thing you will notice is that E3 comprises four modules, which are described on the
next sections.
1.2.1 E3 Server
It is the Application Server, where main processes run, including real time communication
with control devices. The server is also responsible for sending data and screens to connected
clients anywhere in the network (Intranet and Internet). A Server can run many projects at the
same time and exchange data with other E3 Servers in order to accomplish a fail-over
(standby) or distribute processing loads among the machines. It is developed to run on
6 Presentation
Windows XP SP3, XP x64 SP2, Server 2003 SP2, Vista SP2, Server 2008 SP2, Server 2008 R2 SP1,
and Windows 7 SP1.
1.2.2 E3 Studio
It is a unique configuration tool, acting as a universal development platform with a modern
and friendly environment, including a full graphical and scripts (VBScript) editor. This allows a
project to be edited by many people at the same time, or many E3 Studios to be connected to
the same remote server with multiple configurations.
1.2.3 E3 Viewer
E3 Viewer allows operating applications residing in the server in any computer either with the
Viewer executable program (Windows XP, 2003, Vista, and Windows 7) or with an Internet
browser. In either case, it is not necessary to install the application in the client machine,
because all components (screens, libraries, ActiveX controls, etc.) will be automatically
downloaded and registered.
1.2.4 E3 Admin
This module is responsible for E3 Server's (and other modules') interface with the user. It is
used to send commands to E3 Server, using the icon in the Notification Area on Windows
Taskbar, and to control the Domain via command line.
This tutorial follows a hypothetical application, which presents the most important resources
of E3 software. This hypothetical application does not cover all development possibilities
offered by this tool. However, the amount of quality information presented in this first contact
with the software is enough to learn how to use it with autonomy to create applications.
· Screens and Screen Objects: how to create graphical interfaces for your applications
· Using Links: an easy and effective way to show information or to create animations in
Screens
· Database Integration: using functions and tools to access and search for Databases,
Presentation 7
focusing on processes
· Reports: powerful tool incorporated to E3. It brings easiness and a great amount of
resources for report creation
· Advanced resources: redundancy, access to the application via browser, user security
configurations, among others
Your feedback is very important for us. At the end of the training course, you will be asked to
evaluate several aspects of the training course, just like the quality and the amount of
information transmitted in lessons and about the tutorial, the instructor's work and the
quality of our facilities. Any suggestions are welcomed by the development team of this
tutorial.
Elipse Software wishes you an excellent training course and a good experience with E3!
This system presents a synoptic of an ink plant, showing several aspects and resources
available in Elipse E3.
The system operator can view tank level and temperatures, ink color to produce, and control
pumps.
To ensure the execution of the application, we will implement the concept of Hot-Standby.
Thus, if the main server fails, a backup server automatically takes over, without loosing
8 Presentation
process continuity.
Application menu
The system also displays alarm conditions in case any parameter exceeds established limits
(for example, if there is an excessive increase in temperature).
Alarms
There is a procedure for querying alarms, which allows viewing and printing historic data.
You can also create trend charts of the variables, with an option to print and export the
historic chart.
Presentation 9
Trend chart
Finally, you will access information from other E3 server using Remote Domains.
Remote Domain
10 Presentation
CHAPTER
2
Elipse Knowledgebase
Elipse Knowledgebase was created to help users of Elipse software programs to find quick
answers to any question or problems faced during their use, be they found while developing
applications or after completing them. This space is a web portal where technical information
and tips are concentrated. Its information database is constantly updated and has a simple
language, focused on a quick understanding for users.
After opening the address kb.elipse.com.br, you will be on the main page.
· Favorites: a link displaying all articles from the database marked as favorites
Searching the KB
There is also a possibility of using an Advanced Search, which allows refining the search. Just
click the Advanced Search option.
Advanced Search
In the Advanced Search option, users can type the word or words they are looking for, filter by a
specific category, author, and also by article rating. That is, if it helped a lot, just helped, did
not help, or helped a little.
2.3 Categories
Users have the possibility of accessing all articles by choosing directly the category it belongs
to. For this, in the Browse by Category field, just select the category to search for and then click
Go.
Choosing categories
All articles of that category are returned as the search result. It is important to notice that the
whole database is divided into two main categories: English and Portuguese. Inside each one
there are Elipse E3, Elipse SCADA, Elipse 21 DOS, Elipse Drivers OPC, Altus TCP/IP, and Drivers
categories. Inside these six categories there are several others, each one dealing with a
English categories
Notice that inside each one of these subcategories there is a number. This number indicates
the amount of existing articles inside that category.
The other existing sections in the main page of the Knowledgebase are:
· Featured Articles: Displays all articles marked to appear as highlighted. Generally this
section is used to highlight an article which deserves a special attention for Elipse software
users
· Most Popular Articles: Displays a list of the 10 most popular articles in the Knowledgebase
· Recent Entries: Displays a list of the last 10 articles added to the Knowledgebase
· Most Popular Searches: Displays the 10 most used words in searches by the Knowledgebase
search tool
3
Starting the Application
After installing the software, your computer will have a program group called Elipse E3, and the
icon to open E3 Studio. When E3 is launched, the system opens a dialog box with the
following options:
OPTION DESCRIPTION
Start E3 Studio Starts E3 Studio, but does not open any
Domain.
Application Wizard
3.1.1 Projects
Projects contain object definitions, Tags, Screens and other application components. .prj files
are created using the Standard Application and Blank Application options. The first option
creates a pre-configured project with some basic objects and a project creation wizard, while
the second option creates an empty project, which can be implemented by the user.
3.1.2 Libraries
Libraries contain user-created object definitions (ElipseX) to use in projects. These libraries
can be reused in different projects and maintain a link with the application. This means that if
users modify the library, all objects of this library are automatically updated in all projects.
3.1.4 Organizer
The Organizer allows you to view the application as a whole, in a simple and organized way. It
helps editing and configuring all objects involved in the system using a hierarchical options
tree. It has two viewing modes, Domain and Explorer.
The Domain mode shows only information about open objects belonging to the Domain. This
information is divided into four groups: Settings, Objects Library, View, and Server Objects.
The Explorer mode shows all projects and libraries currently open in E3 Studio, whether they
belong to the Domain or not. Objects are shown inside the project or library they belong to,
sorted out alphabetically.
Properties List
· Execute application: Saves all project and library configurations, and executes the
Viewer
3.3 Exercises
Application Wizard
2. In the Application Wizard, click Next, select the Standard application option, and name the
project as MainProject.
4. In the next Wizard window, select the Create a new Domain option and use the same project
name.
7. At the end of these procedures, you have access to the Studio's working area.
3.4.1 KB
· KB-28984: Execution time for an E3 Studio license.
4
Data Server
A Data Server is the module responsible for executing and managing Tags and objects that are
not directly involved with the communication. With a Data Server, you can configure Internal
and Simulation Tags, in addition to inserting XObjects, which are data objects from ElipseX
libraries (see later on this chapter). Below there are some objects that can be inserted into a
data server.
OBJECT DESCRIPTION
Counter Tag Object that counts time (in seconds) up to a
pre-determined value, or performs a certain
count indefinitely.
NOTE: Objects inserted in the Data Server are executed by the E3 Server; therefore, they will
be present in the Server. This information shows how E3 works.
22 Data Server
4.1 Rules for Naming Tags
There are some details you must consider when naming Tags:
· If the first character is not a letter or an underscore character, the name must be inside
brackets
· If some of the characters (from the second on) are not letters, numbers or an underscore
character, the name must also be inside brackets
· If there are special characters (for example, diacritical marks), the name must be inside
brackets
4.2 Exercises
Data Server 23
4.2.1 System Time
To get the current system time, you must create a Demo Tag that accesses this information.
1. In the Data folder of E3Training, insert a Demo Tag named CurrentTime. Configure
the Type property of the Demo Tag to 3 - CurrentTime.
1. In the Data folder, insert Demo Tags with the following properties configured:
24 Data Server
NAME DOCSTRING MINIMUM MAXIMUM PERIOD SCAN TYPE
Tank1
4.2.3 Tanks
The application represents a plant which uses as raw materials red, green, and blue inks,
producing other inks as a combination of these three ones.
1. In Data folder, create a Data Folder called Tank1 and insert three Internal Tags, Red,
Green, and Blue.
Selecting a datatype
Data Server 25
Data Folders
26 Data Server
4.3 Notes
Data Server 27
CHAPTER
5
Screens and Frames
Screens are windows for monitoring processes, where objects are inserted, and that will be
operator's interface with the system. Each application can have an unlimited number of
Screens.
Frames are objects for organizing and structuring the interface, creating composed views for
users inside Viewer's main window or using an internet browser.
5.1 Screens
A Screen is the basic user interface object. The following objects can be inserted into it:
· Primitive shapes of the graphical editor (straight lines, circles, rectangles, polygons, etc.)
A Screen uses the Himetric standard for measuring size and coordinates, which is given in
1/100 mm and not in pixels. In this system, if a positive value is added to x, the x coordinate
moves to the right. When we add a positive value in y, the y coordinate lowers, which is the
data origin for the upper left corner of the Screen.
Screens can be opened in Full-Screen mode, occupying all the Viewer area, or as Typical
Screens, occupying only the height and width size of the coordinates.
5.2 Frames
A Frame is the object that organizes and structures the interface, creating composed views for
users inside Viewer's main window or inside an internet browser.
In a Frame, you can create Splitters to view different screens at the same time. Each Splitter
can also show an URL, an Excel spreadsheet, a Word document, or a PDF file.
Splitters disposition inside a Frame can be horizontal or vertical. Other Splitters can be
inserted inside each other. For each pair of Splitters created by options Split Horizontal and
Split Vertical, there is always a Main Splitter and a Secondary Splitter. Only the former has
values explicitly defining its position, the latter will only get remaining values. In order to use
this resource, follow these procedures:
1. Right-click project name in Viewers and Frames and choose option Insert Frame.
2. To create a Splitter, right-click the open Frame and select Splitter type (Horizontal or
Vertical).
3. Drag Splitter bar to the desired position and left-click to fix it.
Splitters
5.3 Viewer
A Viewer object configures the way E3 Viewer is displayed.
E3 Viewer can be launched from any point on a network that has access to an E3 Server. It is
not necessary to copy the application for every machine where E3 Viewers are executed,
because Screens and bitmaps are retrieved from server when needed, at run time.
By using Settings tab, you can configure Viewer window, title, and resolution.
On Communication Errors tab, you can define a pattern so that application's Displays and
Setpoints indicate communication errors.
5.4 Exercises
5.4.1 Frames
1. Right-click folder Viewer and Frames and choose option Insert Frame in - E3Training.prj.
2. On Frame's viewing area, right-click it and select option Split Horizontal, according to the
figure below.
Split Horizontally
3. Place the bar about 10% of the Screen, from its upper limit, and left-click it to fix its position.
5. Call this Splitter you just created as Upper_Area. To change an object's name, there are
three options:
· Select object in Organizer and press F2 key. Name editing is then enabled
· Select object in Organizer and, in object's Properties List, change Name property
6. Split the bottom Frame horizontally about 10% of the Screen, from its bottom limit. Call
these Splitters as Central_Area and Bottom_Area, respectively.
Frame Splitters
7. Configure Bottom_Area Splitter as Main. This forces E3 to comply to Splitter size and then
the remaining Screen is Central_Area Splitter's size. Right-click Bottom_Area and
choose Set as Main Splitter.
5.4.2 Screens
1. Right-click Screens folder and choose Insert Screen in - E3Training.prj.
Insert Screen
2. Choose Upper_Area Splitter from dropdown list. This causes the Screen to be created
with this Splitter's exact size. Choose Set as Main Screen, and type "MenuScreen" in Name
field.
6
Screen Objects
Screen Objects are graphical elements that can be inserted into Screens in order to create a
visual interface with processes. They can be created using Objects toolbar or menu.
Once you have selected the object that you want to create, just keep the left mouse button
pressed on the Screen area while moving the mouse (a dotted rectangle shows the object size
and form). When you release the left mouse button, the object is placed inside the specified
area.
Sc reen Objec ts 37
ICON OBJECT DESCRIPTION
Spin Button You can use it to increase or
decrease a value.
NOTE: Other ActiveX objects made by third parties can also be used in E3, if they are properly
registered. They can be added using Tools - Manage ActiveX menu.
6.2 Gallery
The Gallery is a library of vector symbols, divided into categories, which can be dragged to
Screens. After inserting it, the object can be freely edited and manipulated according to
features applicable to image objects (the fill color, for example, can be changed on the
OverrideFillMode, OverrideFillColor, and OverrideLineColor properties without transforming
the object into a graphical E3 object).
In addition to symbols library, the Gallery also displays XControls belonging to the current
Domain libraries.
38 Sc reen Objec ts
Gallery
NOTE: When running E3 Studio in Demo mode (no license), only the first element in each
symbols category set is available.
6.3 Exercises
Sc reen Objec ts 39
6.3.1 Figures
All figures used in this application are saved on a folder inside the main project, so that there
are no concerns about figure paths when executing the application on another computer.
Insert Resource
40 Sc reen Objec ts
6.3.2 Initial Screen
The Initial Screen will look like this:
Initial Screen
2. To place the InitialScreenBackground figure as the background, drag the bitmap from
Resources to Screen's PictureFile property. This forces E3 to use the inserted resource
instead of the image file (which is external to the application). To choose the best position
for the figure, you can change the PicturePosition property.
3. Create two Text objects : one with the text "Enter", and another one with the text "Quit".
TIP: To edit an existing text on the Screen, right-click it and select Edit Text.
4. In the center of the Screen, place the text "E3 Studio Training".
Sc reen Objec ts 41
5. Right under the text "E3 Studio Training", insert a second text with the message "Elipse
Software Ltd".
6.3.3 MenuScreen
MenuScreen
2. Insert a Command Button object and in its Caption property, type "Initial".
3. Repeat this procedure to create a button for each screen of the application: Events, Chart,
Synoptic, Communication, Remote, and Playback.
4. On the right side of the Screen, insert a Display to show the name of the user logged in.
6. Insert a Display on the corner of the Screen to show the current time.
7. Go to the object properties and select the Format tab. Define the format as Time, and in the
Type item, choose 13:06:03. This formatting displays hours, minutes, and seconds.
8. To view the previous configuration, go to Display's Value property and choose the Date
option.
Time format
6.3.4 AlarmScreen
This Screen displays active alarms of the application.
1. Configure the Screen with the background you wish. Use the Fill Style button.
42 Sc reen Objec ts
6.3.5 SynopticScreen
SynopticScreen
1. On SynopticScreen, place the image SynopticScreenImage as the background.
6.3.6 Setpoint
1. On the color tanks, insert Setpoints where you can type the amount of each color
component.
Configuring limits
6.3.7 Gallery
1. Insert the figure 5GallonBucket from the folder Tanks, in the graphical objects library -
Gallery) onto the conveyor belt.
6.3.8 Rectangle
1. On the tanks on the right, draw a Rectangle object and configure the following properties:
· BackgroundStyle: 1 - opaque
Sc reen Objec ts 43
· VerticalPercentFill: 20
6.3.9 Display
1. On the side of each tank, insert a Display .
6.4.1 KB
· KB-36216: Inserting objects in the E3 Gallery.
44 Sc reen Objec ts
6.5 Notes
Sc reen Objec ts 45
CHAPTER
7
Links
Links (or Connections) are associations made between properties and objects, or even
between properties. Links make creating animations and other types of common logics easier,
minimizing the use of scripts.
By using the Link tab of the Properties window, you have access to all available object
properties and to all possible link types for these properties.
Links
You can link an object or create an expression. When creating an expression or linking an
object or property to the Source field, the text will appear in blue, in case this object
corresponds to an item existing or loaded in E3 Studio. If the item does not exist, or if it does
not belong to an existing module in the Domain, the text will appear in red, and this item will
be shown as an error, until it is corrected or excluded with the Verify Domain option.
46 Links
7.1.1 Simple Link
In a Simple Link, the value of Source field is copied to the property every time the first one is
modified.
Simple Link
Bidirectional Link
Links 47
7.1.3 Digital Link
In a Digital Link, when the variable or the expression of the Source field is a digital property, its
True and False status are connected to certain values in the destination, including the Blink
option (toggling values).
Digital Link
Analog Link
48 Links
7.1.5 Table Link
You can establish conditions between the variable, its values, and the destination. On the
table, you will specify minimum and maximum values, and values for the property referring to
these conditions.
Table Link
Reverse Link
Links 49
7.1.7 Link Edition
E3 has a tool for link edition, called Edit Links. That way, you can change one or more links
made in the application faster than you would in the usual window. To access this tool, right-
click one or more objects, and select the Edit links option.
Link edition
TAG VBSCRIPT
0 False
1 True
1 -2 True
50 Links
Therefore, NOT of 1 is not False because its value is not equal to 0. In case you want to use the
NOT command, first convert the Tag value to a Boolean using the CBool method:
1 True False
CBool method
Another option would be working with Tag's Bit00 property, which is already a Boolean
property, instead of working with Tag's Value property.
Bit00 property
7.3 Exercises
2. In the Value property use the AppBrowser to search the Demo Tag CurrentTime (Server -
Data) on the Source column. On the right, select the Value property and click Paste.
Information goes from Tag to Display, therefore it is a Simple Connection (Property «
Source).
Simple Link
Links 51
7.3.1.2 Logged In User
1. In the Display showing the user name, link Display's Value property with Viewer's User
property.
3. Replace the words "Red", "Green", and "Blue" by Red, Green, and Blue Tags, respectively.
TIP: Work with Copy (CTRL + C) and Paste (CTRL + V). To edit a previously created Link, use F2
key.
Bidirectional Link
52 Links
7.3.3 Analog Link
1. The value of Level Tag varies from 0 to 100, while a formatting of type Percentage displays
values from 0 to 1. To apply a scale to the value, insert an Analog Connection in the Display
which shows numerically the Level variable.
Analog Link
10 30 Blue
30 70 White
70 90 Yellow
90 100 Red
1. In Display's ForegroundColor property, insert a Table Connection with the Level1 Tag.
Table Connection
Links 53
7.3.5 Copying Links
To copy the Link to the Display Level2, follow these steps:
1. In the Display already configured with a Table Connection, right-click it and choose the Copy
Links option.
2. In the Display you want to format, right-click it and choose the Paste Links option.
3. If there are any Links already in this object, a message box is displayed asking whether you
want to ignore it or overwrite it.
7.3.6 Animation
1. Select the Gallon object and press the button to insert a Translation Animation. The
shadow of the object appears. Move it to wherever you want.
Translation Animation
The beginning of the movement represents position 0, and the end represents position 100.
For the movement to happen, you need a variable varying from 0 to 100, linearly. Because you
use this variable only to animate a Screen object, create a Demo Tag (simulation) in the
Viewer object.
54 Links
2. Right-click the Viewer and insert a Demo Tag named Animate.
· Minimum: 0
· Maximum: 100
· Period: 5000
· Scan: 100
4. Right-click the Animation and open its properties. Create a Link in the Value property with
the Animate Tag.
Links 55
7.4 Notes
56 Links
CHAPTER
8
Communication
OBJECT DESCRIPTION
Folder Defines groups and subdirectories for
organizing variables. It does not have direct
relationship with field devices.
Communic ation 57
8.1.1 Exercises
8.1.1.1 Driver
1. Right-click the folder Drivers and OPC and choose the option Insert I/O Driver in - E3Training.
prj.
2. Select the Driver file (.dll) in the dialog box opened for file selection.
3. In case this dialog box is not automatically opened, choose the Driver file in the
DriverLocation property.
5. In newer Drivers, all communication settings must be performed in the Extra configuration
windows of IOKit, which is a shared component used by E3 I/O Drivers.
6. For Drivers using IOKit, the configuration interface is opened using the Configure the Driver
button, in the Driver toolbar.
58 Communic ation
Driver configuration window
8. On Setup tab, choose the physical interface to use from the Option List of the Physical Layer
property. The options are Serial, Ethernet, Modem, and RAS.
9. Configure the time the Driver waits for a response from the field device in the Timeout field.
10.After choosing the Physical Layer option, the other tabs are disabled, and you will just need
to configure the chosen interface. From this point on, the Driver is configured to access the
physical layer.
2. On Tag Browser window, drag the I/O Block IO.IOKitEvent (from folder General) to the
left.
Communic ation 59
Tag Browser
Amount of Tags
60 Communic ation
3. Configure properties from N1/B1 to N4/B4 according to the Driver manual.
4. Right-click again the Driver and choose the item Activate Communication to test the
configurations, or click the Activate/Deactivate communication button. If the
configuration is correct, the Tag row will become blue.
Activate Communication
5. Create other Tags and Blocks and configure their properties from N1/B1 to N4/B4.
6. Set the scan time for each Tag according to your needs.
7. On CommunicationScreen, create a Setpoint for each Tag and link it to its respective
Tag.
CommunicationScreen
8.1.1.4 CommunicationScreen
1. Insert a new Screen on the project, called CommunicationScreen, to be opened on
Central_Area Splitter. Check option Set as initial Splitter's Screen.
2. On CommunicationScreen, create a Setpoint for each Tag you created, and link it to its
respective Tag.
Communic ation 61
CommunicationScreen
OBJECT DESCRIPTION
OPC Folder Defines groups or subdirectories for
organizing variables.
62 Communic ation
OBJECT DESCRIPTION
OPC Block Element Allows writing or reading one of the Elements
of the OPC Block where it is inserted. The OPC
Block reads a data table and this object is
always linked to the position defined by its
Index property, corresponding to the
monitored variable.
8.2.1 Exercises
E3 works as an OPC server and also as an OPC client. Just like the previous exercise, this one
serves to show how the OPC Driver configuration works, as this procedure is similar for any
OPC server being used. This script is described in the next steps.
1. Right-click folder Drivers and OPC and choose option Insert OPC Client Driver in - E3Training.
prj.
2. Right-click the inserted OPC Driver, select option Properties and go to OPC Driver tab. Click
Select.
Select server
3. A window is opened with OPC Server options on your local machine or network. Select the
Elipse OPC Server of your instructor's machine in the option Network Servers and click OK.
4. When returning to the properties window of the OPC Driver, click Activate Communication.
Activate Communication
5. From this point on, you will be able to check communication with the server by clicking
option Information.
Communic ation 63
Information about the server
6. The next step for configuration is importing Tags. Select option Import Tags.
Import tags
Fetching Tags
8. The previous figure shows the appearance of the importing window. On the right side there
is a list of server Tags, and on the left side the E3 area for importing. To import, select the
item and drag it to the desired OPC Group.
64 Communic ation
OPC Groups
9. After importing some Tags or properties, check if imported Tags are working.
Imported Tags
10.Just like when configuring Elipse Drivers, the way to work with Elipse OPC servers is the
same for all servers.
8.3.1 KB
· KB-14918: Tag count in an I/O Driver.
Communic ation 65
8.4 Notes
66 Communic ation
CHAPTER
9
Scripts
Scripts are pieces of source code (programming) with which you can create procedures linked
to specific events, allowing greater flexibility in the development and use of applications. All
scripts are linked to events, and every E3 object has a list of previously defined events; also, it
is possible to define new user-generated events.
NOTE: Until now, we have been working only with E3 properties. We already know some E3
properties, and also that there are two ways to modify them: via Properties window, or via
Links.
Methods are previously defined functions, which execute certain actions on object's
properties calling these actions. For example, functions that modify screen visibility (Hide or
Activate methods), that write on Tags (Write or WriteEx), among others. In object-oriented
programming languages, you must create methods to work on a property. For every method in
E3, you must define the event to which it is linked, because E3 scripts are event-oriented.
Events are occurrences related to an object that can be handled in order to perform an action
(a method).
9.1.1 Picks
Picks implement a friendlier way to perform common procedures in scripts, saving time while
writing code. Among them there are actions like Screen toggling or value attributions, which
are common when creating projects.
Sc ripts 67
9.1.1.1 Run Scripts
It allows editing a custom script to be executed whenever a certain event occurs.
68 Sc ripts
9.1.1.2 Open Screen
Opens a certain Screen or Frame.
Sc ripts 69
9.1.1.3 Open Modal Screen
Opens a modal Screen.
70 Sc ripts
9.1.1.4 Run Application
Launches a specific program.
Sc ripts 71
9.1.1.5 Load Value
Loads a certain value into a Tag.
72 Sc ripts
9.1.1.6 Toggle Value
Allows toggling a Tag's value. If the Tag's value is equal to Value1, then the Tag receives
Value2. If the Tag's value is equal to Value2, then the Tag receives Value1. If the Tag's
value is equal to neither Value1 nor Value2, then the Tag receives Value1.
Sc ripts 73
9.1.1.7 Print Report
Allows printing a Report on a Screen or to a printer.
9.2 Events
Events are object-related occurrences that trigger programmed actions. There are basically
two types of events: Physical (or external), and Internal.
Physical events are, for example, any keyboard or mouse actions. In this case, the important
information would be the pressed key, or the cursor position and the button status. Internal
events are, for example, the temperature change of a room from 10 to 11 Celsius degrees.
In E3, there is a list of available events sorted by object, starting by standard events, present
in all objects. These events can be modified using the Scripts tab, which can be searched by
using the object properties to which you want to write a script.
74 Sc ripts
Event list
You can create user-defined events using option Create new event in the event list, or using
button Create user event .
Sc ripts 75
Create user event
9.3 Methods
Methods are procedures that can be executed by objects. For example, a Screen object has
both a method to open it (Open) and another one to close it (Close). Because they are
encapsulated, that is, stored inside objects, a method call must always declare to which
object it is referring.
Many pre-defined methods have parameters, which can (or must) be passed in the method's
call. To do so, VBScript has a rule that must be obeyed. If the method is used in an attribution,
its parameters must be enclosed in parenthesis. The parenthesis used when declaring
methods in this tutorial is only setting them apart from properties. In scripts, you must follow
this rule.
AppBrowser
76 Sc ripts
9.4 Properties
All objects have Properties, which store information regarding its features. For example, a
Rectangle object has the Name property, which contains its name, and the Width and Height
properties, for its width and height respectively, among others. To modify these properties,
use the same specifications described in the previous section, but select the Properties
folder.
9.5 Exercises
5. On MenuScreen, for each button linked to a Screen, create a script to open its respective
Screen. InitialScreen must open in _top Frame and the other ones in
Central_Area Frame.
Pick Script
2. Using AppBrowser , search for Viewer's Exit method and click Paste.
Application.Exit
Sc ripts 77
3. Execute the application and test its new functionalities.
78 Sc ripts
9.6 Additional Exercises
9.6.1 KB
· KB-25172: Creating hot keys in E3.
Sc ripts 79
9.7 Notes
80 Sc ripts
CHAPTER
10Security
E3 has access control to Screens, Alarms, and Domains on a list of users, where each name has
a password and a login name. Depending on the configured options, the system allows access
to registered users or unlimited access to project Screens.
10.1 Users
When using the Users option, you can configure information regarding which users will have
access to the system. To use this resource, it is necessary to go to the File - Users menu and
click the Users tab.
Users tab
Sec urity 81
IMPORTANT: After configuring security, only listed users will have access to the system.
10.2 Groups
Groups option allows creating groups whose features are common to all of its members
(users). A group can also belong to other groups, but a group cannot belong to a group already
belonging to itself, that is, a circular reference. To use this resource, it is necessary to go to
the Files - Users menu and select the Groups tab.
Groups tab
10.3 Permissions
Permissions tab allows configuring user and group permissions for Screens, Alarms, Domains,
and the Viewer. A permission check consists of information that the member of the group has
about a command acting upon a specific object.
For example, User1 has permission to use Open command on the Screen1 object. Each
group member can deny or enforce a command permission, regardless on the group they
belong to. This way, they will not take into account information about the group. They can also
decide to always use information defined for the group. If group information is conflicting, the
following order is used: Deny » Enforce » Indifferent.
82 Sec urity
Permissions tab
Sec urity 83
10.4 Protection
E3 has a protection tool for projects and libraries. With this item, you can protect file content
against non-authorized editing, viewing, and execution. To use this resource, right-click the
project name in the Organizer and select the Protection option.
File protection
· Edition Protection: It protects a file against non-authorized changes or views. This resource
is used to prevent a certain library or object from accidental changes, or restricted
procedures by a developer from being copied. E3 has a control over editing these project or
library files
· Execution Protection: This option is used to protect a file against non-authorized execution.
For this, it is necessary to request the recording of a password in the protection device,
which is performed by Elipse Software. This protects non-authorized copies of the project,
for example
84 Sec urity
When a .lib or .prj file is opened in E3 Studio, it starts by showing a gray icon with a padlock
indicating that it is protected and its content cannot be accessed. To access file content, right-
click the icon and select Open with password. After typing the password, and after the system
has granted access, the icon becomes colorful , indicating the accessibility of the file.
10.5 Exercises
Let's see how to configure users in an E3 Domain and how this resource can be used to deny or
grant access to Screens, controls, alarms, etc.
10.5.1 Users
1. On File menu, select the option Users.
2. Go to Groups tab and create two user groups, called Administrators and Operators.
3. On Users tab, create three users. Notice that this feature is case-sensitive.
Sec urity 85
User data
4. Configure one of the users to belong to the Administrator group and the other two to belong
to the Operators group.
10.5.2 Permissions
1. On Permissions tab, select the option Groups. Block one of the Screens for Operators group.
2. Under user permissions, grant access to one of the users in Operators group to access the
blocked Screen for that group.
10.5.3 Login
1. On MenuScreen (the Login button), create a new Script-type Pick on Click event.
86 Sec urity
10.6 Additional Exercises
TagAdmin
3. On InitialScreen, create a Link between the Visible property of the Text Enter and the
Tag TagAdmin. Only users from the Administrators group can view this object.
Sec urity 87
10.6.3 Event Recording
1. Right-click the E3 icon on Windows Notification Area and go to Domain - Options.
Domain - Options
Security tab
NOTE: Security settings are not applied to existing users, only when changing or creating a
user.
3. Go to the Event Recording tab and configure it to record events in the Events table on an
automatically selected database.
88 Sec urity
Event Recording tab
10.6.4 KB
· KB-32881: User and password administration in runtime.
Sec urity 89
10.7 Notes
90 Sec urity
CHAPTER
11ElipseX Libraries
E3 has tools that allow transforming any object or set of objects of your applications into a
user library. The concept of user libraries (called ElipseX) comes from object-oriented
programming languages, where several components can be shared among projects without
the need to develop each object again. Using E3 libraries is highly recommended due to the
productivity they bring to your application. Some of ElipseX advantages are:
· Code reuse
Object Libraries
ElipseX Libraries 91
11.1 Creating User Libraries
ElipseX objects may contain, in addition to drawings, internal variables that can be exported
to the application, and programming logics (scripts) that are present in all copies of the object
being developed, thus diminishing the need for repeating code in several parts of the
application.
1. Go to File menu, select New Project item, and then click Next.
Application Wizard
3. Determine the name of the library and the folder where it will be saved, and click Next.
5. Click Finish.
There are two types of objects that can be inserted into an ElipseX library: XControl graphical
objects and XObject data objects.
All items available for Screens can be inserted into XControls. Among these items are
primitive drawings, graphical vector objects - including symbol library objects (WMF, EMF,
etc.), non-vector graphical objects (BMP, JPEG, GIF, etc.), E3 ActiveX controls (E3Chart,
E3Browser, E3Alarm), XControls made by third parties, and other ActiveX controls.
92 ElipseX Libraries
Data libraries can contain any type of non-graphical objects, which are executed in E3 Servers.
You can insert the following objects in an XObject: I/O Drivers, Data Servers, Databases,
Formulas, Alarm Configurations, Alarm Servers, COM objects, and other XObjects, among
others.
In the same .lib file, you can have any number of ElipseX components, whether they are
XControls or XObjects. You can also have many different libraries (several .lib files) in the same
Domain.
11.1.1 XControl
An XControl defines a graphical interface for the user, which can comprise any E3 objects,
intended to be easily multiplied by your project. You can create an XControl by right-clicking
the .lib file created in the Domain (Organizer - Explorer) or in Object Libraries, XControl, and
choosing the Insert - XControl option.
XControl
Before you insert an XControl, please notice that on the lower part of the screen there are
three tabs: Design, Properties, and Scripts. On Properties tab, you can insert properties that
are exported by the object. These properties can be linked to a Tag or to any other property
when the object is used in a project. On Design tab, which is equivalent to a Screen, you can
insert the graphical objects previously described.
The properties to be exported (XProperties) can be inserted with the INS key or by using the
button, and can be excluded by using the button. The available options are:
OPTION DESCRIPTION
Name Determines XControl's property name.
ElipseX Libraries 93
OPTION DESCRIPTION
property is public or not.
You can notice that other Data objects (XObjects) can be declared as a Type. This allows you to
control the whole functionality of an object, so that the maintenance of a library will become
easier.
The edition of graphical objects has the same graphical resources and options as Screen's
edition. You can insert XControls in any Screen or even inside another XControl, by right-
clicking the destination Screen or XControl and choosing option Insert.
From this moment on, the XControl has a name inside the Screen, and it is considered as a
copy of the original definition. Thus, you must define (if needed) values or links that this
specific copy has in this context.
11.1.2 XObject
In addition to graphical objects, you can also create a data library, called XObject. With that
library, you can define a data structure to be executed in the server. Such structure can
perform calculations, links, communications, alarm checking, historic recording, etc., which
do not depend on any open graphical interface (Viewer) or executing at that moment. To
create an XObject, right-click the .lib file in the Organizer and choose the Insert - XObject
option.
The available options for XObject properties are the same as the ones for XControls, as
previously mentioned. In addition to XProperties, any E3 module can be inserted into an
XObject to be executed in the server. To get a complete list of XProperties, just press the
button defining object type and check the list of available options. This allows you to define a
complex management system as a library that can be easily replicated as many times as
needed in your application.
You can insert XObjects in any Data Server by right-clicking the Data Server and choosing Insert
option. Even if your library file has several XControls and XObjects, when you are trying to
insert a library, E3 Studio will only show XControls for Screens and XObjects for Data Servers.
· Repetition in use: if a device or process is used more than once on the same project
· Known user procedures: often, a process created by a certain company must be copy-
94 ElipseX Libraries
protected. This is common in case of service integrators or machine manufacturers
NOTE: It is not possible to copy a library and use both files (the original and the copy) in the
same Domain. For example, you cannot copy the .lib file and then split it into two new files.
11.3 Exercises
Let's develop a Display to show temperature value. The Display is formatted with one decimal
place and suffix "°C". Display's background color varies according to temperature value.
11.3.1 Library
1. Click New Project and, in Application Wizard, select option E3 Object Library. Name it
TrainingLib and specify folder path C:\TrainingE3\Library. Click Next, add it to current
Domain, and then finish the process.
11.3.2 XControl
1. Insert an XControl and name it DisplayTemp.
DisplayTemp
Display format
4. In order to receive any external value, we must create properties. Switch from Design tab to
Properties tab at screen bottom.
Properties tab
ElipseX Libraries 95
Property Temperature
6. Switch back to Design tab. In the Display, create a Simple Link between Temperature and
Value properties.
Simple Link
Table Link
8. In order to use this new object, you must register it. Save changes, right-click Libraries, and
then choose option Register loaded libraries.
96 ElipseX Libraries
DisplayTemp
10.For each DisplayTemp on Screen, create a Simple Link between Temperature property and
Temp Tag.
11.3.3 PumpTag
1. In library LibTraining, insert a new XObject and name it PumpTag.
PumpTag properties
PumpTag objects
ElipseX Libraries 97
11.3.5 Pump
Pump
2. Insert an object 3DISABlower from category Blowers of Symbol Library. Change the following
properties:
· OverrideFillMode to 3 - ByBrightness
PumpTag type
6. To save later work, write in field Help Text the message "Associated object PumpData.
Properties: OnOff, Automatic, and Failure".
98 ElipseX Libraries
7. In order to display figure only when valve is on failure, create a Simple Link between
object's Visible and Failure properties.
· In the bottom field, insert PumpData property after Source property, in this case,
Failure.
AppBrowser
8. Repeat the previous step for Automatic object with Automatic property.
9. In the Display under the valve, the name of the associated XObject PumpData should
appear. Create a Link between Display's Value property and Pump.Source.Name.
10.When property OnOff is True, pump color must be green, and when this property is False,
color must be red.
· On Links tab, create a Digital Link between OverrideFillColor and OnOff properties.
Digital Link
ElipseX Libraries 99
11.3.6 SynopticScreen
1. On SynopticScreen, insert a Pump object above each background pump.
2. Link Pump's Source property from SynopticScreen to previously created Pump XObject.
Source property
TIP: You can drag an object to the property you want to link.
11.3.7 PumpCommand
Command
Let's create an XControl to change OnOff, Automatic, and Failure properties of XObject
PumpTag. There will be a single Screen in this object, which configures all application pumps.
4. Create a Bidirectional Link between Check Box's Value property and Source's Failure.
5. Copy Check Box twice. Change Caption property of those objects to "Automatic" and "OnOff",
respectively, and link them to corresponding properties.
6. Insert a text above objects where the name of the associated XObject ValveData
appears.
11.3.8 CommandScreen
Insert a new Screen on the project, called CommandScreen, 200 by 200 pixels.
1. In XControl Pump, create a script on Click event of the figure depicting the pump:
'Pump's full name
Arg = Pump.Source.PathName
'Open CommandScreen
Application.DoModal "CommandScreen", "Command", 0, 0, , , Arg, 1+2+64+2048
2. Type "Arg = " to create an auxiliary script variable, which holds the clicked pump's name.
3. Using AppBrowser, select XControl Pump, and Source property on the right. Click Paste.
4. Finish the line by typing ".PathName". This property returns the associated XObject
PumpTag's full name.
Arg = Pump.Source.PathName
7. Change Title parameter to "Command". This is Screen's title, as long as Screen's Caption
property is blank.
8. Change Left and Top parameters to 0. Forcing Screen to open centralized is done on another
parameter.
9. Change Width and Height parameters to a space, thus using Screen's original size.
10.Arg is an information passed to the opening Screen. This parameter has been already
defined as pump's full name.
11.Change Flags parameter to 1+2+64+2048, which means title bar (1), close button (2),
movable (64), and centered (2048).
There are eight possible combinations for three pumps. To change Boolean values into
decimals, use the following expression:
4 * Pump1 + 2 * Pump2 + Pump3
Since in VBScript a True value is numerically equivalent to -1, previous expression must be:
-4 * Pump1 - 2 * Pump2 - Pump3
0 0 1 1 RGB(0, 0, Blue)
0 1 0 2 RGB(0, Green, 0)
0 1 1 3 RGB(0, Green,
Blue)
1 0 1 5 RGB(Red, 0, Blue)
1 1 0 6 RGB(Red, Green,
0)
1 1 1 7 RGB(Red, Green,
Blue)
ForegroundColor property
11.4.2 KB
· KB-28547: Using a library developed in a different Domain.
12Databases
An E3 Database is used to store information of the project referring to Historics, Formulas, and
Alarms. It supports MDB (Microsoft Access), Oracle, and Microsoft SQL Server formats. To use
this resource, follow these procedures:
2. In case of an Access database, type the desired file name (whether it exists or not) in the
MDB file field.
3. Leave the User and Password fields blank. These fields are used only if the specified
database for the connection already has a user and a password.
4. Leave the DB password field blank. As it was previously specified, this field is only used in
case the specified database has a password.
12.1 Exercises
This database will be used to store all project's Alarm and Historic data.
2. To connect to a database, you must type the server, the user, and the password.
Databases 105
Connect to a database
3. In the Server name field, click the Combo Box and select the server on the list.
4. In the Authentication field, select the option SQL Server Authentication. In the Login field,
type "sa" and in the Password field, type the password created during installation.
106 Databases
12.1.1.1 Creating Databases
1. Right-click the item Databases and choose the option New Database.
E3Training database
Databases 107
12.1.2 Database
1. Insert a new Database in the E3Training project, named Database.
Insert Database
108 Databases
Database configuration
12.2.1 KB
· KB-29527: Other databases supported by E3.
Databases 109
12.3 Notes
110 Databases
CHAPTER
13Alarms
E3 Alarm module comprises basically two units, whose functionality is connected logically:
· Alarm Server: Organizes the way events and alarms are handled
· Alarm Configuration: The object responsible for creating and configuring alarm sources
IMPORTANT: There can only be one Alarm Server object per Domain, and its presence is
mandatory for alarm verification.
With Configuration tab, you can specify if the alarms will be stored in the Database. Alarms
can either be viewed in an E3Alarm or in an E3Browser, which are Screen objects seen later in
this Tutorial.
13.2.1 Area
The Area object allows grouping a set of Alarm Sources, as well as other Alarm Areas. This
facilitates the management, operation, and monitoring of a set of related alarms, allowing, for
example:
Alarms 111
· Checking the amount of active or unacknowledged alarms of a set of Alarms Sources
In case you need it, new Areas can be inserted inside other Areas.
PROPERTY DESCRIPTION
Message text This is the text linked to the alarm condition
that appears in the viewing object (E3 Alarm),
Database, etc. It may contain up to 255
characters.
There are several types of Alarm Sources that can be inserted into an Alarm Area.
112 Alarms
13.2.2.1 Analog
Allows monitoring analog variables, by specifying up to four alarm levels, which are LOLO (very
low), LO (low), HI (high), and HIHI (very high).
13.2.2.2 Digital
Allows monitoring a digital variable (or expression), by specifying an alarm when in a rising
edge (in -1 or True) or in a falling edge (in 0 or False).
Alarms 113
13.2.2.3 Dead Band
Allows monitoring an analog variable by specifying a maximum difference limit (dead band
value), relative to a reference value (Setpoint).
114 Alarms
13.3 E3Alarm
The E3Alarm object is a tool for monitoring active or unacknowledged alarms in a system. By
using this object, you can verify alarm status in the system, as well as acknowledge them
manually. To use this object, right-click the working area, and then select the Insert - E3Alarm
option.
E3Alarm
On E3Alarm's General tab, you can specify information regarding the Alarm Server and its
filters.
General tab
Alarms 115
13.4 Exercises
2. Go to the Alarm Server properties and, on Configuration tab, enable the Store alarm events
in the database option.
5. Click the Fields button and select the fields you want. In order to have E3Playback working
properly, insert the following fields:
116 Alarms
· EventTimeDbl
· FullAlarmSourceName
· ConditionActive
· Acked
· AckRequired
Alarms 117
13.4.3 Analog Alarm
1. Create, inside the Alarm Configuration, a new Area by pressing the Add button and change
its name to Level.
Add an Alarm
Area
2. Select the Area just created and click the Add button. Insert an Analog-type Alarm Source.
4. Click the editing area of the Alarm Source Tank1 and, with the AppBrowser, select the
Value property of the Tag Level1 from folder Data.
· Check the item LoLo, with a limit of 10 and a message "Level 1 Very Low"
· Check the item Lo, with a limit of 30 and a message "Level 1 Low"
· Check the item Hi, with a limit of 70 and a message "Level 1 High"
· Check the item HiHi, with a limit of 90 and a message "Level 1 Very High"
118 Alarms
13.4.4 Dead Band Alarm
1. Insert a new Area named Temperature.
1. Setpoint:50
2. BM: 10
7. Link the Alarm Tank2 to the Tag Temp2 and change Alarm messages.
Alarms 119
13.4.5 Digital Alarm
1. In the PumpData object, insert an Alarm Configuration.
2. Select the Alarm Configuration and create a new Area named Pump.
6. In order to display the name of the pump in the Alarm messages, create the Links as in the
next figure.
Digital Alarms
13.4.6 E3Alarm
Viewing Alarms in real time can be performed using an E3Alarm object.
2. In the properties of the E3Alarm, General tab, select the name of the Alarm Server.
120 Alarms
Selecting an Alarm Server
3. The same configuration can be performed using the Properties List. In the AlarmServer
property, type the name of the Alarm Server, or drag it to the property.
AlarmServer property
Alarms 121
13.5 Additional Exercises
3. With the AppBrowser, search for the object E3Alarms1 in the AlarmScreen, and on the
right the AckAll method.
Screen.Item("E3Alarm1").AckAll([Operator])
4. Replace the Operator parameter by the name of the user logged in the Viewer. With the
AppBrowser, search for the User property of the Viewer.
13.5.2 KB
· KB-29110: Playing a sound file whenever the alarm becomes active.
122 Alarms
13.6 Notes
Alarms 123
CHAPTER
14Queries
The Query object helps in the process of defining queries in the application's Database. Every
time E3 needs to search for data in the Database, a command needs to be sent in order to
know which data is needed for that object. For this search, every time an application needs to
record or to search for stored data in a Database, commands in SQL (Structured Query
Language) format are sent to the database.
The Query presents a friendly interface that allows building SQL queries using a graphical
interface and following the immediate results of the generated SQL code. The Query allows
showing the last data from n days, hours or months, initial or ending date and queries,
depending on the implemented filter.
The Query Configuration Wizard is responsible for creating the text that makes the filter or the
query, but it is not necessary for the user to know implementation details such as dates, etc.
To use this resource, right-click the project Screen and select the Insert - Query option.
2. After defining the Database, a new window is opened with the tables that were found,
allowing their selection.
124 Queries
Selecting tables
3. Select the tables which are part of the Query and click Add.
4. On Fields tab, you can add fields returned by the Query, as well as define filters and sorting.
The previous window can be accessed by right-clicking the Query object and selecting the
option Configure.
Queries 125
14.1.1 Creating and Accessing Variables
On Query's configuration window, you can add filters directly into the fields. These filters can
be formed by variables defined by script, via Query's SetVariableValue method. How variables
can be declared depends on the data type they represent, as follows:
· Number: <%Variable_Name%>
· String: '<%Variable_Name%>'
14.2 E3Browser
An E3Browser is an ActiveX control (developed by Elipse Software) used to view data stored in
a Database, generated by E3 or by any other software. You can configure Queries by using
filters of several data types and by setting colors for each column, among other settings. This
object is used for viewing Historics, Alarms, or any other table existing in the Database.
E3Browser
To use this resource, insert an E3Browser in the project by right-clicking the working area and
selecting the option Insert - E3Browser.
126 Queries
Insert E3Browser
An E3Browser uses the Query object to help the user define queries on the application
database.
14.3 Exercises
Let's view alarm data stored on a Database as a table, using an E3Browser.
14.3.1 EventScreen
1. Insert a new Screen in the project, called EventScreen, to be opened on
Central_Area Splitter. Check option Set as initial Splitter's Screen.
14.3.2 E3Browser
1. Insert an E3Browser on EventScreen.
2. To configure data displayed by this E3Browser, double-click it and select Query tab.
Queries 127
Query tab
Alarms table
Execute Query
8. Click OK. After finishing this step, all fields listed on the Query are available in E3Browser.
Configure each field with color, formatting, and size you want.
128 Queries
Query configuration
1. Insert on EventScreen two Setpoints named spStartDate and spEndDate, and two
texts according to the following figure.
2. Use a Viewer method to display a calendar for users to choose a date. Create a new script
on Setpoint's Click event.
'Calls a Calendar function
If Application.ShowDatePicker(DateTime, 0, 0) Then
'Passes the chosen date to the SetPoint
Value = DateTime
End If
3. With the AppBrowser , search for Viewer's ShowDatePicker method, and then click Paste.
Application.ShowDatePicker(DateValue, Left, Top, [DefaultDate])
4. The DefaultDate parameter is optional and informs the selected date in the calendar.
Queries 129
Delete it because we need a default value, which corresponds to the current date.
5. Replace the Left and Top parameters by 0 or the coordinate you want when opening a
calendar.
6. The DateValue parameter must be replaced by an internal script variable. Call this variable
as DateTime.
7. The ShowDatePicker method returns true if users click OK, and false if users click Cancel.
Only when clicking OK you should pass the calendar value to the Setpoint. Type "If" at the
beginning of the command line ShowDatePicker and "Then" at the end.
If Application.ShowDatePicker(DateTime, 0, 0) Then
8. To pass the calendar date to the Setpoint, type the following text on the next line.
Value = DateTime
9. Since you are writing a script in the Setpoint and you want to reference its Value property,
you can directly type the name of the property without its full path.
11.Open E3Browser's Query object. This can be performed by double-clicking the object in the
Organizer or on E3Browser's Query tab.
E3Browser Query
13.To be able to choose a starting and ending date, you must create query variables. Configure
the filter according to the following figure.
Configuring a filter
130 Queries
14.Type an initial value for variables created on Variables tab.
15.Open the Visualize tab and click Execute Query to check the Query result. Make sure the
filter was applied and then click OK.
16.On EventScreen, below the Setpoints, create a Query button, and insert a new script on
its Click event with the following lines.
'Reference to Setpoints
StartDate = Screen.Item("spStartDate").Value
EndDate = Screen.Item("spEndDate").Value
Set query = Screen.Item("E3Browser1").Item("Query1")
'Configure Query variables
query.SetVariableValue "StartDate", StartDate
query.SetVariableValue "EndDate", EndDate
18.With the AppBrowser, search for the Setpoint spStartDate and on the right for its Value
property.
StartDate = Screen.Item("spStartDate").Value
19.Repeat the previous step to create the internal variable EndDate, referencing the value
of the Setpoint spEndDate.
EndDate = Screen.Item("spEndDate").Value
20.With the AppBrowser, search for the Query1 inside E3Browser1. On the right select
the SetVariableValue method.
Screen.Item("E3Browser1").Item("QUery1").SetVariableValue(VarName, Value)
22.Type, at the beginning of the line, the text "set query = ". This way you will create an internal
script variable which references the Query object.
Set query = Screen.Item("E3Browser1").Item("Query1")
23.At the beginning of the line containing the SetVariableValue method, type "query.".
query.SetVariableValue(VarName, Value)
Queries 131
24.The VarName parameter references the name of the variable created in the Query. Type
"StartDate".
25.In the Value parameter, inform the value you want to pass to the variable. In this case, you
want to pass the Setpoint value referenced the internal variable StartDate.
query.SetVariableValue "StartDate", StartDate
27.Copy the line to implement the same logic to the variable EndDate.
query.SetVariableValue "EndDate", EndDate
14.4.1 KB
· KB-20214: SQL function to calculate maximum, minimum, and average values.
132 Queries
14.5 Notes
Queries 133
CHAPTER
15Historics
Historics are modules responsible for storing application data in a database. They allow
storing process data for future analyses, in E3 or in any other tool.
You can create as many historic files as you want, each one containing several Tags or
expressions. Each Historic can create or use an independent table inside the Database, whose
storage can be defined by Time or by Event. You can also determine which Database inserted
into the project is used for data storage. To use this resource, right-click the project name and
select the Insert - Historic option
To create the historic table, it is important to create its fields. Such fields can be inserted with
the (Add a field) button. To remove any unwanted field, click the (Remove field) button.
Historic
There are two types of primary keys, Simple and Compound. A Simple Primary Key is a field that
uniquely identifies every record in a table. A Compound Primary Key can be formed by the
combination of two or more table fields. There are cases when a single field is not capable of
behaving as a primary key because it may have repeated values. In addition, a table can have
only one primary key, either simple or compound. That means you cannot define two or more
fields of a table to be separated single primary keys. Do not confuse this with compound
primary keys, where two or more fields form a single primary key on a table. When choosing
Primary Key fields, consider the following details:
· In case there is no single identifier for a certain table, you can use a field that generates
134 Historic s
sequential numbers
The primary key can be configured in two ways: by verifying in the Historic Screen the table
field that you want to turn into a Primary Key and enabling it using the , or by clicking the
icon , which opens the configuration window.
15.2 Indexes
An Index is a field or a set of fields which are previously sorted by the Database in order to
improve the performance of queries using this index. They are used to find out records with a
specific value in a column. Without an index, the Database must start at the first record and
then read all the records until it finds out the relevant records. The larger the table is, the
higher the cost of processing time will be. If the table has an index for these columns, the
Database can rapidly get a position to search for in the middle of data files without having to
scan all records. The available index types are Primary, Unique, and Index.
You may create indexes in multiple columns. A multiple column index can be considered a
sorted array which contains values created by concatenating values of indexed columns.
Indexes can be configured using the icon, which opens the configuration dialog box, shown
on the next figure.
Index Editor
15.3 Exercises
Historic s 135
15.3.1 Historic
1. Right-click the item Databases and insert a new Historic in the project E3Training,
naming it as LevelHist.
Insert Historic
2. In the Historic just created, insert two new fields and configure them as follows.
Field configuration
3. Click the option Historic Properties , and on Historic tab, configure the following
properties:
· Database: Database
· Table: Level
4. Click the Create Table button. The message "The database table structure was created
136 Historic s
successfully" should then appear.
15.4.1 KB
· KB-24714: Number of fields in a Historic.
Historic s 137
15.5 Notes
138 Historic s
CHAPTER
16E3Chart
An E3Chart is an ActiveX component specially created to work alongside E3. With it, you can
display charts with Tags varying in real time and also display historic data stored in a
Database.
Each data sequence is represented by Pens on an E3Chart. Each Pen has data linked to it, and
this data can either be Tags or Query fields. You can create several axes with different scales
to be linked to Pen's data.
E3Chart
To insert this object on a Screen, right-click it and select option Insert - E3Chart.
E3Chart 139
16.1 Pen Configuration
A Pen Collection object represents a set of Pens contained on an E3Chart. Each Pen is
configured to show real time or historic data coming from a Query. On Pens tab, you can
configure the number and type of Pens to be created in Pens Collection. When you go to this
tab and click Add, a new Pen is created in E3Chart.
Pen properties
16.1.1 Real-Time
To configure a Pen as Real-Time, select Realtime option on Pen properties' Data tab, available
at Pen Type item. After that, define Tags at Vertical axis link and Horizontal axis link options.
140 E3Chart
16.1.2 Historic
A Query object is also used to show historic values on an E3Chart. On Queries tab you can add,
delete, or configure Queries. To create a Historic Pen, a Query must have been previously
created. To do so, go to Pen properties' Data tab, select Historic option, available at Pen Type
item, and define a Query. Then define Query fields at Vertical axis field and Horizontal axis field
items.
16.2 Exercises
Let's create a Real-Time and Historic chart with level variables. Using a button, let's choose
between a chart displaying its horizontal axis as real-time or historic.
16.2.1 ChartScreen
1. Insert a new Screen named ChartScreen in the project, to be opened on Splitter
Central_Area. Check option Set as main screen.
16.2.2 E3Chart
1. Place an E3Chart on ChartScreen.
16.2.3 Scale
Higher values are from Tag Level, which varies from 0 to 100, so let's change vertical scale to
display values inside that range.
16.2.4 Query
As we want to view historic data, we must configure a Query.
2. Click Add. Select "Database" in field Server Name, and then choose table Level.
E3Chart 141
3. Select fields E3TimeStamp, Level1, and Level2.
16.2.5 Pens
1. On Pens tab, click Add.
Pen properties
5. In option Vertical axis link, select Value property of Tag Level1 from folder Data.
Pen data
7. Repeat the last two items to create Level2 pen, linked to Level2 Tag, and then click OK.
142 E3Chart
16.2.6 Legend
1. On Legend tab, select option Show legend, size 60, and add all columns you want.
2. Configure column Value of tag X to display its value in the format "HH:mm:ss".
2. In this Check Box, create a script at Change event, and search for Level1's Visible property.
4. With AppBrowser, search for the E3Chart inside ChartScreen, Pens collection, Pen
Level1, and on the right select Visible property. Click Paste.
5. Type " = Value". Since you are writing this script for a Check Box, when typing "Value", you are
creating a reference to object's value itself.
E3Chart 143
Time interval
4. Choose a small initial interval (five minutes), so that Screen loads faster.
2. In the Setpoint with starting date, create a Bidirectional Link with Initial date, and create a
Bidirectional Link with E3Chart's HorScaleBegin property.
Bidirectional Link
3. In the Setpoint with ending date, create a Bidirectional Link with E3Chart's HorScaleEnd
property.
2. With AppBrowser, search for the E3Chart inside ChartScreen, and on the right select
144 E3Chart
HorScaleBegin property.
4. With AppBrowser, search for the E3Chart inside ChartScreen, and on the right select
HorScaleEnd property.
16.3.2 KB
· KB-18257: Creating a chart with digital points.
E3Chart 145
16.4 Notes
146 E3Chart
CHAPTER
17Reports
A Report is an ActiveX component called ActiveReport, which allows viewing and printing
snapshots of system's variable values and data stored in a Database (Alarms, Historic
Queries, and Formulas). To use a Report, right-click item View - Reports in Organizer, in Domain
mode, and select Insert Report in, and then project's name.
A Report also uses a Query object. This object allows specifying Database's data source to be
displayed in a Report.
A Report contains several sections. Each Report section contains a group of controls,
processed and printed at the same time, as if they were a single unit.
Report sections
Report structure
SECTION DESCRIPTION
Report Header This section prints at Report's beginning. It is
used to print Report headings, sum tables,
charts, or any other information that needs
to appear only at Report's beginning.
Reports 147
SECTION DESCRIPTION
to print a Report sum, grand totals, or any
another information that needs to be printed
once at Report's end.
Group Header, Group Footer A Report can have multiple nested groups.
Each group has a Header section and a Footer
section. A Header section is printed right
before any Detail section in a group. A Footer
section is printed right after a group's Detail
section.
A Report's toolbar has three configuration items that allow editing and viewing a Report, as
well as creating scripts. These items are:
· Preview Report: By using this option, you can preview a Report. With it, you will be able
to check margin settings, figures, etc.
· Report Settings: With this option, you can configure Page Settings, Preview Settings, Grid
Settings, and Report Style
· Script Editor: By using this option, you can edit scripts for a Report. In Object field, it is
necessary to specify for what object you want to create the script, and in Events field, the
Report event where action takes place
148 Reports
17.1 Report Objects
The Report tool has several specific objects that can be used, and they can be accessed on
Report's toolbar.
Report's toolbar
· Line: Basic straight line object that connects any two points. It allows you to draw
straight lines, by specifying two points when creating it, or in polygons
· Rectangle: This object allows you to draw a rectangle, using up the complete object's
width and height. It is created with at least two vertices
· Round Rectangle: This object is created by using two vertices, and you have the option
of rounding the edges by a rounding factor. When inserted or edited, it shows a small point
next to the object's upper left edge, which allows modifying the rounding factor
· Ellipse: This object allows drawing circles and ellipses, using up the complete object's
width and height, and defining the center of the circle in rectangle's center
· Picture: This object allows displaying images stored inside or outside an application file
· Text: It allows creating text labels. When defining Screen's area, you can directly type
the text, which also accepts multiple lines
· Setpoint: By using a Setpoint object, you can link it to a table field in a Database. This
field is specified in DataField property
· Page Break: It marks where a page finishes and another one starts on a Report. For
example, you can force a page break to make sure a chapter title always starts at a new
page
· Table: It is an object composed by rows and columns, where text or charts are inserted.
Tables in Reports are used to organize and present information. You can also use tables to
create page layouts
· E3Chart: This object is used to view Report data on a graphical format. For further
information on this object, please refer to E3Chart's specific chapter
Reports 149
· / Bring to Front / Send to Back: Using these buttons, you can bring an object to the
front or send it to the back of another object. When choosing Bring to Front or Send to Back
options, the selected object is placed on layer order's first or last position, respectively
NOTE: The Printer option in E3 icon on Windows Notification Area displays a list of printers
found either locally or remotely, and allows you to choose one to be used by E3 Server.
17.2 Exercises
Let's create a Report to print Screen's chart, and then all data displayed in that chart.
5. Between texts "Sub OnBeforePrint" and "End Sub", type the following script:
Set Chart = Report.Sections("PageHeader").Controls("E3Chart1")
Set ScreenChart = Application.GetFrame("Central_Area").Screen.Item("E3Chart1")
Chart.CopyConfig(ScreenChart)
Chart.LoadData()
17.2.2 Print
Before exporting the Report, we can view how it looks like when printed.
2. Create a script on Click event, which uses a Print Report Pick. Select ChartReport, and
then choose Screen on Output option.
150 Reports
17.2.3 Export
To help users to choose the name and directory of the file to generate, let's open a dialog box
for this.
4. Since you want to save a file, replace Open parameter with False.
5. FileName parameter must be an internal script variable to store file name. Replace it by
"FileName".
6. In case you do not inform a file extension, default is whatever is in Extension parameter.
Type "pdf".
7. To display a user's confirmation message in case a file already exists, change Flags
parameter to 128.
8. These file dialog boxes allow filters to search for file types.
File types
9. A filter is always a pair of Strings separated by a vertical bar (|), first item being the name
displayed to the user and second one being a Windows identifier.
11.A file can only be generated if a user clicks Save. If a user cancels this action, nothing will
happen. At the beginning of ShowFilePicker command type "If", and at the end type "Then".
12.To export a Report, use AppBrowser to search for item Tasks - Load Report - ChartReport, and
on the right select Export method.
Set Report = Application.LoadReport("ChartReport")
Report.Export([ExportFilter], [ExportFileName])
Reports 151
13.Replace ExportFilter parameter by "PDF", and ExportFileName parameter by FileName
variable previously created.
Configuring a Query
Configuring a filter
152 Reports
17.2.5 Page Header
This section is printed on top of each Report page. It is the first section printed on a page,
except when this page contains a Report Header section. It is used to print column headings,
page numbers, page titles, or any other information that needs to be printed at each page's
beginning.
1. For each chosen field in Query, insert new Text objects in Page Header section, and configure
them with field names. These are column titles.
17.2.6 Detail
The Detail section is the Report's body, which prints once for each data source's record. For
this application, let's display alarm data.
1. In Detail section, insert a Setpoint for each field, aligning it with its respective text. In
DataField and Text properties, type the exact column's name configured in Query.
1. Using data fields in an E3 Report is very flexible, being configured in the field executing that
function. For example, let's create an indication of "Page 1 of 12" in PageFooter section.
3. Between these Texts, insert a Display and configure it to show current page number.
· SummaryType: 4 - ddSMPageCount
· SummaryRunning: 2 - ddSRAll
4. After the "of" Text, insert a Display and configure it to display total page count.
· SummaryType: 4 - ddSMPageCount
· SummaryRunning: 0 - None
Reports 153
17.2.8 Report Header and Footer
These sections are printed at Report's beginning or end. They are used to print Report titles,
sum tables, charts, or any other information that needs to be displayed once at Report's
beginning or end.
1. Right-click the Report and choose Insert - Report Header/Footer. This option inserts both a
start and a final page in the Report.
3. In Report Footer section, insert a Setpoint object and configure its DataField property with
Clock path from Data folder, Data.Clock.
4. Insert a second Setpoint and configure it to display the name of Viewer's logged in user.
DataField property
5. Insert two Text objects, "Report generated in" and "By the user", according to the following
figure.
17.2.9 Print
1. To view the Report at run time, on EventScreen copy the Query button to create a new
button labeled "Print".
154 Reports
' Prints the Report
' Referencing Setpoints
IniDate = Screen.Item("spInitialDate").Value
EndDate = Screen.Item("spEndDate").Value
4. At the end of the script, again using AppBrowser, go to Tasks - Load Report - ChartReport, and
on the right select PrintPreview method.
5. Delete the line referencing the Report, because it was already declared at the beginning.
Report.PrintPreview()
6. Test Print(PrintPreview) method. Only data inside a specified interval can be printed.
Reports 155
17.3 Notes
156 Reports
CHAPTER
18Formulas
Formulas are modules created to store and transfer value sets to certain groups of variables,
in order to create pre-defined configurations, being basically an implementation of recipes.
Formulas are basically composed of three parts:
· Templates: Define data types that can be stored in any formula variable and their
restrictions. These restrictions allow enabling or disabling value changes in formulas at run
time, or else defining limits for changes
· Units: Define Tags that will be linked to a formula template. You can create several units,
that is, several Tag groups that will be able to receive values from a formula
· Value Sets: These are values that will be transferred to Tags, that is, to Units
Formulas are always linked to a Database, because they need to make sure that data
(Templates, Units, and Values), configured at any moment, remain valid whenever needed. To
work with Formulas, you can use any database type, and E3 Studio or E3 Server themselves
create necessary tables and relationships for use with Formulas.
NOTE: When using MDB (Microsoft Access) databases, it is interesting to create specific files
for Formulas and Historics, in order to avoid data loss in case of any problem.
18.1 Exercises
The Formula object will store information about ink colors, formed by a combination of red,
green, and blue.
18.1.1 Database
1. Insert a new Database in E3Training, named FormulaDB.
2. In field MDB file, locate folder E3Training, and type "Formula.mdb", no quotation marks.
Formulas 157
18.1.2 Formula
Insert Formula
4. On Templates tab, add three new Integer-type Templates: Red, Green, and Blue. For all
these Templates, choose 0 to 255 as their absolute limit.
Templates
158 Formulas
5. On Units tab, select any row from column Unit1, and then click Rename . Change Unit
name to Tank1.
7. Search for, in these two Units, the path of Tank1 and Tank2 Value property in Data.
Unit configuration
8. On Values tab, add more Value Sets, filling in columns with your preferred values.
9. To load Formula data, insert a button on SynopticScreen, set its Caption property to
"Load", and on its Click event, create a script with Viewer's LoadFormulaDlg method.
Application.LoadFormulaDlg "Formula"
18.2.1 KB
· KB-28508: Incorrectly loaded Formula values.
Formulas 159
Selecting values' table
3. Select only Name column, and then view Query. All registered colors should appear.
160 Formulas
18.3 Notes
Formulas 161
CHAPTER
19Storage
There is a whole set of specific functionalities for this module, like pre-built queries and data
compressing algorithms, among others. By using this tool you can accurately recover all
changes in process variables, while occupying minimum space in a database.
Using Storage is strongly recommended for processes where the objective is to follow trends
that need to keep essential process information. By using a mathematical algorithm widely
spread, the Storage can provide relevant information about a certain process occupying less
disk space than data stored by a Historic recorded periodically.
In processes where data must be precise, like measurements used for input billing (water,
energy, or gas), or processes where data must be paid up on a period, using conventional
Historics is recommended.
19.1 Functionality
Storage recording is performed the following way:
· After defining the table, data is stored according to its settings. If there is a variation in Tag
quality, data is also recorded
· Data is not stored only if variation occurred on a time period smaller than the minimum
configured
As new values are obtained for variables, a record checking algorithm interprets the sequence
and decides whether each point is stored or not.
This checking, however, only occurs for analog fields. For text and digital fields, it is enough to
have any value or quality variation to store them.
For each type of magnitude stored, a set of tables is generated, one for each analog Tag,
another one for texts and a third one for digital Tags. This way, each Storage can manage up to
seven tables (backup), in case you specify that all three Tag types must be stored:
<NomeTabela>_Fields
<NomeTabela>
<NomeTabela>_Text
<NomeTabela>_Bit
<NomeTabela>_Backup
<NomeTabela>_Text_Backup
<NomeTabela>_Dig_Backup
162 Storage
19.2 Configuration
When a Storage is created on the Screen, a list of recording field definitions is displayed.
Storage
For later data querying, the search is performed by the Tag path or the property being stored
(the Source field). The Name property is only used if the Source field contains an expression.
Therefore, if expressions are not used in the Source field, there is no need to import it with its
name.
Query configuration
Users may choose between seven functions to consolidate data, as described next.
Storage 163
19.3.1 LastValue
Returns the last value stored in the Database.
19.3.2 ArchivedValue
Returns a stored value relative to a given point in time defined on the TimeStamp variable.
The type of relationship can be:
· Interpolated: a calculated value, based on the previous and the next value
19.3.3 TagAttribute
Returns a Tag attribute, which can be:
19.3.4 CompressedDataNValues
Returns, to a single Tag, n values stored from an initial instant in time.
164 Storage
19.3.5 CompressedDataStartEndTime
Returns, to a single Tag, values stored between an initial and final interval.
19.3.6 SampledData
Returns, to one or more Tags, interpolated (estimated) values at fixed intervals between the
instants defined by StartTime and EndTime variables.
19.3.7 CalculatedData
Returns the result of mathematical operations applied to data between the instants defined
by the StartTime and EndTime variables, at fixed intervals. The types of calculations are
Total, Minimum, Maximum, Standard Deviation, Amplitude, Mean, and Median.
19.4 Exercises
Let's create two Storages, which are going to be used in the following chapters. The Storage
with temperature data is going to be graphically viewed, and the Storage with pump data is
going to be used by PlayBack.
19.4.1 Temperature
1. Insert a Storage object in the project. Change its name to StorageTemp.
Insert Storage
2. In the StorageTemp object, insert two fields and configure them as in the next figure.
Storage 165
Field configuration
· Database: Database
· Table: Temperature
19.4.2 PumpData
1. In the XObject PumpData insert a Storage. Name it PumpStorage.
Insert Storage
166 Storage
2. Add to the PumpStorage the Automatic, Failure, and OnOff properties of the object
PumpData. Configure them as in the next figure.
Storage fields
· Database: Database
· Table: Pumps
NOTE: When a Storage is inside an XObject, the table structure is generated when the
application runs.
19.5.1 KB
· KB-31955: Storage working only with a Studio hardkey.
Storage 167
19.6 Notes
168 Storage
CHAPTER
20E3Playback
E3Playback is an ActiveX that runs inside E3 Viewer or E3WebViewer and allows viewing
application Screens by using historical data stored on databases.
E3Playback retrieves Tags referenced on Screens from a database and displays values,
animations, states, and charts according to information on that database, in a defined
playback period.
NOTE: In Demo mode (or with a Studio license), the allowed playback period is restricted to
the last six hours of data stored on a database.
20.1.1 Toolbar
E3Playback toolbar
20.1.2 Timeline
The Timeline allows visually following and controlling playback clock.
Timeline
Event List
Tag List
The Tag List can help determine which Tags need to be stored on a database to allow a full
playback of a Screen just by checking Tags with a forbidden icon next to them.
· You are not allowed to access server objects using Application's GetObject method. Script
errors occurred in E3Playback do not generate an error message, they are quietly aborted
· E3Playback emulates a real Viewer. You can test the IsPlaybackMode property
· E3Playback treats new Frames created by the application as tabs on top of the Screen Area.
The tab title is the name of the open Frame or Screen
· All Links referring to server objects are captured by E3Playback, and start receiving
historical data according to the current playback clock
· Links among Viewer objects (for example, a Display showing the value of a Viewer internal
Demo Tag) work normally, without playback interference
· E3Chart only works inside an E3Playback if it is configured with Historic Pens. Real-time
Pens are disabled
· E3Alarm displays the alarm summary according to what is stored in the alarm table on the
database
20.2.1 Storage
· The Source column must not contain expressions, because they cannot be used in playback
· FullAlarmSourceName
· ConditionActive
· Acked
· AckRequired
20.2.3 Historics
The Historic file format is not ideal for playback, because it generally has a great amount of
duplicated data stored in it. It is advisable using Storage whenever possible. Follow these
recommendations:
· Use tables with a few fields and, if possible, add an individual index for each field (mainly for
the ones with little variation)
20.3 Licensing
Elipse provides two packages for E3Playback:
· Basic Playback
· Advanced Playback: Basic plus Video Recording and Screen Capture tools
Packages are sized according to the number of I/O points (Tags and Alarm Sources) stored on a
Database. If a Database has more points than the available licenses, Database assembling
fails and an error message is then displayed.
The E3 Studio's license includes an Advanced Playback license with unlimited I/O points,
although it is limited to the last six hours of data stored on a Database. In Demo mode (when
20.4 Exercises
20.4.1 PlayBackScreen
1. Insert a new Screen on the project, called PlayBackScreen, to be opened on Splitter
_top.
20.4.2 Configuration
1. On PlayBackScreen, insert an E3PlayBack object filling the whole Screen.
E3Playback properties
2. A line with existing interval data will appear on Timeline, and Event List will be populated.
Timeline
3. Choose the event you want to start reproducing and click Play button.
21Hot-Standby
The Hot-Standby implements a failover concept in a supervisory system, that is, two servers
(main and backup) acting in contingency mode; if main server fails, a backup server
immediately takes over, without having to stop running processes. This backup server is
known as Standby.
21.1.1 Files
Domain files must be at the same location of main and backup servers. For example, if main
server's Domain and other files (.lib, .prj, etc.) are at C:\Project1, in Standby server the project
must be copied to that same path, that is, C:\Project1.
21.1.2 Servers
Servers (main and backup) must be listed on Servers tab of Domain options.
1. To open Domain's configurations, click the E3 Admin icon on Windows Notification Area
and select Domain - Options menu.
176 Hot-Standby
Domain - Options menu
2. Servers may have any name in Server name field. In Network address field, type the
computer's name on the network. For example, Server name as Server1 and Network
address as \\server1.
Servers tab
Hot-Standby 177
21.1.3 Configuration Options
On Options tab, check Enable item, and in Main server and Backup server options, choose
previously registered servers on Servers tab.
Options tab
178 Hot-Standby
21.1.5 Local Failure
Local failures are detected and reported by the application via Application.ReportFailure
method. You can enable automatic server switch when a local failure is reported on the main
server. Server switch is only performed if backup server has no failures.
21.1.6 Database
When working with databases and Hot-Standby, there are basically two structure options:
· Both applications access the same network database. The Hot server stores data on this
database
· There are two databases running locally, on both servers (main and backup). In this case,
enable Database's EnableSynchronization property, so that all data recorded on the main
database is also updated on the Standby database
If the main application cannot send data to the Standby server, this data remain stored locally
on disk, to be sent later (when communication between computers is reestablished), thus
ensuring that tables generated by the application are equal.
21.1.7 Retentive
Retentive property determines if a value must be stored in case the active server is switched.
So, when the Standby server executes, its value is the same as the Hot server's when it
stopped. If this property is False, the value is set to the initial value whenever the Domain is
executed or the active server switches.
21.2 Exercises
21.2.1 Retentive
To highlight the differences, let's turn Tank1's color Tags (red, green, and blue) to retentive,
and Tank2's color Tags to non-retentive.
1. Select all Internal Tags of folder Tank1 (red, green, and blue) and change their Retentive
property to True.
Hot-Standby 179
21.2.2 Local Failure
1. In Data folder, insert an Internal Tag named LocalFailure.
3. In Tag LocalFailure, create a user event called Failure, which only occurs when Tag
value is True.
7. For this Tag to return to its normal state, type in the last line the expression "Value = False".
Value = False
180 Hot-Standby
Load Value Pick
2. On Standby server, open the application in E3 Studio and configure the Database for a local
SQL Server.
1. From either Hot or Standby computer, click E3 Admin icon on Windows Notification Area
and select Domain - Options menu.
2. On Servers tab, add two servers informing both computer's name on the network and any
other name.
3. On Options tab, enable Hot-Standby and choose one server as main and the other one as
backup.
Hot-Standby 181
21.3 Additional Exercises
21.3.1 KB
· HotStandBy: Frequently Asked Questions (FAQ).
182 Hot-Standby
21.4 Notes
Hot-Standby 183
CHAPTER
22Remote Domains
Remote Domains configuration establishes that different servers and Viewers can
communicate, where one application will send data and the other one receives data. The
Domain sending data is called the Server Domain. The Domain using this data is called the
Client Domain. A Domain configured as Client may also work as a Server at the same time, and
vice versa.
With these Remote Domain configurations, a Client Domain can access objects from a Server
Domain in two ways: by using scripts or via links. For the connection between Domains to
occur, all E3 Servers involved must be running the same E3's version.
NOTE: Associated REC connection port and possible firewall configurations also apply to
Remote Domains.
Another possibility is to keep a copy of the Remote Domain on client machine, and type this
copy's path in Domain File field. This way, E3 Studio uses this local copy to determine which
objects exist, allowing it to work offline.
1. If the machine uses Windows 2000, 2003, or Vista, go to Administrative Tools - Local Security
Policy Control Panel.
3. Disable option Network Access: Restrict anonymous Access to Named Pipes and Shares.
Security options
If Server Domain's machine uses Windows XP, configuration must be performed directly at
Windows Registry. In this case, follow these procedures:
Configuration using Windows Registry can also be performed in Windows 2000, 2003, and
Vista. According to Microsoft, the key RestrictNullSessAccess specifies whether a
server limits access to system by users logged in with no username and no password
authentication. Possible values are:
· 0: Access without authentication is allowed and all users have access to shared resources
· 1: Does not allow access without authentication. Users without authentication can only
access directories listed on variable NullSessionShares
In either case, you must restart the machine to apply changes. In addition, you must configure
sharing and NTFS to accept access from anonymous users (ANONYMOUS LOGON) or network
users (NETWORK). To do so, follow these steps:
1. Select the folder containing the Server Domain, which must be shared.
4. Add NETWORK user or ANONYMOUS LOGON user, allowing reading access to that folder, and
then click OK.
5. Go to Security tab, and once again add NETWORK or ANONYMOUS LOGON user (the same one
added on Sharing tab), then click OK.
NOTE: For communication between machines to work correctly at run time, firewall must
either be correctly configured or disabled.
22.3 Licenses
E3 Server running the Client Domain, as well as the one running the Server Domain, must have
specific Remote Domain licenses. When this license exists, E3 Server running the Server
Domain accepts an unlimited number of external connections from other Domains. Likewise,
in case of an E3 Server running a Client Domain, it is possible to establish an unlimited number
of connections.
This tool allows creating a Remote Domain in the local application pointing back to itself, that
is, pointing to the local Domain and machine.
Local alias
When configuring an application, you must link all Screen objects and scripts via recently
added Remote Domain.
22.7 Exercises
22.7.1 RemoteScreen
1. Insert a new Screen named RemoteScreen on the project, to be opened on Splitter
Central_Area. Check option Set as initial Splitter's screen.
22.7.2 Sharing
1. Share project folder and configure its permissions according to section Sharing the Server
Domain Folder.
2. On Remote Domains tab, insert a Domain and configure the following properties:
5. On RemoteScreen, create a Display to show values from any Tag. Search for, in the
AppBrowser, a Tag inside Remote Domain Local_Domain.
2. On Remote Domains tab, insert a Domain and configure the following properties:
· Domain File: Remote Domain's file path. This path must be a network sharing which
allows accessing this file or a local copy
5. On RemoteScreen, create a Display to show values from a Remote Domain. Search for, in
the AppBrowser, a Tag inside Remote Domain Remote1.
6. Create a Display or Setpoint for each Tag you want, and link them via Remote Domain path.
RemoteScreen
23Revision Exercises
23.1 Exercise
A mining company wants to monitor the levels of a few tanks. The equipment to be used in it
has not been decided yet, but it must bring information about four levels.
The sector manager wants to view data in a user-friendly way, then they asked to develop a
supervisory with the following requirements:
· Simulate values of the four levels of the equipment on failure (values from 0 to 100)
· Display the level value on screen formatted with its engineering unit as "%", one decimal
place, and obeying the following color table
70 90 Yellow
30 70 White
10 30 Blue
0 10 Green
· Sign on screen the alarms of all levels, according to the following table
ALARM LIMIT
HiHi 90
Hi 70
Lo 30
LoLo 10
· On the main Screen, you must be able to identify the logged in user
· On a second Screen, you can view those four levels on a chart, where you can choose which
information to display simultaneously via buttons
Level chart
· View data stored on a database on a table in the same Screen of the chart
· A report with level data stored on the database must be exported as PDF
1. To simulate values, create Demo Tags, setting their maximum and minimum limits as
specified.
3. Type the name of the figure in the PictureFile property of the Screen.
3. Create a Link from the VerticalPercentFill property to the corresponding Tag Level.
· Display the level value on screen formatted with its engineering unit as "%", one decimal
place, and obeying a color table:
1. As there are several duplicated Displays, the best option is to create an XControl.
5. Draw a Display.
7. Create a Simple Connection to the Level property created in the Value property of the
Display.
1. If the Domain does not have one yet, insert an Alarm Server in the project.
2. If the Domain does not have one yet, insert an Alarm Configuration in the project.
5. Access the properties of the Alarm Source, Analog tab. Inform limits and alarm
messages according to the table.
6. In the Source column, search for the Tag you want the alarm to monitor.
7. Insert as many alarms as needed and configure them according to the previous steps.
· On the main Screen you must be able to identify the logged in user:
2. Create a Connection from the Value property of the Display to the User property of the
Viewer.
5. Access the File - Users menu and create at least one user.
4. In the Permissions tab, block alarm acknowledgement for the Maintenance group.
4. Insert a Pen.
6. In the Data tab, keep one Pen as Real Time and search for the Tag in the Vertical axis
link field.
1. If the Domain does not have one yet, insert a Database object and configure it.
3. Create fields for each information and link them to the respective Tag in the Source
column.
· View data stored on a database as a table in the same Screen of the chart:
3. Configure the Query to fetch the table just created on the Database.
4. Choose the fields you want to fetch and in the Visualize tab, press the button to
check data.
· A report with level data stored on the database must be exported as PDF:
Branch SP Branch PR
Rua dos Pinheiros, 870 - Conj. 141/142 Av. Sete de Setembro, 4698/1705
05422-001 São Paulo - SP 80240-000 Curitiba - PR
Phone: +55 (11) 3061-2828 Phone: +55 (41) 3342-0120
Fax: +55 (11) 3061-2828 Fax: +55 (41) 3342-0120
E-mail: [email protected] E-mail: [email protected]
Branch RJ USA
Praia de Botafogo, 300/525 40190 Jarvis Gray Lane
22250-044 Rio de Janeiro - RJ Avon - NC - USA 27915
Phone: +55 (21) 2158-1015 Phone: +1 (252) 995-6885
Fax: +55 (21) 2158-1099 Fax: +1 (252) 995-5686
E-mail: [email protected] E-mail: [email protected]
Germany Taiwan
D-67714 Waldfischbach Deutschland 9F., N.12, Beiping 2nd St., Sanmin Dist.
Phone: +49 (0) 6333-4439 807 Kaohsiung City - Taiwan
Fax: +49 (0) 6333-2790045 Phone: +886 (7) 323-8468
E-mail: [email protected] Fax: +886 (7) 323-9656
E-mail: [email protected]
Check our website for information about a representative in your city or country.
w w w .elipse.c om.br
[email protected] om.br