Getting References to Objects

<< Click to Display Table of Contents >>

 

Getting References to Objects

One of the most important features to consider when working with scripts in E3 is the separation between processes executed in a server and those executed in a client's interface (E3 Viewer). To work with scripts, users can manipulate:

Server objects via server

Server objects via E3 Viewer

Viewer objects via the same E3 Viewer

 

However, users cannot directly manipulate:

Viewer objects via server, because this is only possible by creating events in a Viewer, which are connected to variables in a server

Viewer objects via another Viewer, because this is only possible by creating events connected to variables in a server

 

Such limitations come from the fact that, by definition, there is an independence between what an E3 Viewer's station is performing or viewing and the server, and vice versa. So, all activities, both in a server and in E3 Viewer, need to be coordinated either in an asynchronous way or through events, to operate harmoniously.

Thus, due to this independence, when creating a script, first users must obtain a correct reference to the objects they want to manipulate, that is, an object must be first found on several E3 modules.

Remember that when users edit a script, they can use AppBrowser, which allows the path of a method or property to be completely copied to the script, thus helping the creation of scripts.

Therefore, to access external objects being manipulated in a script, some basic guidelines are used. For example, if users want to manipulate the value of an I/O Tag, the path is Server - Driver - Folder (if available) - Tag. But if their goal is to manipulate a button on a Screen, the path is Viewer - Frame (if available) - Screen - Button.

The source locations for scripts, according to the methodology for accessing objects, are the following:

Server

Screens and Frames (E3 Viewer)

ElipseX (libraries): they can be XFolders, XObjects (executing on a server), or XControls (executing on an E3 Viewer)

Was this page useful?