XObjects

<< Click to Display Table of Contents >>

 

XObjects

In addition to XControls and XFolders, users can create a data Library called XObject. With it, users can define a data structure executed in the server. Such structure can perform calculations, Links, communications, alarm acknowledgments, historical recordings, etc., regardless of a graphical interface (E3 Viewer) opened or in execution at that moment. To create an XObject, right-click the Objects Library - XObjects item in Domain mode, select the Insert XObject in option, and then the name of the Library.

Properties tab of an XObject

Properties tab of an XObject

When inserting an XObject, the View of this object is opened, where users can insert variables. These variables are Properties to be exported by the object, which can be linked to a Tag or any other property of an application when the object is in use in an application.

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

Available options for Properties tab

Option

Description

Name

Specifies the XObject's variable name

Type

Determines the data type supported by a 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:

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

In case 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 option corresponds to the Type property of a Property Definition object

Public Public Property

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

Persistable Persistable Property

Determines whether a 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. This option corresponds to the Retentive property of a Property Definition object

Initial value

Determines the initial value of a variable. This option corresponds to the DefaultValue property of a Property Definition object

Help text

A text to declare and document a variable. This option corresponds to the HelpString property of a Property Definition object

 

Only Properties with simple data types (Variant, String, Date, Double, etc.) can be retentive (the View automatically deselects the Retentive Retentive Property column if a Property's data type changes to an object type), and only XFolder and XObject Properties can be retentive.

 

NOTE

Using retentive Properties in ElipseXs may increase the starting time of an application, and may also increase memory consumed by E3Run process. These times vary depending on the number of XFolder and XObject instances, on the number of retentive Properties on each XFolder or XObject, and on the number of these Properties that have their value changed. If a Property never changes, its retentive value remains in zero.

 

In an XObject can be inserted any E3 modules executed on the server, such as Databases, Alarm Configurations, Formulas, Historics, Storages, Data Servers, I/O Tags, I/O Drivers, and Alarms.

This allows users to define as a Library a complex management system that can be easily replicated, as many times as it is required in an application.

 

IMPORTANT

XControls, XFolders, and XObjects can only communicate with the external world using Properties (or through mouse and keyboard for XControls). This means that users cannot access internal data from an XControl, XFolder, or XObject except within the object itself.

Starting with version 5.0, users cannot insert Alarm Servers in an XObject, which was allowed in previous versions. Therefore, when opening applications created in earlier versions containing XObjects with this object, the Domain Verifier reports this situation as an error and does not allow the execution of this object.

 

Users can insert XObjects in any Data Server by right-clicking the Data Server in Domain mode, selecting the Insert option and then the name of the XObject, as shown on the next figure. In Explorer mode, right-click the project's Data Server, select the Insert option and then the name of the XObject.

Inserting an XObject in Domain mode

Inserting an XObject in Domain mode

Notice that even if Library files contain several XControls, XFolders, and XObjects, when trying to insert an instance (copy), E3 Studio shows for Screens only XControls, and for Data Servers only the available XFolders and XObjects.

 

NOTE

Users must be careful to not delete an XControl, XFolder, or XObject Property that contains a Link. These Properties, once deleted, do not appear in object's Properties List anymore, and therefore they cannot be edited. When the Domain Verifier option is selected, a search for these Properties is performed and users are asked whether to remove this Link or not.

 

Invalid property

Invalid property

Users can select not removing them, and then recreate the erased object with the Property to edit, remove only the Property currently displayed, remove all Properties, or do not remove any Property.

Was this page useful?