Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
HMI/SCADA SOFTWARE
USERS MANUAL
Table of Contents
1.
1.1.
1.2.
1.3.
2.
2.1.
2.2.
2.3.
2.4.
3.
3.1.
3.2.
INTRODUCTION .......................................................................................................................................................... 9
ELIPSE SCADA PACKAGES ..................................................................................................................................... 9
OPERATIONAL MODULES ....................................................................................................................................... 11
PLUG-INS
.................................................................................................................................................... 11
3.3.
3.2.4.
Elipse Web
................................................................................................................................. 34
SCRIPTS ............................................................................................................................................................... 35
4.1.
4.2.
4.3.
4.4.
TAGS.......................................................................................................................................................................... 37
TAGS GROUP ........................................................................................................................................................ 37
NEW TAG.............................................................................................................................................................. 38
CHRONO TAG ....................................................................................................................................................... 40
PLC TAG .............................................................................................................................................................. 41
4.
4.5.
4.6.
4.7.
4.8.
DDE TAG
................................................................................................................................................... 44
DEMO TAG ............................................................................................................................................................ 47
EXPRESSION TAG ................................................................................................................................................. 48
BLOCK TAG........................................................................................................................................................... 50
4.8.1.
Block Element ....................................................................................................................................... 52
4.9.
RAM TAG .............................................................................................................................................................. 53
4.10.
MATRIX TAG .................................................................................................................................................. 54
4.11.
BIT TAG ......................................................................................................................................................... 55
4.12.
ALARM PAGE ................................................................................................................................................. 57
4.13.
TAGS SCRIPTS............................................................................................................................................... 59
5.
5.1.
5.2.
5.3.
6.
SCREENS .................................................................................................................................................................. 61
GENERAL PROPERTIES OF SCREEN ....................................................................................................................... 63
STYLE PROPERTIES OF SCREEN............................................................................................................................ 64
SCREEN SCRIPTS ................................................................................................................................................. 66
6.5.2.
6.5.3.
6.5.4.
6.5.5.
Display .................................................................................................................................................. 76
Browser ................................................................................................................................................. 79
Bitmap ................................................................................................................................................... 85
Animation .............................................................................................................................................. 86
6.5.6.
AVI
6.5.7.
Video
.............................................................................................................................................. 89
.......................................................................................................................................... 90
6.5.8.
Preview
....................................................................................................................................... 92
6.5.9.
Trend..................................................................................................................................................... 93
6.5.10.
Bar Graph ........................................................................................................................................... 100
6.5.11.
Gauge ................................................................................................................................................. 105
6.6.
INTERACTION OBJECT ......................................................................................................................................... 108
6.6.1.
Slider ................................................................................................................................................... 108
6.6.2.
Button.................................................................................................................................................. 110
6.6.3.
Setpoint ............................................................................................................................................... 114
6.6.4.
Alarms ................................................................................................................................................. 118
7.
7.1.
7.2.
8.1.
8.2.
9.1.
9.2.
8.
9.
9.3.
10.
............................................................................................................. 140
HANALYSIS REPORT
.......................................................................................................................... 167
11.
DRIVERS.................................................................................................................................................................. 169
11.1.
SETTING UP DRIVERS .................................................................................................................................. 169
11.1.1.
PLC Drivers ......................................................................................................................................... 170
11.1.2.
Network drivers ................................................................................................................................... 173
11.2.
DRIVER SCRIPTS ......................................................................................................................................... 176
11.3.
LIST OF ASSOCIATED TAGS .......................................................................................................................... 176
12.
DATABASE.............................................................................................................................................................. 177
13.
14.
15.
16.
17.
18.
OPCSERVER
............................................................................................................................................... 209
18.1.
GENERAL PROPERTIES OF OPCSERVER ...................................................................................................... 210
18.2.
OPC TAGS .................................................................................................................................................. 212
18.3.
OPC GROUPS ............................................................................................................................................. 216
18.4.
QUALITY ...................................................................................................................................................... 217
19.
HAnalysis Functions
................................................................................................................. 270
19.5.10.
19.5.11.
19.5.12.
19.5.13.
19.5.14.
SPC Functions
.......................................................................................................................... 271
Report Functions ................................................................................................................................. 271
Query Functions .................................................................................................................................. 273
Plotter Functions ................................................................................................................................. 273
Drivers Functions ................................................................................................................................ 274
19.5.15.
19.5.16.
Database Functions
.................................................................................................................. 276
Remote Applications Functions ........................................................................................................... 282
19.5.17.
OPCServer Functions
.............................................................................................................. 283
19.6.
ATTRIBUTES ................................................................................................................................................ 283
19.6.1.
Global Manager Attributes ................................................................................................................... 284
19.6.2.
Application Attributes........................................................................................................................... 284
19.6.3.
Tags Attributes .................................................................................................................................... 288
19.6.4.
Screen Attributes ................................................................................................................................. 294
19.6.5.
Attributes of Screen Objects................................................................................................................ 296
19.6.6.
Plotter Attributes .................................................................................................................................. 317
19.6.7.
Alarms Attributes ................................................................................................................................. 321
19.6.8.
Recipe Attributes ................................................................................................................................. 322
19.6.9.
Historic Attributes ................................................................................................................................ 322
19.6.10.
19.6.11.
HAnalysis Attributes
.................................................................................................................. 323
Query Attributes .................................................................................................................................. 324
19.6.12.
19.6.13.
19.6.14.
19.6.15.
SPC Attributes
........................................................................................................................... 325
Batches Attributes ............................................................................................................................... 326
Reports Attributes................................................................................................................................ 326
Drivers Attributes ................................................................................................................................. 327
19.6.16.
19.6.17.
19.6.18.
Database Attributes
.................................................................................................................. 329
Attributes of the Users List .................................................................................................................. 329
Remote Application Attributes ............................................................................................................. 329
19.6.19.
Watcher Attributes
19.6.20.
Steeplechase Attributes
19.6.21.
OPCServer Attributes
.................................................................................................................... 333
............................................................................................................ 335
............................................................................................................... 335
20.
Conventions
These are conventions used in this manual:
EXAMPLE
SILO6.BMP
General
Agitation
Screen1.Show()
Tank01.High
<name of file>
[Ctrl+Enter]
DESCRIPTION
Chapter
1. Introduction
Introduction
Communication with equipment via drivers (DLLs) and OPC (Server and
Client);
Screen Objects;
Block communication;
Scripts;
User Manual
10
Introduction
User Manual
1.3. Plug-Ins
Plug-ins are additional tools that allow the expansion of features of Elipse SCADA,
adding functionalities to the software. They can be purchased separately, and work
alongside any version of the software.
Presently, the following plug-ins are available:
It allows the monitoring of systems through features
of capture, registration and digital transmission of
images in real time. It gives support to several
standards (including MPEG), enabling the
visualization in windows having size and quality that
are programmable by the user. It allows the creation
of a bank of images with search by period or event,
and transmission of images in real time to remote
stations via TCP/IP or dialed row.
System for the supervision of processes through the
Internet. By using any navigator (Internet Explorer,
Netscape and others), it is possible to connect to a
remote supervision station, and receive data in real
time. With this feature, it is possible to view
Introduction
11
User Manual
12
Introduction
Chapter
2. What Is On Screen
An easy way of understanding how Elipse SCADA works is from the tools available
and their presentation on screen.
The following picture shows Elipse SCADAs main screen with an open application
in Configuration module, identifying its elements.
The Title Bar shows the path and name of you application, as well as the title of the
current screen being shown in the work area. The work area is the space where you
will develop your application. The edition of screens and reports is performed in this
area. The Screen Bar shows the current screens title, and allows you to alternate
between screens. The Menu Bar allows you to choose from several options for the
applications set up. The buttons on the Tool Bar allow you to execute some tasks
quickly, without using the menus. Thus, with just one click, you can create screen
objects or call the Organizer, for example. The Status Bar shows some auxiliary
information when editing an application, such as indicators numeric keypad
activation (NUM), capital letters (CTRL) and screen scroll (SCRL), and coordinates
of the mouse pointer. It also shows a small description of a given object, for example
a button of the toolbar or a menu item.
Whats Is On Screen?
13
User Manual
the applications that will run in the version Windows CE must be necessarily
created in the version Windows, Set Up mode.
2.1.1.
File Menu
14
What Is On Screen?
User Manual
2.1.2.
DESCRIPTION
New application
Open application
Save application
Save application as
Close application
Run
Organizer
Options
1, 2, 3 and 4
Exit
Screen Menu
What Is On Screen?
15
User Manual
2.1.3.
DESCRIPTION
New
Delete
Close
Monitor
Properties
Redraw
Objects Menu
16
What Is On Screen?
User Manual
DESCRIPTION
Unselect
Select all
Cut
Copy
Paste
Delete
Deletes the selected objects. To select more than one object, use the
[Ctrl] key.
Properties
Shows the properties of the selected object. The same function can
be activated by double-clicking the object.
Select mode
Connects the select mode, allowing the user to select all objects
within an delimited by the mouse.
The remaining options create objects according to their respective names. After
choosing the Screen Object you want, you should select a region in the screen to
place the object by keeping the left button pressed while the object is moved. A
dotted rectangle shows the size and form of the object. By releasing the mouse
button, the object will be placed inside the specified area.
2.1.4.
Arrange Menu
What Is On Screen?
17
User Manual
2.1.5.
DESCRIPTION
Group
Ungroup
Send to Back
Bring to front
Aligning Controls
Center in screen
View Menu
2.1.6.
DESCRIPTION
Toolbar
Status Bar
Screen Bar
Help Menu
18
What Is On Screen?
User Manual
DESCRIPTION
Index
Using Help
2.2. Toolbars
Toolbars offer a quick access to Elipse SCADAs functions. These functions are
distributed in four groups, as follows: Application, Screen Objects, Arrange, and
Screens, as follows.
2.2.1.
Application Toolbar
What Is On Screen?
19
User Manual
ACTION
2.2.2.
Objects Toolbar
20
What Is On Screen?
User Manual
ACTION
Turns selection mode on, allowing the user to select all objects within
an area delimited by the mouse.
Creates a new Slider object.
Creates a new Trend Chart object.
Creates a new Button object.
Creates a new Gauge object.
Creates a new text area (Text object).
Creates a new Bar Chart object.
Creates a new Display object.
Creates a new Animation.
Creates a new Setpoint object.
Creates a new Alarm object.
Creates a new Browser object.
Creates a new Bitmap object.
Creates a new Video object.
Creates an AVI object.
Creates a new Preview object.
2.2.3.
Arrange Toolbar
The Arrange Toolbar has commands for the edition of Screens acting on the Screen
Objects that are selected; these commands are also available in the Arrange menu.
To select more than one Screen Object, use the left button, and keep the [Ctrl] key
pressed; the last selected objects focus gets red to be used as a reference. To
unselect an object, use this key combination: [Ctrl]+[Shift]+Left Button.
What Is On Screen?
21
User Manual
ACTION
2.2.4.
Screens Toolbar
The Screens Toolbar shows the name of current screen, and allows you to switch
screens through a list showing the name of all screens existing in the application.
22
What Is On Screen?
User Manual
ACTION
Ctrl + O
Ctrl + Shift + V
F1
Calls help.
Shift + F1
ACTION
Ctrl + S
F10
Alt + O
Ctrl + N
New screen.
F8
Monitor screen.
KEYS
ACTION
Ctrl + F4
Close screen
Esc
Deselect object
Ctrl + A
Del
Erase object
Ctrl + X
Ctrl + C
Copy object
Ctrl + V
Paste object
Shift + Del
Ctrl + Ins
Copy object
Shift + Ins
Paste object
What Is On Screen?
23
User Manual
Editing reports
OPTIONS
DESCRIPTION
Ctrl + F4
Esc
Unselects object
Ctrl + A
Del
Erases object
Where:
-DEMO
-SETUP
-EDIT
NameApp
In the version Windows CE, the only command line available is NameApp.
24
What Is On Screen?
Chapter
3. Organizer
You can call the Organizer only when there is an open application, by selecting the
Organizer command in the File menu, or by pressing the Organizer button in the
Toolbar. The following window will appear:
Organizer
25
User Manual
From the Organizer, you can create your whole application simply by navigating
through the application tree. By selecting any of its branches, the properties of the
selected object will be shown on the right side of the window, where they can be
edited. For example, if you select Tags in the Organizer tree, you can create new
Tags and edit their properties by selecting the page wanted from the tabs on top of
the window.
26
Organizer
User Manual
When you right-click the objects in the Organizer, the following options appear:
Search and Replace: allows you to search and replace texts in scripts and properties
from the selected object, as well as from its child-objects. This search is case
sensitive.
Link Report: generates a report with crossed references from the object and its
child-objects.
Script Report: helps you organize and document scripts in the application.
Translation Tool: helps translating the application.
The buttons of the Organizer toolbar allow you to quickly execute given tasks
without using the menus. There are 13 buttons, as it can be verified in the following
table:
Organizer
27
User Manual
Organizer Tools
ICON
COMMAND
ACTION
Delete
Duplicate
AppBrowser
Cross reference
Compile
Compile all
Recompile all
If
ElseIf
Else
ForNext
WhileSend
RepeatUntil
3.1. AppBrowser
The AppBrowser is an important Organizer tool. It is composed of a window
presenting the application tree with its objects. By clicking any object, it is possible
to view the functions and attributes related to this object. When we are writing a
script, a Copy in Script --> button stays available on this window, allowing for the
copy of the attribute or function focused to the programming rows, thus making this
task to be easier.
28
Organizer
User Manual
Choose in the File menu the New Application option, or click the
corresponding button in the toolbar.
In the Save New Application! Frame, choose a name and the place where the
application will be saved.
Besides the files with APP extension, there are others that are generated and
used by Elipse SCADA:
NOTE: Windows XP users must pay attention to System Restore tool. This tool also
tracks .APP files changes, and if you restore the system, the tool will reverse the
new version files into older ones.
Organizer
29
User Manual
App extension
EXTENSION
DESCRIPTION
.APX
.BAK
Backup of application
.DAT
File of historic
.HDR
.RCP
Recipes file
.DLL, .SO
Communication drivers
Image files
In CE, only .BMP is currently avaliable.
3.2.1.
When you select the root of the Application in the Organizer tree, its properties are
shown on the right side of the tree. The page of general properties appears when the
Application tab is selected on top of the Application pages. This page is shown
below, and its respective fields are described in the following table.
30
Organizer
User Manual
DESCRIPTION
Description
Title bar
DESCRIPTION
Close Button
Minimize Button
Maximize Button
Allow Close
OPTIONS
Organizer
DESCRIPTION
Statistics
Find Item
Import
Protection
User Manual
3.2.2.
Application Window
The Window page allows the configuration of the main window for the execution of
the application.
32
Organizer
User Manual
Start Maximized
/Minimized
/Normal
X, Y, Width, Height
Centralize Window
3.2.3.
DESCRIPTION
Touch Screen
Elipse SCADA has special support on the use of touch (Touch Screen), allowing a
more intuitive interface for the use of your application.
Organizer
33
User Manual
DESCRIPTION
3.2.4.
DESCRIPTION
Elipse Web
Through the Elipse Web plug-in, Elipse SCADA can generate documents to be
visualized through the Internet, together with some commercial Web Server as the
Microsoft Internet Information Server (IIS) or Microsoft Personal Web Server
(PWS).
34
Organizer
User Manual
Port
DESCRIPTION
3.3. Scripts
During the execution of an application, several procedures can be triggered through
events. These procedures are described by scripts associated to these events. More
details about scripts will be discussed in a further chapter. Here, we have a list of
events/scripts available in an application.
Organizer
35
User Manual
Events/Scripts of an Application
EVENT
36
DESCRIPTION
OnKeyPress
OnKeyRelease
OnStartRunning
OnStopRunning
OnUserLogin
OnUserLogout
WhileKeyPressed
WhileRunning
Organizer
Chapter
4. Tags
The supervision of a process with Elipse SCADA occurs through the reading of
process variables in the field. The values of these variables are associated to objects
of the system called Tags.
To each object inserted on screen, we should associate at least a tag or attribute.
Tags are all variables (numeric or alphanumeric) involved in an application.
Attributes are data supplied by Elipse SCADA about parameters of the system and
components of the application.
When creating tags, the user can freely organize them in groups in a way as to
facilitate search and identification during the process of configuration. For the
creation of a group, just select the Tags item in the Organizer, and click New Group.
You can create groups within other groups, without restrictions. In order to modify
the hierarchy of groups and change their position (for example, to include a group
inside another group), just drag the group focused to the desired place.
You can create and edit tags from the Organizer by selecting the Tags branch in the
application tree and pressing the New Tag button. On the Organizer window, you
can double click the Tags option to see the tags that are already defined for the
application, in the same way as you do with a directory tree. As the application
grows, the tags can be grouped in order to better organize and edit the application.
Tags
37
User Manual
DESCRIPTION
Name
Description
New Group
New Tag
Report
38
Tags
User Manual
Available options
OPTIONS
Tags
DESCRIPTION
Name
Tag Name. Spaces and special characters are both allowed when
Tags are used in Scripts.
Quantity
Defines the number of Tags that will be created with the same
characteristics specified.
PLC
DDE
Allow exchanging data with programs that are DDE Servers. DDE
(Data Dynamic Exchange) is a protocol developed by Microsoft
for communication of Windows based applications.
Demo
Matrix
Expression
Block
RAM
39
User Manual
40
Tags
User Manual
DESCRIPTION
Name
Description
Increment
Preset
Tags
41
User Manual
42
Tags
User Manual
DESCRIPTION
Name
Tag Name. You can use as many characters as you wish, but
spaces and special characters are not allowed when Tags are used
in Scripts.
Expand bits
Description
Driver
Driver Help
N Parameters
Scan
Scaling
PLC Low
System Low
PLC high
System high
Tests the communication with the PLC server, allowing for the
reading and writing of values.
Enables PLC tag scan reading, that is, the tag value is always
updated on the time specified in Scan field.
When enabled, the tag value is read when needed only. If Enable
scan reading is enabled, this option is ignored.
43
User Manual
Enable scan reading is enabled, the option Enable automatic reading will be
irrelevant, because tag value is always updated.
The option Enable automatic reading can be used to optimize specific processes.
For example, if one tag is used by in a specific script, you can turn on Enable
automatic reading and turn off Enable scan reading. In this case, the tag will be
read only when is necessary.
Automatic writing in PLC tags
When directly attributing a value to a PLC tag or block element that has the property
of automatic writing enabled, the command is directly sent to the communication
driver, which in turn transmits it to the associated equipment. Such action does not
occur only when the attributed value is equal to the content that was already in the
tag. In case you anyway want to force writing, the Write() function of the tag should
be executed in some script (see the Chapter of Scripts).
44
Tags
User Manual
Tags
45
User Manual
46
DESCRIPTION
Name
Tag Name. You can use as many characters as you wish, but
spaces and special characters are not allowed when the Tags
are used in Scripts.
Change type to
Description
Server Name
Topic
Item
Test Connection
Scaling
Server Low
System Low
Server High
System High
Tags
User Manual
Tags
47
User Manual
DESCRIPTION
Name
Change type to
Expand bits
Description
Type
Low Limit
High Limit
Increment
Delay
Period
Enabled
48
Tags
User Manual
Tags
DESCRIPTION
Name
Change type to
Expand Bits
Description
Expression
Errors
49
User Manual
50
Tags
User Manual
Tags
DESCRIPTION
Name
Change type to
Description
Driver
Help
B Parameters
Scan
Change size
Add Element
Size
Add element...
51
User Manual
4.8.1.
Block Element
Each element of Block tag has its properties, which can be accessed by selecting the
desired element in the application tree in Organizer. Following page will be then
shown on the right side of the window.
52
Tags
User Manual
DESCRIPTION
Name
Description
Expand Bits
Index block
Scaling
PLC Low
System Low
PLC High
System High
Tags
53
User Manual
DESCRIPTION
Name
Description
Expand Bits
Initial value
54
Tags
User Manual
DESCRIPTION
Name
Description
Columns
Rows
Map
Tags
55
User Manual
The Bit tag can be both a single bit as well as a set of bits, as long as they are
continuous. This means that you can map for a single Bit tag, for example, bits 0, 1,
and 2, but not bits 10, 11 and 24. The check box that exists in this window allows
specifying if a tag should be created for each selected bit, or if continuous bits that
are selected should be grouped in a single tag.
In the example above, five Bit tags will be created in the following way:
TAGS
BITS
bitField1
0, 1, 2
bitField2
5
bitField3
8
bitField4
12
bitField5
20, 21, 22
The Bit tags created appear below the respective tag in the application tree in
Organizer. When selecting a specific Bit tag, its properties are shown on the right
side of the tree.
The page of General Properties of the Bit tag appears when the General card is
selected on top of the pages of the Bit tag. This page is shown below, and its
respective fields are described in the following table.
56
Tags
User Manual
DESCRIPTION
Name
Description
Tags
57
User Manual
58
DESCRIPTION
LoLo
Low
High
HiHi
Value
Pri
Comments
Alarm Group
Always in Advise
Tags
User Manual
OnAck
OnAlarmHigh
OnAlarmHiHi
OnAlarmLow
OnAlarmLoLo
OnAlarmReturn
OnValueChanged
OnRead
Tags
DESCRIPTION
59
Chapter
5. Screens
Screens
61
User Manual
Screen Options
OPTIONS
62
DESCRIPTION
List
New
Delete
Go to
Show
Hide
Screens
User Manual
Screens
63
User Manual
Properties of screens
OPTIONS
DESCRIPTION
Name
Defines a name for current screen. By using this name, you can
open the screen from any part of the application by using buttons
or function keys, as well as associate it to scripts.
Title
Color
Bitmap
Browse...
Access level
64
Screens
User Manual
Screens
DESCRIPTION
Full Screen
Windowed
Width
Height
Scroll-Bars
Show Border
Resizeable
Movable
Title bar
Initial Screen
Modal
Popup
Clip Children
Close Button
65
User Manual
66
DESCRIPTION
OnHide
OnKeyPress
OnKeyRelease
OnKillFocus
OnPreHide
OnPreShow
OnSetFocus
OnShow
WhileKeyPressed
WhileRunning
Screens
Chapter
6. Screen Objects
When the programmer is developing your application, many times he/she needs to
show some result, make an alert, or receive information and actions from the user.
This interaction with the user happens through what we call interface. For the
programmer to be able to build up the interface of your application, Elipse SCADA
offers a series of features called Screen Objects.
Screen objects are graphic elements and representations of real objects in the process
that help the user to interact and follow up the application being executed in Elipse
SCADA.
In this chapter, we will see the screen objects available in Elipse SCADA, their
meaning, usefulness, and operation. For a better comprehension, we have organized
the screen objects in two categories: visualization and interaction objects.
Screen Objects
67
6.2.1.
68
Screen Objects
User Manual
Screen Objects
DESCRIPTION
Width
Height
Unmoveable during
development
Visible on application
startup
Enabled (receive mouse
and keyboard input)
Access level
69
6.2.2.
Frame Page
70
Screen Objects
User Manual
Frame Properties
OPTIONS
6.2.3.
DESCRIPTION
Visible
Color
Title
Text
Font
Border
Thickness
Color
3D effect
Thickness
Tags Page
Screen Objects
71
DESCRIPTION
Objects
Properties
Tags Selected
Add
Remove
72
Screen Objects
User Manual
SCRIPTS AVAILABLE
You can associate scripts in any screen object for these events:
EVENTS
OnKillFocus
OnLButtonDblClk
OnLButtonDown
OnLButtonUp
OnMouseMove
OnRButtonDblClk
OnRButtonDown
OnRButtonUp
OnSetFocus
DESCRIPTION
6.4. Cross-Reference
The Cross-Reference page lists all links for current object, and its properties, i.e.,
which other objects refer to it and what properties or values are being used. If you
want to go to the selected item just double-click it. The Box of Show children
items allows to view in the list, the children items associated to the father items
listed.
Screen Objects
73
Text
The Text object allows the attribution of messages at intervals of tag values, called
Zones. Several zones can be defined, each one of them containing its own message.
The Text Properties allow the definition of colors and messages for each zone. It is
also possible to define a Default Zone for values not belonging to any specific
interval. You can edit the properties of a text by double-clicking it.
74
DESCRIPTION
Name
Description
Screen Objects
User Manual
Text Zones
Screen Objects
75
6.5.2.
DESCRIPTION
Zones
Add
Delete
Autorange
Message
Alignment
Transparent
Default zone
Blinking
Enables the Blinking for the zone. Once activated and defined
as Blinker, the zone alternates with the default zone, in
accordance with the time set in Blinking every.
Blinking every
Tip
Minimum
Maximum
Background
Font
Defines font, color, and size for the text of the message.
Display
76
Screen Objects
User Manual
Screen Objects
DESCRIPTION
Name
Description
Alignment
Font
Background
Multiline
77
Display Format
Availables Options
OPTIONS
78
DESCRIPTION
String
Numeric
Size
Precision
Prefix
Suffix
Screen Objects
User Manual
6.5.3.
Browser
The Browser object allows viewing your database files. These files should be in
Elipse SCADA format, i.e., should have been created by Elipse. In order to browse
these files, you should look for .DAT (Historic or Alarms) or .HDR (Batch)
extensions. You can edit the browser properties by double-clicking it.
Screen Objects
79
DESCRIPTION
Name
Description
Font
Order
Title Background
Title Text
Row Background
Row Text
Selection Background
Selection Text
Grid
Background
Settings of Browser
80
Screen Objects
User Manual
Setting of Browser
OPTIONS
Screen Objects
DESCRIPTION
Source Filename
Browse
All Batches
Last batches
Specific Batch
Field
Criteria
81
Browser Query
82
Screen Objects
User Manual
DESCRIPTION
No query date
Time range
Newest data
Initial Date
Final Date
Initial Time
Final Time
Last
Unit
Browser Database
Screen Objects
83
Database Properties
OPTIONS
DESCRIPTION
Fields
Move Up
Move Down
Enable
Size
Precision
Prefix
Suffix
Date format
Label
Lines
Browser Scripts
The events available for exclusive Scripts of the Browser are described in the table
below. For more details regarding the use of scripts, see the specific chapter.
SCRIPTS AVAILABLE
You can associate Scripts to the Browser and execute them in one of the following
situations:
EVENTS
OnDrawRow
84
DESCRIPTION
Screen Objects
User Manual
6.5.4.
Bitmap
The Bitmap object allows the insertion of images, figures or drawings in the screens
of your application, as long as they are in BMP, GIF or JPEG format. This object can
be re-dimensioned to have the same size of the picture, and has support to
transparence, being enough just to enable and select a color. You can edit the
Bitmap properties by double-clicking it.
Screen Objects
85
6.5.5.
DESCRIPTION
Name
Description
Bitmap Name
Browse...
Transparent
Background
Fit to Image
Animation
86
Screen Objects
User Manual
Screen Objects
DESCRIPTION
Name
Description
Transparent
Border
Background
Blinking every
Fit to Image
87
Animation Zones
88
Screen Objects
User Manual
6.5.6.
DESCRIPTION
Bitmap
Location
Add
Delete
Autorange...
Change Location
Default Zone
Minimum
Maximum
Blinking
Tip
Preview
AVI
The AVI object is used for visualizing files with AVI extension in the system.
Through this object, it is possible to Browse the AVI file in the system, and show it
on screen when the project runs. This object only accepts AVI files.
Screen Objects
89
6.5.7.
DESCRIPTION
Name
Description
AVI file
Browse...
Video
The Video object is used for visualizing a video image. Through this option, it is
possible to view system files, or those created by the Watcher option.
90
Screen Objects
User Manual
Screen Objects
DESCRIPTION
Name
Description
Video Source
91
6.5.8.
Preview
The Preview object is used for the video display files generated through the
XPressPlayer board. Through this object, it is possible to configure it in the
XPressPlayer board to be connected to a given camera, or to indicate the
XPressPlayer file. The visualization of the object will be shown during the execution
of the project.
92
Screen Objects
User Manual
6.5.9.
DESCRIPTION
Name
Description
XPressPlus Board
Camera number
Window Size
Camera Number
Auto size
Trend
This object is used to view a trend graphic with up to 16 tags. The graphic is
constantly refreshed as the process evolves and tag values change.
By using trends, you can make graphs like Value x Time and Value x Value. Due to
these characteristics, it is possible to make the analysis of data as the process
evolves.
The trend object has various aspects that can be modified through various pages of
properties, which will be next seen.
Screen Objects
93
94
Screen Objects
User Manual
Trend Properties
OPTIONS
Screen Objects
DESCRIPTION
Name
Description
XY
Time x Data
Show labels
Time Span
Buffer Size
Add Mark
95
96
OPTIONS
DESCRIPTION
Configure Query
Screen Objects
User Manual
Screen Objects
97
DESCRIPTION
(Scale)
Limit
Right limit
High Limit
Low Limit
Scrolling Grid
Text
Date/Time Format
DESCRIPTION
Ruler background
Ruler text
Chart background
98
DESCRIPTION
Grid
X Rows
Y Rows
Ruler font
Screen Objects
User Manual
Availables Options
OPTIONS
DESCRIPTION
This column lists the selected pens for the graph. Allows the
changing of the text of the legend, and the activation/deactivation
of each pen.
Y Axis
X Axis
Screen Objects
99
100
Screen Objects
User Manual
General Properties
Screen Objects
101
DESCRIPTION
Name
Defines the name of the object that will be used in the Organizer
tree and in the scripts.
Description
Type
Defines what is the bar graph type: Bar (simple) or Bar Gauge
(meter in bar).
Limit
Defines the minimum and maximum values for the Bar Graph.
Orientation
Background
Bipolar
Determines that the graph bars will have two sides divided by a
center. The bars grow from the center in the direction of the
graph limits.
Center
Spacing
3D
Ruler Properties
102
Screen Objects
User Manual
Ruler Properties
OPTIONS
DESCRIPTION
Enable
Ruler Text
Ruler divisions
Colors
Rule font
Bar Color
This card makes it possible to enable the legends that will be at the side of the
drawing of bars in the graph. This is done by choosing the Show labels option. Each
number indicates the graph bar, its respective legend and color.
Screen Objects
103
104
DESCRIPTION
Tag
Low-Low Limit
Low limit
Normal limit
High limit
High-High limit
Pointer size
Defines the size of the pointer that will indicate the tag
value.
Screen Objects
User Manual
6.5.11. Gauge
The Gauge object is very useful in order to show variables with analog results,
working as a continuous meter. Scaling values and properties of gauge can be
defined by the user, besides their position on screen, which can vary in 0, 90, 180 or
270 degrees in rotation. You can edit the Gauge properties by double-clicking it.
Screen Objects
105
106
DESCRIPTION
Name
Description
Minimum value
Maximum value
Frame color
Back color
Text color
Needle color
Position
Display limits
Display values
Decimal places
Total ticks
Starting angle
Font
Defines font, color, and size for the text of the Gauge.
Screen Objects
User Manual
Screen Objects
107
DESCRIPTION
Show ticks
Show sub-ticks
Total numbers
Show fonts
Font
Show legend
Show frame
High limit
Low limit
Colors
Slider
This object is used to read or write values in a selected Tag. You can attribute values
to the selected Tag by sliding the potentiometer (sliding button), or by using the
direction arrows in the extremities of the Slider. The value will vary according to a
Scaling that is defined in the object. You can edit the Slider properties by doubleclicking it.
108
Screen Objects
User Manual
Screen Objects
109
6.6.2.
DESCRIPTION
Name
Description
Minimum value
Maximum value
Step
Background
Text color
Fonts
Display Limits
Display value
Display arrows
Vertical position
Horizontal position
Move
Release
Precision
Button
This object is used for activations or executions of tasks specified by the user
through the mouse or keyboard, and its operation is equal to the Windows standard
buttons.
Elipse SCADA has a series of button models, among switches, keys, and others, to
facilitate the implementation of various functions by using buttons. The activation of
buttons also generates events that can be treated by Scripts. Buttons are very
flexible, and can be widely set through the pages of properties.
110
Screen Objects
User Manual
Screen Objects
111
DESCRIPTION
Name
Defines the name of the Button that will be used in the Organizer
tree and in the scripts.
Description
Momentary
Toggle
This type of button functions like a key. It has two states (on and
off), which can be defined in the Messages page.
Jog
Buttons
Group of models that define the button look. Available are keys,
switches, and bitmaps, besides a transparent board that allows the
transforming of any object under it into a button.
Function key
Go to screen
Button Messages
112
Screen Objects
User Manual
DESCRIPTION
Text
Text font
Defines the color, size, and type of the text font when the
button is not pressed.
Background
Value
OPTIONS
DESCRIPTION
Text
Text font
Defines the color, size, and type of the text font when the
button is pressed.
Background
Value
Align
Button Scripts
Scripts exclusively available for buttons are described in the table below. For more
details regarding the use of scripts, see the specific chapter.
SCRIPTS AVAILABLE
You can associate scripts to buttons and execute them in one of the following
situations:
EVENTS
Screen Objects
DESCRIPTION
OnPress
OnRelease
WhilePressed
113
6.6.3.
Setpoint
The Setpoint object works as an editing box of Windows; thereby, it is just enough
to type a value and press [Enter] to attribute this value to the associated tag. The
properties of setpoint allow you to define the type of input value, the font, size and
color of characters to be shown in the object. You can edit the Setpoint properties by
double-clicking it.
114
Screen Objects
User Manual
DESCRIPTION
Name
Description
Alignment
Limits
Fonts
Refresh
Multiline
Format of Setpoint
Screen Objects
115
116
DESCRIPTION
Text
Numeric
Size
Date/Time
Format
Prefix
Suffix
Allows the definition of a string that describes the date and hour
format.
Screen Objects
User Manual
Setpoint Keys
Screen Objects
117
DESCRIPTION
6.6.4.
Alarms
The Alarm object allows the verification of active or registered alarms (logged) in
the alarm file. Alarms can be triggered when values of associated tags are verified in
four situations and different priorities: LoLo (critically low), Low, High, HiHi
(critically high). Outside these ranges, tag values are considered as normal.
In the alarm window, we find a toolbar that allows some functions, like:
118
Screen Objects
User Manual
Name
Screen Objects
DESCRIPTION
OPTIONS
120
DESCRIPTION
Description
Alarm type
From Priority
To Priority
Toolbar
Titles
Large buttons
Alarm Group
Screen Objects
User Manual
Alarm Colors
Screen Objects
121
DESCRIPTION
Window color
Toolbar color
Zone 1
Zone 2
Zone 3
Allows to define the Zone 3 priority interval, alarm text and alarm
background colors, and if the line will blink or not.
Blinking every ms
122
Screen Objects
User Manual
Screen Objects
DESCRIPTION
Date
Date/Format
Time
Time/Format
AM/PM
Show milliseconds
Event
Alarm type
Priority
Alarm Status
Remarks
Remarks/Size
Value
Value/Size
Value/Precision
Tag name
Tag Name/Size
Limit
Limit/Size
Limit/Precision
User
User/Size
123
Chapter
7. Alarms
The Alarms option in the application tree of the Organizer allows the definition of
some characteristics for the management of system Alarms. You can specify a file
where to record all alarms that will occur in your system, as well as setting up
sounds and alert messages. The properties of the Alarm Manager affect the behavior
of all system Alarm that is specified in the page of Tag Alarms.
Alarms
125
DESCRIPTION
Records
Filename
Browse
OnAlarm
126
DESCRIPTION
Alarms
Chapter
8. Recipes
A Recipe is a set of pre-defined values that can be loaded into a group of tags in
order to configure a specific process. This list of tags we also call model of recipe.
For instance, be it a machine that makes different types of screws. Variables
involved in the process are always the same, but their values will probably change,
depending on the type of screw one wants to produce. Supposing that you have
different machine settings for each type of screw, these values could be recorded in a
recipe, and be further loaded into tags of control, facilitating the task of the operator,
and avoiding errors.
In this way, we can create a Screw recipe model with several recipes: Philips,
Torx, Simple, and so forth.
In order to be recovered when necessary, the models and data of a recipe are stored
in disk, in a recipes file with .RCP extension.
You can define a Recipe in the Organizer during the configuration of the
application, or in execution time, by using Special Functions through Scripts.
Recipes
127
Recipes Properties
OPTIONS
128
DESCRIPTION
Name
Description
Recipe File
Defines the name of the file for the recipe model. The
file name can have up to 8 characters, and should not
contain extension (Elipse SCADA will always use
the RCP extension). You can also specify the file
path,
which
can
be
an
absolute
(C:\ELIPSE\RECIPES\RCP1)
or
relative
(RECIPES\RCP1) location. Relative locations are
recommended if you want to copy your application
into another computer.
Edit Data
Labels
Tag
Recipes
User Manual
Recipes
DESCRIPTION
Recipes
Recipe Title
New Recipe
Creates a new recipe. Each recipe model can have various recipes
(set of values) listed.
Delete Recipe
Copy Recipe
Allows the edition of the tag value for the current recipe, which is
listed in the bottom frame. The tags are identified through their
associated labels. Use the direction arrows of the keyboard or the
mouse in order to select the tag to be edited.
129
Chapter
9. Historic
The Historic object allows the storage of the variation of data of a process with
time, then enabling future analysis. This Historic can be generated in two different
ways: in a Continuous way, or in Batches. In the continuous way, the Elipse
SCADA stores data continuously during the execution of the application. With the
form of batches, the historic is made in lots. With this modality, it is necessary to
send a command via script in order to initiate and end the generation of the historic.
Historic
131
DESCRIPTION
Name
Description
Analysis...
Refresh
SPC...
File
Browse...
Write Time
Max Records
Batch Process
Network support
9.2. HAnalysis
When a Historic is created, Elipse SCADA automatically associates a Historic
Analysis (HAnalysis) object to it. This object has several characteristics that can be
adjusted in execution time.
When the HAnalysis is called, a Historic window is open in your application,
showing the Analysis page with the graph for the analysis of data. This window has
other 6 pages of set up (available according to the programming of application).
They are: Graph, Pens, Pen Colors, Settings, Query, and Print Setup. Each of these
pages appears when its corresponding form is selected on top of the window. Next,
we see a description of each one of them.
132
Historic
User Manual
Analysis
The Analysis page shows the graph of HAnalysis, and allows the setting of variables
to be shown in it. It has features of zoom, scroll, and printing, which can be
accessed by means of the toolbar located in the inferior part of the window.
At the right side, we can see the graph pens, each one associated to a tag, whose
historic evolution we want to observe. These pens can be activated or deactivated,
and it is possible to change the type of color and style of row as the user wishes.
In the top part, Elipse SCADA shows some information when the mouse is
positioned within the graph area: mouse coordinates and value of the point selected
in the graph delimited by doted rows (horizontal and vertical). In order to select a
point in the graph, it is enough to click it.
Graph
This page allows the setting of the HAnalysis Graph look, according to what
follows:
Historic
133
134
Historic
User Manual
DESCRIPTION
Left limit
Right limit
OPTIONS
DESCRIPTION
High Limit
Low Limit
OPTIONS
Historic
DESCRIPTION
Auto range
Scrolling Grid
Text
Date/Time Format
Adjusts the date and hour format when set for the
axis.
Ruler Colors/Background
Ruler Colors/Text
Graph Colors/Background
X Grid/Rows
Y Grid/Rows
Ruler font
135
Pens
This page allows the determination of the tags to be shown in the graph, by
associating to each one of them a pen that will describe the evolution of the
variable in the process.
In the central frame, it is listed the pens to be used in the graph. It is possible to
adjust which ones will be active. By clicking the black rectangle at the right, it is
possible to adjust the characteristics of graphic representation of the pen, such as
row thickness and color. The other fields are described below:
Options of pen setting
OPTIONS
DESCRIPTION
Label
Y Axis
X Axis
Through the buttons of the toolbar, positioned on the top part of the window, it is
possible to:
add up another Pen
add a Mark
136
Historic
User Manual
Settings
This page allows the specification of the data file to be used in analysis. If the option
of Batch Process is marked (see general properties of Historic), the Batch group
in this page will be available for the choice of batch.
Historic
DESCRIPTION
File name
All Batches
Last batch
Specific Batch
137
Query
This page allows the creation of a query (query) for the historic file. From this
query, it is possible to define a time interval in order to limit data we want to work
with.
138
Historic
User Manual
DESCRIPTION
No query date
Time range
Newest data
Initial Date
Initial Time
Final Date
Final Time
Last (value)
Last (unit)
Printing
This page allows the setting of options for printing the HAnalysis. The application
developer can generate printer-setting files (.PTR files) that are loaded by the user in
execution time.
Historic
139
DESCRIPTION
Printer
Load
Save
Printer
140
k : number of samples;
ij
Historic
User Manual
Setup
This is the main SPC page, and allows the setting of its general properties, besides
having buttons to call up the auxiliary SPC screens that contain the charts and the
results of the statistical analysis.
Historic
141
DESCRIPTION
Points/Group
Tag
Specification Limits/Lower
Specification Limits/Upper
142
Historic
User Manual
Graph of Averages
This page allows the setting of the SPC averages graph look. Its controls are next
described.
Historic
143
DESCRIPTION
Left limit
Right limit
DESCRIPTION
High Limit
Low Limit
Common options
OPTIONS
144
DESCRIPTION
Auto Range
Scrolling grid
Text
Date/Time Format
Adjusts the date and hour format when set for the
axis.
Ruler Colors/Background
Ruler Colors/Text
Graph Colors/Background
X Grid/Rows
Y Grid/Rows
Ruler font
Historic
User Manual
Calculation methods
The average graph is calculated in the following way. For each i sample ( i = 1, 2, ...,
k), the x i average is calculated:
xi=
1
( x11 + x12 + x13 + ... + x1n )
n
A central row represented by x , is the average of averages of each sample. You can
obtain the value of the standard deviation of averages by using one of these two
x methods:
a) Sigma Method
For each i sample ( i = 1, 2, ..., k ), it is calculated:
12
n
S = x 2 n. x 2 n
j 1 j
S=
1
k
S S
1
... S k
For the assessment of the standard deviation, it is used a correction factor, annotated
by c2. This constant varies according to n, and as you can see in the SPC table, when
n is bigger than 25, c2 = 1, what means that there is no more corrections to do.
The standard deviation will be, then:
S
C2
It is recommended to use this method for large samples, with n bigger than 10.
Historic
145
b) Range Method
For each i sample ( i = 1, 2, ..., k ), it is calculated:
R X
i
max
X
min
1
k
R R ... R
1
For the assessment of the standard deviation, it is used a correction factor, annotated
by d2. This constant varies according to n, and as you can see in the SPC table, the
bigger the value of n, the bigger the correction to be applied.
The standard deviation will be, then:
R
D2
It is recommended to use this method for small samples, with n lesser or equal to 10
(n<=10).
The graph will have then the following points in X-axis.
LSC X a2 R ;
LIC X a2 R ;
146
Historic
User Manual
Dispersion Graph
This page allows the setting of the SPC dispersion graph look. It has the same
controls and operation of the Average graph.
Calculation methods
a) Sigma Method
The central row of the graph is represented by
S=
1
k
S S
1
... S k
For the calculation of control limits, two constants, c3 and c4 are used (see SPC
table). Therefore, the following limits are calculated:
c
LIC = S c
LSC =
This graph is recommended for large samples, with n bigger than 10 (n>10);
b) Range Method
In the same way as with the previous graph, the central row of the graph is
represented by
1
k
R R ... R
1
For the calculation of control limits, two constants, d3 and d4, are used (see SPC
table). Therefore, the following limits are calculated:
LSC =
R .d 4
LIC =
R .d 3
Values for the calculation of central rows and control limits are defined in
accordance with the following table:
Historic
147
SPC table (values for the calculation of central rows and control limits)
148
a2
d2
c2
d3
d4
c3
c4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
1,880
1,023
0,729
0,577
0,483
0,419
0,373
0,337
0,308
0,285
0,266
0,249
0,235
0,223
0,212
0,203
0,194
0,187
0,180
0,173
0,167
0,162
0,157
0,153
1,128
1,693
2,059
2,326
2,534
2,704
2,847
2,970
3,078
3,173
3,258
3,336
3,407
3,472
3,532
3,588
3,640
3,689
3,735
3,778
3,819
3,858
3,895
3,931
0,5642
0,7236
0,7979
0,8407
0,8686
0,8882
0,9027
0,9139
0,9227
0,9300
0,9359
0,9410
0,9453
0,9490
0,9523
0,9551
0,9576
0,9599
0,9619
0,9638
0,9655
0,9670
0,9684
0,9696
0,000
0,000
0,000
0,000
0,000
0,076
0,136
0,184
0,223
0,256
0,284
0,308
0,329
0,348
0,364
0,379
0,392
0,404
0,414
0,425
0,434
0,433
0,452
0,459
3,267
2,575
2,282
2,115
2,004
1,924
1,864
1,816
1,777
1,744
1,716
1,692
1,671
1,652
1,636
1,621
1,608
1,596
1,586
1,575
1,566
1,557
1,548
1,541
0,000
0,000
0,000
0,000
0,030
0,118
0,185
0,239
0,284
0,321
0,354
0,382
0,406
0,428
0,448
0,466
0,482
0,497
0,510
0,523
0,534
0,545
0,555
0,565
3,267
2,568
2,266
2,089
1,970
1,882
1,815
1,761
1,716
1,679
1,646
1,618
1,594
1,572
1,552
1,534
1,518
1,503
1,490
1,477
1,466
1,455
1,445
1,435
Historic
User Manual
Histogram Graph
The Histogram Graph shows a large volume of data in a clear way, allowing a better
visualization of the central trend, the dispersion along the measurement Scaling, and
the frequency of values.
In the Histogram Graph page, we can configurate the look of this type of graph
generated by the SPC. This page has the same controls and operation of the Average
graph. Elipse SCADA generates the Histogram Graphic based on the following
elements:
Number of Bars
Historic
TOTAL OF ITEMS
NUMBER OF BARS
20-50
51-100
101-200
201-500
501-1000
more than 1000
6
7
8
9
10
11-20
149
1
2
x 2
CP =
Tolerancia
6
If the samples are not in the average point, they tend to zero.
VALUE OF CP
DECISION
Process is capable.
Process is capable, but must be monitored with CP near 1.0.
Process is not capable.
CR - Capability rate
It is the reverse of CP.
CR =
6
Tolerancia
150
Historic
User Manual
K=
Media PtoMedio
Tolerancia
LSE Media
3
or
Media LIE
3
A negative value of CPK indicates that the average is outside the engineering limits.
CPK equal to zero indicates that the average is equal to one of the engineering
limits. CPK between 0 and 1.0 means that part of the 6 sigma limits falls outside the
engineering limits. CPK equal to 1 indicates that an end of the 6 sigma limits falls in
an engineering limit. CPK bigger than 1 means that the 6 sigma limits fall
completely within the engineering limits.
Settings
This page is the same that exists in the Historic query, and allows the setting of the
historic file that will be used by SPC.
Historic
151
Query
This page is the same that exists in the Historic query, and allows the definition of a
time interval for the Historic file.
152
Historic
Chapter
10
10. Reports
0
0
Reports allow the printing of data of Historic or Alarms files, or even tag values in
real time.
Reports have currently the following restriction: they do not allow
loading/saving printer settings (printers settings window are always displayed).
You can define a Report in the Organizer during the configuration of the application,
or in execution time, by using Special Functions through Scripts.
There are four types of Reports available:
0
1
0
Formatted: used to print data in real time, as for example the value of a
Tag in a given moment;
HAnalysis
: it is a report on screen that has within it a graphic report.
In order to create or edit a Report, you must select the Reports option in the
application tree in the Organizer; the page below will be shown, containing a list of
all reports existing in the application.
You can create a new Report by using the New button at the right of the page, or
remove an existing one by selecting it in the list and pressing the delete button. The
window for choosing the type of the New Report is next shown:
Reports
153
Each Report you create for the application appears below the Reports option in the
application tree in Organizer. When selecting a specific Report, its properties are
shown on the right side of the tree.
154
Reports
User Manual
Reports
155
Report Properties
OPTIONS
DESCRIPTION
Name
Description
Printer
Edit!
Font...
of
the
drawing
of
10.2. Settings
Text and Graphic Reports
It allows the specification of the file to be printed: Historic (DAT extension), Alarms
(DAT extension) or Batch (HDR extension). If the option of Batch Process is
marked (see General Properties of Historic), the Batch group in this page will be
available for the choice of the Batch.
The page of Report Settings appears when the Settings tab is selected on top of the
Text or Graphic Report pages. This page is shown below, and its respective fields
are described in the following table.
156
Reports
User Manual
DESCRIPTION
Source Filename
Defines the name of the font file for the Report (.DAT
or .HDR).
Browse...
All Batches
Last batch
Specific Batch
Field
Criteria
10.3. Query
Text and Graphic Reports
Allows the definition of a time interval in order to select the data of the file to be
printed. The page of Report Query appears when the Query tab is selected on top of
Reports
157
the Text or Graphic Report pages. This page is shown below, and its respective
fields are described in the following table.
Query Properties
OPTIONS
DESCRIPTION
No query date
Time range
Newest data
Initial Date
Initial Time
Final Date
Final Time
Last
Unit
10.4. Database
Text Report
The Report Database page appears when the Database tab is selected on top of the
Text Report pages.
158
Reports
User Manual
Reports
159
Properties of Databases
OPTIONS
160
DESCRIPTION
Fields
Up
Down
Enabled
Size
Precision
Prefix
Suffix
Date Format
Label
Lines
Reports
User Manual
10.5. Batch
Text Report
The Text Report Batch page appears when the Batch tab is selected on top of the
Text Report pages. This page is shown below, and its respective fields are described
in the following table.
Reports
161
162
DESCRIPTION
Fields
Up
Down
Enabled
Size
Precision
Prefix
Suffix
Date Format
Label
Lines
Reports
User Manual
10.6. Graph
Graphic Report
The Graph page of the Graphic Report appears when the Graph tab is selected on top
of the Graphic Report pages. This page is shown below, and its respective fields are
described in the following table.
Reports
163
DESCRIPTION
Scaling
Left limit
Defines the left limit of the X axle in the graph. This option
is available only if the graph is of XY type.
Right limit
High Limit
Low Limit
Shows a ruler on the left side of the graph, with values from
Y axle.
Auto Range
Scrolling grid
Text
Legend that will appear beside the Scaling in the X and Yaxis.
Date/Time Format
Defines the format of time tick that will appear in the X-axis
on Time X Data graphs.
164
DESCRIPTION
Ruler background
Ruler text
Defines the color for the text that will be shown in rulers.
Graph background
Grid
X Rows
Y Rows
Show milliseconds
Ruler font
Reports
User Manual
10.7. Pens
Graphic Report
The Pens page of the Graphic Report appears when the Pens tab is selected on top of
the Graphic Report pages. This page is shown below, and its respective controls and
fields are described in the following table.
Pens Properties
OPTIONS
DESCRIPTION
This column lists the selected pens for the graph. Allows the
changing of the text of the legend, and the activation/deactivation of
each pen.
Y Axis
X Axis
Reports
165
Pen Colors
The Pen Colors table appears when clicking the icon beside the graphic
pens.
In this table, we can define the color, format, and type of the graph that will be
drawn for the focused pen: row, area or bar. The Others... button allows the choice
of other colors different from the ones listed in the table.
10.8. Scripts
Graphic Report
Using report scripts, you can configure the report settings before printing. For
example, you can configure an axis scale of the graph to be printed. For more details
regarding the use of scripts, see the specific chapter.
SCRIPTS AVAILABLE
EVENT
OnBeforePrint
166
DESCRIPTION
Triggered when executing the Print() method from the report, right
after executing the query, and before the report is actually printed.
Reports
User Manual
10.10.
HAnalysis Report
The HAnalysis Report is a report on screen that creates a HAnalysis object, being
able also of being printed. The setting and the pages of property of this Report are
done in execution time, in accordance with what has already been described in this
section. It is possible to configurate the window of HAnalysis and to activate or
deactivate the settings pages in the general properties of the HAnalysis object in the
Organizer.
Reports
167
Chapter
11
11. Drivers
The Elipse SCADA allows the communication with data acquisition equipment, and
with other computers running the Elipse SCADA through I/O drivers or network
drivers supplied by Elipse Software. A document is supplied with each driver,
containing important information relative to its setting.
Check the driver for availability for SCADA CE. The .dll files for SCADA Win
and SCADA CE are not the same.
In order to install or set up a driver, you must select the page of drivers in an
associated PLC or Block tag, or access the Drivers object in the Organizer. In this
case, the page below will be shown, containing a list of all drivers installed in the
application. You can install a new driver by pressing the New button, or remove an
existing one by selecting it on the list and pressing the Delete button.
169
170
Drivers
User Manual
DESCRIPTION
Name
Object name.
Description
Driver Location
Parameters
Abort on error
Browse
Reload
Help
Drivers
DESCRIPTION
Write in background
Writing priority
Many drivers have a very slow time for loading and start.
This option maintains the driver in memory, minimizing
the starting time, and speeding communication up.
171
The Extras... button calls special driver settings. These settings vary from driver to
driver. Consult the help file that follows the driver to obtain more information. The
following window may vary according to the driver inserted in the system but, in
general, this is the window displayed:
172
Drivers
User Manual
DESCRIPTION
Use Modem
Modem Settings
Dial number
No Log
Create new
Append data
ASCII Output
Drivers
173
174
Drivers
User Manual
Object name.
Description
Driver name
Driver Location
Current Setting
Browse...
Reload
Help
Set up...
Drivers
DESCRIPTION
Name
175
OnCommError
DESCRIPTION
Availables Options
OPTIONS
176
DESCRIPTION
Name
Tag name
N1/B1 N4/B4
Scan
Size
Shows the size of a Block tag (not available for PLC tags).
Export Tags...
Drivers
Chapter
12
12. Database
The Databases option allows the creation and manipulation of databases within
Elipse SCADA. This object uses the ODBC standard of Windows, which
manipulates the database by sending and receiving data. Open Database
Connectivity (ODBC) is an interface created by Microsoft, which offers a universal
interface for the access to different databases, including Oracle, Access, MySQL,
Interbase, among others.
You can define a Database in the Organizer during the setting up of the application,
or in execution time, through Scripts. In order to use a database in Elipse SCADA,
you must select the Databases option in the application tree in Organizer. The page
below will be shown, containing a list of all Databases existing in the application.
Availables Options
OPTIONS
Database
DESCRIPTION
List
New
Delete
Advanced
177
You can connect Elipse SCADA to a database by using the New Connection Wizard
when pressing the New button at the right of the page. A window will be shown,
asking if you want to create a connection with an already existing table, or to create
a new table. Next, a list containing the existing connections (Data Sources) will be
shown; if you want a new one, click the New button, and choose the ODBC driver
you want to use: MS Access, MS Fox Pro, MS Excel, CA-Clipper, dBase, Oracle, or
others. After selecting the driver, click OK and configurate its options; among them:
Connection Name (Data Source Name) and the file or directory that contains the
data. If you are creating a new table, a window will be presented for you to inform
the Name of the Table, its respective fields, and the data type of each one.
The Elipse SCADA will show in the Organizer tree, the new table and its respective
fields, which can be modified by using the special functions of ODBC in the Scripts.
You can remove an existing database by selecting it in the list and pressing the
Delete button. For a better comprehension of the ODBC connectivity, see next
picture:
178
Database
User Manual
Database
Select the Machine Data Source tab and a list with the connections (Data
Source Name) available will be shown. If you want any that is non-available
in the list, press the New button and choose the ODBC Driver you want to
use. In this example, you should choose the Microsoft Access database, and
click OK.
179
180
The Create New Database window will be shown for you to indicate the type
of data source. Select System Database, and click Next.
In the following window, choose the ODBC Driver you want to use. In this
example, you should choose the Microsoft Access database, and click Next.
The Driver Setting window will show; in it, you should inform the name of
connection (Data Source Name), and by pressing the Select button, choose
the file you have created (SUPPORT.MDB);
The next window allows the selection of the database tables that will be
used. Select table Main Table;
Now, the titles of selected tables appear below the Databases option in the
application tree, and their respective fields appear below the title.
After that, the fields of the Database can be associated to the Screen Objects,
as well as to Tags (system variables). The manipulation of Database records
is done through Special Functions that can be found by using the App
Browser when in a Scripts page (see Scripts Chapter - Special Functions Database Functions).
Database
Chapter
13
13. Users
Elipse SCADA allows you to control the access to an application through a list of
names, being allowed to attribute a password to each user and configurate levels of
safety in your system.
The Administrator user has unlimited access to the system. The remaining users
have an associated safety level that only allows them to access those characteristics
attributed to their level of access.
You can create a list of users by selecting the Users option in the application tree in
Organizer; the page below will be shown, containing a list of all users registered in
the application.
Availables Options
OPTIONS
DESCRIPTION
List
New
Delete
Properties
You can add up a new user by using the New button at the right of the page, or
remove an existing one by selecting it in the list and pressing the delete button.
Users
181
When adding a new user to the system, it will appear in the Organizer tree right
below Users. Select the new user in the tree, and the following window will appear;
in it, the login and the user password shall be informed.
Users Properties
OPTIONS
DESCRIPTION
Name
Description
Login
Password
Access level
After that, you should define the level of access for each application screen,
according to the following table:
LEVEL
0
1
bigger than 1
ACCESS
A user can only access the screens with priority zero, or bigger or equal to his/her.
As a standard, all screens have level of access 0 (free access).
182
Users
User Manual
Calls up a dialog box for the identification of a new user. Returns true (different
from zero) if the user has been successfully identified (has been logged), or false
(zero), if he/she wasn't. In case of error, no message will be shown. The function
refreshes the global attribute lastError, by placing 0 (zero) if the login is cancelled
by the user, or 1 (one) if the user or the password is invalid.
Application.Logout()
Logs out an user from the application. Closes all screens having priority different
from zero.
Application.UserAdministration()
This function shows one of two dialog boxes, according to the level of access of the
user:
When you press OK in the dialog box, the message Password Changed shall
appear. If the message New password not confirmed appears, you have probably
rewritten a password that is different from your new one.
The application has the following attributes for the login functions:
Attributes for the Login Functions
ATTRIBUTES
Users
DESCRIPTION
UserName
UserAccessLevel
183
DESCRIPTION
OnUserLogin
OnUserLogout
Observations:
184
It is not allowed more than a user logged at the same time in the
application.
Users
Chapter
14
Remote Applications are used when one wants to connect two or more Elipse
SCADA linked via network, modem or serial cable. In order to use this
characteristic, you should define a Server station and a Client one, and add up the
network driver you want to use to both.
The only driver currently implemented for CE is TCPIP driver.
You can add up a network driver to your Server and Client applications by selecting
the Drivers option in the application tree in Organizer, and pressing the New button
at the right of the network drivers list. Each new driver you add to the application
appears below the Drivers option, and when selecting a specific Driver, its
properties are shown in the right side of the tree; press the Set Up button to open
the network driver settings window that varies in accordance with the selected
driver. (See Chapter about drivers.)
Common Properties of Network Drivers
OPTIONS
DESCRIPTION
Server port
Maximum connections
In the Client application, after adding the network driver, you must create a Remote
Application, and configurate its parameters. In order to create or edit a Remote
Application, you must select the Remote Application option in the application tree
in Organizer; the page below will be shown, containing a list of all Remote
Applications existing in the application. You can create a new Remote Application
by using the New button at the right side of the page, or remove an existing one by
selecting it in the list and pressing the delete button.
Remote Applications
185
DESCRIPTION
List
New
Delete
186
Remote Application
User Manual
Remote Application
187
188
DESCRIPTION
Name
Description
Network Driver
Network configuration
Connect to server at
application start up
Help
Configure...
New Group
Remote Application
User Manual
OnDisconnect
Remote Application
DESCRIPTION
189
Chapter
15
15.
Elipse Web
The additional module Elipse Web makes the applications screens available in the
web via a Web server, like Windowss PSW (Personal Web Server) or IIS (Internet
Information Services). The Web server must be installed in the machine running the
Elipse application, and this machine must have a fixed IP in case you want to access
the application via Internet.
To configure Elipse Web, follow these procedures:
Check if your computer has a Web server (PWS or IIS). In case it does not,
install it.
Elipse Web is an additional module, so check if the hardkey has this
module.
At Elipse SCADA, access the Organizer, and click the tab Web in the item
Application.
Enable the item Enable web data server, according to the picture below:
Click on the button [Browse], and specify the Web servers default
directory. For PWS or ISS the default directory is C:\Inetpub\wwwroot.
Click on the button [OK].
Elipse Web
191
Enable the option Create Web Page. These pages will be created in the
Web Servers default directory.
To view the application, just type the servers address and the name of the
configured HTML document on the browsers address bar (for example:
http://ServerName/Screen1.htm).
NOTES:
192
Elipse Web allows you only to supervise the application. It does not allow you
to control, send data, or interact with the application.
Elipse Web
Chapter
16
16. Watcher
Elipse Watcher is a plug-in of Elipse SCADA offering capture, storage, and digital
transmission of images. With it, it is possible to view images within an application,
and work with them as desired.
An object of Watcher represents each acquisition board linked to Elipse SCADA. In
order to add up equipment, it is just enough to add up a corresponding object to the
object list.
It is possible to independently set up the parameters of each object. These objects are
further linked to a screen object (Preview, AVI or Video) for their use within the
application, or linked to an AVI Recorder object, which allows the generation of an
.AVI file. Elipse Watcher has drivers for a variety of equipment in the market.
Consult our technical department to verify the compatibility of yours with Elipse
SCADA.
Watcher
193
194
Watcher
User Manual
AVI Player
The AVI Player object allows the reproduction of an .AVI file in the system. This
Watcher object is normally associated to an AVI screen object.
Watcher
DESCRIPTION
Name
Description
AVI file
Browse
195
AVI Recorder
The AVI Recorder object allows the recording of a video input (an acquisition
board, for example) in a file with .AVI format.
196
DESCRIPTION
Name
Description
AVI file
Browse
Video Source
AVI Compression
Frame rate
Watcher
User Manual
Frame-grabber S611
Through this option, it is possible to configure the specifications referring to
interface with acquisition board (frame-grabber) S611 of Sensoray.
Watcher
197
198
DESCRIPTION
Name
Description
Input
Image Size
Width
Height
Board #
Color Format
Interlaced
Signal Format
Frame Rate
Watcher
User Manual
Frame-grabber S613
Through this option, it is possible to set up the specifications referring to interface
with acquisition board S613 of Sensoray.
Watcher
199
200
DESCRIPTION
Name
Description
Input
Image size
Width
Height
Board #
Color Format
Interlaced
Signal Format
Frame Rate
Image Compression
Factor
Watcher
User Manual
Watcher
DESCRIPTION
Name
Description
Video Device
Video compression
Video display
Video format
Video source
201
202
DESCRIPTION
Name
Description
Board number
Insert Cameras
File
Signal Format
Board Number
Watcher
User Manual
Cameras
With the XPressPlus board, it is possible to individually manage and adjust options
of all connected cameras. Settings are done through a Camera object, which
represents the camera in question. These objects are created through the Insert
Cameras button, shown in the previous item. Each camera has three sets of options:
General, Recording, and Mask.
a) General Properties
Watcher
DESCRIPTION
Name
Description
Camera
Brightness
Saturation
Contrast
Hue
Sharpness
203
b) Recording Options
Through this item, it is possible to adjust the recording options of the capture board.
Recording options
OPTIONS
Recording Options
DESCRIPTION
204
Area
Sensitivity
Field/cycle
Frame size
FPS
Trigger options
Watcher
User Manual
c) Mask
Defining a mask is indicating sensibility areas, i.e., detection of movement of each
video input. Red areas represent non-sensible places. Light green areas are sensible
areas.
Watcher
205
Chapter
17
17. Steeplechase
Steeplechase
207
Properties of Steeplechase
OPTIONS
208
DESCRIPTION
Name
Scan
Import Tags
Wizard
Description
Server Name
Status
VLC Status
VLC Project
Version
Steeplechase
Chapter
18
18. OPCServer
The OPCServer object is an OPC (OLE for Process Control) client that enables the
communication with a given equipment or device, by using the OPC protocol. The
OPCServer object is the representation of an OPC DA (Data Access) server inside
Elipse SCADA, what allows for the sending and reception of real time data (tags).
OPCServer
209
210
OPCServer
User Manual
OPCServer
DESCRIPTION
Name
Description
BlockMode
New Tag
New Group
Logging...
Network Address
Server ID
Vendor Info
Browse...
Get Version...
Import...
Background Reads/Enable
Scan
211
212
OPCServer
User Manual
DESCRIPTION
Name
Description
Real Name
Reading Type
Read from
OPCServer
Scaling
OPC Low
System Low
OPC High
System High
Scan
213
Alarms tab
214
OPCServer
User Manual
Properties of alarms
OPTIONS
OPCServer
DESCRIPTION
LoLo
Low
High
HiHi
Value
Pri
Comment
Alarm Group
Always in Advise
215
DESCRIPTION
Name
Description
New Group
Import
When the Import tags button is activated, the window below is shown. From then
on, you just have to drag the desired tag to the group selected.
216
OPCServer
User Manual
18.4. Quality
Quality fields represent the items value quality status. They are formed by a 16-bit
word, and the first 8 bits are defined by three bit fields: Quality, Substatus, and
Limit.
The other 8 bits (of a higher order) are available for each manufacturers use. If
these bits are used, the default quality bits are still used to indicate which deductions
could be made on the returned data. So, it is the clients responsability to interpret
the field of specific information on quality to make sure the server providing this
information uses the same rules as the client.
OPCServer
217
Quality Field
QUALITY
0 63
QUALITY FIELD
DESCRIPTION
Bad
Uncertain
128 191
(Reserved)
192 255
Good
64 127
A server that does not support information on quality always returns 192 (Good). It
is also acceptable that a server simply returns Bad or Good (0 or 192), and always
returns 0 for Substatus and Limit.
218
OPCServer
Chapter
19
19. Scripts
Scripts are small procedures written in own programming language Elipse Basic
allowing more flexibility to your application. Scripts are always associated to events,
i.e., they begin in the moment this event occurs.
DESCRIPTION
OnKeyPress
OnKeyRelease
OnSetFocus
OnLButtonDown
OnPress
OnRelease
WhileRunning
OnAlarm
The language used in script modules, Elipse Basic, is very similar to C languages,
although having features of visual programming like those found in Visual Basic.
Some characteristics of the language are:
Scripts
219
The type of data attributed to a tag is free. The supported value can vary
from an integer of 8 bits to a real type of 64 bits, or even a string (text). In
data communication with external equipment, the conversion is
automatically done in accordance with the types supported by the
equipment. In the case of properties, an icon beside each one (visualized
through the AppBrowser) indicates the type of data that is supported:
Numeric attribute (integer number)
Numeric attribute (real number)
String attribute (text)
Boolean attribute (0 or 1)
The variables and constants are basic objects manipulated in a Script. The
operators specify what will be accomplished with them. The expressions combine
variables and constants to produce new values. In order to facilitate the edition of
scripts or expression tags, tools AppBrowser and Cross Reference can be used.
220
Scripts
User Manual
Availables Options
OPTIONS
Scripts
DESCRIPTION
Selection
Objects
Info
Properties
Show
221
EXAMPLE
Arithmetic operators
OPERATOR
EXAMPLE
+ (addition)
+ (concatenation of
strings)
- (subtraction)
* (multiplication)
/ (division)
% (rest of division)
** (exponentiation)
tag001 + 34
slider1.Frame.title + "<- PLC1"
tag001 - screen1.x
screen1.width * 3.141592
tag001 / tag002
tag001 % tag002
tag001 ** 2 (tag001 squared)
Logical operators
OPERATOR
EXAMPLE
222
Scripts
User Manual
== (equal to)
> (bigger than)
< (lesser than)
>= (bigger or equal than)
<= (lesser or equal to)
<> (different from)
EXAMPLE
tag001 == 8
tag001 > tag002
tag001 < tag002
tag001 >= -1
tag001 <= 16
tag001 <> 1
+= (sum)
-= (subtraction)
*= (multiplication)
/= (division)
**= (exponentiation)
EXAMPLE
&= (AND)
|= (OR)
^= (XOR)
<<= (SHIFT left)
>>= (SHIFT right)
EXAMPLE
223
The conditions specified are expressions that can be assessed as true (different from
zero) or false (zero or empty string ""). If the condition is true, the block of
instructions is executed up to the EndIf command.
When this command is executed, the condition of If (condition1) is first assessed; if
true, the block of instructions 1 is executed, and the command is finished with EndIf.
If condition1 is false, the condition of ElseIf (condition2) is assessed and the block
of instructions 2 is executed in case it is true. If false, next ElseIf condition will be
assessed, and so forth. If no ElseIf condition is true, the block of instructions of Else
will be executed. The program continues its execution with the command after
EndIf.
Blocks of instructions ElseIf and Else are optional. You can specify as many ElseIf
clauses you want; nevertheless, they can never be after an Else clause. Any block of
instructions can contain nested IfEndIf commands.
Scripts
User Manual
The condition specified is an expression that can be assessed as true (different from
zero) or false (zero or empty string ""). If the condition is true, the block of
instructions is executed up to the Wend instruction, when the condition is assessed
again. The block of instructions will be repeated until the condition becomes false,
when the command after the Wend instruction will be executed. While...Wend loops
can be nested.
The condition specified is an expression that can be assessed as true (different from
zero) or false (zero or empty string ""). The block of instructions is executed, and
then the condition is assessed. If it is false, the block of instructions is repeated and
the condition is assessed again. The block of instructions will be repeated until the
condition becomes true, when the command after the Until instruction will be
executed. Repeat...Until loops can be nested.
Scripts
225
Returns arc cosine (angle) of the value x in the interval of [0, ] radians. The x
parameter should be contained in the interval [-1, 1]; if not, the function returns zero.
Asc (strText)
Returns arc sin (angle) of the value x in the interval of [-2, 2] radians. The x
parameter should be contained in the interval [-1, 1]; if not, the function returns zero.
ATan(x)
Returns arc tangent (angle) of the value x in the interval of [-2, 2] radians.
226
Scripts
User Manual
Blue(Color)
Captures the screen specified in screenName parameter and saves it in a bmp file
with name specified in fileName. If fileName parameter is blank (" "), the capture is
placed in clipboard.
type parameter determines how the screen is captured: if the parameter is 0, all the
screen is captured, including the Windows taskbar; if it is 1 (or any value different
from 0), only the area of screen objects is captured (the size is the contour of all
screen objects).
Example:
IF CaptureAppScreen("screen.bmp", "Screen1",1)
MessageBox("Screen1 captured to the file screen.bmp")
ELSE
MessageBox("Error capturing the screen!")
ENDIF
IF CaptureAppScreen("", "Screen1",1)
MessageBox("Screen1 captured to the clipboard")
ELSE
MessageBox("Error capturing the screen!")
ENDIF
CaptureScreen([fileName])
Captures the whole screen by placing it in the clipboard (if no file is specified in the
fileName parameter) or in a file with name fileName, in BMP format.
Example:
IF CaptureScreen("screen.bmp")
MessageBox("Screen captured in the screen.bmp file")
Else
MessageBox("Error capturing the screen!")
ENDIF
Chr(n)
Scripts
227
Copies the contents of the srcFile file to destFile. The function returns 1 (one) if
well succeeded, and 0 (zero) if not. The global attributes lastError and lastErrorStr
are refreshed by this function.
Example:
IF CopyFile("source.dat", "dest.dat")
MessageBox ("The copy has been well succeeded.")
Else
MessageBox("Error in CopyFile command!")
ENDIF
CopyObject (strSrcName, strDestName [, strDestFolder])
Creates a copy of the strSrcName object with the name strDestName. The new
object is created in the same folder of the source object as default, unless a
destination folder is indicated in the optional parameter strDestFolder. The function
returns True if succeeded, or False if not.
Example:
// Creates a copy of the Display1 object in the folder
// Screens.Screen1; the new object will be called Display2
CopyObject ("Screens.Screen1.Display1", "Display2")
// Creates a copy of Display1 in the Screens.Screen1 folder
// the new object will be called Display2, and will be placed
// in the Screens.Screen2 folder
CopyObject ("Screens.Screen1.Display1",
"Display2", "Screens.Screen2")
Cosine (angle)
Returns the cosine of the specified angle. The angle is expressed in radians.
CreateDir (fullPath)
Creates a new directory. Returns TRUE if well succeeded, or FALSE if failing. The
global attributes lastError and lastErrorStr are refreshed by this function.
CreateFile (fileName, fileContents)
Creates a file called fileName, writes the fileContents string in the file, and closes
it. If the file already exists, it is destroyed and substituted by the new content.
Returns FALSE an error occurs, or TRUE if not.
DDEExecute (server, topic, command)
Sends a DDE command to another application. The server parameter is the name
of the DDE server, normally the name of an application; the topic parameter is a
228
Scripts
User Manual
document that is open in the application, and the command parameter is the
command you want to execute.
Example:
DDEExecute("Excel", "Sheet1", '[SELECT("R1C1:R5C1")]')
DDEExecute("Excel", "Sheet1",
"[PRINT(1;;;1;FALSE;FALSE;1;FALSE;1;360;360)]")
The first example selects the region to be printed, the second runs the printing
command. The first parameter is always the application name. The second parameter
is the spreadsheet or document you want to access, including the path and extension
of file. The third parameter is the command.
Deg (angle)
Returns the angle, expressed in degrees, converted into radians, according to the
formula degrees = (radians / 3.141592) * 180.
Example:
tag001 = Deg(ACos(x)) // Arc Cosine of x express in degrees
DeleteFile (file)
Erases the file specified in the file parameter. Returns TRUE if well succeeded, or
FALSE if failing. The global attributes lastError and lastErrorStr are refreshed by
this function.
DeleteObject (strObjName)
Opens a window that allows the edition of the Global Manager properties.
Execute (CmdLine)
Runs the program specified in the cmdLine parameter. If the program is not located
in the directory of \WINDOWS or \WINDOWS\SYSTEM, you should specify the
localization of the file. Program parameters can also be included in the command
line CmdLine.
Example:
Execute("C:\WINDOWS\WINCALC.EXE")
Execute("C:\UTIL\PKZIP.EXE DATA C:\DATA\*.*")
This function does not accept parameters in CE. Use function ShellExecute().
Exp(x)
229
tag001 = Exp(2.302585093)
// returns 10.0
FileSelectWindow([filepath][, extension][,type])
Shows a dialog for file selection. Returns a string containing the name of the
selected file or an empty string if failing of being cancelled by the user. The filepath
parameter specifies the file or directory that will be previously marked. The
extension parameter specifies the types of files that can be selected. Its syntax is:
filterName1 | mask1 | filterNameN | maskN
Each filter is a sequence of two strings separated by a |. The first string is the name
of the filter that will be shown in the combo box, and the second string is the mask
of selection of files (*.dat, for example). The mask can contain a sequence of masks
separated by point and comma (for example, *.bmp;*.jpg;*.gif). The filters should
be separated by |.
Example:
dim strDir
strdir = FileSelectWindow("C:\temp\*.dat",_
"History files (*.dat)|*.dat")
The parameter type is a integer that specifies how the file will be selected, as
follows:
type Parameters
VALUE
DESCRIPTION
Open the file selection dialog; doesnt allow the user to type the name,
only select from the window list.
Allows the user to create a new file, typing the name directly.
Allows the user to type the file name and returns the complete path;
doesnt create any file.
Looks for the first file from a given standard of name and specific attributes,
returning the name of the file found. The fileName attribute determines the standard
of file to be searched (for example: "\DATA\*.DAT"), and the attr parameter is
optional, and determines the sum of attributes desired in the file, according to the
table:
230
Scripts
User Manual
VALUE
0
1
2
4
16
32
ATTRIBUTE
For instance, to place the System (system file) and Hidden (occult) attributes, one
should attribute the numeral 6, i.e.: system (4) + hidden (2) = 4 + 2 = 6.
The function returns the name of the first file that fulfills the parameters, or empty
("") in case no file is found. After calling FindFirstFile() function FindNextFile()
can be called to find other files that fulfill these conditions.
If attr parameter is missing, the attributes are ignored.
FindNextFile()
Looks for next file obeying the parameters specified in function FindFirstFile ().
Returns the name of the file that fulfills the parameters, or empty ("") in case no file
is found.
Example:
// This example makes a security copy of all
// files *.DAT in the directory C:\DATA that have
// archive attribute for C:\BACKUP
DIM strFile
strFile = FindFirstFile ("C:\Data\*.dat",32)
WHILE strFile<>""
CopyFile ("C:\Data\"+strFile,"C:\Backup\"+strFile)
strFile = FindNextFile()
WEND
FolderSelectWindow ([strDefaultFolder])
Opens a window for the selection of a directory (folder), returning a string with the
name of the selected directory or an empty string, if cancelled. The parameter
strDefaultFolder specifies the initial directory to be selected. If not specified, the
selection is the root-directory of the current drive.
Example:
strFile = FolderSelectWindow ("C:\Data")
Scripts
231
Returns a value in the format date/hour, according to the string strFormat. The
parameter datetimeValue is the value to be formatted itself.
Options for this function are the following:
Date/Time Formats for Format function
FORMAT
W
W
ww
WW
D
dd
M
mm
mmm
MMM
mmmm
MMMM
mmmmm
MMMMM
yy
YY
h
hh
m
mm
s
ss
AM/PM
am/pm
A/P
a/p
0
00
000
|
232
MEANING
Scripts
User Manual
Example:
DIM date = GetTime()
// Returns "November 21, 2000"
str = Format("mmmm d, yyyy",date)
// Returns "11:41:32.612"
str = Format("hh:mm:ss.000",date)
GetAbsoluteFilename (file)
Obtains the week day from an absolute value of time (1 for Sunday, 2 for Monday,
, 7 for Saturday).
Example:
day = GetDayOfWeek(GetTime())
// Example below returns 5
day = GetDayOfWeek(MakeTime(30,10,1997,17,25,56))
GetDayOfYear (time)
Obtains the day of year from an absolute time value in days (1 for Jan 1st, 2 for Jan
2, , 32 for Feb 1st, 33 for Feb 2, ).
Example:
day = GetDayOfYear(GetTime())
day = GetDayOfYear(MakeTime(9,2,1997,17,25,56))
// returns 40
Scripts
233
Returns the total number of Kbytes available in the path strPath specified. The
parameter bUserFreeSpace is optional and forces Elipse SCADA to consider the
user disk quota, if avaliable.
GetFileAttributes (file[, version])
Returns the sum of attributes of the file according to the following table:
ATTRIBUTES
VALUE
Error
Normal
Read Only
Hidden
System
Volume
Directory
Archive
-1
0
1
2
4
8
16
32
The parameter version is optional. If specified (version = 1), it makes the following
NTFS attributes available:
ATTRIBUTES
VALUE
Compressed
Offline
Non-indexed
Encripted
2048
4096
8192
16384
GetFileCreationTime (file)
Returns the hour in which the file strFile has been accessed for the last time.
GetFileLastModifiedTime (strFile)
Reads the value of an internal variable stored in a hardware key (Hasp). This
variable can only be programmed by Elipse Software in Hasp. The function returns a
string containing the value of the variable, or empty ("") if some error occurs or the
variable doesn't exist.
234
Scripts
User Manual
Example:
tagSerialNo = GetHaspVar("SerialNo")
GetHour (time)
Returns the error code of last operation in the file (the same value of the global
attribute lastError).
GetLicenseString ()
Returns a unique string that represents the Elipse SCADA license currently running.
GetMinute (time)
Returns current system hour as an absolute time value measured in seconds since
00:00 of January 1st 1970. The value also expresses milliseconds in the three first
decimals.
Scripts
235
Example:
// This example counts how many seconds it takes to
// take a copy from a file
DIM timeStart, timeDuration
timeStart = GetTime()
CopyFile("C:\Data\Temp.dat","C:\Data\Backup\Temp.dat")
timeDuration = GetTime() timeStart
MessageBox ("The copy has taken "
+ Str (timeDuration,8,3) + "seconds.")
GetYear (time)
Encodes the string strIn based on the password strPassword. The result is a unique
string for this combination strIn, strPassword. The codification is irreversible: it is
not possible to retrieve the original string nor the password used.
Hex(n)
236
Scripts
User Manual
IsNumeric (expression)
tag001 = IsNumeric(GetTime())
IsString (expression)
tag001 = IsString(GetTime())
Left(string, nCount)
Returns the nCount characters more to the left in the string parameter.
Example:
String = Left('Password', 4) // returns 'Pass'
Len(string)
// returns 8
Log(x)
237
MakeReverse(string)
Inverts a string, so that the first character becomes the last, and vice-versa.
Example:
String = MakeReverse(Password) // Returns drowssaP
MakeTime (day, month, year, hour, minute, second)
Returns an absolute time value from the parameters specified. The interval of values
for each parameter is:
Interval of values
OPTIONS
DESCRIPTION
Day
month
1 to 12
Year
1970 to 2039
Hour
0 to 23
minute
0 to 59
second
0 to 59
// returns PASSWORD
Max (x)
Compares x and y, and returns the biggest value between both numeric expressions.
Example:
tag001=Max(tag002,tag003)
MessageBox (text [, title [, style [, x, y]]])
Shows a message box that can be configured by the user. The function returns a
value that corresponds to a button pressed in the message box.
Function parameters
The Text parameter is mandatory, parameters Title and Style are optional, and their
default
values
(0000h)
determine
a
standard
message
box.
Text: It should be a string or Tag containing a string. It should be expressed
between simple quotation marks, and will appear as centralized in the message box
right above the buttons.
238
Scripts
User Manual
Example:
MessageBox ("How the Message Box is?")
// A string is attributed to a Tag
Message = "How the Message Box is?"
MessageBox(strMessage)
Title: It should be a string in the same way as the Text parameter, and will appear in
the title bar of the message box.
Example:
MessageBox ("How the Message Box is?",
"Test of Message Box")
// Two strings below are attributed to Tags
strText="How the Message Box is?"
strTitle="Test of Message Box"
MessageBox(strText,strTitle)
HEXA
DESCRIPTION
Application Modal
0000h
System Modal
1000h
Desk Modal
2000h
OK
OK, Cancel
Abort, Retry,
Ignore
Yes, No, Cancel
Yes, No
Retry, Cancel
Scripts
HEXA
DESCRIPTION
0000h
0001h
0002h
0003h
0004h
0005h
239
Button1 as default
Button2 as default
Button3 as default
HEXA
0000h
0100h
0200h
DESCRIPTION
Icon
TYPE
Stop
Question
Exclamation
Information
HEXA
0010h
0020h
0030h
0040h
DESCRIPTION
Return values
VALUE
BUTTON
MESSAGE
1
2
3
4
5
6
7
OK
Cancel
Abort
Retry
Ignore
Yes
No
OK
Cancel
Abort
Retry
Ignore
Yes
No
Example:
strText = "How the box is?"
strTitle = "Test of Message Box"
MessageBox(strText, strTitle, 1134h)
Mid (strText, nFirst [, nCount])
Returns part of the strText parameter, according to the nFirst and nCount
parameters. The nFirst parameter specifies the position, within the string, of the first
character of the substring that is returned (counting starts at zero), and the nCount
parameter is the number of characters of the substring. Example:
240
Scripts
User Manual
strPasswd = Mid('Password', 0, 3)
strPasswd = Mid('Password', 3, 4)
// returns 'Pas'
// returns 'swor'
strPasswd = Mid('Password', 2)
// returns 'ssword'
Min (x,y)
Compares x and y, and returns the least value between both numeric expressions.
Example:
tag001 = Min (2.4,28.3)
// tag001 = 2.4
Moves the specified file to a new localization. Returns TRUE if well succeeded, or
FALSE in case of error. The global attributes lastError and lastErrorStr are
refreshed by this function.
Example:
MoveFile("c:\data\turtle.dat","c:\newdata\rabbit.dat")
PadC (strString, nLength [, strPadChar])
Returns the string strString centralized with the character strPadChar completing
the size of the resulting string specified by nLength. If strPadChar is not specified,
spaces are introduced. Only the first character of strPadChar is used.
Examples:
PadC("abc",7)
// Results "
PadC("abcdefghij",5)
// Results "abcde"
abc
"
PadC("abc",8,"-")
// Results "--abc---"
Returns the string strString positioned at the right side of character strPadChar,
completing the size of the resulting string specified by nLength. If strPadChar is
not specified, spaces are introduced. Only the first character of strPadChar is used.
Examples:
PadL("abc",5)
PadL("abcdefghij",5)
PadL("abc",8,"-")
// Results "-----abc"
Returns strString positioned at the left side of character strPadChar, completing the
size of the resulting string specified by nLength. If strPadChar is not specified,
spaces are introduced. Only the first character of strPadChar is used.
Examples:
PadR("abc",7)
Scripts
// Results in "abc
"
241
PadR("abcdefghij",5)
PadR("abc",8,"-")
// Results in "abcde"
// Results in "abc-----"
Opens up a dialog box for the input of a password. The title parameter is a string to
be shown in the title bar, and text is a string with a message for the user. It returns
the password typed by the user. Optional parameters x and y indicate the position in
the top left corner of the message box to be shown. The function returns the
password typed by the user.
Example:
strPwd = PasswordDlg ("Type a password","Safety")
strPwd = PasswordDlg
("Type your password","Login",100,100)
PlaySound (soundIndex)
0
1
2
3
4
5
DESCRIPTION
This sound is defined in the control panel of Windows. The function makes the
request of sound playing for the system, and returns. The sound is asynchronously
played.
PlayWave (filename [, msecStart [, msecStop]])
Plays a WAV format file. Parameters msecStart and msecStop specify the interval
of the file to be played (in milliseconds). If these parameters are omitted, the whole
file will be played. The process can be stopped by calling the StopWave() function.
Example:
PlayWave("tada.wav",2000,5000)
// It plays the file from second 2 up to second 5
This function does not accept the parameters startTime and stopTime in CE.
PrintString (lptNum, string)
Sends the string to printer LPTlptNum. The string is sent and waits for a
pre-processing (raw bytes). If formatting is required, it is possible to access the
242
Scripts
User Manual
Returns the angle (expressed in degrees) converted into radians, according to the
formula: radians = (angle / 180) * 3.141592.
ReadFromFile (strFile [, startOffset [,bytesToRead] ])
Bytes ToRead read bytes from the file strFile, beginning with startOffset (from the
beginning of the file, if not specified). If bytesToRead is not specified, the function
reads all bytes in the file. It is recommended that the file only contains text/character
data. Binary data can be read, but cannot be manipulated in Elipse SCADA.
Example:
tag001 = ReadFromFile("Help.txt")
// Reads the whole HELP.TXT file for tag001
ReadIniNumber (strFile, strSection, strInput [, nDefaultValue])
Returns the number of an input in the set up file (.INI) strFile. Parameters
strSection and strInput specify the section and input of file, respectively. If the
input is not found, the value nDefaultValue returns. If nDefaultValue is not
specified, the function returns zero. The file should be formatted with the following
syntax:
[section1]
input1 = value1
input2 = value2
<other entries>
inputN = valueN
[section2]
<other entries>
[sectionN]
<other entries>
Example:
// File MYAPP.INI with the following content:
// [General]
// Total = 1000
// UserName = Admin
ReadIniNumber("MYAPP.INI","General","Total",-1)
// Returns 1000
ReadIniString("MYAPP.INI","General","UserName")
Scripts
243
// returns "Admin"
Note: If there is another program modifying .INI file, changes can be immediately
seen, for Windows maintains a copy of the file in memory. You can force updating
by calling WriteIni (strFile,"","","") before reading the .INI file. Be it a
VALUES.INI file being refreshed by another program. It is possible to read the
refreshed values as:
WriteIni("VALUES.INI","","","")
// Forces Windows to unload the cache
ReadIniNumber("VALUES.INI", "Section", "Input")
// Reads the value of Input in the Section
ReadIniString(strFile, strSection, strInput [,strDefaultValue])
Returns the string containing the input value in the strFile .INI file. Parameters
strSection and strInput specify the section and input of the respective file. If the
input is not found, strDefaultValue is returned, or a null string ("") if
strDefaultValue is not specified.
Real (string)
// returns 30,0
These functions allow the acquisition of one of the three colors composing a color
value of 24 bits in: red, green and blue. The returned value will always be between 0
(minimum intensity) and 255 (maximum intensity).
Example:
color = Display.backgroundColor
Display.backgroundColor = RGB(Red(color)/2,
Green(color)/2, Blue(color)/2)
The example above sets up the background color of a Display to half of the intensity
of the original color for each one of the three components of colors.
ReleaseMouseCapture ()
Scripts
User Manual
Changes the name of file srcFile to destFile. It returns TRUE if well succeeded, or
FALSE (zero) if not. Global attributes lastError and lastErrorStr are refreshed by
this function.
RGB (R, G, B)
Returns a 24 bits color value for the three composing colors that are specified: red,
green and blue. Each component is an integer between 0 (minimum intensity) and
255 (maximum intensity). The value returned can be attributed to any color attribute
of an object.
Example:
// Strong red
Display.backgroundColor = RGB(255,0,0)
Right (strText, nCount)
Returns the nCount characters more to the right in the strText parameter.
Example:
str = Right("Password",4)
// returns "word"
Rnd ()
245
Example:
tag001 = Round(14,1)
tag002 = Round(13,9)
RunMacro (strCode)
Compiles and runs the expression contained in string strCode passed as parameter.
Returns the value of the expression that has been executed, or zero if no compilation
or execution error occurs.
Example:
// runs expression "Screen<activeScreen>.Activate",
// where activeScreen is the screen number.
RunMacro("Screen"+Str(activeScreen,1,0)+".Activate()")
ScriptWindow ()
Opens a window for debug in Runtime mode, which allows the supervision of all
scripts that are running. It also shows for how long or how many times a script is
executed.
SetFileAttributes (file, newAttr)
Modifies the attributes of file for newAttr. See function GetFileAttributes for the
list of attributes that parameter newAttr can receive. The function returns TRUE if
well succeeded, or FALSE (zero) if failing. Global attributes lastError and
lastErrorStr are refreshed by this function.
Example:
SetFileAttributes("turtle.dat",3)
// read-only (1) + hidden (2) = 3
SetSystemTime (datetime)
Adjusts the hour of the system for parameter datetime. The parameter datetime is
an absolute value of datetime. Use function MakeTime() in order to compile this
number. The function returns 1 (TRUE) if successful, and 0 (FALSE) if failing.
Example:
SetSystemTime(MakeTime(10,8,2000,17,25,56))
Note: The internal time maintained by Elipse SCADA is not automatically adjusted.
For this to happen, you can use two methods: Add the key
HKEY_CURRENT_USER\Software\Elipse
Software\Elipse32\Options\DisableInternalClock with a value of
1 to the Registry Editor of Windows, or else start Elipse SCADA via command line
using the option disableInternalClock.
Sgn (x)
Scripts
User Manual
Example:
tag001 = Sgn(-123.98) // Returns -1
ShellExecute (strAction, strFile, strParams, strDir, nCmdShow)
Runs a operation strAction for file strFile that has been specified. strAction can be
one of the following commands: "edit", "explore", "find" (search), "open", "print",
or "properties". strParam is a string that specifies the parameters that should be
passed in the command call, or the file that will receive the action specified. strDir
defines the standard directory. nCmdShow specifies how the application should be
shown when open, as follows: 0 = hide window; 1 = show window; 2 = show
window as minimized; 3 = show window as maximized.
Example:
'Runs FTP application with specified commands saved
'on filename.txt, and hides the command window.
ShellExecute("open", "ftp", "-s:filename.txt", "", 0)
Sin (angle)
Returns the sin of the specified angle. The angle is expressed in radians.
Sleep (nSeconds)
Makes a pause in the execution of the script during nSeconds (it is possible to
specify a fraction, for example: Sleep (0.5)). The user interface will not answer
while the pause is being executed. Processes running in the background in separate
threads (I/O, network driver, video reception) will carry on their functioning, but
the whole logics of the application (scripts) will be in pause.
Sqrt (x)
// returns 9
Plays the sound that is specified in soundIndex with the frequency specified in
frequency (in milliseconds) until a StopSound command is called. soundIndex
should be an integer between 0 and 5 (see the table of sounds available by consulting
function PlaySound()). Minimum frequency is 100ms; if a smaller number is
specified, the value of 100 will be assumed. Note that the frequency parameter
assigns the rate of occurrence for playing the sound.
Example:
StartSound(2,2000)
// plays the sound of exclamation at each 2 seconds
Scripts
247
StopSound ()
Converts an integer or real number into a string. The value parameter is the number
to be converted, the parameters size and precision determine the size of precision of
the string. When the value parameter is a string, it is first converted into a number,
and then formatted according to parameters size and precision.
Example:
String = Str(30.95,6,2)
Converts an integer or real number into a string, filling it with zeros on the left until
the size that has been specified. The value parameter is the number to be converted,
parameters size and precision determine the size of precision of the string. When the
value parameter is a string, it is first converted into a number, and then formatted
according to parameters size and precision.
Example:
String = StrZero(30.95,6,2)
Tan (angle)
Returns the tangent of the angle that has been specified. The angle is expressed in
radians.
WaitCursor(enable)
Enables (enable=1) or disables (enable=0) the waiting slide wire (log glass).
Example:
WaitCursor (1)
<some commands that take time>
WaitCursor (0)
WatchWindow()
Opens a debugging window in Runtime module, which allows the viewing of values
of the properties of an item that is selected in the application tree.
WriteIni (strFile, strSection, strInput, value)
Writes the value (numeric or string) in file .INI strFile. Parameters strSection and
strInput specify the section and input of the respective file.
248
Scripts
User Manual
Note: If the file is a modified INI file, such transformations will not be immediately
modified, for Windows copies a file in the memory. You can force updating by
using parameter WriteIni (strFile,"","","") after reading the .INI file.
The example below writes the following rows in MYAPP.INI:
[General]
Total = 1500
UserName = Admin
Example:
WriteIni("MYAPP.INI","General","Total",1500)
WriteIni("MYAPP.INI","General","UserName","Admin")
WriteToFile(filename, string [,mode])
Writes the string in the file. Returns 1 if well succeeded, or 0 if some error occurs.
The mode parameter is optional and has the following specifications:
MODE
0
1
2
3
DESCRIPTION
Example:
WriteToFile("test.txt", "This row will be
added to an existing file", 1)
Adds a new user to the list of application users. Returns 1 (one) if well succeeded, or
0 (zero) if not.
Example:
Application.AddUser
("Joo Machado", "Manager", "JoaoM", "1234", 0 )
DeleteUser (strLogin)
Erases a user from the users list. Returns 1 (one) if well succeeded, or 0 (zero) if not.
Examples:
Scripts
249
Application.DeleteUser("JoaoM")
Application.DeleteUser(strUserName)
EditProperties()
Calls up a dialog box for the identification (login) of a user. Returns true (different
from zero) if the user is successfully logged, or false (zero) if not. In case of error,
no message or window will be shown. Optional parameters X and Y indicate the
coordinates of the top left corner position of the login window. The bEnableTitle
parameter enables (bEnableTitle = 1, default) or not (bEnableTitle = 0) the login
window title. The parameter bAllowClose is a Boolean that indicates if the button
that closes the window should appear (standard is 1, visible). Parameter customTitle
allows the specification of a title for the window that is different from the standard.
In case of error, the global attribute lastError is also refreshed: 0 (zero) if the login
is cancelled by the user, or 1 (one) if the user or password are invalid.
Example:
IF Application.Login()
SetPointScreen.Activate()
ENDIF
Logout()
Runs the logout of a user of the application. Closes all screens having priority
different from zero.
Example:
IF MessageBox("Do you want to logout?","Logout",4) == 6
Application.Logout( )
ENDIF
MaximizeApp()
250
Scripts
User Manual
ReloadApp([strNewAppName])
Finalizes the execution of current application, reloads it from the disk, and restart it.
Optional parameter strNewAppName allows the passage of the name of the other
application to be restarted, instead of the current one. This function is not available
in Demo (demonstration) mode of Elipse SCADA.
RestoreApp()
NOTE: When the application runs in Configuration mode, it simply stops the
application. When the application runs in Runtime mode, the application stops and
the PC is restarted.
StopRunning()
Scripts
251
Returns the average of values in the rectangle defined by row1 (r1) column1 (c1)
and row2 (r2) column2 (c2).
Example:
tagSum = tagMatriz.Avg(2,1,3,3)
// returns the average of cells
// (2,1), (2,2), (2,3), (3,1), (3,2), (3,3)
ExchangeColumns (column1, column2)
Returns the value (numeric or string) of a given cell of the matrix specified by row
and column.
Example:
// Returns the value of row 3, column 5 cell
TagMTX1.GetCell(3,5)
MapCellsToTags(startColumn, startRow, endColumn, endRow)
Orders the rows of a matrix between the initial row, topRow, and the final one,
bottomRow through the col column, in ascendant way (if ascendingSort = 1) or
descendent (if ascendingSort = 0).
Example:
// Orders rows 1 to 8 of matrix in ascending form,
// according to values of column 1
TagMTX1.OrderBy(1,8,1,1)
252
Scripts
User Manual
Attributes a value to a given cell of the matrix, specified by a given row and
column.
Example:
// Attributes value 9 to the cell of row 3, column 5
TagMTX1.SetCell(3,5,9)
Sum (r1, c1, r2, c2)
Returns the sum of values contained in the rectangle defined by row1 (r1) column1
(c1) and row2 (r2) column2 (c2).
Example:
// Sums the contents of cells
// (2,1), (2,2), (2,3), (2,4), (3,1), (3,2), (3,3), (3,4)
TagMTX1.Sum(2,1,3,4)
Takes the value stored in a Block Element. The index attribute indicates the index of
the block tag element. Attention: this function cannot be used in limited versions
(Lite versions) of Elipse SCADA.
Example:
// Sum of all block elements
DIM index, sum
sum = 0
FOR index = 0 TO Block1.size-1
sum += Block1.GetAt(index)
NEXT
Read()
Reads the PLC block immediately, returning 1 if the reading succeeded and 0 if the
reading failed. For more information about PLC blocks, check the Block Tag item
on the chapter about Tags on this manual.
Attention: This is a synchronous function, it waits until the reading operation is
finished before returning the execution to the next instruction, so it can seriously
degrade application performance; therefore, you should be careful while using it,
and use it only when it is absolutely necessary.
Scripts
253
Sets the value of a Block Element. Returns true if the operation is well succeeded; if
not, returns false. The index attribute indicates the index of the block tag element,
and the value attribute is the value to be sent to the element. Attention: this function
cannot be used in limited versions (Lite versions) of Elipse SCADA.
Example:
// This example adjusts all block elements to zero
DIM index
FOR index = 0 TO Block1.size-1
Block1.SetAt(index, 0)
NEXT
SetSize (size)
Adjusts the number of block elements, which is indicated by the size parameter.
Block elements will be added if the block grows, or removed if the block
diminishes.
Write ()
Writes the current block value to the PLC and returns 1 if the writing is successful,
and 0 on failure. For more information on I/O server writing check the Block Tag
item on the chapter about Tags on this manual.
Block Elements Functions
Read()
Reads an element of a PLC tag block. Returns 1 (one) if the reading was successful,
and 0 (zero) on failure.
Attention: this is a synchronous function, it waits until the operation finishes before
returning to the next instruction. It can seriously degrade the performance of the
application; therefore it should be only used when absolutely necessary.
Write()
It immediately writes the current block element valueto the PLC, returning 1 (one) if
it is successful, or 0 (zero) on failure. For more information on I/O services writing,
check the Block Element item on the chapter about Tags on this manual.
Attention: this is a synchronous function; it waits until the operation finishes before
returning to the next instruction. It can seriously degrade application performance;
therefore, it should be used when absolutely necessary.
WriteEx(value)
Writes the value for the I/O driver, by specifying information for the tag. This
function is used in order to specify information on tag scanning.
254
Scripts
User Manual
Immediately reads the PLC Tag, returning 1 if successful, and 0 on failure. For more
information on I/O services reading, check the PLC Tag item on the chapter about
Tags on this manual.
Attention: this is a synchronous function; it waits until the reading operation
finishes before returning to the next instruction. It can seriously degrade the
performance of the application; therefore, it should be used when absolutely
necessary.
Write()
It immediately writes the current value of the Tag to the PLC. Returns 1 if writing is
successful, and 0 on failure. For more information on I/O driver writing, check the
PLC Tag item on the chapter about Tags on this manual.
Attention: this is a synchronous function, it waits until the reading operation
finishes before returning to the next instruction. It can seriously degrade the
performance of the application; therefore, it should be used when absolutely
necessary.
WriteEx(value[,timeStamp)
Writes the value directly into the I/O, without attributing it to the PLC tag. This
function uses the Scaling defined in the PLC tag. The optional numeric parameter
timeStamp allows to force a time stamp for the writing.
Example:
Block1.elm000.WriteEx(12)
Scripts
255
EditProperties()
Sends characters [Tab] to the application in order to change the keyboard focus
between the screen objects. Positive values of nTabs simulate the [Tab] key,
negative values simulate the combination of [Shift]+[Tab] keys.
Example:
Screen1.SendTab(4)
Show()
Places the object in the frontal part of the screen (in front of the remaining objects).
EditProperties()
Returns true (different from zero) if the object has the keyboard focus, or false (zero)
if not.
Example:
// Changes the Button color if having the keyboard focus
IF Button.HasFocus()
Button.foregroundColor = RGB(255,255,0)
ENDIF
256
Scripts
User Manual
HasMouseCapture()
Returns true (different from zero) if the object has the mouse as captured, or false
(zero) if not.
Example:
Button.SetMouseCapture()
tag1 = Button.HasMouseCapture()
// returns 1
ReleaseMouseCapture()
tag1 = Button.HasMouseCapture()
// returns 0
IsMouseInside()
Returns true (different from zero) if the mouse is over the object, or false (zero) if
not.
Example:
// Changes the Button color if having the mouse over it
IF Button.IsMouseInside( )
Button.foregroundColor = RGB(255,255,0)
ENDIF
MoveTo(x,y)
Places the object in the last plan of the screen (behind the remaining objects).
SetFocus()
Captures the mouse for the object that calls the function. All mouse messages will be
directed to this object until global function ReleaseMouseCapture( ) is called.
SetTag(strTagName)
Associates a new Tag (strTagName) to the object. Returns true (different from
zero) if the Tag is successfully added, or false (zero) if not. If strTagName is an
empty string (" "), then the associated Tag is removed from the object. This function
Scripts
257
can only be used with objects that have just a single Tag, i.e., it is not valid for the
trend and Bar objects.
Alarm Objects Functions
AckSelection()
Sends a recognition sign (ACK) to all alarm messages selected in the object. Returns
the number of messages that are recognized.
Example:
DIM nAcks
nAcks = Alarm1.AckSelection()
IF nAcks > 0
MessageBox(Str(nAcks) + " message(s) acknowledged!")
Else
MessageBox("No messages acknowledged!")
ENDIF
GetColorZoneInfo(strField, nZone)
CheckValue
ForeColor
BackColor
InitialValue
SecondValue
DESCRIPTION
Examples:
// Adjusts the color of zone 0 to white if it is enabled
IF Alarm.GetColorZoneInfo("CheckValue", 0)
Alarm.SetColorZoneInfo("ForeColor", 0, RGB(255,255,255))
ENDIF
SetColorZoneInfo(strField, nZone, newValue)
Scripts
User Manual
Home()
Opens an AVI file, and starts playing it from the beginning. If nFrom is specified,
the beginning will be from frame nFrom. If nTo is specified, the reproduction will
be up to frame nTo. If the AVI is configured to play in reverse, these parameters
will be ignored, and the film is entirely played. If the timeFormat attribute of AVI
is 1, then parameters nFrom and nTo will be interpreted as milliseconds.
Step(nSteps)
Moves the position of film nSteps frames on. If nSteps is negative, the position will
be moved back. The film will be paused after calling the function. If the
timeFormat attribute of AVI is 1, then parameter nSteps will be interpreted as
milliseconds.
StopAVI()
Scripts
259
GetCheckLoLoLimit(barIndex)
GetCheckLowLimit(barIndex)
GetCheckHighLimit(barIndex)
GetCheckHiHiLimit(barIndex)
Adjusts the color of a normal bar graph. For a Bar Gauge, a different setting is done.
Example:
// This example changes the color of bars 1 to 4 into red
// in the bar graph Bar1.
DIM index
FOR index = 1 to 4
Bar1.SetIndexBarColor(index, RGB(255,0,0) )
NEXT
260
Scripts
User Manual
Returns the value of the field indicated by fieldName in the current row (pointed as
curSel). If called in script OnDrawRow(), returns the field value in the row to be
drawn.
SetLabel(indexColumn, title)
Refreshes the Browser query, by renewing the values of rows that are shown.
Scripts
261
Changes the text of zone iZone into Text. If iZone is 0, the text of all zones is
modified.
Trend Objects Functions
AddData(time)
Breaks the pen, by making the new additional data not to be connected with the
points that were already in the pen.
ClearData()
Loads data of the historic related to the trend, in accordance with the query that is
specified.
VideoIn Objects Functions
Pause ()
Saves the current video frame to a graphical image file strFile. strFile is the name
and path of the graphical file. The filename must have the extension included, the
function does not add it. nType is the file type, as follows:
262
Scripts
User Manual
TYPE
0
1
2
3
DESCRIPTION
Stop ()
Scripts
263
ClearHistoricalData()
Erases all messages of alarms, also cleaning the log file of alarms.
GetInfo(strFieldName[, alarmHandle])
FIELD
Comment
DateTime
Event
Limit
Priority
State
Tagname
Type
Value
Handle
User
DESCRIPTION
It is possible to use abbreviations for field names having at least two characters. In
other words, field Value can be abbreviated by VA, field Priority can be
abbreviated by PR, and so forth.
Example:
// Alarms.OnAlarm() script
// stores the handle of alarm of messages
// of tags that start with "TEMP"
IF Left(Alarms.GetInfo("Tagname"), 4) == "TEMP"
lastHandle = Alarms.GetInfo("Handle")
ENDIF
GetNextActiveAlarmHandle( lastHandle )
Returns the handle of last message of active alarms. Messages of active alarms are
shown in the Summarized Alarm. lastHandle can be: -1 for searching the first active
264
Scripts
User Manual
Scripts
265
FIELD
id
timeStamp
Tagname
Comment
Value
Limit
Priority
Type
Event
State
DESCRIPTION
Example:
// Records an event in the log. The message doesn't go
// to the Summarized Alarm because the ID is 0.
Alarms.SimulateAlarm(0, GetTime(),_
"System", "Comm Error",0, 0, 1, "", "EVT", "UNACK")
// This example simulates a High alarm
Alarms.SimulateAlarm(230, GetTime(), "pressure1",_
"Pressure 1 HIGH", 140, 120, 10, "HIGH", "ALM", "UNACK")
// Next row removes the simulated message from Summarized
// and records a false alarm return message in the
// record of alarms
Alarms.RemoveFromSummary(230)
Alarms.SimulateAlarm(0, GetTime(), "pressure1",_
"Pressure normal",110, 120, 10, "RTN", "ALM", "ACK"
Opens a dialog that allows the selection of a recipe from a list, by returning its index
to the file. The parameter title is a string to be shown in the title bar of the dialog
(place " " for a window without title), selRecord is the index of the recipe to be
266
Scripts
User Manual
selected when the dialog is open (place -1 in order not to select any), x, y, width and
height are optional, and indicate the position and size of the window; if not
informed, the dialog is open in the center of the screen or in the last position in
which it has been open, and a border allows its size to be modified.
Example:
// tagRecipe will receive the index of the recipe that
// has been chosen. The dialog will be open in the center
// of the screen, in a window that can be re-dimensioned,
// having the title List of Recipes.
tagRecipe = Recipes.ChooseRecipe("List of recipes", 1)
Creates a new record in the Recipes file in accordance with the description
parameter, returning the record index to the file.
CopyRecord(nRecord)
Copies a selected record with the same values of the original record, which are
specified in nRecord. This function returns the number of new records or 0 if
failing.
Example:
// Copying a recipe
DIM nRecord
nRecord = Recipe1.ChooseRecipe("Recipes", -1)
IF nRecord > 0
Recipe1.CopyRecord(nRecord)
ENDIF
DeleteRecipe(record)
Erases the record having record number in a recipe. Returns true (different from
zero) if the operation is successful, or false (zero) if not.
EditProperties()
267
GetRecCount()
Returns the description of a record to the Recipes file. The record parameter should
be between 1 <= record <= GetRecCount().
LoadRecipe(record)
Loads a recipe record of the Recipes file in the respective listed tags. The record
parameter should be between 1 <= record <= GetRecCount(). The function returns
True if the recipe was loaded successfully; False, if an error occurred.
Example:
// Loads the fourth record of Recipes
Recipes.LoadRecipe(4)
SaveRecipe(record)
Saves the record. The function returns True if the recipe was recorded successfully;
False, if an error occurred.
SetRecDescription(record, description)
Opens the HAnalysis window and generate the chart. The parameters x and y
specify the XY position of the window. The parameter width specifies the width of
the window. The parameter height specifies the height of the window.
Average (src, type, startTime [, endTime])
Returns the historic data sets average. The parameter src specifies the tag that is
saved in the historic. The parameter type specifies the time interval to be used in the
average calculation, as follows: 0 = year; 1 = month; 2 = week; 3 = day; 4 = time;
5 = minute. The parameter startTime specifies the initial time and endTime
(optional) specifies the final time. If endTime is specified, type is ignored.
Close()
Edits the current record without writing it in disk. In order to write it, use function
Refresh().
268
Scripts
User Manual
EditProperties()
Returns the index of the first record that has date and hour bigger or equal to the one
that is specified in time.
FinishBatchProcess()
Returns the current position of the pointer for the historic file.
GoTo(recno)
Moves the pointer of records from the historic file to the recno index record without
reading the record.
IsBOF()
Verifies if the pointer of records points out to the beginning of the historic file.
Returns true (different from zero) if the pointer is in the beginning, or false (zero) if
not.
IsEOF()
Verifies if the pointer of records points out to the end of the historic file. Returns
true (different from zero) if the pointer is in the end, or false (zero) if not.
Move(n)
Moves the pointer of records of the historic file n records onwards (positive
numbers) or backwards (negative numbers). The record is read, and its values loaded
into the respective historic fields.
MoveFirst()
Moves the pointer of records of the historic file to the first record. The record is
read, and its values are loaded into the respective historic fields.
Scripts
269
MoveLast()
Moves the pointer of records of the historic file to the last record. The record is read,
and its values loaded into the respective historic fields.
MoveNext()
Moves the pointer of records of the historic file to next record. The record is read,
and its values loaded into the respective historic fields.
MovePrev()
Moves the pointer of records of the historic file to the previous record. The record is
read, and its values loaded into the respective historic fields.
Open()
Opens the HAnalysis window and generate the chart. The parameters x and y
specify the XY position of the window. The parameter width specifies the width of
the window. The parameter height specifies the height of the window.
CloseAnalysis()
270
Scripts
User Manual
RequeryAnalysis()
Reapplies the query over the data file of HAnalysis, by repeating the loading of data
in the window of analysis.
SPC()
Runs the SPC (Statistical Process Control) over the data file of HAnalysis.
Recalculates all SPC data. This function, together with SetDatField(), allows the
automatic calculation of SPC without having to open the windows of setting and
graph.
SetDatField(datField)
Adjusts the field name of the historic file that will be used in the calculations of
SPC.
Loads the printer setting, margins and fonts of the report of a file in disk saved by
function SaveCfg().
Print(bShowErrorMessages,[strHeaderBmp],[strFooterBmp],
[bStretchHeader], [bStretchFooter])
Prints the report according to the specified setting. It returns True (different from
zero) if the Report is successfully printed; otherwise, it returns False (zero). The
parameter bShowErrorMessages indicates if the command will show error
messages (1), or run in silent mode (0).
The optional parameters strHeaderBmp and strFooterBmp indicate the filenames
with the images to be included in the header and in the footer, respectively. On their
turn, the optional parameters bStretchHeader and bStretchFooter enable headers
and footers stretch.
Scripts
271
SaveCfg(fileName)
Saves the printer setting, margins and fonts of the report in a file;
SetupPrinter()
Filters the value of a field. The field parameter is a string that specifies the name of
the numeric field to be filtered. Parameters valueLow and valueHigh specify an
interval of values for the search. Records that have values outside this interval will
be excluded from the report. It is advisable to set up the filter before printing, and
remove it after. More than a field can be filtered, and only the records satisfying all
filters will be included in the report.
Example:
TextRep1.AddFilter(code, 0, 23)
PrintToFile (fileName, [bPrintHeader], [separator], [bProgressDialog],
[bPlaceQuotes])
Prints data of a Historic or Alarms file in a text file specified by the name in
parameter fileName.
Parameter bPrintHeader enables (1) or disables (0) the header printing (this
parameter is optional, and the default value is 0). When you select a specific Batch
to be printed with parameter bPrintHeader as 1, and attribute printHeader of
Report as 1, the function will also print the batch header data.
The parameter separator is a string containing the character that will be used to
separate the fields (it is optional, and the default value is " ", i.e., a blank space).
Returns true (different from zero) if the Report is successfully printed, or false (zero)
if not. No header is printed.
Parameter bProgressDialog enables (1) or disables (0) the exhibition of a progress
bar while the report is printed (this parameter is optional and the default value is 0).
If a separator character is used, the parameter bPlaceQuotes indicates that values
from string or date/time type columns will be surrounded by quotes
(bPlaceQuotes = 1). If parameter is 0, the function will not place quotes.
Example:
Relatorio.PrintToFile ("turtle.dat", 1, "-", 1)
RemoveAllFilters()
Scripts
User Manual
Returns the number of the first record between firstReg and lastReg having date
and hour bigger or equal to time. If there are no records in the interval specified by
the date that is bigger or equal to time, the function returns -1.
Example:
Query1.FindTime(MakeTime(2,3,1995,13,45,30), 20, 50)
ReloadStructure()
Forces the query object to reload the list of fields. This will be required if you
change the specification of font for the query and the structure of the specification is
different from the previous field.
Example:
ReportTxt.Query.filename = "C:\Data\MON12.DAT"
ReportTxt.Query.ReloadStructure()
Saves the chart to a bitmap file (.BMP). The parameter strFileName specifies the
name (and path) of the bitmap file. The parameters nWidth and nHeight specify the
width and height of the picture, respectively. nFontScaling specifies the font scale
of bitmap text, as follows: fontSize * (nFontScaling/1000). If zero, the font
size is not modified.
Example:
Trend1.Plotter.SaveBitmap("C:\SNAPSHOT.BMP", 320, 200, 0)
ShowDate(bShow)
Shows the date in the bottom ruler of the graph when parameter bShow is equal to
1. If bShow is equal to 0, it doesn't show the date.
TimeInHAxis()
Scripts
273
Opens a dialog box for setting up the parameters of the network driver.
StartDriver()
Loads the network driver enabling remote communication. Returns true (different
from zero) if the driver is successfully loaded, or false (zero) if not.
StopDriver()
Stops the network driver by disabling any remote communication. Always returns
true (different from zero), indicating that the driver has been successfully stopped.
PLC Drivers
AddFilter(filter)
Adds a communication filter to the Driver. The filter allows the disabling of reading
or writing to PLC or Block Tags that have the same parameters that are specified in
the filter.
Example:
// disables all communication
// with N1 or B1=1 and N2 or B2 = 30
Driver1.AddFilter("1,30")
// disables all readings with N4 or B4 = 40
Driver1.AddFilter("R,,,40")
Scripts
User Manual
Returns information about last error; param defines what information will be
returned.
If param is 0, it returns the type of communication that has caused the error:
1 = reading of a PLC Tag;
2 = reading of a Block Tag;
3 = writing of a PLC Tag;
4 = writing of a PLC Block;
If param is 1, 2, 3 or 4, it returns parameters N1 to N4 of PLC tag or B1 to B4 block
tag that caused the error.
Example:
// Driver1.OnCommError() script
// adds a filter to all tags of
// N1/B1 of last error
DIM strFilter
strFilter = Str(Driver1.GetErrorInfo(1))
// avoid adding the same filter more than once
// removes the filter that precedes this same PLC
Driver1.RemoveFilter(strFilter)
Driver1.AddFilter(strFilter)
Reload()
Reloads a driver from the disk. Doesnt return any error, if fails.
RemoveAllFilters()
Removes a filter of a driver added with AddFilter(). Returns true (different from
zero) if the filter has been successfully removed, or false (zero) if it doesn't exist or
is invalid. The parameter filter should be specified in the same way as in
AddFilter().
Scripts
275
StartComm()
Adds a new record to the database. Returns TRUE (different from zero) if
successfully added, or FALSE (zero) if any of the following errors occur: full disk,
database is read only, a primary key having a value that already exists, or there is no
modification done in the database. It is necessary to fill out all fields of the record
before calling the function. Parameter bRefreshQuery indicates if the query should
be refreshed after the additions of the record. If the parameter is 0 (zero), then the
added record will be visible only after query updating. The standard value is 1 (one).
Examples:
Table1.ID = tag002
Table1.Valor = tag003
Table1.AddRecord(1)
BeginTrans()
Begins a transaction with the database. Returns true if the transaction begins, and
false if failing or if the transactions that sustain the database are not located.
Example:
if (BD1.CanTransact())
BD1.BeginTrans()
BD1.GotoRecord(0)
while (not BD1.IsEOF())
BD1.DeleteRecord()
BD1.MoveNext()
wend
BD1.CommitTrans()
// begins a transaction
// goes to the beginning
// if it is not the end of file
// erases a record
// goes to next
// even if BD1.EndTrans(1)
ENDIF
CanTransact()
Returns true (different from zero) if the database is available for transactions, or
false (zero) if not. Example: see it in BeginTrans().
276
Scripts
User Manual
CloseConnection()
Closes an ODBC connection. This operation releases the database for external
operations, as for example a backup of the database that is being used by Elipse, or
the change of some parameter of connection.
CommitTrans()
Erases the current record from the database. Returns TRUE (different from zero) if
successfully removed, or FALSE (zero) if any of the following errors occur: the
database is read only, the pointer of records is pointing out to the mark of beginning
of file (BOF), the pointer of records is pointing out to the mark of end of file (EOF).
This function erases all duplicated records, i.e., those that have the same data in case
a single duplicated record is erased.
Example: see the example in BeginTrans().
EditProperties()
Edits the current record without writing it in disk. In order to write it, use function
Refresh(). Both of these functions are obsolete, and are maintained to allow
compatibility with previous versions of the software. In order to edit a record,
currently, it is enough to modify the values of fields, once we are over them.
EndTrans(n)
277
GetEditMode()
Returns the status of edition for current record. (Only in DAO.) It can be one of the
following values:
VALUE
-1
0
1
2
DESCRIPTION
GetLastError ()
Returns the last error message occurred during a transaction with the database.
GetODBCParameter(strParam)
Returns the value of parameter strParam of the string of ODBC connection. The
string of connection is a sequence of parameters and values of parameter as in
ODBC;DSN=C:\Data.DB;Timeout=500.
Example:
strDSN = Table1.GetODBCParameter(.DSN.)
GetRecordNumber()
Returns the record number in the database. The first record is number zero.
GetTableName()
Returns the total number of records in the database according to the Query specified
in function SQLQuery().
Example:
// Returns the total number of records,
// for it doesn't have a defined query.
BD1.SQLQuery(" ", " ")
TagRam = BD1.GetTotalNumberOfRecords()
GotoRecord(n)
Moves the pointer of records to record n, depending on the Query that has been
specified. Returns true (different from zero) if the movement has been successful, or
false (zero) if a mark of end of file EOF is found.
Example:
// goes to the 13th record, as the first
// record always has index 0 (zero)
Database1.GotoRecord(12)
278
Scripts
User Manual
IsBOF()
Verifies if the pointer of records is in the beginning of the file. Returns true
(different from zero) if it is, or false (zero) if it is not.
IsEOF()
Verifies if the pointer of records is in the end of file. Returns true (different from
zero) if it is, or false (zero) if it is not.
Example: see it in BeginTrans().
Locate(strCondition [, bMoveFirst])
Looks for the next record fulfilling the expression informed in parameter string
strCondition. Parameter bMoveFirst is a Boolean value that defines if the search
should start from the first record of the database (bMoveFirst = 1) or from current
record (bMoveFirst = 0).
Example:
// Browses the first record fulfilling the expression
// from current record
Database1.Locate("temp == tag001 * tag002", 0)
Move(n)
Moves the database pointer n records onwards relative to current position of pointer.
Returns true (different from zero) if the movement has been successful, or false
(zero) if a mark of end of file EOF is found.
Example:
// Positions the pointer on the 11th record, as
// the first record always has index 0 (zero)
Database1.GotoRecord(10)
// Positions the pointer in next record (12th record)
Database1.Move(1)
// Returns two records (10th record)
Database1.Move(-2)
MoveFirst()
Moves the pointer of records to the first record of the database. Returns true
(different from zero) if the movement has been successful, or false (zero) if not.
MoveLast()
Moves the pointer of records to the last record of the database. Returns true
(different from zero) if the movement has been successful, or false (zero) if not.
MoveNext()
Moves the pointer of records to next record. Returns true (different from zero) if the
movement has been successful, or false (zero) if a mark of end of file EOF is found.
Scripts
279
MovePrev()
Moves the pointer of records to the previous record. Returns true (different from
zero) if the movement has been successful, or false (zero) if a mark of beginning of
file EOF is found.
OpenConnection()
Refreshes the Database. It is useful when more than one user is using the DB. This
function is not necessary when you are using the Refresh(1) function, as this
function in itself already refreshes the DB.
RollBack()
Undoes all actions accomplished during a transaction. Returns true (different from
zero) if the actions have been successfully undone, or false (zero) if not.
SetODBCParameter(param, strValue)
Scripts
User Manual
Operators accepted in expressions in this parameter are: =, <> (different), <, >,
<=, >=, !< (not lesser than), !> (not bigger than), AND, OR, NOT, LIKE (similar
or equal), IN, BETWEEN, IS NULL, IS NOT NULL.
OrderBy: Defines an order for searching the database in accordance with the field
that is specified, which can be ascending (default) or descending. This field is
mandatory, but can be an empty string.
The function returns the amount of records of the query.
Examples:
// Searches all records having "Maria" in the name field,
// in ascending order. HowMany receives the amount of records
// of the query
HowMany = Database1.SQLQuery("name = 'Maria'","name")
// No filter. Note that the quotation marks in the string
// can be double or simple.
Database1.SQLQuery(" ")
// Searches all records having in the
// name field a string bigger than 'Maria', and in the
// salary field a number that is bigger than 1000. Both filters
// should be satisfied.
Database1.SQLQuery("name > 'Maria' AND salary > 1000")
// You can use the value of a Tag to create
// a string by using the concatenation.
Database1.SQLQuery("name = '"+TagRam1+"'")
// Searches all records having in the
// name field, a string beginning with 'ma'.
//For exemple: Maria, Mario, Manoela, Marcelo
Database1.SQLQuery("name LIKE 'ma%'")
// Searches all records having in the
// sales field a number between 40000 and 100000.
Database1.SQLQuery("sales BETWEEN 40000 AND 100000")
// Searches all records having in the
// optional field a blank space, ordered in
// descending order by the name field.
Database1.SQLQuery("optional IS NULL","name DESC")
// Makes the query for date
Scripts
281
Database1.SQLQuery("Date = CDate('10/09/2006')")
NOTE: this last example is valid for an MDB database. Other databases may not
accept this query format.
Update(bQuery)
Opens a driver dialog box for setting up the parameters of the Remote Application.
Connect()
Establishes connection with the Remote Application. Returns true (different from
zero) if the connection has been successful, or false (zero) if not.
Disconnect()
Finishes the connection with the Remote Application. Returns true (different from
zero) if the connection has been successfully closed, or false (zero) if not.
EditProperties()
Loads from a file that is specified by fileName, the set up of the Remote
Application.
SaveCfg(fileName)
Saves the set up of the Remote Application in a file that is specified by fileName.
Remote Files Functions
Cancel()
Obtains a server file with name serverFile and takes a copy of it into a local file
having the name of clientFile.
282
Scripts
User Manual
19.6. Attributes
Attributes are data associated to an object that determine its characteristics and the
way in which it will behave. Normally, there is a window in which you can modify
the attributes of an object. Each attribute has an associated type that is represented
by its icon as follows:
Numeric attribute
String attribute (text)
Boolean attribute (true/false)
System attribute, internally used by Elipse SCADA.
Recipe Attributes
Application
Historic Attributes
Tags Attributes
Report Attributes
Screen Attributes
Driver Attributes
Alarm Attributes
Databases Attributes
Users Attribute
Watcher Attribute
Steeplechase Attribute
OPCServer Attribute
Scripts
283
284
Scripts
User Manual
centerWindow
: a Boolean attribute used to enable the main application
window to start execution as centered. Returns true (non zero) if center is enabled or
false (zero) if it isnt.
closeButton
: a Boolean attribute (read only) determining that the close
button is enabled in the application window. Returns true (different from zero) if the
button is enabled, or false (zero) if not.
description: a string containing a brief description of the application;
exclusive
: a Boolean attribute determining that Elipse SCADA has
exclusivity over the use of the CPU. Returns true (different from zero) if Elipse
SCADA is exclusive, or false (zero) if not.
height: an integer without sign (from 0 to 65535) determining the height of the
Application window in pixels. It is used together with the width attribute to define
the size of the window. This attribute should be defined in accordance with the
resolution used in Windows to obtain a window without scroll bar. For instance, if
you are using a resolution of 640x480 (VGA), parameter height can vary from 0 to
480 pixels;
isMaximized: a Boolean attribute determining if the application window is
maximized or not. Returns true (different from zero) if the window is maximized, or
false (zero) if not.
isMinimized: a Boolean attribute determining if the application window is
minimized or not. Returns true (different from zero) if the window is minimized, or
false (zero) if not.
isNormal: a Boolean attribute determining if the application window is
normalized or not. Returns true (different from zero) if the window is normalized, or
false (zero) if not.
keyPadBackColor
: a hexadecimal (from 0h to 1000000h) or decimal
number (from 0 to 16777215) defining the background color of Key Pad (Screen
Keyboard). This value can also be specified by function RGB(r,g,b) in which each
component (r,g,b) can vary from 0 to 255.
keyPadHeight
: an integer without sign (from 0 to 65535) determining the
height of the Key Pad window in pixels. It is used together with the KeyPadWidth
attribute to define the size of the window. This attribute should be defined in
accordance with the resolution used in Windows to obtain a window without scroll
bar. For instance, if you are using a resolution of 640x480 (VGA), parameter height
can vary from 0 to 480 pixels;
keyPadKeyColor
: a hexadecimal (from 0h to 1000000h) or decimal number
(from 0 to 16777215) defining the color of Key Pad keys (Screen Keyboard). This
value can also be specified by function RGB(r,g,b) in which each component (r,g,b)
can vary from 0 to 255.
Scripts
285
keyPadTextColor
: a hexadecimal (from 0h to 1000000h) or decimal
number (from 0 to 16777215) defining the text color of Key Pad keys (Screen
Keyboard). This value can also be specified by function RGB(r,g,b) in which each
component (r,g,b) can vary from 0 to 255.
keyPadTitleBar
default) or not (zero).
: Boolean, indicates if the Key Pad will have title bar (one,
keyPadVisible
: a Boolean attribute determining that the Key Pad is visible.
Returns true (different from zero) if the Key Pad is visible, or false (zero) if not.
keyPadWidth
: an integer without sign (from 0 to 65535) determining the
width of the Key Pad window in pixels. It is used together with the KeyPadHeight
attribute to define the size of the window. This attribute should be defined in
accordance with the resolution used in Windows to obtain a window without scroll
bar. For instance, if you are using a resolution of 640x480 (VGA), parameter height
can vary from 0 to 640 pixels;
keyPadX
: an integer with sign (from -32768 to 32767) determining the X
coordinate for top left corner of the Key Pad window, in pixels. It is used together
with the Y attribute to define the position of the top left corner of the window. This
attribute should be defined in accordance with the resolution used in Windows to
obtain a window without scroll bar. For instance, if you are using a resolution of
640x480 (VGA), your X coordinate can vary from 0 to 640 pixels;
keyPadY
: an integer with sign (from -32768 to 32767) determining the Y
coordinate for the top left corner of the Key Pad window, in pixels. It is used
together with the X attribute to define the position of top left corner of the window.
This attribute should be defined in accordance with the resolution used in Windows
to obtain a window without scroll bar. For instance, if you are using a resolution of
640x480 (VGA), your Y coordinate can vary from 0 to 480 pixels;
largeButtons: a Boolean attribute enabling large buttons in the Organizer,
HAnalysis, etc. to facilitate the use of Touch Screen. Returns true (different from
zero) if large buttons are enabled, or false (zero) if not.
maximizeButton
: a Boolean attribute (read only) determining that the
maximize button is enabled in the application window. Returns true (different from
zero) if the button is enabled, or false (zero) if not.
minimizeButton
: a Boolean attribute (read only) determining that the
minimize button is enabled in the application window. Returns true (different from
zero) if the button is enabled, or false (zero) if not.
name: a string containing the application name used as identifier for it.
noMousePointer
: a Boolean attribute used for disabling (hiding) the mouse
pointer during running time (while executing an application). Returns true (different
from zero) if the mouse is disabled, or false (zero) if not.
286
Scripts
User Manual
noScreenSaver
: a Boolean attribute used for disabling the screen saver
during running time (while executing an application). Returns true (different from
zero) if the screen is disabled, or false (zero) if not.
numPadCloseButton
: Boolean, indicates if the button to close NumPad
shall be presented (value one, default) or not (value zero).
numPadTitleBar
: Boolean, indicates if the Numeric Pad will have title bar
(one, default) or not (zero).
numPadTitleBarText
: string, allows the indication of a text for the title bar
of Numeric Pad (empty, by default).
revision: an integer without sign (read only), indicates the revision number of
the application. It is automatically incremented each time the application is saved.
saveKeyPadCoord
: a Boolean attribute determining that the coordinates
and the size of the KeyPad window (Screen keyboard) are saved to be loaded in the
next opening of it. Returns true (different from zero) if saving is enabled, or false
(zero) if not.
startMaximized: a Boolean attribute determining if the application window
starts as maximized or not. Returns true (different from zero) if the application starts
as maximized, or false (zero) if not.
startMinimized: a Boolean attribute determining if the application window
starts as minimized or not. Returns true (different from zero) if the application starts
as minimized, or false (zero) if not.
startNormal: a Boolean attribute determining that the application window starts
as normalized. Returns true (different from zero) if the application starts as
normalized, or false (zero) if not.
startScreen: Only for the use of Elipse SCADA. It is not allowed modifications
on the part of users.
titleBar
: a Boolean attribute determining that the Title Bar is shown in the
application window. Returns true (different from zero) if the Title Bar is shown, or
false (zero) if not.
useKeyPad: a Boolean attribute enabling the use of KeyPad (Screen keyboard)
during running time. Returns true (different from zero) if the KeyPad is enabled, or
false (zero) if not.
userAccessLevel: an integer without sign from 0 to 65535 (read only)
determining the access level of the user logged in the application.
userLogin: a string (read only) containing the name of current user (login).
userName: a string (read only) containing the current user logged in the
application.
Scripts
287
version: a string (read only) indicating the version of Elipse that has last saved
the application.
width: an integer without sign (from 0 to 65535) determining the width of the
Application window in pixels. It is used together with the height attribute to define
the size of the window. This attribute should be defined in accordance with the
resolution used in Windows to obtain a window without scroll bar. For instance, if
you are using a resolution of 640x480 (VGA), parameter width can vary from 0 to
640 pixels;
x: an integer with sign (from -32768 to 32767) determining the X coordinate for
the top left corner of the Application window, in pixels. It is used together with the
Y attribute to define the position of the top left corner of the window. This attribute
should be defined in accordance with the resolution used in Windows to obtain a
window without scroll bar. For instance, if you are using a resolution of 640x480
(VGA), your X coordinate can vary from 0 to 640 pixels;
y: an integer with sign (from -32768 to 32767) determining the Y coordinate for
the top left corner of the Application window, in pixels. It is used together with the
X attribute to define the position of top left corner of the window
Scripts
User Manual
289
Scripts
User Manual
low1: a real number setting the bottom limit of the PLC. It is used together with
attribute high1 to define an interval of variation;
low2: a real number setting the bottom limit of the system. It is used together
with attribute high2 to define an interval of variation;
scaling: a Boolean attribute used to enable Scaling of values between the PLC
and the system. Returns true (different from zero) if the Scaling is enabled, or false
(zero) if not. With this attribute as enabled, you can set up attributes low1, high1,
low2 and high2;
server: a string containing the name of the application to be connected by using
DDE. It is used as an identifier of the application in the computer specified for the
connection. For instance, you want to create a DDE connection in the
Elipse_Software computer that is running Elipse SCADA whose DDE name is
ELIPSE$. You can change this attribute during running time;
topic: a string containing the name of the window or work area to be connected
by using DDE. It is used as identifier of a work area in the application server;
Attributes of Demo Tags
delay: an integer setting the number of periods between each generation of value
for the demo Tag. For instance, if it is 1, a value is generated at each period, if it is 2,
a value is generated at each two periods, and so on. It is used together with the
period attribute to control the time interval for the variation of data. The formula
that expresses the frequency of modification of the demo tag is period * delay.
enabled: a Boolean attribute used to enable the simulation of the demo tag data
while the tag is active. Returns true (different from zero) if the simulation of data is
enabled, or false (zero) if not.
highLimit: a real number setting the higher limit of the demo tag. It is used
together with attribute lowLimit to define the interval of variation of the Tag;
increment: a real number determining the increment to be added to data in
accordance with the time frequency specified in period.
lowLimit: a real number setting the lower limit of the demo tag. It is used
together with attribute highLimit to define the interval of variation of the Tag;
period: integer; sets the interval in milliseconds between the generation of each
new value for the demo tag. It is used together with the delay attribute to control the
time interval for the variation of data.
type: an integer setting the type of variation of the demo tag. The variation is
described by a curve, and can have the following types:
Scripts
291
NAME
VALUE
DESCRIPTION
Randomic
Senoidal
Square Wave
Ascending Ramp
Triangular
Descending Ramp
Scripts
User Manual
nOKReads: an integer without sign (read only) that indicates the total number
of successfull readings;
nOKWrites: an integer without sign (read only) that indicates the total number
of successfull writtings;
realScan: a real number (read only) indicating the real sacn time in which Elipse
is being able to read the Tag.
scanTime: an integer with sign (from -32768 to 32767) setting the time interval
between two readings;
size: an integer determining the size of the block to be monitored by Elipse
SCADA.
status: a string (read only) containing the current status of communication of the
Tag: "Reading", "Writing", "Idle";
Attributes of Block Tag elements
high1: a real number setting the top limit of the PLC. It is used together with
attribute low1 to define an interval of variation;
high2: a real number setting the top limit of the system. It is used together with
attribute low2 to define an interval of variation;
index: an integer without sign (from 0 until the total number of elements - 1)
determining the index (initiating by zero) of the element in the block.
low1: a real number setting the bottom limit of the PLC. It is used together with
attribute high1 to define an interval of variation;
low2: a real number setting the bottom limit of the system. It is used together
with attribute high2 to define an interval of variation;
scaling: a Boolean attribute used to enable Scalings of values between the PLC
and the system. Returns true (different from zero) if the Scaling is enabled, or false
(zero) if not. Having this attribute as enabled, you can set up attributes low1, high1,
low2 and high2;
Attributes of Matrix Tags
nColumns: an integer without sign setting up the number of columns of Matrix
Tag.
nRows: an integer without sign setting up the number of rows of Matrix Tag.
Attributes of Chrono Tags
acum: Current value of chronometer;
Scripts
293
Scripts
User Manual
295
Windows to obtain a window without scroll bar. For instance, if you are using a
resolution of 640x480 (VGA), parameter width can vary from 0 to 640 pixels;
x
: an integer with sign (from -32768 to 32767) determining the X coordinate
for top left corner of the Screen, in pixels. It is used together with the Y attribute to
define the position of top left corner of the Screen. This attribute should be defined
in accordance with the resolution used in Windows to obtain a window without
scroll bar. For instance, if you are using a resolution of 640x480 (VGA), your X
coordinate can vary from 0 to 640 pixels;
xOrigin: an integer without sign (from 0 to 65535) determining the X coordinate
for the origin of the Screen, in pixels. It is used together with attribute yOrigin to
define the size of the Screen. This attribute should be defined in accordance with the
resolution used in Windows to obtain a window without scroll bar. For instance, if
you are using a resolution of 640x480 (VGA), parameter xOrigin can vary from 0 to
640 pixels;
y
: an integer with sign (from -32768 to 32767) determining the Y coordinate
for top left corner of the Screen, in pixels. It is used together with the X attribute to
define the position of top left corner of the Screen. This attribute should be defined
in accordance with the resolution used in Windows to obtain a window without
scroll bar. For instance, if you are using a resolution of 640x480 (VGA), your Y
coordinate can vary from 0 to 480 pixels;
yOrigin: an integer without sign (from 0 to 65535) determining the Y coordinate
for the origin of the Screen, in pixels. It is used together with attribute xOrigin to
define the size of the Screen. This attribute should be defined in accordance with the
resolution used in Windows to obtain a window without scroll bar. For instance, if
you are using a resolution of 640x480 (VGA), parameter yOrigin can vary from 0 to
480 pixels;
296
Scripts
User Manual
height: an integer without sign (from 0 to 65535) determining the height of the
object in pixels. It is used together with the height attribute to define the size of the
object
showTip: Boolean value that enables the object by showing a little tip when the
mouse is over it.
visible: Boolean value that indicates if the object is visible for the user (TRUE)
or not (FALSE).
width: an integer without sign (from 0 to 65535) determining the width of the
object in pixels. It is used together with the height attribute to define the size of the
object
x, y: two integers with sign (from -32768 to 32767) determining coordinates X
and Y for the top left corner of the object, in pixels, from the top left corner of the
Screen where the object is.
Alarm Attributes
ackALMColor: a hexadecimal (from 0h to 1000000h) or decimal number (from
0 to 16777215) defining the text color for an Alarm message that is recognized. This
value can also be specified by function RGB (r,g,b) in which each RGB component
can vary from 0 to 255. Example: Alarm.ackAlmColor = RGB(255,0,255)
alarmState: (Boolean) determines that the status column of alarms is shown in
the object. Returns true (different from zero) if the status column is shown, or false
(zero) if not.
alarmType: (Boolean) determines if the column of Alarm type will be shown in
the object: true (different from), it is shown; false (zero), it is not.
comment: (Boolean) determines that the remarks column is shown in the Alarm
object. Returns true (different from zero) if the remarks column is shown, or false
(zero) if not.
commentLength: integer without sign (from 1 to 199) determining the length of
the remark that will be shown. Only available if the comment attribute is enabled;
date: (boolean) determines that the date column is shown in the Alarm object.
Returns true (different from zero) if the date column is shown, or false (zero) if not.
description: a string containing a brief description of the Alarm;
displayTitle: (Boolean) determines that the title bar of the Alarm is shown.
Returns true (different from zero) if the Title Bar is shown, or false (zero) if not.
event: (Boolean) determines that the events column is shown in the Alarm
object. Returns true (different from zero) if the events column is shown, or false
(zero) if not.
Scripts
297
tagName: (Boolean) determines that the column of Tag names is shown in the
object. Returns true (different from zero) if the column of Tag names is shown, or
false (zero) if not.
tagNameLength: integer without sign (from 1 to 32) determining the length of
Tag names that will be shown. Only available if the tagName attribute is enabled;
time: (Boolean) determines that the hour column is shown in the Alarm object.
Returns true (different from zero) if the hour column is shown, or false (zero) if not.
titleBarColor: hexadecimal (from 0h to 1000000h) or decimal number (from 0
to 16777215) defining the title row color of the Alarm. This value can also be
specified by function RGB (r,g,b) in which each RGB component can vary from 0 to
255. Example: Alarm.titleBarColor = RGB(255,255,0)
titleTextColor: hexadecimal (from 0h to 1000000h) or decimal number (from 0
to 16777215) defining the title text color of the Alarm. This value can also be
298
Scripts
User Manual
specified by function RGB (r,g,b) in which each RGB component can vary from 0 to
255. Example: Alarm.titleTextColor = RGB(255,255,0).
toolbar: (Boolean) determines that the toolbar of the Alarm object is shown.
Returns true (different from zero) if the toolbar is shown, or false (zero) if not.
toolbarColor: hexadecimal (from 0h to 1000000h) or decimal number (from 0
to 16777215) defining the toolbar color of the Alarm. This value can also be
specified by function RGB (r,g,b) in which each RGB component can vary from 0 to
255. Example: Alarm.toolbarColor = RGB(255,255,0)
type: integer without sign (from 0 to 1) defining the Alarm type, which can be
summarized (0) or history (1). This property is read only.
unAckALMColor: a hexadecimal (from 0h to 1000000h) or decimal number
(from 0 to 16777215) defining the text color for an non-recognized Alarm message.
This value can also be specified by function RGB (r,g,b) in which each RGB
component can vary from 0 to 255.
userLength: (integer from 1 to 20) indicates the size of the User column, in
characters.
userName: (Boolean) if true, indicates that the User column should be shown.
value: (Boolean) determines that the column of Tag values is shown in the
Alarm object. Returns true (different from zero) if the column of Tag values is
shown, or false (zero) if not.
valueLength: integer without sign (from 1 to 10) determining the length of Tag
names that will be shown. Only available if the comment attribute is enabled;
valuePrec: integer without sign (from 0 to limitLength - 2) determining the
number of decimal digits for values that will be shown in the Alarm.
windowColor: a hexadecimal (from 0h to 1000000h) or decimal number (from 0
to 16777215) defining the background color of the Alarm. This value can also be
specified by function RGB (r,g,b) in which each RGB component can vary from 0 to
255.
Animation Attributes
backgroundColor: a hexadecimal (from 0h to 1000000h) or decimal number
(from 0 to 16777215) defining the background color of the Animation. This value
can also be specified by function RGB(r,g,b) in which each component (r,g,b) can
vary from 0 to 255.
BlinkTime: an integer without sign (from 0 to 100) determining the time in ms
of the Animation Blinkinger, i.e., the time in which the default zone will Blinking
alternating with the current zone.
Scripts
299
Scripts
User Manual
also be specified by function RGB(r,g,b) in which each component (r,g,b) can vary
from 0 to 255.
label
: a string containing the measurement unit to be shown in the ruler.
Example: Barra1.label = "MHz"
labelEnable: a Boolean attribute determining that the ruler label is shown in the
Bar Graph. Returns true (different from zero) if the ruler label is shown, or false
(zero) if not.
leftRuler: a Boolean attribute determining that a ruler of values is shown at the
left side of the Bar Graph. Returns true (different from zero) if the ruler at the left is
shown, or false (zero) if not.
middle: a real number determining the center of the bipolar bars. Only available
if the middle attribute is enabled;
name: a string containing the name of the Bar Graph, used as Bar identifier;
orientation: an integer without sign determining the orientation of the Bar
Graph, in accordance with the following table:
VALUE
1
5
2
6
ORIENTATION
301
302
Scripts
User Manual
Scripts
303
buttonType = 0
buttonType = 1
buttonType = 2
buttonType = 3
buttonType = 4
buttonType = 5
buttonType = 6
Scripts
User Manual
width: an integer without sign (from 0 to 65535) determining the width of the
Button in pixels. It is used together with the height attribute to define the size of the
Button
x: an integer with sign (from -32768 to 32767) determining the X coordinate for
the top left corner of the Button, in pixels. It is used together with the Y attribute to
define the position of the top left corner of the Button from the origin of screen (0,0)
y: an integer with sign (from -32768 to 32767) determining the Y coordinate for
the top left corner of the Button, in pixels. It is used together with the X attribute to
define the position of the top left corner of the Button from the origin of screen (0,0)
Display Attributes
backgroundColor: a hexadecimal (from 0h to 1000000h) or decimal number
(from 0 to 16777215) defining the background color of the Display. This value can
also be specified by function RGB(r,g,b) in which each component (r,g,b) can vary
from 0 to 255.
description: a string containing a brief description of the Display;
enabled: a Boolean attribute used to enable the access of keyboard and mouse to
the Display object. Returns true (different from zero) if the access is enabled, or
false (zero) if not.
height: an integer without sign (from 0 to 65535) determining the height of the
Display, in pixels. It is used together with the width attribute to define the size of the
Display;
horizontalAlign: an integer without sign (from 0 to 2) determining the
horizontal alignment for data to be shown in Display, in accordance with the table
below:
VALUE
0
1
2
ALIGNMENT
Left
Center
Right
305
showTip: a Boolean attribute that enables the object to show a Tip when the
mouse is over it. Returns true (different from zero) if the tip is enabled, or false
(zero) if not.
suffix: a string containing a sufix to be shown after the Tag value associated to
the Display;
textColor: a hexadecimal (from 0h to 1000000h) or decimal number (from 0 to
16777215) defining the text color of the Display. This value can also be specified by
function RGB(r,g,b) in which each component (r,g,b) can vary from 0 to 255.
type: an integer without sign (from 1 to 2) determining the data type to be shown
in the Display, which can be a string (1) or a number (2).
verticalAlign: an integer without sign (from 0 to 2) determining the vertical
alignment for data to be shown in Display, in accordance with the table below:
VALUE
0
1
2
ALIGNMENT
Top
Center
Bottom
visible: a Boolean attribute determining that the Display is visible. Returns true
(different from zero) if the Display is visible, or false (zero) if not.
width: an integer without sign (from 0 to 65535) determining the width of the
Display, in pixels. It is used together with the height attribute to define the size of
the Display
x: an integer with sign (from -32768 to 32767) determining the X coordinate for
the top left corner of the Display, in pixels. It is used together with the Y attribute to
define the position of the top left corner of the Display from the origin of screen
(0,0)
y: an integer with sign (from -32768 to 32767) determining the Y coordinate for
the top left corner of the Display, in pixels. It is used together with the X attribute to
define the position of the top left corner of the Display from the origin of screen
(0,0)
Gauge Attributes
backgroundColor: a hexadecimal (from 0h to 1000000h) or decimal number
(from 0 to 16777215) defining the background color of the Gauge. This value can
also be specified by function RGB(r,g,b) in which each component (r,g,b) can vary
from 0 to 255.
bulletsVisible: a Boolean attribute determining that ticks are shown under the
form of bullets. Returns true (different from zero) if the bullets are shown, or false
(zero) if not;
306
Scripts
User Manual
Scripts
307
Scripts
User Manual
points: an integer without sign (de 0 a 65535) determining the number of points
in the Gauge ruler. Some points cannot be shown if many points are defined for a
small Gauge.
showTip: a Boolean attribute that enables the object to show a Tip when the
mouse is over it. Returns true (different from zero) if the tip is enabled, or false
(zero) if not.
startAngle: a real number setting up the initial angle of the Gauge needle;
subTicksColor: a hexadecimal (from 0h to 1000000h) or decimal number (from
0 to 16777215) defining the color of Gauge sub-ticks. This value can also be
specified by function RGB(r,g,b) in which each component (r,g,b) can vary from 0
to 255.
subTicksVisible: a Boolean attribute determining that sub-ticks are shown
between main ticks. Returns true (different from zero) if the sub-ticks are shown, or
false (zero) if not;
textColor: a hexadecimal (from 0h to 1000000h) or decimal number (from 0 to
16777215) defining the text color that will be shown in the Gauge. This value can
also be specified by function RGB(r,g,b) in which each component (r,g,b) can vary
from 0 to 255.
thickTicks: a Boolean attribute determining that main Gauge ticks are thick.
Returns true (different from zero) if the ticks are thick, or false (zero) if not;
tickColor: a hexadecimal (from 0h to 1000000h) or decimal number (from 0 to
16777215) defining the color of main Gauge ticks. This value can also be specified
by function RGB(r,g,b) in which each component (r,g,b) can vary from 0 to 255.
ticksValues: a Boolean attribute determining that values of ticks are shown in
the Gauge. Returns true (different from zero) if the values are shown, or false (zero)
if not;
Scripts
309
ticksVisible: a Boolean attribute determining that main ticks are shown in the
Gauge. Returns true (different from zero) if the ticks are shown, or false (zero) if
not;
totalNumberOfSubticks: an integer without sign (from 0 to 9) determining the
total number of sub-ticks to be shown between main ticks.
valueVisible: a Boolean attribute determining that the Gauge value will be
shown. Returns true (different from zero) if the Gauge value is shown, or false
(zero) if not.
visible: a Boolean attribute determining that the Gauge is visible. Returns true
(different from zero) if the Gauge is visible, or false (zero) if not.
width: an integer without sign (from 0 to 65535) determining the width of the
Gauge, in pixels. It is used together with the height attribute to define the size of the
Gauge
x: an integer with sign (from -32768 to 32767) determining the X coordinate for
the top left corner of the Gauge, in pixels. It is used together with the Y attribute to
define the position of the top left corner of the Gauge from the origin of screen (0,0)
y: an integer with sign (from -32768 to 32767) determining the Y coordinate for
the top left corner of the Gauge, in pixels. It is used together with the X attribute to
define the position of the top left corner of the Gauge from the origin of screen (0,0)
Setpoint Attributes
autoSend: (Boolean) When in 1 (one), sends automatically data inserted in the
control to the associated tag when it looses focus.
backgroundColor: a hexadecimal (from 0h to 1000000h) or decimal number
(from 0 to 16777215) defining the background color of the SetPoint. This value can
also be specified by function RGB(r,g,b) in which each component (r,g,b) can vary
from 0 to 255.
checkMaximum: (Boolean) Used to enable the verification of the SetPoint
value having the maximum value specified for it. Returns true (different from zero)
if the verification is enabled, or false (zero) if not.
checkMinimum: (Boolean) Used to enable the verification of the SetPoint value
having the minimum value specified for it. Returns true (different from zero) if the
verification is enabled, or false (zero) if not.
dateFormat: (string) Defines a format to show and insert data of Date/Time in a
setpoint. Example: "dd/mm/yy hh:mm:ss" will be shown as "02/07/97 18:35:22".
310
Scripts
User Manual
w
W
ww
WW
d
dd
m
mm
mmm
MMM
mmmm
MMMM
mmmmm
MMMMM
yy
YY
h
hh
m
mm
s
ss
AM/PM
MEANING
am/pm
A/P
a/p
0
00
000
|
Scripts
311
height: an integer without sign (from 0 to 65535) determining the height of the
SetPoint, in pixels. It is used together with the width attribute to define the size of
the SetPoint;
horizontalAlign: an integer without sign (from 0 to 2) determining the
horizontal alignment for data to be shown in SetPoint, in accordance with the table
below: 0, to the left; 1, center, or 2, to the right.
maximum: a real number setting up the maximum value for the SetPoint. It is
used together with attribute minimum to define an interval of values for the SetPoint;
minimum: a real number setting up the minimum value for the SetPoint. It is
used together with attribute maximum to define an interval of values for the
SetPoint;
multiLine
: a Boolean attribute used to enable multiline in the SetPoint.
Returns true (different from zero) if the use of multiline is enabled, or false (zero) if
not.
name: (string) Contains the SetPoint name, used as identifier of the SetPoint.
precision: an integer without sign (from 0 to 254) determining the number of
decimals to be shown in SetPoint. It can never be bigger than the size attribute.
prefix: a string containing a prefix to be shown before the value of the Tag
associated to the SetPoint; Example: SetPoint.prefix = "Weight"
refresh: a Boolean attribute determining that the SetPoint value is automatically
refreshd if any modification occurs in the associated Tag. Returns true (different
from zero) if the automatic updating is enabled, or false (zero) if not.
selectAll: a Boolean attribute determining that all characters of SetPoint are
selected when the object receives the focus. Returns true (different from zero) if the
selection of all characters is enabled, or false (zero) if not.
showTip: a Boolean attribute that enables the object to show a Tip when the
mouse is over it. Returns true (different from zero) if the Tip is enabled, or false
(zero) if not.
size: an integer without sign (from 0 to 255) determining the size of data to be
shown in the SetPoint.
suffix: a string containing a suffix to be shown after the value of the Tag
associated to the SetPoint; Example: SetPoint.suffix = "Kg"
textColor: a hexadecimal (from 0h to 1000000h) or decimal number (from 0 to
16777215) defining the text color that will be shown in the SetPoint. This value can
also be specified by function RGB(r,g,b) in which each component (r,g,b) can vary
from 0 to 255.
type: an integer without sign (from 1 to 2) determining the data type to be shown
in the SetPoint, which can be a string (1) or a number (2).
312
Scripts
User Manual
Scripts
313
rangeMinimum: a real number setting up the minimum value for the Slider. It
is used together with attribute rangeMaximum to define an interval of values for the
Slider;
showRange: a Boolean attribute determining that the limits of the Slider are
shown. Returns true (different from zero) if the limits are shown, or false (zero) if
not;
showTip: a Boolean attribute that enables the object to show a Tip when the
mouse is over it. Returns true (different from zero) if the tip is enabled, or false
(zero) if not.
showValue: a Boolean attribute determining that the Slider value will be shown.
Returns true (different from zero) if the Slider value is shown, or false (zero) if not.
step: a real number to be incremented or decremented from the Slider value
when its arrows are pressed;
textColor: a hexadecimal (from 0h to 1000000h) or decimal number (from 0 to
16777215) defining the text color that will be shown in the Slider. This value can
also be specified by function RGB(r,g,b) in which each component (r,g,b) can vary
from 0 to 255.
updateOnRelease: a Boolean attribute determining that the Slider value is
refreshd when the mouse button is released after moving the Slider lever. Returns
true (different from zero) if the Slider is refreshd when its lever is moved, or false
(zero) if not.
visible: a Boolean attribute determining that the Slider is visible. Returns true
(different from zero) if the Slider is visible, or false (zero) if not.
width: an integer without sign (from 0 to 65535) determining the width of the
Slider, in pixels. It is used together with the height attribute to define the size of the
Slider;
x: an integer with sign (from -32768 to 32767) determining the X coordinate for
the top left corner of the Slider, in pixels. It is used together with the Y attribute to
define the position of the top left corner of the Slider from the origin of screen (0,0)
y: an integer with sign (from -32768 to 32767) determining the Y coordinate for
the top left corner of the Slider, in pixels. It is used together with the X attribute to
define the position of the top left corner of the Slider from the origin of screen (0,0)
Text Attributes
description: a string containing a brief description of the Text;
enabled: a Bboolean attribute used to enable the access of keyboard and mouse
to the Text object. Returns true (different from zero) if the access is enabled, or false
(zero) if not.
314
Scripts
User Manual
height: an integer without sign (from 0 to 65535) determining the height of the
Text, in pixels. It is used together with the width attribute to define the size of the
Text;
name: a string containing the Text name, used as identifier for the Text.
showTip: a Boolean attribute that enables the object to show a Tip when the
mouse is over it. Returns true (different from zero) if the tip is enabled, or false
(zero) if not.
visible: a Boolean attribute determining that the Text is visible. Returns true
(different from zero) if the Text is visible, or false (zero) if not.
width: an integer without sign (from 0 to 65535) determining the width of the
Text, in pixels. It is used together with the height attribute to define the size of the
Text;
x: an integer with sign (from -32768 to 32767) determining the X coordinate for
top left corner of the Text, in pixels. It is used together with the Y attribute to define
the position of the top left corner of the Text from the origin of screen (0,0)
y: an integer with sign (from -32768 to 32767) determining the Y coordinate for
the top left corner of the Text, in pixels. It is used together with the X attribute to
define the position of the top left corner of the Text from the origin of screen (0,0)
Trend Attributes
description: a string containing a brief description of the trend;
enabled: a Boolean attribute used to enable the access of keyboard and mouse to
the trend object. Returns true (different from zero) if the access is enabled, or false
(zero) if not.
enableDataRec: a Boolean attribute used to enable the trend to collect new
value whenever the Tags associated to it change. Returns true (different from zero)
if the values are collected, or false (zero) if not;
frozen: a Boolean attribute used to enable/disable the automatic scroll of Trend.
Returns true (different from zero) if the Trend is frozen, or false (zero) the scroll is
enabled (default).
height: an integer without sign (from 0 to 65535) determining the height of the
Trend, in pixels. It is used together with the width attribute to define the size of the
Trend.
isXY: a Boolean attribute. Only for the use of Elipse SCADA. It is not allowed
modifications on the part of users.
name: a string containing the Trend name, used as identifier of the Trend.
Scripts
315
0
1
2
3
ORIENTATION
showTip: a Boolean attribute that enables the object to show a Tip when the
mouse is over it. Returns true (different from zero) if the tip is enabled, or false
(zero) if not.
timeSpan: a real number determining the time to be visualized in the Trend in
seconds.
visible: a Boolean attribute determining if the trend is visible. Returns true
(different from zero) if the trend is visible, or false (zero) if not.
width: an integer without sign (from 0 to 65535) determining the width of the
Trend in pixels. It is used together with the height attribute to define the size of the
Trend.
x: an integer with sign (from -32768 to 32767) determining the X coordinate for
the top left corner of the Trend, in pixels. It is used together with the Y attribute to
define the position of the top left corner of the Trend from the origin of screen (0,0)
y: an integer with sign (from -32768 to 32767) determining the Y coordinate for
the top left corner of the Trend, in pixels. It is used together with the X attribute to
define the position of the top left corner of the Trend from the origin of screen (0,0)
Frame Attributes
borderColor: a hexadecimal (from 0h to 1000000h) or decimal number (from 0
to 16777215) defining the Frame border color. This value can also be specified by
function RGB(r,g,b) in which each component (r,g,b) can vary from 0 to 255.
borderEnabled: a Boolean attribute determining that the Frame border is
shown. Returns true (different from zero) if the border is shown, or false (zero) if
not.
borderThickness: an integer without sign (from 0 to 255) determining the
thickness of the Frame.
color: an hexadecimal (from 0h to 1000000h) or decimal number (from 0 to
16777215) defining the tick color. This value can also be specified by function
RGB(r,g,b) in which each component (r,g,b) can vary from 0 to 255.
description: a string containing a brief description of the Frame;
enable3D: a Boolean attribute used to enable a 3D effect in the Frame. Returns
true (different from zero) if the 3D effect is enabled, or false (zero) if not.
316
Scripts
User Manual
frame: a Boolean attribute determining that the Frame will be shown. Returns
true (different from zero) if the Frame is shown, or false (zero) if not.
name: a string containing the Frame name, used as Frame identifier;
separator: a Boolean attribute determining that a separation row of the title is
shown. Returns true (different from zero) if the row is shown, or false (zero) if not.
set3DInset: a Boolean attribute determining that the 3D effect is in the inside or
outside part of the Frame. Returns true (different from zero) if the 3D effect is
shown inside, or false (zero) if outside.
thickness3D: an integer without sign (from 0 to 255) determining the thickness
of the 3D effect in the Frame.
title: a string containing the Frame title;
titleColor: a hexadecimal (from 0h to 1000000h) or decimal number (from 0 to
16777215) defining the text color of the title. This value can also be specified by
function RGB(r,g,b) in which each component (r,g,b) can vary from 0 to 255.
titleEnabled: a Boolean attribute determining that the Frame title will be shown.
Returns true (different from zero) if the title is shown, or false (zero) if not.
317
Scripts
User Manual
Cursor Attributes
barCalc: Specifies the calculation method for bar value, as follows:
0 = Medium; 1 = Maximum; 2 = Minimum; 3 = By Sample.
barWidth: Defines X axis bars width by sample.
bottomWorld: Specifies charts inferior data value.
description: Contains objects description.
leftWorld: Specifies charts left data value.
mode: Contains cursors operation mode, as follows: 0 = None; 1 = Selection
Mode; 2 = Zoom Mode; 3 = Scroll Mode.
name: Contains the name identifying the object.
penColor: Specifies cursor pens color. The range of valid values goes from
0h to 1000000h (in hexadecimal values) or from 0 to 16777215 (in decimal values).
You can also use RGB() function to specify this color.
penStyle: Specifies cursor pens style, as follows: 0 = Solid; 1 = Dash; 2 = Dot;
3 = Dash-Dot; 4 = Dash-Dot-Dot.
penType: Specifies cursor pens type, as follows: 1 = Line; 2 = Bar; 3 = Area.
penVisible: Boolean attribute indicating whether the pen is visible (True) or not
(False).
penWidth: Defines pen width, in pixels (integers from 0 to 65,535).
rangeType: Specifies cursor selection, as follows: 0 = no selection; 1 = the
selection is a point; 2 = the selection is a retangle.
rangeX1: Specifies the first range value of the coordinate X, when rangeType
is 2.
rangeX2: Specifies the last range value of the coordinate X, when rangeType is
2.
rangeY1: Specifies the first range value of the coordinate Y, when rangeType
is 2.
rangeY2: Specifies the last range value of the coordinate Y, when rangeType is
2.
rightWorld: Specifies charts right data value (rangeType must be 2).
Scripts
319
0
1
2
3
4
STYLE
Solid
Dashed
Dotted
Dash-Dot
Dash-Dot-Dot
penVisible: a Boolean attribute determining that the Pen is shown. Returns true
(different from zero) if the Pen is shown, or false (zero) if not.
penWidth: an integer without sign (from 0 to 65535) determining the width of
the Pen in pixels.
Tick Attributes
description: a string containing a brief description of the Tick;
name: a string containing the Tick name, used as Tick identifier;
markType: an integer without sign (from 0 to 2) determining the Tick type, in
accordance with the following table:
320
Scripts
User Manual
VALUE
0
1
2
TYPE
Point
Vertical
Horizontal
0
1
2
3
4
STYLE
Solid
Dashed
Dotted
Dash-Dot
Dash-Dot-Dot
321
name: a string containing the Alarm name, used as identifier of the Alarm.
nRecords: an integer without sign (from 0 to 65535) determining the number of
more recent alarms to be recorded in the log file of alarms.
soundType
: an integer without sign (from 0 to 65535) determining the type
of sound to be played when an alarm occurs. Only available if the warningSound
attribute is enabled;
warningSound: a Boolean attribute used to enable an alert sound when an alarm
occurs. Returns true (different from zero) if the alert sound is enabled, or false (zero)
if not.
Scripts
User Manual
0
1
2
PAGES
323
0
1
2
QUERY TYPE
Time interval
Most recent data
Without Criteria
Scripts
User Manual
determining a time unit for the search of newest data, in accordance with the
following table:
VALUE
0
1
2
3
4
5
FORMAT
Day
Month
Year
Hours
Minutes
Seconds
Scripts
325
dispLCL: a real number setting up the bottom limit of the Dispersion graph. It is
used together with attribute dispUCL to define an interval of variation;
dispUCL: a real number setting up the top limit of the Dispersion graph. It is
used together with attribute dispLCL to define a interval of variation;
k: Only for the use of Elipse SCADA.
lcl: a real number setting up the bottom limit of the Control. It is used together
with attribute ucr to define an interval of variation;
lel: a real number setting up the bottom limit of Engineering. It is used together
with attribute uer to define an interval of variation;
maxValue: (read only) a real number indicating the maximum value between
samples that are calculated.
minValue: (read only) a real number indicating the minimum value between
samples that are calculated.
name: a string containing the SPC name, used as identifier of the SPC.
nRecords: (read only) an integer without sign (from 1 to 65535) indicating the
total number of records analyzed.
pointsPerGroup: an integer without sign (from 0 to 65535) determining the
number of points per sample;
stdDev: a real number determining the Standard Deviation;
ucl: a real number setting up the top limit of the Control. It is used together with
attribute lcr to define an interval of variation;
uel: a real number setting up the top limit of Engineering. It is used together
with attribute ler to define an interval of variation;
Scripts
User Manual
Scripts
327
328
Scripts
User Manual
tx: a Boolean attribute (read only) used to inform if the driver is sending data or
not. Returns true (different from zero) if the driver is sending data, or false (zero) if
not.
Scripts
329
0
1
2
3
4
5
EVENT
OK transfer
Client file could not be opened or created
Server file has not been found.
Invalid data received from the server during connection
Out of sequence block received from the server
Writing or placement error in client file
-1
0
1
EVENT
0
1
2
3
EVENT
No transfer going on
Connecting
Comparing files
Transferring
330
Scripts
User Manual
DESCRIPTION
0
1
2
3
4
No active alarms
LOLO level alarm.
LOW level alarm.
HIGH level alarm.
HIHI level alarm.
331
332
DESCRIPTION
-1
Scripts
User Manual
333
DESCRIO
Non-interlaced image.
Interlaced image.
0
Up to 65535
DESCRIPTION
Lower compression
Higher compression
DESCRIPTION
No compression
MJPEG
Scripts
User Manual
deviceVersion: Sets the version of the device supporting Video for Windows.
frameRate: Sets picking up frame rate (per second).
XPresPlus Camera Attributes
fileName: Video file name.
format: Image format (PAL-M, NTSC, etc).
name: Objects name.
nFrame: Sets current frame number.
numBoard: Sets board number.
numCam: Defines the total number of cameras.
Scripts
335
Chapter
20
Elipse SCADA allows the change of information with other programs through the
support to DDE technology (DDE - Dynamic Data Exchange). The system can
operate as server or client of applications like Microsoft Excel, Microsoft Access,
and others.
Support to DDE
337
Fields Name of Server, TTopic and Item are always defined in accordance with
the server application. If the application is open in the same computer in which the
Elipse SCADA is running, it is automatically detected through items Server and
Topic. It is possible to test the connection with the server application through the
button [Test Connection].
You can send a DDE command to a server application through Scripts, by using the
DDEExecute() function. See the Chapter about Scripts, in Special Functions, Global
Manager.
Example: Elipse SCADA & Microsoft Excel
The following setting establishes a DDE connection between Elipse SCADA as
client, and Microsoft Excel as server, by using cell A1 in a spreadsheet called
Sheet1 in the work folder Book1. Both programs are running in the same computer.
For this example, execute the following procedures:
338
User Manual
FIELD
Server Name
Topic
Item
VALUE
Excel
[Book1.xls]Sheet1
R1C1
Note: For different versions or languages of the software, topics and items can
change.
The button Test Connection allows the test of the DDE connection. Once the
connection is done, the DDE tag that is setted can be used in screen objects,
scripts or other functions.
Support to DDE
Define the tag that Excel will access in Elipse SCADA. For example:
tagDDE.
Create a table in Excel and save it with any name, for example: tabela.xls.
In Excel, type in the wanted cell the following formula:
=ELIPSE|Aplicao!Tags.tagDDE, where: "ELIPSE" is the DDE server, "
Application" is the topic, and Tags.tagDDE is the item to be accessed. This
item can be any tag or attribute of any object n the application as for
example: "Hist1.DateTime".
Go to the Edit menu, Link option. Select the link with Elipse and click
"Manual". Enter in Link again, select the link with Elipse, and choose
"Automatic".
339