Professional Documents
Culture Documents
After you get to know the work area at E3 Studio, click the
icon New on Default Tool Bar, or the menu File—New Project.
3. Next, name the project “MainProject”. When questioned whether you want to
create the folder MainProject, reply “Yes”.
4. The next window on the wizard, click “Create a New Domain”, and use the
same name as the project. Reply “No” to the next three questions, and then
click “Finish”.
6. Direct the project to the same path as MainProject, that is, to “c:\e3training”.
Name the project “IndustrialProject”. It is advisable not to use accents nor
spaces between names, to avoid distortions and the generation of errors in the
domain (this will be seen later in this tutorial).
7. Click Next, and then Yes to the window that will open. Next, select “Add to
the Current Domain”. Finally, click Finish to conclude the project.
9. By the end of these procedures, you will have in the Organizer the scheme
displayed in the picture below:
Picture 1: Organizer
1. Inside the folder Data in MainProject, insert a Demo Tag, and define its type
to CurrentTime. This tag will be used on MenuScreen to display system’s
time. Rename it to CurrentTime.
3. Inside IndustrialData server, insert the demo tags of the table below:
4. The way the data will be used on screen will be described later. Just remember
not to use spaces nor accents.
6. Still in ElectricalData folder, create three new demo tags, type Random,
values from 34000 to 42000. Rename them Tension1 to Tension3. Tension
tags will be used in the study of graphics.
7. In the same data server, insert an internal tag called KeySec. This tag will be
used in the study of alarms and libraries.
2. Modify the property DriverLocation to the folder where the driver is installed
(it is advisable to keep it in a specific folder for this purpose inside the project’s
folder, to make project maintenance easier).
9. Follow your instructor’s steps, and write down any step you think is important
in the space available at the end of the exercises, so that your doubts can be
solved during the development of a real project in class.
1. Import some tags from their own definiton on an Excel spreadsheet. Save the
spreadsheet as a file with .CSV extension, and choose the option “Import
Tags” in the I/O Driver. The description of the fields in the spreadsheet can be
obtained at User’s Manual.
2. Create another I/O driver in your application and check how drivers are shared,
by checking the option SharedServer as True in both cases, besides from
specifying the same path for the I/O driver. The second driver being executed
“borrows” its connection from the first driver.
3. Perform some tests using tags’ Scale and DeadBand properties. Scales are used
to convert values, and DeadBand is used to make new tag values to be sent to
Tutorial Exercises Book 4
E3 Server only if they have a value x% higher or lower than the last reported
value, thus diminishing the traffic of unnecessary information.
2. Right-click the inserted OPC Driver, select the option Properties, and go to
OPC Driver tab.
3. Click Select button. A window with options for local servers or network servers
will be opened. Select your instructor’s Elipse OPC Server in the option
Network Servers.
4. Press the button Activate Driver. From this point on, it is possible to check
communication with the server by clicking Information.
5. The next step for configuration is importing tags. Close Properties window
and right-click the OPC driver. Select the option Import Tags. With this action,
E3’s tag importing wizard will be opened:
7. After importing some tags or properties, check for the performance of the
imported tags.
8. Just like with the configuration of Elipse Drivers, the routine to work with OPC
Server is the same as with any other server in use. Write down any items you
considered important at the end of the exercises, to make subsequent
consultations easier.
4. Insert a new Frame in MainProject. Frame1 will be created, with the item
Splitter1. Right-click the frame and select the option Split Horizontal,
according to the picture below:
5. Place the bar at around 10% from the frame, from its lower limit. Next, left-
click it and establish bar position. Check if there are two new splitters on
Frame1.
7. For the Frame (and its splitters) to start displaying Screens, it is necessary to
configure SplitLink property of the splitters.
4. Next to this bitmap, place a text “E3 Studio Training” using Arial font, size 22,
in Blue. Below, place a second text, displaying the message “Elipse Software”,
also using Arial font and in Blue, but with size 16.
5. In the lower center of the screen, place two text objects. The first one displays
the message “Enter the System”; the second one displays “Close Viewer”. Both
should use Arial font, size 12, in Blue.
)
This Screen will be used as a browsing tool among screens throughout the domain. It
will only contain links to other screens in the system, and nothing else. Screen
layout will follow this pattern:
1. Change Screen’s background color to White, and adjust its height (through
Height property) to 2000.
5. To distribute the spaces evenly between screen objects, select them all and
press the button Space Across .
In all Screens, labels will be created on their upper part (displaying Screen names),
to help identify them all when browsing, even when the screen had not yet been
edited. The example can be seen in the picture below. There is no restriction to
colors on each screen, except for ElectricalScreen, which will be described in more
details later.
1. In EventScreen, place a text and modify its value to “Initial Time:”. Place a
second text as “Final Time:”.
2. Next to those two texts, place two SetPoints, used to display initial and final
time to be selected from a calendar, which will be built later on. Format these
two SetPoints to display the time, in date/time format, and rename them
TxtIniTime and TxtFinTime.
1. In AlarmScreen, after you configure the text with screen title, place on its
lower parte a Command Button with Caption property set to “Alarms
Acknowledgment”.
11. Finally, insert TankerTruck2, from Vehicles folder. On this object, insert
linear movement with the button Linear Slider , to simulate the truck
movement leaving from the left.
13. Insert a Display, and configure its formatting to display values with two
decimal places, with the prefix Outflow:. To do so, configure display’s Value
property as Long, and Format’s property should contain the string “Outflow:”
0.00.
14. Insert StraightArrow2 from Arrows folder. Right-click the object and choose
the option Convert to Symbol.
15. Rotate the object through the option Rotate , directing it to the left. Signal
the sector Production.
16. Repeat the whole operation, now replacing the text to Dispatch. In case there is
any doubt, check it with the instructor.
(#
• OverrideFillMode: 2- Solid
• BackgroundStyle: 1- Opaque
6. In HarpinTurnDown, modify:
• 0 a 10: 0- No Override
• 11 a 40: ByBrightness
1. On InitialScreen, click “Close Viewer”, and on scripts tab create a new script
on Click event. Locate Exit method, which can be found at Viewer, in scripts
editting area, through AppBrowser. Copy it to the script.
2. On the same screen, click “Enter the System” and create on Click event a new
Open Screen pick. In the item Open Screen, select Frame1. In Initial Zoom,
select Fit.
1. EventScreen enables you to view the alarms in the system, filtered in time
intervals. To do so, you will use E3’s method that displays a calendar. The
purpose of the next exercises is to create Screens and filter control buttons.
Also, we can visualize the selected time through a message on the Screen.
2. Now you will edit the scripts that allow you to modify both the initial and the
final time of the events query. Create on initial time’s SetPoint a new script on
Click event. In this new script, the code to be inserted is:
Dim Hora
'Calls Calendar function
Application.ShowDatePicker Hora, 0, 0
'Passes the chosen value to SetPoint
Value = Hora
4. To view the selected time, create a new script on Click event of the Command
Button already configured on Screen. Insert the following code in the script:
'Passes the values from SetPoints to script variables
Initime = Screen.Item("TxtIniTime").Value
Fintime = Screen.Item("TxtFinTime").Value
MsgBox "Hora Inicial: " & Initime & Chr(13) &
"HoraFinal:" & Fintime
5. Run EventScreen as the initial Screen, and check E3’s buttons and calendar to
see if they are working properly.
1. The next step is configuring the button that will call AlarmScreen modally on
MenuScreen. To do so, go to the properties on Alarm button, and create a
new script on Click event. Insert the following code on the script:
Application.DoModal "AlarmScreen","Alarms Screen",_
100,100,500,500,0
1. To include the options, you should create a new script in ComboBox for
OnStartRunning event. Para incluir as opções, deve-se criar na própria Lista
de seleção um novo script para o evento OnStartRunning. Insert the code
below:
'Delete existent lines to avoid duplication
Clear()
AddItem "Industrial Screen"
AddItem "Electrical Screen"
AddItem "Event Screen"
AddItem "Historic Screen"
AddItem "Formula Screen"
AddItem "Initial Screen"
3. After all the options are registered, it is necessary to compose a script that will
browse among Screens when some option is selected on the combo box. To do
so, click the ComboBox, go to Scripts tab, and create a new script for Click
event. The script below shows how browsing among Screens is performed.
'Choose which Screen will be opened and store the answer
in the variable Screen.
Select Case(ListIndex)
Case 0
Screen = "IndustrialScreen"
Case 1
Screen = "ElectricalScreen"
Case 2
Screen = "EventScreen"
Case 3
Screen = "HistoricScreen"
Case 4
Screen = "FormulaScreen"
Case 5
Screen = "InitialScreen"
End select
1. After you have finished the first draft of ElectricalScreen, click again on New
Project , and on project wizard select the option E3 Object Library. Name
it TrainLib and save the application on the previously created MainProject
folder. Click next, add it to the current domain, and finish it.
5. Save the changes and register the library, accessing this option by right-clicking
it.
7. Insert a new XControl in the library, and name it Sectional. On central bar,
add a rotation and change its point of reference to the lower part.
Configure it according to the appearance and data illustrated below.
9. When you finish configuring the Sectional, save it in the library and register it.
To illustrate thow the object works, insert a Sectional object on Screen, right
below the box with the text Concessionaire.
10. Create a link for the property Status with the tag KeySec.
11. The object Sectional Text created on ElectricalScreen should toggle the value
of KeySec.Value variable between 0 and 1 at each click. For this, use the
button’s “Toggle Value” pick.
12. When you execute the application, you will notice that the sectional’s design
follows the value defined by KeySec tag, just as the updated current values are
shown on CurrentDisplay objects placed on Screen.
13. The next steps demonstrate how to create a data object, and how to create a
Screen object that uses data made available by this XObject. Over the library,
insert a new XObject, and name it BreakerData. Insert three properties and
configure them like the model below.
15. Insert a new XControl in the library, named Breaker. Configure it according
to the model in the picture.
16. Link Value property of the text inserted right to the circuit breaker to the
expression Breaker.source.Name (“Name” is the name of the breaker to be
configured in the XObject instanced at ElectricalProject).
17. In the red rectangle, create a digital link for ForegroundColor property to the
expression Breaker.Source.Status. When on, the breaker should be Red, and
when off, Green.
18. Still in the rectangle, create a script for Click event, with the commands listed
below.
set DJ = Disjuntor.Fonte
'If Breaker has no faults
if DJ.Defeito = false then
'If it is on
if DJ.Estado = true then
'Ask user if they would like to turn off
if MsgBox("Turn Breaker off " & DJ.Nome & "?",_
vbOKCancel, "Confirme!") = vbOK then
'If yes, turn off
DJ.Estado = false
else
' If not, cancel command
MsgBox("Abort command – Turn Breaker off " _
19. This enables both the breaker’s current state and and the condition of the fault
listed on XObject’s properties to be checked. Besides, any manouver to be
made will display a confirmation box to be answered before the operation.
20. Once again, save the updates and register the library.
21. Create the folder BreakerData inside the folder ElectricalData to ilustrate
how the objects BreakerData and Breaker work. In this folder, you will insert
three BreakerData objects, and one FaultDJ1 internal tag. Adjust each
BreakerData’s Name property to Dj23-01, Dj23-02, and Dj23-03.
22. Insert three Breaker objects in ElectricalScreen, one to each bus’s output. Link
each one to a BreakerData instanced at ElectricalProject.
23. Create a Toggle Value pick for the variable FaultDJ1.Value on Electrical
Screen’s Text DJ1 Faults. Follow to BreakerData1 and link Fault property to
the variable FaultDJ1.Value.
24. Save the updating and run the project. All breakers will have similar
functionality, although their data are different.
2. Place the file in the folder e3training, where all project’s files are. Name the
file Data.mdb. This database will be used to store all data about alarms and
historics in our project.
2. Inside the area you have created, insert three Analog alarms, whose sources
will be the Current tags from ElectricalProject. Before you link them to these
tags, rename them as CurrentAlarm1, CurrentAlarm2, and CurrentAlarm3.
3. Click the source editting area and, through AppBrowser, select each Current
tag’s Value property (ElectricalProject’s ElectricalData folder). When
configuring each alarm, check the items Lo (limit=30) and Hi (limit=80).
Adjust the messages to each alarm level.
6. Create a new alarm area and rename it IndustrialArea. Create two new analog
sources, OutflowAlarm and LevelAlarm, and link them to the tags Outflow
(Lo=10 and Hi=40) and Level (Lo=30 and Hi=70), from IndustrialData
folder. Change Severity property to Medium.
7. Insert an Alarm Server object, and set it to save data from the database
registered in MainProject. Next, check the server to “Mantain Data from
Last 3 Months”, cheking them every month. Click Fields button, and add
EventTime field. Last, click Generate Table button. A message of success is
displayed.
2. In the historic recently created, insert three new fields and adjust these fields’
sources for the tags Current1 to Current3, from ElectricalProject. Next,
change the stamps in each field so that their names are the same as the tags’.
3. Next, click the option Historic Properties. Select DBServer and name the table
to be used as CurrentsTable. The historic’s recording interval should be 2
seconds long.
4. To finish it, click Create DB Structure button. With this, the necessary tables
will be created in the database.
5. The current data will be saved every two seconds, as soon as the domain begins
to run.
2. Double-click E3Browser, go to Data Source tab, and click Get Fields button.
The query configurer will be opened. Then, select the DBServer available in
the domain.
4. Generate the query to check if it is working correctly. When you finish this
step, all the fields listed on the query will be available in the browser.
6. With the configurations made above, all the content of the currents historic
table will be refreshed on Screen every ten seconds. Many times, this is not
viable, either because of the amount of data stored in the historic, or because of
the high amount of fields, or even because of the great number of registers. So,
the application of filters for historic diplay is made necessary. Examples of
fields will be created in the next exercises.
9. Highlight the column Severity to make filter checking easier. When you select
the field, drag it up, until it is right below EventTime.
10. For alarms filter, use EventTime field. It is necessary to create the filter for
field value input in the query. Click the query, and edit the filter on
EventTime’s Filter column as in the picture below:
12. This script creates the query to be made to the DB, with values configured at
the time SetPoints created at EventScreen. To check the query, adjust the
period between which the alarms content will be displayed.
6. Still on Axis tab, click Add button. A new scale will be created, called
TensionAxis, and its values should be adjusted to 34000 and 42000. Change
the item Scale Color, so that it distinguishes itself from CurrentScale.
7. Now you will start working with on-line pens. To do so, go to Pens tab. Create
a new pen and access its properties.
8. Configure the pen, begining with Vertical Axis Data, which should be linked
to Current1 tag. With Vertical Axis, use Axis. Create a new pen to each
CurrentTag.
9. Now configure tension pens. Add three more pens and relate them to the
corresponding tags. The axis should be TensionAxis.
10. When you have finished configuring the pens, proceed with legend
configuration. Go to Legend tab, enable the item Show Legend, and mantain
the option on bottom. Select the columns Pen Color, YScale, Y Tag Name,
and Y Tag Value. The Graphic’s configuration is now completed.
11. To enable or disable the pens that had been created, insert on Screen six
CheckBox objects. Each box should be named after one of the tags displayed
on the graphic (Current 1 to 3, and Tension 1 to 3).
12. Change each checkbox’s Value property to True. Thus, they will be in
accordance with the pens’ initial visibility when you open the Screen.
13. In each button, create a script on Change event with the following code:
Set Pena1 = Screen.Item("E3Chart1").Pens.Item("Pen1")
Pena1.visible = Value
14. In this script, the number 1 should be replaced by the pen’s number (1 to 6). So,
each button will be responsible for showing or hiding one of the pens created in
the graphic.
1 2
5. Next, configure the pens. Create a new one, configure it to be Historical Data
from Query, and use the query you have created at the beginning of this
exercise. Select Current1 for vertical axis, and E3TimeStamp for horizontal
axis. Picture 15.3 ilustrates how the configuration of historic Pen1 should look
like.
7. Since query periods are usually smaller than one day, you can make that each
time the Screen is open only the data from the last two hours are displayed.
Create a new script for HistoricScreen’s OnShow event. The following code
will make the necessary adjustments for the two-hour period to be displayed:
Sub TelaHistorico_OnShow()
Set Chart = Screen.Item("E3Chart1")
Chart.Axes.HorAxis.SetHistoricPeriod now - 2/24, now
End Sub
8. Create a button called Update Graphic with the following script to refresh it:
Screen.item("E3Chart1").Queries.UpdateData()
9. Run the project and check the results obtained. In case you have any doubts,
call your instructor.
2. Adjust report query to find current data stored in the DB. To do so, double-
click the query, through Organizer. The available tables will be displayed, so
select CurrentsTable. Then, queries wizard will be opened. Select, on
CurrentsTable, the variables E3TimeStamp and Current1 to Current3.
These data will be available to be displayed in the report.
3. The next steps define the report’s appearance, since the data to be displayed
have already been configured. Insert a bitmap in PageHeader area, and place
the picture file indicated by your instructor.
6. Still in PageHeader area, insert four new Text objects and configure them to
Date/Time and Current1 to Current3. Adjust them to be level with the
lowermost limit in PageHeader area.
7. On Detail field, insert 4 SetPoints, aligning them with the fields created in
PageHeader, since these fields will be responsible for displaying historic data.
For each field, configure DataField property for the data it will display. For
example, the field below the label Date/Hour should have as value
E3TimeStamp in DataField; the labe Current1 should have as value
Current1, and so on
8. To split data lines in the report, at the end of Detail area, insert a horizontal
line.
9. The report is configured to display the current values selected from Database.
To view this report, press report’s Preview button .
10. E3’s report data fields use is very flexible, being configured on the same field
where the function this field should execute is. As an example, you will create
in PageFooter the text indicating “Page 1 of 12”. To do so, insert two texts.
Configure one of them to “Page”, and the other to “of”. Between them, insert a
SetPoint and configure SummaryType property to 4 – ddSMPageCount, and
SummaryRunning property to 2 – ddSRAll. This will display the current page
number.
12. Execute report’s visualization one more time, and check the changes made.
14. This will make the report visualization Screen be displayed. From this Screen,
it is possible to configure printer and paper characteristics, among others, and
also print the report. To print the report without viewing it, use the report’s
Print() method.
1. Before you start working with formulas, in IndustrialData folder, insert a data
folder called Formula, and inside it, create a subfolder called Tank1. Inside
Tank1, insert three internal tags and rename them to Additive, Alcohol, and
Coloring.
4. Type TrainFormula as the name of the table, and link the formula to
MainProject’s DBServer.
5. Next, define a format to the formula, with the data on the table below:
NAME TYPE RESTRICTIONS
Additive Integer A 1 20
Alcohol Integer A 15 25
Coloring Integer P 10 10
6. Go to the next Screen. Create two new units, receiving different values for their
tags. In Unit1, link Tank1’s tags to the respective template’s tags. Next, create
create the second unit, and link it to Tank2 folder’s tags.
7. On the next Screen, create four new cluster of values, obeying the previously
defined limitations by the format. The values can be the constant ones in the
next table.
ITEM’S NAME VALUE1 VALUE2 VALUE3 VALUE4
Additive 15 18 20 5
Alcohol 23 15 20 21
Coloring 10 8 15 20
10. For the command button with the label Load Quiet Formula, edit the
following script.
Unit1 = Screen.Item("TxtUnit1").Value
Unit2 = Screen.Item("TxtUnit2").Value
'Loads values cluster chosen form the two units
set formula = Application.GetObject("Formula1")
formula.LoadFormulaValuesQuiet "Unit", "Value"&Unit1
formula.LoadFormulaValuesQuiet "Unit2", "Value"&Unit2
11. This script will load the cluster of values especified at the setpoints for the
respective units. Notice that you will use only the values 1, 2, 3, or 4 at the
setpoints, because you will only have registered four cluster of values.
12. For the command button Load Dialog Formula, edit the script below. You will
find LoadFormulaDlg method among Viewer’s methods.
Application.LoadFormulaDlg "Formula1"
13. This script will make the loading of values to formula units be done through a
wizard.
15. For the same purposes as the previous exercise, create the script below at Save
Unit2 button.
Unit2 = Screen.Item("TxtUnit2").Value
Set formula = Application.GetObject("Formula1")
Formula.SaveFormulaValues "Unidade2", "Valor"&Unit2
Users Table
USERS Paul Henry Sally Peter
PASSWORD P H S P
ADMINISTRATOR Yes No No No
ADMINISTRATORS Yes Yes Yes Yes
SUPERVISORS No Yes Yes No
OPERATORS No Yes No Yes
3. Access the tab Permissions, and select the option Groups. For the group
Adminstrators, enable the opening of all Screens, except for InitialScreen,
which sould not check users. For alarms, block the option Alarm
Acknowledgment for Electrical and Industrial areas. Enable all Domain
options for this group.
4. For the group Supervisors, enable the opening of all screens, except for
InitialScreen. Enable the option Alarm Acknowledgment. Block all Domain
options.
6. Now, select the option Permissions, and click Users. For user Paul, enable the
option Alarm Acknowledgment at Electrical area. Since he is part of
Administrators group, individual permission overrides group permission.
7. Go to InitialScreen and create Click event for the text Enter the System, and
run the command Application.Login().
8. Run the application, using all the registered users. Check each user restrictions
or permissions behavior. When you doubt, ask your instructor.