Académique Documents
Professionnel Documents
Culture Documents
ELIPSE SOFTWARE
TUTORIAL
Copyright 2002 - 2. 22 SP 20 - Elipse Software Ltda.
All rights reserved.
Summary
1. INTRODUCTION .................................................................................................................... 1-1
W elcome to the training. This manual introduces the Elipse Scada training
module and it aims to aid the learning of the contents given during training
classes. For a better learning, we suggest that you read this manual carefully,
make your own notes during the class, ask the trainer as much as you can to
solve any questions, and pratice what you learned. We appreciate your interest and wish
you success with your new tool.
this…
Conventions
Check the following list for syntaxis and some conventions used in this manual.
Example Description
1
Capítulo
1. Introduction
T
He Elipse Scada is a software for the creation of process supervision and
control applications for several areas. It can be completely configured by the
user which allows the monitoring process variables in real time through
graphs and objects that are related to field physical variables. Furthermore, the
user will be able to operate and send or receive information to the data acquisition
equipment.
The software is avilable in four modules: View, MMI (Man Machine Interface),
Professional and Power.
All the forementioned modules have Configurator, Runtime, and Master versions.
The Runtime is used to run process supervision applications after they have been
developed making use of the Configurator.
The Master embodies in the same tool one Configurator module and one Runtime
module, which allow the set up and running in one sole product.
In the absence of a protection device (hardkey), the software can be run in demo mode.
The Demo is used to asses the software and it has all the existing resources as in the
Configurator. However, it works with a maximum f 20 Tags, allowing the
communication with the data acquisition equipment up to 10 minutes, with the
condition that there is the respective communication driver. It does not use a hardkey
and can be freely reproduced.
In order to know which version we are using, at any time, even in runtime mode, we
just have to press the combination: CTRL + SHIFT + V.
See the following for an abstract of the functional feactures of each version:
Further, as additional modules, there are two tools that can work together with any of
the above mentioned products, which are the Elipse Watcher and the Elipse Web.
On the order hand, the Elipse Web is a supervision application server to Internet,
where by means of a navigatior such as the Netscape or the Internet Explorer it is
possible to get connected with a station and send/receive data in real time.
2
Chapter
2. Installation
2.2. Installing
1 – Insert the Hardkey in your computer parallel port, if there is already a printer in
this port place the hardkey first and then connect the printer in the same port.
2 – Introduce the floppy disk or CD-ROM in the respective drive, and through the
Start button choose the Run option.
3 – In the unit that you are using, choose the INSTALL.EXE command, and follow
the instructions that are displayed on the screen.
2.3. Updating
Periodically, Elipse launches new software Releases that contain new tolls and/or
updates for the already existing ones. Such updates can be obtained through common
media (Floppy disk or CD-ROM) or through our site: www.elipse.com.br. In the case
of updating, only the files that change with each release are available in Internet which
turns the updated version smaller than the installed one.
a) Run through the Running command of your Windows or one of the MS_DOS
sections the hinstall.exe program that is copied during the installation process to the
same directory in which the software was installed) that is responsible for the hardkey
installation according to the syntax below, selecting the Bi-directional option.
HINSTALL.EXE [options]
Options:
/i – Installs the hardkey driver (HASP)
/iu – update
/r – remove
/portmode=<type>
tipo: Normal – normal port mode
ECP – Enchanced Control Port modo
BiDi –Bidirecional mode
Auto –automatic mode
b)To run a printer set up utility in the c:\Windows directory or your machine
equivalent, disabling the Bi-directional communication option..
When you receive a new file, run again the CUSTOMER.EXE program.
3
Chapter
3. Case Study
The mentioned System shows a candy plant sunoptic. For the production, it is
necessary four basic products: water, syrup, glucose and sugar, whose qualities
are controller for each new type of candy to be produced through the use of recipes
that are programmed by the operator. After the individual weighing of each products,
they are homogenized in the mixer which in turn transfers the moisture to a storage
tank. This transference between tanks can be automatic or controlled by a valve drive.
From the storage tank, the moisture is transferred to the cookers through pumping that
it also controlled by the application. The system operator can visualize each tank
temperature in the same screen, control the engines frequency and open or close valves
that drive the moisture to the cookers.
The system will also show alarm status, in the case the parameters exceed the
established limits. (e.g. excessive temperature increase), besides creating temperature
trend graphics, generate operating database and its respective reports.
Throughout the register screen, it is possible to create new products and edit the already
existing ones. There is also a Query procedure for batch processes that allow historical
data Query, visualization and printing.
1 – Dosage Screen
3 – Printing Screen
2 – Register Screen
4 – Opening Screen
6 – Bath Screen
7 – Trend Screen
4
Chapter
4. Starting Up
Menu bar
Toolbar
Work area
4.1.1.Configurator
ALWAYS AVAILABLE
KEYS ACTION
Ctrl + O File / Open the Application
Shift + Ctrl + V Help / About Elipse Windows
F1 Help
Shift + F1 Context Help
KEYS ACTION
Ctrl + S File / Open the Application
F10 File / Run the Application
Alt + O File / Organizer
Ctrl + N Screen / New
F8 Screen / Monitoring
Shift + Ctrl + Alt + I Counts the items number in the application
KEYS ACTION
Ctrl + F4 Screen / Close
ESC Objects / Deselect
Ctrl + A Objects / Select All
Ctrl + X Objects / Cut
Shift + Del Objects / Cut
Ctrl + C Objects / Copy
Ctrl + Ins Objects / Copy
Ctrl + V Objects / Paste
Shift + Ins Objects / Paste
Del Objects / Delete
KEYS ACTION
Ctrl + F4 Close the Report Editing
ESC Objects / Deselect
Ctrl + A Objects / Select All
Del Objects / Delete
4.1.2.Runtime
KEY ACTION
Shift + Ctrl + V Help / About Elipse Windows
Shift + Ctrl + Alt + I Counts the items number in the application
Where:
OPTIONS ACTIONS
-DEMO (optional) is used to run the Elipse as a demo, without verifying the protection
mechanism (hardkey). This option rewrites the .INI file set in the
[Protection]Type=…section
-SETUP (optional) instructs the Elipse to run the Setup program that allows you to set
the options in the Elipse.INI file. It shows the same dialog box as the menu File
/ Options …
-EDIT (optional) instructs the Elipse to run the Configurator. If an application name is
informed in the appName of the command line, this application will be open for
Set up.
appName (optional) an application name that will automatically run (in the Runtime or in
the Master module) or it will be open by the set up (in the Configurator module
or while the –EDIT is specified in the master or Demo modules). It is highly
recommended that you include all the application’s file path.
Note
Note
When you specify a command line application, the work drive and
directory are set to the same as the application.
Drill:
Task: To create a new Application.
Click the button New application.
Save application as Example.App, operation that is automatically requested.
In order to allow a simple and organized view of the entire application, the Elipse
Organizer command in the File menu or pressing the button in the toolbar.
The organizer structure can be compared to a directory tree of the Windows Explorer.
In this way, the application structure starts in the upper left corner with the
application’s root. All application objects go down from the root , grouped according to
their type: tags, Screen, Alarms, recipes, Historical, reports, Drivers, databases, User’s
List and Remote Applications. Selecting any of the tree legs of the application will make
it expand showing its content – so you will be able to navigate through the application
having all the set up options available for any object.
Starting from the Organizer, you can create all your application only but navigating
through the application tree. Selecting any of this legs, the selected object properties will
be editing. For instance, if you select Tags in the Organizer tree, new Tags can be
created, and its properties can be edited selecting the page you wish from the tabs in the
top of the window.
The Organizer Toolbar buttons allow you to quickly perform certain tasks without
using the menus. There are 13 buttons as you may see in the following table:
Rebuild All It recompiles all the Application Scripts allowing the user to
access each Script with a double click. It generates a list of
the compiled Scripts showing in red the ones with errors.
If It inserts an If command in the selected Script in the place
where the cursor is.
Else...If It inserts an Else...If command in the selected Script in the
place where the cursor is.
Else It inserts an Else command in the selected Script in the
place where the cursor is.
For...Next It inserts a For...Next command in the selected Script in the
place where the cursor is.
While...Wend It inserts a While…Wend command in the selected Script in
the place where the cursor is.
Repeat...Until It inserts a Repeat...Until command in the selected Script in
the place where the cursor is.
When you select the Application root in the tree, its properties will be displayed in the
right hand side. Here the generic parameters about the application will be set, as well as
its behavior in relation to other programs and operational system itself. The variables
that can be set up here are:
FIELDS DESCRIPTION
Description It defines the application title (that will appear in the title bar) if the
Title Bar option is enabled.
Title bar It shows the Title Bar in the application window.
Disable task-switching It disables the exchange among the windows programs, that
means, once it is in the Elipse Scada it will no be allowed to go to
other applications unless ending the section. (Disables the Alt-tab
option).
Disable Screen-Saver It disables any screen saver while running Elipse Scada.
Close Button It enables the Close button and the System Menu.
Minimize Button It enables the minimize button.
Maximize Button It enables the maximize button.
Allow Close Whenever it is Off, it makes the Runtime to complete only when
the function StopRunning() is selected. When it is On it allows to
turn off the Elipse by other means such as a mouse click in the
close button, in the Windows shutdown, and so on.
Statistics … It opens a window that shows the Elipse version that last recorded
the application, the total time of the application edition, the
number of the
Find Item… It opens a window that allow to find items (object, properties)
anywhere in the application and to present it for edition.
Import… It opens a window that allows choosing an application for import.
After choosing the source application a new window will be open
with a two application tree, so that the user may be able to drag
objects from the origin application to the destination application.
Protection… It opens a window for Application protection. There are two
protections: for set up (Open/Modify/Save) and for Run. In the
case of using a password for the set up the final user will not be
able to change the application, unless he knows that the Runtime
will have a password just if there the Set up has one.
Start It defines the setting of initial sizes of the application.
Maximixed/Minimized/
Normal
Use Runtime Keypad It enables the keyboard use in the screen through the mouse or
Touch Screen.
Don’t Show Mouse It disables the display of the mouse pointer.
Pointer
Use large buttons Enables the use of large buttons in the screen objects and
keypad.
Drill:
Task: To degine the new application style.
In the Style properties choose Title bar and in the tab Window choose
Initialize Maximized.
5
Chapter
5. Tags
A
Process supervision with the Elipse Scada takes place through process
variable readings in the field. The values of these variables will be stored in
tags.
At least one Tag or Attribute must be associate for each animation object inserted in
the screen. Tags are all the variables (numerical or alphanumeric) involved in one
application. It can be of several types, according to purpose of use. Attributes are data
furnished by the Elipse Scada about system parameters and Application components.
For instance, we can consider a tag as furnace temperature, and one of its attributes is
the alarm level from which the siren will be activated.
Tag values or associate Attribute value can be displayed by the animation objects in the
Screen, used in calculations through the scripts, modified through the operator’s
actions, and so on.
In creating Tags, the user will be able to organizer them in Groups as he may wish, so
to make it easier the search and identification during the set up process. To create
groups, just select the Tags item in the Organizer and click in New Group. You can
create groups within other groups, and if you wish to change their position, (e.g. to
include it in other group) just drag it to another position and the whole content will also
be moved.
The following examples inform the tags creation procedures. If you have an equipment
and wish to perform communications, choose the creation of variables type PLC or
Block; otherwise, choose the Demo type, that will allow the simulation of values in the
absence of real data.
In whick name (following the mentioned rules), quantity (in case you create more than
automatic numbering at the end of the names will be created) and type shall be
informed.
5.2.1. PLC
Tags PLC type are generally used when you wish that a tag access communication
driver reads/writes a value or a set of values to a single variable. Therefore, it can
represent any type of variable independently as an input or an output, digital or
analogical, depending on the set up and address required by the communication driver.
Each tag PLC or Block must be associated to a communication driver, which will be
responsible for the communication with the specific equipment. You must set up the
communication driver at least once when a new application takes place.
5.2.1.1.Communication driver
The Elipse Scada drivers are separate files with DDL extension that can be placed in
and directory to be defined by user.
To set up a new driver, just click in the Drivers item from the Organizer – then in the
New button loading the correspondent DDL file.
By choosing the Set up option it is possible to specify the general data about
communication, as serial port, communication rate, and so on, according to the
supplied documentation to each communication driver. To assist the set up task, you
must access the Driver Help option where the driver set up parameters is displayed.
FIELD DESCRIPTION
Driver Location It shows the path where the DDL file is.
Parameters It allows the communication general parameters set up, such as
serial port, communication rate, according to the supplied
documentation and help.
Abort on Error This option displays a dialog box requesting the annulment of the
communication with the driver, in case of communication error.
This option must be used only in the set up, since its running can
be dangerous, in the sense that if the operator answer “Yes”, all
the communication will be suspended.
Hide mouse during The “Hide mouse during communication” option can be used to
communication verify interruption conflict in the serial port (generally not used)
and the “retry failure communication” can be specify a retry
number in case for error (generally disabled).
Retry failed Extra try number in case of communication error. Use this
communications/ property with caution, because if the equipment presents
Number of Retries continuous communication errors a general review of all
communication will be necessary- otherwise it will cause delay on
the general answer of the software.
Consult at the end of this manual the exhibits related to some help examples of
communication driver.
Through the Advanced button you will have access to more detailed set u about the
driver operation.
FIELD DESCRIPTION
Maintain 16-bit driver When enabled, it is the normal operation mode of the 16 bits
behavior versions. If disabled, it operates the hybrid multitask mode that is
32 bits version pattern. This operation mode of the 32 bits drivers
places all the communication task in a separate process, in
asynchronous way compared to the Elipse Scada normal
operation, speeding up the application process. This method is
only suspended when there are the user’s clear restrictions to
obtain a variable value, such as a script (program), where the
following step dependes on the tag value update, when the
process of information exchange between the communication
driver and the main program becomes synchronous.
Use background writing It also allows the writing perform in parallel process, however it
allows placing the write requirement to the driver with the same
priority of others requirements (low priority) or in the top of the
requirement list (high priority).
Start driver at application This option allows that on starting an application the
startup communication driver be ready to exchange information, or in
another works, it automatically runs its function via some script, in
order to allow the communication.
Keep driver in memory When in set up, this option allows that the elipse Scada does not
unload the memory driver every time it returns to the development
enviromment.
Through the extra Button, available in some drivers, you will have access to special
parameters of the set up, such as modems use and Debug or trace file creation of
communication Consult the driver documentation to learn more about these
parameters.
Drill:
Task: To set a communication driver to be used.
Load the communication driver and with the help file assistance, fulfill the p1
to p4 parameters enabling the in Abort in Error option, and disabling the
hiding mouse… option and to not use retries.
The following screen is displayed when a tag PLC type is created, presenting the
following parameters:
FIELD DESCRIPTION
Name Tag name. You can use as many characters as you wish, but
special spaces and characters are not allowed when Tags are
used in the Scripts.
Change type to It allows the Tag type to be changed.
Expand bits… It allows to separate the Tag in bits, creating Tags Bit to each bit
or tag bits set.
Description A brief description about the tag.
Driver It allows selectig a communication driver to the current Tag.
Drivers must be installed through the Drivers windows in order
to make them available.
Driver Help It shows the Help of the selected Driver.
“N” Parameters It allows the address “N” parameters set up to the current Tag
according to the selected driver. This set up is contaned in the
Driver Help that can be accessed by pushing the “Driver Help”
button. Values can be expressed in decimal [-32768, 65535],
octal [0o, 177777o] or hexadecimal [0000h, FFFFh].
Scan It defines when the tag values will be updated (mSeg).
Scaling By selecting this option, the Tag values will be converted on a
new scale of values determined by the user as the defined limits
in PLC Low, System Low, PLC High and System High.
PLC low It defines the minimum PLC (CLP) value to be read.
System Low It defines the new minimum value to be read in the PLC (CLP).
PLC High It defines the maximum value to be read value conversion.
System High It defines the new maximum value to read value conversion.
Test Connection Here Its tests the communication with the PLC in reading and writing
some values.
Enable Scan reading If this option is enabled, this tag will be read in the specified rate
in the Scan field in milliseconds, whenever there is any item in
the application that is being used by the tag (Screen, Historical,
Alarms, and so on).
Enable automatic reading It enables automatic reading. It enables the tag to be read in
case its value become necessary, and the last reading made
is old (bigger than the scan time).
Enable automatic writing In case of value attribution, whichever through scripts or screen
objects (setpoint, slider) to a tag clp or block element, it
specifies whether the driver will automatically send the new
value to the equipment.
Drill:
Task: To create tag PLC type to represent a digital input.
Select Tags object in the Organizer, click in the New Tag button:
Key in DO in the property Tag name;
Key in 1 in the How many field;
Choose Tag PLC type and then click in the OK button.
Task: To create a new group of tags, with three tags of tank level of the PLC type.
Select the Tags object in the Organizer, click in the New Group button:
Key in Levels in the property Name
Select Levels group by clicking in New tag;
Key in Tank01 in the Name field;
Key in 3 in the How many field;
Choose the tag PLC type, and then click in the OK button.
3 tags of the PLC type will be created with part of the name alike, but with
different numerical index (in crescent order) once there are not two tags with
the same name.
If the equipment values that are being read are kept in a different scale form
from that used in your system, you can specify a conversion on the tag,
stipulating the inferior and superior levels in the System. By using the variable
in any part of the software (except in the Organizer in the Test Connection
Here function, where the values without conversion are shown), its scales will
be automatically calculated in each reading or writing.
5.2.2.Tag DDE
Tag DDE is used to exchange data between the Elipse Scada and other application
(Excel, Access, Word, etc.) using DDE (Dynamic Data Exchange).
In a Windows network, Elipse Scada uses NET DDE and becomes able to exchange
data with other Elipse Scada, among other ways, through Tag DDE. For that purpose,
you need to specify the computer name, the server application, the topic and the item,
as you can see in the following box:
FIELDS DESCRIPTION
Name Tag name. You can use as many characters as you wish, but special
spaces and characters are not allowed when the tags are used in the
Scripts.
Change It allows changing the tag type.
Drill:
Task: To create a link between an Excel cell and a Tag DDE type.
Select the Tags object in the Organizer, and click in the New Tag button:
Key in Spreadsheet in the property Tag name;
Key in 1 in the How many field;
Choose the Tag DDE type, and then click in the OK button.
Open the Microsoft Excel, and key in any value in the first cell on a new
spreadsheet.
In the Spreadsheet tag, choose Server Name: Excel, Topic: Sheet1, Item:
R1C1 or L1C1 (depending on the excel, if in English or in Portuguese);
Click in Test Connection and key in value in the cell will be displayed.
5.2.3.Tag Demo
The Tag Demo is used to the value simulation. It allows you create defined curves or
random values according to the curve type selected in the six buttons of the General
page of the Tag Demo (see picture below).
FIELD DESCRIPTION
Name Tag name. You can use as many characters as you wish but
special space and characters are not allowed when the Tags are
used in the Scripts.
Change type to It allows changing the Tag type.
Expand bits… It allows separate Tags in bits, creating Tag Bits for each Tag bit
or bit set.
Description It is a brief description about Tag.
Type It defines the curve type to be used by the current tag Demo.
Low Limit It defines a minimum value to the Tag Demo.
Task: To create a Tag Demo type to the mixer animation in the Funnel.
Select the Tags object in the Organizer, and choose New Tag. In the name
property key in Mix, and accept it with the OK button.
In the Mix tag properties, choose the triagonal wave option, with inferior 0
and superior 9 limits.
5.2.4.Tag Block
The Tags Block have the same purpose as the PLC tags, that means, they exchange
information with the data acquisition equipment through the communication drivers
supplied by Elipse Software.
Its goal, however, is to allow that several tags have its values read or written
simultaneously, increasing the phisical environment and decreasing the scanning
medium time of the variables. In general, each block must be associated to a
communication driver. It has a scan time that is the same for all its variable.
If you have an application with too many PLC tags, and want to change them into
block element tags, you can use the Change type option where the destiny block must
be chosen (if changing block). From that on the tag will be changed into a block
element, including the change in all its internal references (use of screen, expressions,
scripts and other objects).
FIELDS DESCRIPTION
Name Tag name. You can use as many characters as you wish, but
special spaces and characters are not allowed when the tags
are used in the Scripts.
Change type to It allows changing the tag type.
Description It is a brief description about the tag.
Driver It allows the selection of a communication driver to the current
Tag. The drivers must be installed through the Drivers window in
order to make them available.
Driver Help Is shows the help of the selected Driver.
“B” Parameters It allows the set up of the address “B” parameters to the current
Tag according to the selected Driver.
Scan It allows the set up of the address “B” parameters to the current
Tag according to the selected driver. This set up is contained in
the Driver Help that can be acessed by pressing the “Driver
Help” button. The values can expressed in decimal [-
32768,65535], octal [0o, 177777o] or hexadecimal [OOOOh,
FFFFh].
Change Size It defines when the tag values will be updated (mSeg).
Add Element It changes the block size to be monitored by the Elipse Scada.
Enable scan reading It allows you to add a new element in the selected Tag.
Enable automatic reading It enables automatic reading in block.
Enable automatic writing It enables automatic writing to the block.
BLOCK ELEMENTS
Each Tag Block element has properties that can be accessed by selecting the element
you seek in the application tree of the Organizer. The following page will be then
displayed in the right side of the window.
The same regards made to the PLC tags is valid to block elements, namely:
FIELD DESCRIPTION
Name Tag name. You can as many characters as you wish, but special
space and characters are not allowed when the tags are used in the
Scripts.
Description It is a brief description about the tag.
Expand bits … It allows separating the tags in bits, creating Tags Bit for each bit or
bit set of the Tag.
Block Index It allows changing the element order in the block by keing in the
desired index.
Scaling By selecting this option, the tag values will be converted into a new
value scale estabilized by the user according to the defined limits in
PLC Low, System Low, PLC High and System High.
PLC Low It defines the minimum value to be read in the PLC (CLP).
System Low It defines the new minimum value to the conversion of the read
values.
PLC High It defines the maximum value to be read in the PLC (CLP).
System High It defines the new maximum value to the conversion of the read
values.
Test Connection Here It tests the communication with the PLC reading and writing some
values.
Drill:
Task: To create a communication box with 3 elements.
Procedure: Follow the same procedures as for the tag creation, choosing now in the
name property block1, in the how many field 1 and the type block. After you click in
OK, it will be asked the block elements number where you must key in 3. Select now
three elements keing in the text name “Temperature01”.
Automatically the other blocks elements will have the following names
Temperature02 and Temperature03.
5.2.5.Tag Ram
Tags Ram are internally used to store values in the memory. This Tags type is volatile,
therefore it keeps its values only when the application is running.
There are two ways in order to establish an initial value to the RAM:
Drill:
Task: To create RAM variables to the register and storage of the raw material
quantities. It is not necessary to specify an initial value.
Procedure: To create a new tags group called Products. To create from this group the
following tags RAM: Water, Sugar, Syrup, Glucose, number_recipe and Code (that
will receive the products code).
5.2.6.Tag Matrix
Tag Matrix allows to create data matrixes or vectors that can be used in calculations,
storage, and others. It is possible to map each cell of a matrix as if were a tag, and then
associate each one of them to a tag or property. In this case, once the cell value
changes, the tag/property associated takes over a new value and vice versa.
Keep in mind that the operation about matrixes always have row and column starting
with index 1.
FIELD DESCRIPTION
Name Tag name. You can use as many characters as you wish, but
special spaces or characters are allowed when Tags are used in
the Scripts.
Description It is a brief description about the tag.
Columns It defines the matrix column number.
Rows It defines the matrix row number.
Map It maps all or some of the matrix cells to a tag.
You can map a matrix or vector cell to a Tag by pressing the Map... button in the Tag
Matrix General page, and by specifying which are the cells that you wish to map.
Each mapped cell is displayed below the Tag Matrix in the application tree in the
Organizer. When selecting a specific cell, its properties are displayed in the right side of
the tree. Each mapped cell has 4 property pages: General, Alarms, Scripts and Tags.
The 3 first pages are the same of any tag, and the tags page allows to associate a Tag or
property to the matrix cell likewise the tags and properties are associated to Screen
Objects (see 7.2.2 section).
5.2.7.Tag Bit
Tag Bit can only be created starting form another tag, and it allows to individually
access each bit of it. Those Tags that allow the separation in bits are: PLC, Demo,
Expression, Block Elements, Ram or Remote.
This resource is very useful when a read value of an equipment, such as a byte or word,
actually represents 8 or 16 (or more) independent digital status (on or off).
The bit value is obtained through the masking of the bit position with the tag to which
it belongs. On the other hand, the writing is made in two ways: masking and writing the
whole or written word of the individual bit, if the equipment supports such command
that is implemented in a transparent way to the user in the communication driver.
You can create a Tag Bit from the General page of any of the above mentioned tags.
Clicking the Access bits… button the following windows will be displayed, where you
will be able to select the bits that you wish to be mapped. The bit selection is made
using the mouse and the SHIFT or CTRL keys, in the same way the items are selected
in a windows list box.
The tag bit can be whether a single bit or a bit set, once they are continuous. That
means that you can map one single Tag Bit, for instance, the 0,1, and 2 bits, but not the
10,11 and 24 bits. A check box existing in this window allows to specify if a Tag to each
selected bit must be created or if the continuos bits that are selected must be gathered
in one single Tag. In the next example, 5 tags Bit are created as follows:
TAG BITS
BitField1 0, 1, 2
BitField2 5
BitField3 8
bitField4 12
bitField5 20, 21, 22
The tag Bit created are displayed below its respective Tag in the application tree in the
Organizer. When selecting a specific tag Bit, its properties will be displayed in the right
side of the tree.
The Tag Bit General Properties page is displayed when the General tab is selected in
the top of the Tag Bit pages. This page is shown below. Its respective fields are
described in the following table.
FIELDS DESCRIPTION
Name Tag name. You can use as many characters as you wish, but
special spaces and characters are not allowed when the Tags are
used in the Scripts.
Description It is a brief description about the Tag.
High Word bits and It defines which bits or bit is part of that Tag.
Low Word bits
Drill:
Task: To separate in bits the already created Di and DO tags.
Procedure: Select through the Organizer the DI tag and then the Access Bits. Choose
the bits from 0 to 7, specifying the option Create a tag for each bit. Bits, representing 8
digital inputs will be created as the tag DI “sons”. Follow the same procedure as to tag
DO.
5.2.8.Tag Expression
Tag Expression allows you to attribute a numerical or alphanumerical expression to a
Tag. You can create equations involving any variables, whether numerical,
alphanumerical, tags or attributes.
When you key in the expression, which will be the operation performed by the tag, in
the errors field those errors found in the edition up to that moment will automatically
be displayed.
The same functions, operators and constants used in the Scripts (programming
module) can be used in the tags expression (see chapter 9 – Scripts).
To use them when editing an expression, just click in the App Browser option (thrird
icon in the Organizer toolbar), where a window will be displayed that makes it possible
to copy all the function / attributes available in the application to the editing line.
FIELD DESCRIPTION
Name Tag name. You can use as many characters as you wish, but special
space and characters are not allowed when the tags are used in the
Scripts.
Change type to It allows changing the Tag type.
Expand bits… It allows to separate tag in bits, creating Tags Bits for each Tag bit or bit
set.
Description It is a brief description about the Tag.
Expression It allows the input of any valid expression to the tag.
Errors It lists syntax errors found in the expression. The error are displayed
during the expression edition, and to make a valid expression the
message “No errors” must be shown in this field.
The same functions, operators and constants used in the Scripts can be used in the tag
Expression (see Chapter Scripts, Constants & Operators):
CONSTANTS EXAMPLE
Integer (decimal, bin, octal, hex) 1234, 1234d, -1234, 10011b, 733o,
0A100h
Drill:
Task: To create a tag expression that will be the combination of two digital tags called
Status. This tag will show a useful example when you wish to show in the screen an
indication or animation that has more than two status (on, off, fault, etc…). In this
case, it is necessary to creat a tag expression.
Procedure: Follow the same procedures as to the Tags creation, choosing now the
expression type. In the Name field key in “Status”. Now click in the expression field.
At this moment there are two paths: You can directly key in the desired text, or use the
App Browser tool to navigate through the application, allowing to copy the desired
function, attribute or object directly to the edition place.
0 1 0 2
0 1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7
5.2.9.Tag Chrono
Tag Chronometer allows performing basic operation to time counting (increasing and
decreasing) and timing, allowing execute tasks when a certain value is obtained.
I will be asked the source application path that contains the desired objects to be
copied. After specifying its place, the following window will display:
Use the duplication tool to make copies of tags or tags group. The same
procedure can be used to other objects, such as Screen and Screen objects.
To moves a tag or tags group through the organizer just click in the tag or group and
drag it (without loosen the mouse button) to the final position that can be a root Tags
group item and drop it. All its references (links with other objects or scripts) will be
updated.
CHANGING TYPES
You can use the Change type to... tool that accepts multiselection, which event redo
the references, that means, the links that variable has in a way to set it in the new
desired type..
the list. At this moment all Tags display as selected, if you desire to select just some of
them press the CTRL key while you click in each desired Tag.
Now each action or key in that is made with the already selected tags will be carried on
in all tags.
This information can be obtained through the TimeStamp property, in all tags, with
an accurcy of 1 ms. When the equipment does not support this kind of information, or
when the driver is not ready for such procedure, the program itself will perform the
information task at the moment of collection, filling up with the PLC watch value.
Remark: In the case of Block tag type, the same TimeStamp is informed to all the
block elements, once they have already been consulted at the same time. If they are
distinct events they must be read as tag of PLC type.
5.2.11.Alarms Page
Each Tag that is defined has an Alarms page as the one shown below in which 4 range
values and priorities to Alarms can be set. Alarms are used to signalize any event that
may happen with a variable, also allowing take the appropriate actions through the
Scripts (programs).
To visualize the set Alarms to a Tag, you need to insert an Alarm Screen object,
something we will see later. This object can also show the spread alarms that are
registered on an Alarm file or active alarms of the system.
To print the spread alarms in the system you can define a Report through the
Organizer and run the main function of the Print in a Script.
The tags Alarms page displays when the tab Alarms is selected in the top of the Tag
pages. That page is shown below and its respective fields are described in the following
table.
FIELD DESCRIPTION
Lolo Critical Low Alarm. It defines a value range (minor equal) where the Tag
is considered to be in a Critical Low Alarm status. It is used when the
tag value is below the minimum, that means, extremely low.
Low Low Alarm. It defines a value range (major equal) where the tag is
considered to be in low alarm status. It is used when the Tag value is
bellow the average.
High High Alarm. If defined a value range (major equal).
HiHi Critical High Alarm. It defines value range (major equal) where the Tag
is considered to be in HighAlarm. It is used when the Tag value is
above the maximum, that means, extremelly high.
Value It defines the priorities for each possible alarm (lolo, low, hi, hihi).
Priority It defines the priorities for each alarm event. Small numbers indicate
high priority (the priority must be a number from 0 to 999). For a better
control, the high priority alarms will be displayed in foreground in the
alarms window (Alarm Screen Object).
Comment A comment or message can be defined for each alarm. Up to 100
characters can be used.
Log Alarm Return It enables the message log of Alarm return.
Alarm Group It defines the alarm group, whose file will receive the incident
messages.
The range between the Low and High levels of the alarm (if set) represents the normal
operation status of the variable. When exceeding these limits, the incident is looged as
an active alarm. If the variable rturns to its normal status, the return incident is looged if
this operation is selected.
In this page, we can set a file for alarm recording, as well as alert sounds and messages
that are recognized as standard alarm group.
FIELD DESCRIPTION
Name Alarm Group Name.
Description Description about the group.
Enable Log It enables data recording in disk for group.
Records Maximum register number. The file is rotative, that means, it will only
contain the number here that will be the most recent ones.
Filename Disk file name.
Create New Alarm It creates a new Alarm group.
Group
A different alarm group can be used when you want to separate some type of tags
alarms, so that they are stored in separate files. In order to visualize pr print thenm, in
this case, it will be necessary to create separate objects and reports, one for each file.
Drill:
CREATING ALARMS FOR TAGS
Task: To create alarms for temperature and level tags.
Procedure: Select the three temperature tags, and in the alarm page create the Low and
High option specifying low level 25 and high level 150. Repeat the operation for the
level tags with limits of 10 and 90. Insert the text that you consider interesting in the
comment field, such asd “High cooker level 1” or “Low Area Temperature 2”.
6
Capítulo
6. Screen Creation
A
Screen can be defined as a process monitoring window, in which the objects
that will do the operator interface with the system will be inserted. Each
application can have an unlimited number of screen.
You can create a new Screen pressing the new Screen button in the Toolbar or using
the New command in the Screen menu. In this new Screen, you can define the Screen
Objects, walpaper and other specific features.
For a better graffic quality of the system that is being monitored you can insert a
wallpaper to the Screen. The format used today by the Elipse Scada is a grafical file with
BMP, GIF or JPG extension that can be created in several specific draw Windows
applications, as the paintbrush (Windows 95/98/2000/etc), CorelDraw, Paint
ShopPro, Autocad and others.
You can create your own drawing (bitmaps) in any size and color you wish. The Elipse
Scada will automatically import them without using a conversion process.
To visualize or edit the current Screen properties, double click in an empty window is
displayed, containing a list of all the Screen in you application. You can create a new
Screen using the New button in the right side of the page or remove and then the
bdelete button.
FIELD DESCRIPTION
List It shows a list of all the existing Screen in its application. The same Screens
will be displayed in the Organizer tree below the Screen option, and when
they are selected its respective properties are displayed.
New It creates a new Screen.
Delete It deletes the Screen selected in the list.
Go to It closes ythe Organizer and shows the current Screen.
Show It shows the current Screen without is selection.
Hide It hides the current Screen, keeping it in the application.
displayed in the right side of the tree, or when you double click on its background
(outside the Organizer) or even through the button in the toolbar.
The Screen general Properties is displayed when the General tab in the top of the
Screen Page. This page is displayed below and its respective fields are descrived in the
following table:
FIELDS DESCRIPTION
Name It defines a name for the current Screen. By using this name, you can open the
Screen from any part of the application using the function buttons or screens, as
well as to associate it to Scripts.
Title It defines a Title for the Screen, also used as its description.
Color It defines the background color for the current Screen. This parameters is used
when there is no selected bitmap or when the bitmap or when the bitmap does
no fulfill the Screen.
Bitmap It allows to navigate in the directory structure in order to find the BMP files that
are used as Screen background. The bitmap path and name are displayed below
the check box.
Browser It defines the access to the Screen that will be verified with the access level of the
user when entering the Screen.
Acess It defines the access to the Screen that will be verified with the access level of the
level user when entering the Screen.
FIELD DESCRIPTION
Full Screen It determines the Screen to occupy the whole application window.
Windowed It determines the Screen to be displayed inside a window occupy the whole
application window according to the specifications in the Size and in the
Position options.
Width It defines the Screen width in pixels.
Height It defines the Screen height in pixels.
X It determines the X coordinate for the left superior corner of the Screen in
pixels. For instance, if you are using a windows resolution of 640x480 (VGA),
your X coordinate can vary from 0 (zero) to 640 pixels to a window without
scroll bar.
Y It deteremines the Y coordinates for the left superior corner of the Screen in
pixels. For instance, if you are using a Windows resolution of 640x480 (VGA),
your Y coordinate can vary from 0(zero) to 480 pixels to a window without
scroll bar.
Scroll Never It determines the winodw not to have scroll bars, even when its necessary.
Scroll Scroll bars will automatically be displayes when they become necessary.
Automatic
Close It enables the close button to be displayed in the window (button in the right
superior corner). This button can only be seen in the Windows 95/98/NT/XP
or superior.
Maximize It allows to maximize the window.
Minimize It allows to minimize the window.
Show Border It inserts a border in the screen.
Resizable It allows to resize the window in the running time.
Moveable It allows the window to be moved in the running time.
Title Bar It displays or hides the Title bar.
Initial Screen It makes the Screen be the first display in the running.
Modal It does not allow the user to leave the Screen without turning it off.
Pop-up It allows the screen to be automatically closed when the user click out side
the Screen.
Clip Children When selected it makes the background drawing be totally displayed without
cutting the objects.
Drill:
CREATING
Task: To create the main Screen for the manufacturing monitor.
Procedure:
In the Organizer, select the Screen objects and press the New button, or Click in the
New screen button
in the toolbar, or through the menus, access the New –
Screen option.
If you have already created an empty Screen (when starting a new application a
screen is always automatically created) go to the next step.
From this new screen you can define new animation objects, the synoptic background
draw, and all the Screen specific features. The list of existing Screens in the application
is available in the toolbar for downloading during the set up process and Application
creation.
To set up the new Screen properties you can:
From the Organizer, expand the Screen objects screen, selecting or not the
Screen.
Double click on the Screen in the Work Area, or click in the Screen Properties
button .
In the screen properties, key in “Dosage” in the property Name and “Dosage Screen”
in the property Title. Select the option Bitmap, press the Find buton and select the
Bitmap C:\ELIPSE32\LIB\UTIL\FUNDO MODELO.BMP. In the Style guide
select the style options Full screen and Automatic scroll.
Task: To create Screen for system Alarms visualizing.
Procedure: Create a new screen and set the Screen with the Name “Alarms_Screen”,
Title “Alarms Screen”, style with Window, Scroll Automatic, close button, option
movable option selected, title bar selected and Initial Screen Selected not selected.
Place the background color orange, through the Other colors option in the main page.
Task: Create Trend Screens, in the same pattern as that one of the Alarm Screen.
Procedure: One of the options would be to repeat the prior procedure. However
other interesting option would be to duplicate the prior screen, and only change the
necessary points. Through the Organizer select the Alarms Screen. Next, click in the
that allow makes copies of any object. Then, a dialog
second icon in the toolbar
box is displayed, where must be informed the copy numbers (1). A new Screen called
Alarms_Screen2 will be created. Modify this Screen putting the name “trend, the Title
“trend Screen”. Choose the background color black.
Task: To create the opening Screen, as Full-Screen; wine background color, Initial
Screen selected; name “Opening”, title “Opening Screen”.
Task: To create the opening Screen, as Full-Screen; wine background color, Initial
Screen selected; Name “Opening”, title “Recipe Screen”.
Task: To create Recipe Screen, as with window, black background color, and closing
button; name “Recipes”, and title “Recipe Screen”.
Task: To create Bath Screen, also with window, green background color, and closing
button; name “Batch”, and title “Batch Screen”.
Remark: A reference for the screen look can be seen in chapter 3, Case Study.
7
Capítulo
7. Screen Objects
A
N application Screen can contain background and objects bitmaps. The
objects that are inserted over the bitmap constitute a secondary ground in the
screen, in a way that it can be detected, copied, moved, resized, and
bracketed, without damaging the background.
The screen objects, therefore, are graphical elements that are related to the tags so that
it is possible to make a friendly interface with the variables. The previously available
objects are as it follows:
Button: For activating or running the specific tasks by the user through the
mouse or key, being able to assume several formats and functionality..
Text: This object allows attributing messages in Tags range values, called
Areas, defining colors and messages fo each Area.
Video: The Video object allows you to show a video source, displaying a real-
time video or a playback.
Avi: The AVI object allows you to playback an AVI file. You can edit AVI
properties double-clicking the object.
Insert any two objects in the screen (e.g: two buttons), so that you can verify and use
the following tips:
OBJECTS OVERLAP
If you have two screen objects, and part of one has to be over the other, you need to
adjust the disposal through the Bring to Front and Send to back buttons.
The objects that were brought to the front will be arranged firstly in the navigation
command, and the other that were sent to the back will be placed lastly.
The Screen Objects Edition, such as aligment, size, position and bracketing is done
through the toolbar Settle or through the menu. The last selected object will have the
focua in red to be used as a reference. To deselect an object use the key combination:
SHIFT+CTRL+left button.
To select the objects contained in an area, use the tool selection . With it you
can select the objects within a mouse delimited area.
Combining the directional keys with CTRL, you can make the object transference
10 times faster. Combining the directional keys with SHIFT, you can resize the
object.
Some examples:
7.2.1.Frame page
Trought the frame page we can set visual styles to the object, as Borders, tridimensional
effects and titles, among others.
FIELDS DESCRIPTION
Visible It enables or disables a frame arround the object.
Color It defines the object frame color.
Title It enables or disables a title in the object frame.
Text It defines the title text.
Font It defines the font, color and size of the Title font.
Text Line separator It enables or disables a line separator between the text and the
object.
Border It enables or disables a border or frame.
Thickness It defines the border tickness in pixels.
7.2.2.Tags Page
Through the tags page we can associate the object to one or more variables that can be
attributed from any object. In the Objects windows, we have access to the objects in
the Organizer tree, whose properties are displayed in the Properties window. The
objects selected can be accessed through a click in the ADD button. The most usual
operation that is associated to a tag is made by selecting the referred tag, and adding it
in the list. A similar procedure can be used to make association, instead of the aforesaid
tags, its alarm level, or its scan time, or any other property that you wish.
FIELD DESCRIPTION
Objects It shows the application tree. According to the selected object, its properties
will be displayed in the Properies window.
Properties It allows the selection of any property of the object selected in the tree.
Tags selected It lists the Tags that are associated to the object.
Add It adds the selected Tags in the selected tags list.
Remove It removes the selected Tags of the list.
FIELD DESCRIPTION
X It defines the X coordinates for the left superior corner of the
Object in pixels. It is used together with the Y attribute to define
the Object position bsed on the Screen source (0,0).
Y It defines the Y coordinates fo the left superior corner of the
Object in pixels. It is used together with the X attribute to define
a) Press the F8 key or the icon that carries on the monitoring of all the opened
screens.
b) Press the F10 key or the icon that makes the total running of the application.
In order to return to the set up mode, just click the ESC key that is already specified as
a pattern for leaving the running to create a new application. To change the key or to
create a new method, it is necessary to change the script of the ESC key that already
existis in the Application item, or to delete it and create a new one, which will be seen in
the next chapter.
7.2.5.Bitmaps Utilization
In some objects, such as the animation button, besides the screens, bitmaps acn be
used. To its editing and generation, several programs can be used, such as the
CorelDraw®, Adobe® and AutoCad®, among others. We will show here an example
with the Paint, a tool of the Windows 95/98. taking as an example the following
bitmap, shown below, which is the background of the monitoring main screen of our
example of application.
Select the area that you want to animate (in this case the engine) through the
rectangular selection of the tool , and drag the cursor in diagonal in the screen,
thus selecting the area.
Now, open the file that you have just saved MYMOTOR1.BMP; fulfill a part of the
drawing with a different color, so that we can signalize any event by color (e.g. engine
on).
Selectthe filling icon , and choose an apprioriate color in the palette, in the
inferior part of the screen. Now click over the part in the drawing that you wish to
color.
Through the menu File – Save As, save the image with the name
MYMOTOR2.BMP. If you wish to have any other status information, with other
colors, repeat the procedure, saving the image with other names.
Usethe mouse left button to draw with the front color, and the right button to draw
with the background color.
Todraw perfectly horizontal, vertical or 45 degrees lines, press and keep hold the
SHIFT key, while you drag the mouse pointer.
The SHIFT key, used together with full and empty rectangle, allows to build perfect
suares. The same takes place with rounded border rectangules. You can obtain circles
with the ellipses.
With the selection line, we can select any drawing area. Pressing the CTRL key, and
clicking the mouse over the selected area. If you use CTRL instead of SHIFT, the
figure displacement will create an infinite copy effect.
To choose the foreground color, click with the left button over the selected color in
the color palette. The back ground color can be closen by clicking with the right
button over the selected color.
A double click over a color in the palette opens a dialog box that allows its edition.
The movement of a cropping with the mouse left button pressed implies a
transparent background, that means, all the cropping area with shade equal to th color
of the selected background will be opaque.
7.2.6.Drills
Procedure:
Choose the Bitmap object, and insert it as a rectangle in the referred place.
In the Bitmap Name fied, click in Search, choosing the FUNIL2.BMP file
in the library directory LIB\HYDRAULIC\TANKS.
Click in Size Setting so that the object get set in the right size if the image.
Now, select the option transparent, choosing the gray background.
After placing a tank, you can copy it three times. For that, just select and drag
the object, pressing together the CTRL key, and dropping it in the desired
place.
Task: To place the identification number of the raw materials tank in the superior left
border in the screen (1,2,3 and 4).
Procedure:
In order to the object become superimposed to the tank drawing, just it in the
tank area and bring it to the front through the menu Arrange / Bring it to
Front.
Key in the Message field the text “1”, selecting the Pattern Zone property.
Procedure: Repeat the bitmap object insert procedure, choose the file FUNNIL.BMP.
Task: To place the raw material supply tanks on the inferior left corner in the screen.
Procedure: repeat the bitmap object insert procedure, choose the file SILO6.BMP.
Task: To place the intermediate tank to transfer the mix to the cookers.
Procedure: Repeat the bitmap object insert procedure, choose the file SILO5.BMP.
Task: Next to the 98 and 74 engine, in the superior left side, insert the condensers, also
as bitmap objects.
Task: To insert the material transference valve from the funnel to the tank to manually
control via mouse.
Procedure:
Choose the button object, and insert it as rectangle in the referred place.
Task: To insert a button to manually control the material agitation in the funnel.
Procedure:
Insert a button in the central left side of the screen, next to the funnel.
Select the Functionally On/Off and Type – Text Message (first type).
In the message table select to normal status the next Off, and Arial font 9
White, and for the Pressing the text status On, background color blue with
the same font.
In the Tags table add the property enabled off the tag mix.
INSERTING ANIMATION
Task: To insert animation representing the material agitation.
Procedures:
Choose the object type animation, and place it in any place of the screen.
In the Zone pages, add from the directory LIB\MOTION\MIX, the bitmaps
from AGIT_1 to AGIT_5, and from this one back up to AGIT_1, executing
a total of 9 different positions or zones.
Now, select all the zones (drag them with the mouse) and click in the button
AutoRange, informing from 0 to 9 as limits. Now, each zones is associated
with a tag value rate that will be associated.
Also select the Zone 1 as Patterm Zone, when you select it.
In the general page select transparent, background color light green, and click
in the button to set the object size to the image size.
Now, drag the animation until the funnel, and click in to toolbar Bring to
Front, in order to place the animation over the bitmap.
In the Zone pages, insert two bitmaps: VALVE_OFF, that must be selected
as pattern Zone, and VALVE_ON, selected with minimum 1 and maximum
1.
In the general page, click in setting image. In the Tags page, associate each one
of them to a bit of the tag DO. As soon as a digital output, that is related to an
associated bit, is in its on status, the animation will show the activated valve.
INSERINDO DISPLAYS
Task: To insert a display with timetable in the inferior right corner in the screen.
Procedure:
Right above the raw material supply silos, insert a display. To disable the frame
and choose the font as MsSanSerif regular 10.
In the format page, select string, and in the prefix field key in “Product:”
In the tags page associate the Tag Code. The code value will be explained in
another example further.
Task: To insert a display with timetable in the inferior right corner in the screen.
Procedure:
Choose the font Arial Regular 9, and disable the frame.
In the tags page, select the item Global Manager, and then the property
currentTime.
In the format page, select Date/Hour, and through the Format button select
the desired format HH:MM:SS.
Task: To insert a temperature display beside the cookers and the raw material silo.
Procedimento:
Disable the frame.
Select font MsSanSerif regular 8, white color.
The display background color blue, numeric format, and size 3.
In the suffix field, key in “ ºC ”. In the tags page, associate for each one, one of
the temperature tags. Remark: To key in the symbol º, just press the keys
CTRL+SHIFT+ALT.
Procedure: In the superior right corner of the dosage screen, insert an alarm object.
Select type Resumed, with the Date, Hour, Alarm Type, Comments (Size 20) and
value Options.
In the ruler page, disable it; the same is valid for the frame.
Format its size do that it has the same height of the cooker tank, and narrow
enough to fit between the red lines and the right border.
Put it now in the position over the cooker, and choose the option Bring to
Front.
Repeat the procedure with the other cooker, as tag level02 and with the raw
material storage silo, as tag level03.
Bar It defines the selected pen to a bar graphic. In this case, the
user can select bar as medium, maximum, minimum or just
sample.
Up It brings the selected pen to a position above in the pen list.
Down It brings the selected pen to a position below in the pen list.
The defined order will be obeyed in the graphic draw, so the
pens that are displayed lastly will be in the back, and the first
ones in front of it.
When a new pen or mark is inserted, a new line is added to the oen line, as follows:
FIELD DESCRIPTION
Label / Icone It shows the type of the defined pen – Real time, Historical or
Mark. A double click over the icon opens a window for a tag or to
the pen property association.
Label / Enabled It defines the enabled pen. The disabled pens ca be enabled, and
vice versa, in the runing.
Label / Nome It defines a name to the pen, not necessarily the associated tag or
property name. To keyboarding, just click over the text that an
edition field will be opened.
Y axis It is used to associate a tag, field or attribute to the Y axis of a
pen. Clicking over the field you obtain a list of available fields, in
case the pen is historical, or a window similar to the App Browser
Click in the icon Real Time pen, and add a pen to the list. Double click in the icon in
the list, where the following pn property window is displayed:
Select the Tags table, and next the tag Temp01. Repeat the procedure of inserting pens
to the level and temperature tags.
you click on the button it will enable or disable the visualization of the chosen pen. For
a better result, select the button text color according to the color that it represents, and
the background color equal to the screen background.
8
Capítulo
8. Scripts
T
he scripts are programming language module, in which code lines can be
created that allow a higher flexibility to associate actions to specific events.
Each item of the Elipse Scada application has an event list previously
associated. Thus, the user will be able to create programs that will be executed
in the incident of a specific event..
The events are incidents related to an object that can be handled in order to execute an
action. The events can be physical, as for instance, a keyboard action. In this case, the
relavant information would be pressing the key (among others), or if the event comes
from the mouse, the relevant information would be the cursor position and the button
status. The events can be internal, with a variable value change, but can have a physical
association, such as a chamber temperature change from 10 to 11 degrees.
The event conditions that may occur with the objects are already handled by the Elipse
Scada, and areavailable to the user to connect the program (scripts) to them.
Here there is an event list already available to the script running, listing the generating
type of action or prevailing in the event generation, with its name and a list of objects
that support the events.
combination visualized).
Screen (To running only when the
screen with the scripts is open).
Keyboard / Time – WhileKeyPressed Application (To independent running
While any key or of the screen being visualized)
combination is pressed
Screen (to running only when the
screen with the scripts is open)
Keyboard / Mouse – To OnKillFocus, All the screen objects
click or move the focus OnSetFocus
(edition) to an object or
screen
Mouse (general events OnRButtonUp All the screen objects.
with buttons) OnRButtonDown
OnRButtonDblClk
OnLButtonUp
OnLButtonDown
OnLButtonDblClk
OnMouseMove
Mouse OnPress Button Screen object
OnRelease
Mouse / Time WhilePressed Button Screen object
Time WhileRunning Application (To independent running
of the screen being visualized)
Screen (To running only when the
screen with the scripts is open).
Any Alarm type incident OnAlarm Alarms
Disconeccting the OnDisconnect Remote Application
Supervision Network
(not with the CLP)
Events with Tags OnAck Tags
OnAlarmHigh
OnAlarmHiHi
OnAlarmLow
OnAlarmLoLo
OnAlarmReturn
OnValueChanged
OnRead
The language used in the script modules are defined by the Elipse Basic, and is very
similar to the C language, but with visual resource such as the Visual basic. Different
from the programs in the mentioned languages, some considerations can be made :
Itis not necessary vaiable or function declaration in the beginning of the script. The
variables that can be tags/ objects/ attributes must be previously created, imported
from other application, or yet it can be used as patterms that already part of any
application, at the moment they are created.
The data type that is attributed to a tag is free, and the supported value can range
from a whole number of the 8 bits to a real type of the 64 bits, or yet, a string (text).
When repassed to the communication driver or received from it, the conversions to
the supported types to different equipment are made . In the properties case, an icon
supported type data, as listed below:
The variable (tags/attributes( and constants are the basic objects that can be
manipulated in the script. The operators specify what will be carried on with therm; on
the other hand, the expressions match variables and constants to procedure new values.
To make the scripts edition or tags expression easier, the command buttons in the
Organizer toolbar, the App Browser and the X-Reference (Crossed Reference) can be
used.
FIELD DESCRIPTION
Selected It shows the selected object/attribute/function name, in the same way it will
be copied to the Script.
Objects It lists the application in hierarchy as it is displayed in the Organizer.
Info It shows a brief description of the selected attribute/function.
Properties It lists all the selected object attributes and functions in the Object window.
Show It allows to filter the listed information in the property window. It selects the
Attributes and/or Functions that will be displayed to the selected object.
Copy to Script It copies the displayed text in the Selected field to the Script in the cursor
current position.
Note
You can also use the App Browser in the edition of Tag expressions. To
copy the selected object / property / function to a Script or Expression
just double click over it.
The X-Reference tool has the same structure of the App Browser, however, when you
select an object in the tree in the window left side, its respective references are listed in
the right side. Double click over a reference to go the referred object
CONSTANTS EXAMPLE
Integer (32 bits, dec) 1234, 1234d, -993
Integer (32 bits, bin) 11001110b (does not allow signal)
Integer (32 bits, octal) 7733o (does not allow signal)
Integer (32 bits, hex) 0A100h, 3B8h (does not allow signal) (if the first digits is A-F,
place a zero before)
Real numbers (64 bits) 133.443, 344.939 (does not have scientific notation)
Strings "Temperature", "pressure"
OPERATORS EXAMPLE
+ Addition tag001 + 34
+ Strings connection slider1.Frame.title + " - PLC1" (connects two strings)
- Diminution tag001 - screen1.x
* Multiplication screen1.width * 3.141592
/ Division tag001 / tag002
% Remainder tag001 % tag002 (rremainder of the tag001 / tag002)
** Exponentation tag001 ** 2 (tag001 square)
ATTRIBUTING EXAMPLE
OPERATORS
It returns 1 if the realtion is true, 0, if it is false.
== Comparsiob tag001 == 20
> Higher than tag001 > 20
< Minor than tag001 < 20
>= Higher or equal than tag001 >= 20
<= Minor or equal than tag001 <= 20
<> Different tag001 <> 20
ATTRIBUTING EXAMPLE
OPERATORS
tag001 = 20
tag001 += 20 (tag001 = tag001 + 20)
tag001 -= 20 (tag001 = tag001 - 20)
tag001 *= 20 (tag001 = tag001 * 20)
tag001 /= 20 (tag001 = tag001 / 20)
tag001 %= 20 (tag001 = tag001 % 20)
tag001 &= 20 (tag001 = tag001 & 20)
tag001 |= 20 (tag001 = tag001 | 20)
tag001 ^= 20 (tag001 = tag001 ^ 20)
tag001 **= 20 (tag001 = tag001 ** 20)
tag001 <<= 20 (tag001 = tag001 << 20)
tag001 >>= 20 (tag001 = tag001 >> 20)
AND
XOR
OR
= += -= *= /= %= &= |= ^= **= <<= >>=
Note
When attributing a value directly to a PLC tag or Block Element that has
the property automatic writing enabled, the command is sent directly
to the communication driver that in its turn repast it to the associated
equipment. Such action does not take place only when the avlue
attributed is equal to the content that was is the tag. In case you want to
force a writing whatever, the tag Write() function must be executed in
any script.
8.4.1.If…ElseIf…Else…EndIf Command
It is used to make decisions. Formally, its syntax is:
If condition1
[instruction block 1]
ElseIf condição2
[instruction block 2] ]
...
Else
[instruction block n] ]
EndIf
8.4.2.For…Next Command
It repeats an instruction block a certain number of times.
8.4.3.While…Wend Command
It runs an instruction block while a certain condition is real.
While condition
[instruction block ]
Wend
8.4.4.Repeat…Until Command
Its runs an instruction block until a certain condition is confirmed as real
Repeat
[instruction block]
Until condition
For further information about the syntax and the permission for using control ties,
consult the user’s manual. Our goal here is to supply examples and comments about
the performance furing its use.
The App Browser tool shows the available functions to each object during the Scripts
editions. The following objects have Special Functions that can be visualized selecting
the desired object in the application tree in the App Browser:
Global Manager
Application
Tags
Screen
Screen Objects
Alarms
Recipes
Historics
Reports
Query
Plotting
Drivers
Databases
Remotes Applications
The Global Manager item has generic functions that are not specified to any type of
object. In this group there ar the date and watch functions, strings manipulation and
numeric conversion, files, multimedia, among other functions.
The screen object functions can be accessed first through the screen selection that
contain it, soon after the object. The plotting function can be found in the trend
graphic objects, historical Analysis and graphic report. And the Query functions are
used by the objects, histprical Analysis and graphic report. And the Query functions are
used by the objects that make access to tiedisk data, such as the historical trend, the
browser screen object, and the historical and reports.
SCRIPTS COMPILATION
Always before running an application we must check if it does not have any errors.
This is a very important task, once the scripts that contain syntax errors (that
means, poperty names or wrong objects or not existing ones) will not run.
Using the Compile Scripts, Build Scripts, Rebuild All Scripts buttons that are
in the inferior part of the Organizer, we can make this verification in a faster
manner.
Use the Compile Scripts button to check script errors that are being edited in the
moment. This button will not verifies only the scripts that were not yet compiled.
The Rebuild All Scripts button verifies all the application scripts without
considering if the they were changed or not. The time difference that this
operating takes to be executed regarding the Build Scripts is slightly higher to the
large application, but is very useful to avoid running errors. When using these two
last options, a window click in the red line, the scripts with errors are automatically
edited.
SCRIPTS ERROR
If during the script running an error of the following type takes place:
c) There was a division by zero – the Script will be aborted. To avoid this kind of
problem, always compile your files, and verify the change of this problems
happing again.
SEQUENCING SCRIPTS
As the scripts are priented to events, there is a chance of running the scripts inside
others, due to the used operation sequencing. As the following example:
Screen1.Activate()
In this case, at the moment that the tag001 is in the alarm condition (that was previouly
defined by the user) the first script attributes a value 1 to the tag002. When performing
such task, the tag001 script is interrupted, so it can verify in the value attribution cause
to the tag002. When this occurs, in general it id verified if the tag002 has any script
associatd (so that will be necessary to run them too, since occurred an event to the
tag002) or if there is any screen object connected to it.
Thus, the script OnValueChanged of the tag002 is run, and only then is returned to the
origin point, from where it stopped in the script of the tga001.
COMMENTS
It can be insert comments in the scripts with two simples bars placed in the left side
from the point where you want to meke a comment.
Examples:
INTERN VARIABLE
You can create internally variable in the script. After the running, it will be destroyed.
The used command is DIM. Example:
DIM FLAG
FOR FLAG=0 To 10
Tag001=FLAG
NEXT
SCRIPT RETURN
If you wantwant to leave a script before its end, use the RETURN command.
Example:
IF Tag001 > 10
RETURN
ENDIF
Tag002=10
In the example above, if the Tag001 is higher then 10 the script is abandoned. On the
contrary, its running normally continues.
WHILE Tag001
Tag002+=Tag003
WEND
In the script above, the available tag001 is evaluated; if real, that is, different from zero,
it start the running of the first instruction that increases the tag002 of the value of the
tag003. After that, the tag001 is evaluated again, and the running continues with the
possibility of receiving the answer of the communication driver with the tag001 value.
In order to eliminate the problem, one of the solution is to force the reading of the
tag001 in the end of each loop, as in the example:
WHILE Tag001
Tag002+=Tag003
Tag001.Read()
WEND
Using the ScriptWindow() function that it is also a tool you can verify while running how
long each script takes to be executed. Thus, you must guarantee that a Script
WhileRunningFinnish. Its execution before calling it again, in order to avaiod a running
request accumulation.
It aviods the creation of too long scripts. When you separate them in small parts the
time spent consireably decreases; and as said bove, use the debugging function to
optimize the scripts. A deparation between scripts sughestion could be as follows:
Create a RAM type, wich can be called, for instabce, functionA. At some point, in the
script to be separated, make an attribution to the functionA.
…….
…….
FunctionA=1
In FunctionA create a um script OnValueChanged, and copy the part of the first script
that will be executed on it. As the last instruction, return the tag FunctionA to its initial
value.
…….
…….
FunctionA=0
BUTTONS SCRIPTS
To the button scripts, choose the OnRelease instead of the OnPress, so that the user
notices the action easier.
8.7. Drill
SCREEN EXHANGE VIA SCRIPT
Task: In the calling button of the Alarm screen, F2, replace the automatic call for a
script.
Procedure: In the general page of the mentioned button, in the ListBox Go To
Screen, choose none. In the scripts page, choose OnRealese. Through the AppBrowser,
serach the Alarm Screen, choosing its functions on the inferior right corner. Choose the
function activate(). Copy it to the script, and next compile it. The final result must be:
Alarmes.Activate()
Run the application, testing its functionality.
Script OnAlarm:
IF lastAlarmPri == 2
Alarmes.Activate()
ENDIF
Procedure: Insert a bitmap object over the created toolbar, bringing it to front (over
the bar). Choose as bitmap the file LIB\UNTIL\LOGIN2.BMP, of transparent type,
and background color write. Create a script to reiceve the mouse moves over it;
Script OnMouseMove:
Abertura.Bitmap.SetMouseCapture()
IF Abertura.Bitmap.IsMouseInside()
Abertura.Bitmap.fileName="c:\elipse32\lib\util\login.bmp"
ELSE
Abertura.Bitmap.fileName="c:\elipse32\lib\util\login2.bmp"
ReleaseMouseCapture()
ENDIF
The OnMouseMove script is run when the mouse is moved inside or outside the
object area. On the other hand, the SetMouseCapture function causes all the Windows
messages, generated by the mouse, to be sent to the object in point. Thus you can test if
the pointer is inside or outside the area, resulting in the changig of draws.
Run the application, and when you pass the mouse over the bitmap, you will see that
the drw chages from black and white to colored.
Procedure: Insert a button, aligned in the right side of the button area (inferior part of
the screen). Choose the on-off type, and in the Message page key in “Auto” for Normal
and “Manual” for pressed. There are two procedures that can be executed in this same
button.
To run the second task, it is necessary to create two scripts: PnPress and OnRelease. The
instructions of the first are to enable the objects, when you choose a manual operation,
and of the script second are to disable it, according to the script.
OnPress
Dosagem.button1.enabled=1
Dosagem.button2.enabled=1
……
Notice that the object names can change from one application to the other. Thus,
where you read FirstButton_Name, etc…, it is referred to the button that you wish to be
enabled or disabled. The same is valid for the other scripts script:
OnRelease
Dosagem.button1.enabled=0
Dosagem.button2.enabled=0
……
9
Capítulo
9. Historical
T
he Historical are objects responsible for the storage of tags value in disk. The
storage can be made per time or event that must be specified to the data
recording.
To create or edit a Historical, we need ro select the item Historical in the Organizer.
When a new one is created, it will be displayed below this item in the application
tree.Selecting a specific Historical, its properties will be displayed in the right side of the
tree.
FIELD DESCRIPTION
Name It defines the Historical name that will be used in the Organizer tree and
in the Scripts (it can be changed in the running).
Description It is a brief description about Historical.
Analysis It allows the visualization of the Historical data in graphic form. You can
call Historical Analysis during the running through the Analysis()
function of the Historical.
Update File It updates the Historical File Structure when some change takes place
in the Historical set up.
SPC It calls the Processes Statistic Control (CEP) in order to proceed a
statistic Analysis of the Historical Data.
Filename It defines the file name to the current Historical.
Write time It defines the frequency in which the data will be written in the Historical
file.
Max Records It defines a maximum number of registries to the Historical file. The
Historical file is rotative, that means, when the data exceed the file size
the registries will be displayed.
Enable Historic at It enables the Historical file writing from the start of the application
application startup running, according to the defined rate scan. Keeo this option disabled if
you want to control (using Scripts) the creating of Historical data
manually.
Batch process It defines the Historical type as being Batch. When this option is
enabled, a Header file (HDR extension) is created with the same name
of the Historical file. The Header file keeps the information about each
batch.
Network support It enables the network support to the Historical, that is, it allows that the
Historical be accessed (only for reading) by other Elipse applications in
the Network, through a Browser or Report of the Historical Analysis
type. This option also makes that each change in the Historical be
immediately recorded, not allowing the operational System to perform a
task “appointment” for later performance according to its running
priorities.
After the historical type set up, we must add the tags in the Historical that will be
stored, which is made in the tags table. To each added variable we must establich the
field format, which can be:
byte 0 a 255 1
word 0 a 65535 2
dword 0 a 4294967296 4
When you choose the historical of Batch type, it will be created another itme in the
Historical object, called Header that can be acessed via Organizer. Tags must be
inserted in the header, and their values will be used to identify each one of the batch
processes.
Following the given example about the oven temoerature storage, where we would like
to have a reference via lot code and operator name. So, there must be in your
application two tags, code and operator, that will be inserted associated to the header
item, and will have their value recorded in the batch beginning and, so you can identify
it.
The header data are registered in a file with HDR extension, with the same name of the
historical data file name (e.g. If you informed HIST1.DAT as historical data file name,
it will be created HIST1.HDR).
There must exist in the header at least one tag, set as string field (text), so that the batch
search can be made.
FIELD DESCRIPTION
Name It defines the Historical Analisys name that will be used in the
Organizer tree and in the Scripts.
Title It defines the title to be displayed in the Historical Analysis window.
Analysis It allows the visualization of the Historical Analysis data in graphic
form. You can call Historical Analysis during the running through the
Analysis() function of the Historical.
SPC It calls the processes Statistic Control Cep (CEP) in order to
proceed in the Historical Analisys of the Historical data.
Show Property pages It defines the Property pages to be displayed in the Historical
Analysis window:
All pages
Only the Analysis page (Graphic)
Selected pages (only the selected pages)
Dialog Type It defines the dialog type of the Historical Analysis:
Modal (it does not allow to access any other window
before being closed)
Modeless(does not need to be closed to access other
screens)
Styles It defines the Style of the Historical Analysis window. Scalable font,
Minimize Button, Maximize Button.
9.2.1.Analysis Setting
We can the Analisys way of work through the Graph, Pens, Pen Colors, Settings,
Wuery and Setup Printer pages that are usual in the objects that consult the
databases. We make here a brief explanation about two pages: Setting and Query.
SETTING PAGE
FIELD DESCRIPTION
Source Filename It defines the source file name to the Analysis (DAT extension). In
case of being used for other objects (Reports, Browser) it can be
specified in the Header (HDR extension).
Browser It allows to find the source file to be used.
All Batches It selects all the batches to be printed. This option is available only if
the source file (Source Filename) is a Historical file with an enabled
batch process.
Last Batch It selects the last batch to be printed. This option is available only if
the source file (Source Filename) is a Historical file an enables batch
process.
Specific Batch It select a specific bacth to be printed, as specified in the Field and
Criteria. This option is available only if the source file (Source
Filename) is a Historical file with an enabled batch process.
Field It lists the field available to a specific batch selection. Only string type
fields will be listed.
Criteria It defines the value to be searched when a specific batch is selected.
QUERY PAGE
It allows to define a time range to select the file data to be visualized.
FIELD DESCRIPTION
No query date A filter will not used, that means, it selects all data. Select this option if the
historical must visualize all the file data.
Time range It selects the data within a specified time range. It must be provided the
initial and final search date.
Newest data It selects only the new data. Use this option when the historical must
show the last acquisition in a specified period. The options shown here
can be changed in running through the query properties, available in the
Organizer.
Initial date It determines the time range initial day.
There are other objects that can also work with the data files created by the historical
that are the Alarm screen objects, Browser and Historical trend, and the text Report,
graphic and Historical Analysis.
Drill:
Task: To create a historical object for continuous recording.
Procedure: From the Organizer, create a new historical, with the name Hist1. Specify
the file name as CONTINUO.DAT, writing time of 1000 ms, register maximum
number: 1000; enable the recording by scan, and in the query page, with no data query.
In the tags table, insert the level and temperature tag.
Task: To create a button in the screen, calling the function Historical Analysis..
Procedure: In the F5 button, Analysis in the Dosage Screen, choose the momentary
type. Create a script OnRelease to the button, inserting the function Hist1.Analysis().
Hist1.Open()
Hist1.WriteRecord()
Hist1.Close()
Ou
Hist1.enabled=1
Hist1.WriteRecord()
Hist1.enabled=0
Basically, both perform the same operation, but the second one enables it to recording
by time, while the enabled property is in 1. The writing command, WriteRecord(), obtains
an updated value of the tags that are associated to the historical, creating another data
line.
HISTORICAL TREND
The screen object trend graphic, when previously set as historical trend, can visualize
the historical data as well as the analisis. The objects associated to the trend, in this case,
are not the tags themselves, but the historical fields that that are created when tgas are
associated to the Historical.
To choose data about the file to be associated to the trend, as well as the query manner,
a Query page that can be acessed in the trend Advanced page or via Organizer –
Screen – trend Object is created. The criteria settings are the same already described.
The pens association to the field is done by clicking over the field Axle Y and/or Axle
X in the Pens table, acessed by the Trend properties. Clicking over this field, alist with
the historical field names will be displayed.
To make the trend serach the data in the disk or to update its data, it is necessary, via
some script, to run its function UpdateQuery(). If you want that to happen in the fix
range, just insert this command in the script WhileRunning in the screen, informing its
running time in milliseconds in the script.
BROWSER
The browser screen object has the same characteristics of the historical trend, but it
shows the data of the text mode, not graphically. The browser does not update its data
automatically, so you must run the function UpdateQuery() through some script
when you want the update to take place.
This object also to define some properties, such as line numbers that can be visualized,
the line that is selected by the user, and son on, besides allowing each field format that
will be visualized. The Browser also allows the visualization of the batch file, through
the specification of the correspondent HDR file in the setting page.
9.4. Drill
Task: To create a procedure in the same screen mentioned above, through the use of
two Browser objects, a system for choosing Analysis by batch.
Procedure: Insert in the bath screen, two Browser objects. In this example, the
Browser will allow choosing the batch that we want to visualize through navigating in
the HDR file. So, the first one must be associated to the file BATCH.HDR(FIND
THE FILE BATCH.DAT, AND THEN CHANGE THE EXTENSION TO
.HDR). In the Query page select no data criteria, and in the databases page, click in the
Code field, specifying the word “Code” as label and in the field Application.UsrName
field use the word “Operator”, then click in “Update”.
In the second Browser (Browser2), do the association to the data file BATCH.DAT.
In the settings page, choose the specific batch option.
Create a script to the Browser, that will be run by pressing the mouse left button twice:
Script OnLButtonDblClk
Header.Open()
Header.GoTo(Browser.curSel)
Header.Edit()
Browser2.Consulta.criteria=Header.Code
HAnalysis.Consulta.criteria=Header.Code
Header.Close()
Browser2.UpdateQuery()
Basically, the script above opens the HDR file in the same line where the user is
clicking in the screen. Soon after that it will be pointer as search criteria to Analysis and
for the Browser2, the batch whose code is being visualized by the operator.
The object Browser does not have data update, that means the data file is not
reconsulted automatically in regular ranges. This task is performed only when opening
in the screen that has the object, or yet, through an update function called UpdateQuery(),
that is present in the last line of our example.
To the second button (Finish) we can add the function UpdateQuery() so that when
completing the batch, the browsers will be update. In this case this button script would
have the following setting:
Hist1.FinishBatchProcess()
Browser1.UpdateQuery()
Task: To create in the same screen above a set point for keyboarding the product code.
Procedure: Insert in the dosage screen a set point object, choosing in the format page
the data with the text type (String). In the tags table associate it to the Tag Code.
Capítulo
10 10. Reports
T
He reports allow to perform the historical data, header and alarm printings, as
well as the immediate data.
Text Report: It can make the data printing in the line and column format
including the alarm files. It also allows the printing to filling in disk.
Graphic Report: It makes the graphic printing of the historical data, with the
creation of subtitles.
Form: Use this option to print a form with any texts, momentary values of
variables and bitmaps.
All the reports have Query table for the specification of the data search range, and
the Setting table to choose the data and batch files, if this option is enabled.
10.1.Drills
CREATING ALARM REPORTS
Task: To create a text type for the alarm printing.
Procedure: Specify the Report1 name, file: ALARMS.DAT, criteria selected by date
and hour.
Task: To create a screen for printing range.
Report1.Query.StartMinute
Report1.Query.StartSecond
Report1.Query.StartDay
Report1.Query.StartMonth
Report1.Query.StartYear
Report1.Query.FinalHour
Report1.Query.FinalMinute
Report1.Query.FinalSecond
Report1.Query.FinalDay
Report1.Query.FinalMonth
Report1.Query.FinalYear
Procedure: Insert two objects bitmap type, in the inferior borders in the screen. The
first must be associated to the bitmap LIB\UNTIL\DISQUETE.BMP and the
second, LIB\UNTIL\IMPLYES.BMP. To create a script for the mouse left button as
follows:
OnLButtonUp
Report1.PrinttoFile(“c:\teste.txt”,0,‟ „)
This scripts uses the printing fuction for file, calling the
Report1.PrintToFile(file,bImprimeHeader,burster,bIndicarProgress), where the file is
the file name to be printed in the disk, bPrintHeader enables printing the Header,
buster is a string used to separate the fields in the printing, and bIndicar Progress shows
a window with a progress indicator.
OnLButtonUp
Report1.Print()
PRINTING FILTERS
Together with the previous functions we can use the function
AddFilter(field,valueLow,valueHigh) before printing, to use a filter in a specific field,
together with the date, where the field is the historical field where you want to apply
the filter; valueLow and valueHigh are the limit values, within which the print will be
made. Consult the user’s manual for further information about this function.
Assume that you establish the screen ALT+S to perform the printing. Follow the next
steps:
Procedure: Go to the screen setting(if you want the print just in one page) or to the
application (if you want in all screens). Choose the scripts page, New, type
OnKeyRelease. Click in the capture button and press the keys ALT+S. Now the script
is created
In it, key in or capture through the App Browser the following functions:
CaptureScreen("c:\teste.bmp")
Form1.Bitmap1.bitmapName="c:\teste.bmp"
Form1.Print()
When selecting the item Reports via Organizer, the reports already created for that
application and the registered printer list will be displayed as a subtem. You can
determine a certain report to use alternatively a printer or other of the list, depending
on the desired conditions.
You can associate for example, the Report Form1 to the Printer. While running, the
following properties can be changed.:
a) Change the report printer Form1 from Printer to Printer2. (done through the Report
properties edition)
b) Change the Printer of a certain physical printer model to the other. (done through
the Printer properties edition).
Form1.LoadCfg("c:\printer.ptr")
ADITIONAL DRILLS
To create additional buttons to call another reports:
Capítulo
11 11. Recipes
A
Recipe in the Elipse Scada can be considered as a model that contains a
ceratin number of variables that can have values manipulated by tags,
planning to save/loading the disk or read / writing its values in the
equipment.
When creating a new recipe from the Organizer, a Model is being specified. The
model corresponds to the specification of the tags set.
The tags make part of a model will have one or move value sets that can be read or
written.
The Recipe General Propertis page is dispayed when the general tab in the top of the
recipes is selected. This page is displayed below and its respective fields are described in
the following table.
Though the tags pag we can associate the tags that will be part of the model that we are
creating.
FIELD DESCRIPTION
Name It defines the Recipe Model name that will be used in the Organizer tree
and in the Scripts.
Description It is a brief description about the Recipe Model.
Recipe File It defines the file name to the current recipe model have up to 8
characters, and it must not have the extension (Elipse Scada will
always use the RCP extension). You can also specify the file path that
can be an absolute location (e.g.: “ RECIPE\RCP1” ). Relative
Locations are not recommended if you want to copy your application to
other computer.
Edit selected label It allows the label edition of the selected Tag in the list below. Label can
be understood as a tag nickname, so that its identification in the recipe
is not necessarily the same as the tag name, in order to make the
operration easier.
Edit Data It opens the window Edit Recipe where you can set the recipe defining
the tgas values to be recorded in file.
Labels It shows the labels associated to the tags of the current Recipe Model.
Tag It shows the tags associated to the current Recipe Model. You can add
or remove tags in the Tags page of the Recipe.
11.1.2.Editing Recipes
This window will be displayed when pressing the button Edit data… in the Recipes
General properties page.
Each Recipe within a Recipe Model will be displayed in the list of the combo box
beside the Recipes field. Selecting any Recipe in the list, you can edit its description
and the value of each Tag.
FIELD DESCRIPTION
Recipes It allows the selection of a current Model recipe. You can add a new
Recipe by pressing the button New Recipe.
Description It is a brief description about Recipe.
New recipe It creates a new recipe, adding it to the current Model Recipe list. Each
recipe Model can have several Recipes.
Delete recipe It removes the selected Recipe from the list.
Edit field value It allows the tag value edition to the current recipe. Use the direction
here arrows of the keyboard or the mouse to select the tags to be edited.
Recipe data It lists the value of each Tag of the current Recipe.
Drill:
Task: To create a recipe model for product register.
Procedure: In the recipes item, create a new recipe, with the name Model1. Specify
the file MODEL1.RCP, and associate the tags Water, Sugar, Syrupe and Glucose.
Click in the fields of each one of the tags, and replace the label value: for Water--------------
-, Sugar----------------Syrup--------------- and Glucose--------------
Now click in the field Edit data, where a dialog box for registering (off-line) the several
recipes (value set) that can be associated to the tags will be opened, besides the name of
each recipe.
At this moment, the recipes are already created, but we did not create the manipulation
methods of the running value yet. For such purpose, we can the screen recipes.
Task: To create in the screen Recipes the procedure for recipe manipulation.
Procedure: To create in the screen Recipes 5 buttons, which will run the scripts in
order to perform basiz tasks with the recipes that are:
Selecting and Loading: It allows at choose, model1.rcp, there can be several recipes,
that means, several values sets. Through a selection procedure, we choose which
recipe we want to manipulate. For such, we need to obtain a number that is the
position in the file or a recipe number, which will be stored in the tag
number_recipe.
Tags.Products.number_recipe=Recipes.Model1.ChooseRecipe(“Choose the Product”,1)
The line above makes a window to be opened in order to choose the desired
recipe. Adding the next lines in the same script will make the selected recipe to be
loaded, choose name will be copied to the tag Code.
Recipes.Model1.LoadRecipe(Tags.Products.number_recipe)
Tags.Products.Code= Recipes.Model1.GetRecDescription (Tags.Products.number_recipe)
Create a New Recipe: It allows opening a new register or a data set in the file
model1.rcp.
Tags.Products.number_recipe=Recipes.Model1.CreateNewRecord(Tags.Products.Code)
Delete Recipe: From the register number of a recipe we can withdraw it from the
file model1.rcp.
Model1.DeleteRecipe(Tags.Products.number_recipe)
Another suggestion to delete a recipe can be as follows:
The MessageBox function is used to make sure the user wishes to delete the recipe.
This function is present in the Global Manager and is used as a dialog interface with
the user, when some information or intervention is necessary. Besides that, this manner
also loads the first recipe, so that the setpoints do not keep the values of a recipe that
no longer exists.
Other interesting characteristic in the recipe model is that the same data file created by a
recipe or template can be used by another recipe, since they have the same number of
associated variables.
This allows to load a recipe file in other variable set that are not field variables, allowing
the preparation, in a separate process, of forms and so on, which will be used by the
operator later.
Create a new recipe model (name = recipe) and associate to it the tags and properties
that you want to recors.
In the script OnStartRunning of the Application, or even through any other procedure,
in which you want to guarantee that the files will be recorded, add the following lines:
IF Recipes.Recipes1.GetRecCount() > 0
Recipes.Recipes1.LoadRecipe(1)
ENDIF
In the script OnStopRunning of the Application, or even through any other procedure, in
which you want to guarantee that the files will be recorded, add the following lines:
IF Recipes.Recipes1.GetRecCount() < 1
Recipes.Recipes.CreateNewRecord("Persistent Tags")
ENDIF
Recipes.Recipes.SaveRecipe(1)
By doing so, every time the application is finished the tags values are saved in the first
register (SaveRecipe(1)) of the recipe file. When running the application, it is verified is
loaded (LoadRecipe(1)).
Capítulo
12 12. Passwords
T
His feature allows to control the access to the Screens through list of names,
in which a password, a login and a safety level are attributed to each name.
It in the Screen specification, in the access level field a number different from
0 (0 releases the access to all the users) is specified, it is necessary a user to be logged in,
and that its safety level allows the access to the Screen.
According to the assigned access level, each user will have some functions available.
The user with level 1 is considered a superuser, and when he is logged in he can,
through the UserAdministration() function, create, change and remove the attributes of
all users.
By means of the same function, the other users can change their password by
keyboarding the old password and by double validating the new password.
The passwords and levels are recorded on an encrypted and independent file in the
application directory.
In order to the user be logged in the System, the function Login() must be forcingly
executed. In case there were an user already logged in, this function will first provide a
logout of the former user through the function Logout() and then a register of the new
user.
Drill:
Task: To create users and register them.
Procedure: To create users with various access levels in the system screen except for
the Openning screen, which will have free access to all users.
Task: To create a Login procedure of the user in the Opening screen.
Procedure: In the login bitmap object in the opening screen, create a script
OnLButtonUp, running the function Application.Login(), present in the Application.
Task: To create a password maintenance procedure.
Procedure: In the login bitmap object in the opening screen, create a script
OnLButtonUp, running the function Application.Login(), present in the Application.
Task: Insert the user’s name that was logged in the opening screen.
Procedure:Insert a display in the opening screen, over the toolbar, and bring it to the
front. Set the font Arial Regular 10- black, left alignment. In the prefix field key in
“User” and in the tags table associate Application.UserName. Also insert a display
showing the user level access, via property UserAccessLevel.
Task: To create a button for calling the dosage screen, with the text: “System Login”.
EXTRA DRILLS
Task: To use the Message Box functions and create the verification of users logged or
not.
Task: To create a user’s log registry.
Procedure: Through the creation of a variable RAM called user, create a user’s log,
through marking a high alarm in 1 to it. Using the script OnUser of the Application
perform the following script:
Remark: the alarm of the variable user must be marked with different priority
compared to other alarms in the system.
Capítulo
13 13. Databases
T
He Databases option of the Elipse Scada allows to create and manipulate one
or more databases using the Windows ODBC, that allows the connection
with an already created databasis or to create a new one from an assistant
inside the software.
In the Organizer the new table and its respective fields will be displayed, which can be
changed using the special functions of the ODBC in the Scripts:
Create the databasis. In the Excel case, you must use the first line of each
column as a field name;
Close the databasis;
In the Organizer, in Databases, choose Connect to an existing table,
press the button New and choose the driver ODBC that you wish to use;
Choose the directory where the databasis is;
The table and its respective fields must be displayed in the tree.
Capítulo
T
He Remote Application are used to connect two or more applications that are
linked via local network, modem, serial cable or optical fiber. In order to use
this resource, you need to specify at least one server station and one data
customer, beside a network driver that will be responsible for the information
exchange.
DRIVER DESCRIPTION
Ipx.dll / Ipx32.dll It allows the communication on a network that uses the Novell®
IPX/SPX protocol
Tcpip.dll / It is the faster and most used driver. It is necessary to install a TCP/IP
tcpip32.dll driver in your computer’s network.
Serial.dll / It is used for serial or optical fiber communication between two
serial32.dll computers; the physical environment must be full-duplex.
Dialup.dll / It is used for connection via dial line
dialup32.dll
In the server application, you must set the network driver, whose procedures can be
found in the user’s manual.
In the customer application, you can start, for example, from the server application and
to transform the normal tags (PLC, BLOCK, RAM, EXPRESSION, DEMO, …) in
remote tags. Remember that when it is necessary to change the type of a tag we can use
the tool “Change type to…”that accepts multiselection. The change can also be made
with Block Elements and Remote Tags. When changing a tag to block element, the
user informs in which Block the elements will be inserted; when changing a tag to
remote, the user informs in which Remote Application or remote Tags Group the new
tag will be inserted; when changing the Block Element or Remote tag to another tag
type, the user informs which one is the destiny tag group. Also, when a tag type is
changed to Remote Tag, the Elipse copies the name and the full path of the original tag
to the original tag name field in the Remote Tag. Besides that, when a tag type is
changed, some properties or functions are verified to know if they will no longer exists
after the type change, if that happens the change is aborted and a message is displayed
to the user.
Desides the remote tags, files can be transferred. The Elipse Scada uses a ressource that
optimizes the file transference process, for it is able to transfer only the changes of the
same file from one station to another.
Task: To create a specific screen that will display the transmission progress and its
status. The button can call the screen called Transf_file.
Script OnRelease
Transf_File.Show()
File_Remote1.GetFile("C:\Elipsew\Test.dat","C:\Elipsew\Test.dat")
Task: To create a tag expression, with the name transf01, whose content will be and
operation between two properties of the remote file.
(File_Remot1.bytesDone/File_Remote1.totalLength)*100
This tag will display the bytes percentage that had already been transmitted in realation
to the total.
Capítulo
15 15. Optimization
T
O run the setting tasks in the shorter time possible and to obtain a better
performance in the Application running, we listed here some useful tips:
GetErrorInfo(param)
It returns the information about the last occurred error. If stop=0, it returns the
communication type that caused the error (see User’s Manual). If stop=1,2,3 or 4, it
returnd the parameters N1 to N4 or B1 to B4 of the PLC tag or Block that caused the
error. So, if in a PLC’s network where the parameters N1 or B1 represents the number
of the PLC in the network, it is possible to know which equipment is with defaults..
AddFilter(strFilter)
Add a communication filter in the Driver, disabling the readings or writings in tags that
have parameters specified in the filter. Thus we can disable the communication with a
RemoveFilter(strFilter)
It removes the filter that was added with AddFilter(strFilter).
Example: Assum that we are using the Modbus driver, whose parameter N1 indicates
the PLC address in the network. A script suggestion would be as follows:
ERRO=Driver1.GetErrorInfo(1)
Driver1.AddFilter(Str(ERRO,2,0))
MessageBox("Ocorreu um erro no PLC: "+StrZero(ERRO,2,0),"Communication error",0040h)
6. Memory: The RAM memory quality necessary to good perfornance of its system
depends on the application size. Usually, each application item spends around
2kbytes. To know the total item of your application, press the key
7. Tie Optimization: If your do not need to align several ties, choose to separate
them, so the script will have a better performance. Example:
Ex :
For ...
For ...
Next
Next
Usually is slower than:
For ...
Next
For ...
8. Creating shortcuts for an Elipse application: The Elipse Scada 2.0 installment
automatically registers the files with APP extension. Therefore, the Elipse Scada
applications can be automatically run with a double click over the created
application.To create an access icon (shortcut) in the desktop (work area), just
find the program (in the explorer or file manager) in the directory or work folder
and “darg it” to the wanted localization.
9. Y2K: The Elipse Scada registers the dates using a format that assures the
normal operation of the software to the next millenium without changes or
charges.
10. Manipulating dates in the ELIPSE: The Elipse uses the JULIAN calendar
to manipulate dates, in such case the Y2K is avoided. You can use the
properties day, monyh, year, hour, minute and second, or through the attribute
currentTime. To show a date in any screen format, just insert a display
associated to the property currentTime, and choose the format as Date/Time and
click in the format button.
Observer that the mentined parameters return the current date of the system,
are constantly updated and could be replaced by a value (absolute date) of a
databasis (ODBC).
11. Organizing the Object Tabs of the Elipse: By using the Tabs key it is
possible to move an object, such as a Setpoint, for instance, to next object of a
series.
Initially, the shifting through the Tabs follows the object creation order in the
screen. However, it is possible to easily change this order with a little trick;
13. Driver Files do not Appear: If you try set a new communication driver in
your application and you can not find a file, the reason must be the Windows
Explorer that is set to hide files with DLL extension. To solve this problem,
follow the next steps:
1) Open the explorer
2) In the menu View, click over the option Options or Folder
Options
3) Select the View table, and in the option Hidden Files choose
Show all files.
14. To show Video Images: The nnew video object allows the camera videos or
TV images ro be displayed, you need to have a video board with input for
theses signal. The resolution is defined by the size of the object placed in the
screen, with a frequency of 30 frames/second. To know more about the video
use, read the User’s Advanced manual.
Capítulo
16 16. Exhibits
This driver is set to work with all the Klockner Moeller PLC.
P1 – serial port:
0 = COM1
1 = COM2
2 = COM3
3 = COM4
P2 – transmission velocity
0 = default (9600)
1 = 1200 bps
2 = 2400 bps
3 = 4800 bps
4 = 9600 bps
5 = 19200 bps
P4 – eco
1 = yes
0 = no
n1 – clp number
n1=3 PS306, PS316 or PS416
n1=5 PS3 or PS4-100
n1=7 PS4-200
n2 – variable type
n2= 0 reads byte low of the address
n2= 1 reads byte high of the address
n2= 2 reading/writtingof the address word
n2= 3 reading/writing
External RAM
---------------------------------------------------------------
L 4E85 Status word - 1. slave
L 4E86 Status word - 1. slave
L 4E87 Status word - 2. slave
L 4E88 Status word - 2. slave
L 4E89 Status word - 3. slave
L 4E8A Status word - 3. slave
L 4E8B Type - master
This driver communicates via 3964R protocol with any CLP that supports this
protocol. Some CPU’s have a specific communication channel for this protcol, others
need an interface (RK512 or 524).
Micor connection (Elipse) with the Siemens CPUs via 3964 TTY:
p1 – communication port:
0=COM1
1=COM2
2=COM3
3=COM4
p2 - baud-rate:
0=2400 bps
1=4800 bps
2=9600 bps
3=19200 bps
n1 – not used
n2 – variable type (see table 1)
n3 – address part 1 (generally DB number)
n4 – address part 2 (generally DW number)