XControls

<< Click to Display Table of Contents >>

 

XControls

An XControl defines a graphical interface to users, which can be composed of any Elipse E3 object and its purpose is to be easily multiplied by a project. Users can create an XControl by right-clicking the Object Library - XControls item in Domain mode, select the Insert XControl in option, and then the name of the Library.

Design tab of an XControl

Design tab of an XControl

Properties tab of an XControl

Properties tab of an XControl

When inserting an XControl, this object's View is opened, composed by three tabs. In addition to the Scripts tab, which is common to all objects, there is a Design tab, which is equivalent to a Screen where graphical objects previously described can be inserted, and a Properties tab, where users can insert variables also known as XControl Properties. These Properties are exported by the object and can be linked to a Tag or to another property when this object is used in an application.

The variables to export can be inserted by pressing the INSERT key or by clicking Add Add and can be excluded by pressing the DELETE key or by clicking Delete Delete. The available options on the Properties tab are described on the next table.

Available options for Properties tab

Option

Description

Name

Specifies the name of an XControl's variable

Type

Determines the data type supported by this variable. Notice that other data objects, XFolders and XObjects, can be declared as data types. This way, users can create a data object that contains another data object as a Property. Data objects can work as a structure or as a class in this case, as in the C/C++ programming language. When specifying an object type, such as DemoTag, IOTag, or XObject, this Property displays the following behavior:

If the ElipseX is inactive: This Property works as a String, which specifies the path of the object instance of the configured data type

If the ElipseX is active: On writing, this Property works the same way as the previous case. However, on reading this Property returns the specified object, if it exists. If the path does not point to an existing object at the time, this Property returns Nothing

This options corresponds to the Type property of a Property Definition object

Public Public Property

Enables or disables the visibility of this variable outside the Library, that is, determines whether this variable is public or not. This option corresponds to the Public property of a Property Definition object

Persistable Persistable Property

Determines whether this variable is saved in the project or not. This option corresponds to the Persistable property of a Property Definition object

Retentive Retentive Property

Determines whether this Property is retentive or not. Regarding XControls, Properties cannot be retentive. This option corresponds to the Retentive property of a Property Definition object

Initial value

Specifies the initial value of this variable. This option corresponds to the DefaultValue of a Property Definition object

Help text

Variable declaration and documentation text. This option corresponds to the HelpString of a Property Definition object

 

NOTE

Notice that XFolders and XObjects can be declared as data types.

 

Editing graphical objects can be performed in the same way as when editing a Screen, with the same graphical features and options.

Users can insert XControls on any Screen, or even within another XControl by right-clicking the destination Screen or XControl and then selecting the Insert option, as shown on the next figure. From an XControl in development, that is, inside a Library, users can insert another XControl in it, by right-clicking the destination XControl and then selecting the Insert option.

Inserting an XControl on a Screen

Inserting an XControl on a Screen

From this moment on, the XControl has a name within the Screen and is understood as a copy of the original definition. Thus, users must define, if required, the values or Links this specific copy has in the context it is used. If this object's size is altered on the Library's Design tab and registered again, users must use the Screen's Original Size contextual menu to display that change.

When creating a Pump object, for example, which contains a Status Property that receives an external information disclosing whether this pump is turned on or off by changing its color, after inserting this object on a Screen, Elipse E3 automatically renames this object to "Pump1".

Users can keep this name or rename it to another one. Then, users must inform which variable is linked to the Status Property. Let's suppose that a certain I/O Tag represents the status of this pump. Therefore, a Link between the Status Property and the referred Tag must be created. The same procedure must be performed for other instances, or copies, of the Pump object required in this project.

Was this page useful?