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 Elipse Power is the separation between processes executed in a server and those executed in a client's interface (Elipse Power Viewer). To work with scripts, users can manipulate:

Server objects via server

Server objects via Elipse Power Viewer

Viewer objects via the same Elipse Power 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 Elipse Power Viewer's station is performing or viewing and the server, and vice versa. So, all activities, both in a server and in Elipse Power 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 Elipse Power 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 (Elipse Power Viewer)

ElipseX (libraries): they can be XFolders, XObjects, which execute on a server, or XControls, which execute on an Elipse Power Viewer

Was this page useful?