Visual Designer Tag Arrays; Visual Designer Class Tags - Eaton XV-102 Series Quick Start Manual

Operator interface models with visual designer
Hide thumbs Also See for XV-102 Series:
Table of Contents

Advertisement

Quick Start Guide MN0480001E
Effective February 2011
Notes:
When declaring Application tags, it is not necessary to use the
combo box for defining the Type or Scope fields. After typing in
the tag name, simply press the tab key twice to tab over to the
Type field and press B for Boolean, I for Integer, R for Real or S
for String. Press the Tab key twice again to tab to the Scope field
and type S for Server, or L for Local.
If you place your mouse cursor on the blank square in the upper
left corner (left of the Name field) and click the right mouse but-
ton, you can sort the tags by name in ascending or descending
order.
If you want to delete or insert tags, first place your mouse cur-
sor on the blank square in the upper left corner (left of the Name
field) and click the right mouse button. Select the Disable Sort (if
it is not greyed out). Next, position your mouse cursor over the
line you want to delete, or the line to insert a new line above, and
click the right mouse button. Select Delete Line or Insert Line.
Warning:
You will not be able to Insert or Delete a line if the
Visual Designer application is running. Click on the STOP icon
in the main Toolbar to stop the Visual Designer application.
You can select which fields to view in the Project Tags Datasheet
View. Simply put your mouse cursor on one of the lines, and click
the right mouse button. The Name, Size, Type, Description and
Scope fields are the default fields to be displayed, but by select-
ing More Columns you can view other tag (Property) fields that
can be specified during development. Tag Properties will be dis-
cussed in a later section.
Declaring tags in the Project Tags database is not the only
method of declaring Visual Designer tags. As we will see later,
with most Objects you can simply type in the name of a tag and if
the tag is not already defined, Visual Designer will ask you if you
want to declare the tag. This allows you to create new tags while
developing your application without first declaring them in the
Project Tags database. This method is suitable for declaring tags
of data type Boolean, Integer, Real, String and Array.
In the Datasheet View, each tag will have an icon proceeding
the tag name, signifying the data type of the tag (e.g. Boolean,
Integer .. etc.).
Like most tables in Visual Designer, you can copy and paste infor-
mation to and from the Datasheet View to Excel which may facili-
tate the creation of the tag database.

3.4.6 Visual Designer tag arrays

An Array tag consists of a set of tags that are all of the same data
type, have the same name, and use an index to uniquely identify a
tag that is an element (member) of the array. The use of array tags
can simplify the method used to access multiple data items that are
of the same type (e.g. recipe names, report names, communication
points, etc.). Array tags can easily be declared, saving development
time.
To define an array tag, you open the Application Tags folder and
select Datasheet View. Type the name of the array tag in the Name
field, select the array tag's data type (all elements in the array must
be the same data type) in the Type field, and specify the size of the
array (maximum number of elements) in the Size field. You may also
want to enter a tag description and set the array tag scope. Note
that all Visual Designer arrays are 1-dimensional, and are zero-based
arrays (meaning the first element in the array is index 0).
6
eaton Corporation www.eaton.com
XV Operator Interface Models
Declaring Array Tags
The above graphic shows how an Integer Array tag called tank is
declared. The size value is set to 5, and since all Arrays are zero-
based, there are really 6 elements in the array [0, 1, 2, 3, 4, 5]. To
reference a specific element in the tag, you would use (in an Object
or one of its Dynamic Properties) the following syntax: Array[Index],
e.g. tank[0], tank[1], .. tank[5]. Any index values greater than 5 would
be invalid for the tank array since it was declared as Size 5.

3.4.7 Visual Designer Class Tags

Class tags can be a confusing at first, but are really a simple, yet
powerful concept to describe logical groupings of data. Before we
cover the mechanics of creating and using class tags, let's touch on
where they might be used. For example, let's assume we have an
application that has a storage tank. The tank may have certain param-
eters associated with it:
Name
Physical location
Capacity
Level
Temperature
Pressure
In this example, Name and Physical Location would be stored as
String tags, while Capacity, Fill Level, Temperature and Pressure
would be stored as Real tags.
To create a Class tag for the storage tank, we will first need to
define a Class, which is merely a template or data structure. In the
Database Workspace, position the mouse cursor over the Classes
folder and click the right mouse button. Click the left mouse but-
ton on Insert Class. A dialog box will appear asking you to define
the Class. In this example, we will use cTank (small c to designate
Class).
After clicking on OK, Visual Designer will open a new worksheet that
lets you define the elements in the Class cTank. These elements
are collectively called Members, with each element being called a
Member. The Members are not tags; they are simply the definitions
for the elements that define a Class. Note that in this example, we
have defined the Names and Type of the Members as defined above.
An optional Description field is available.
with Visual Designer

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xv-152 series

Table of Contents