Using Libraries in Elipse E3: Lesson 6.

Indexed Screen

The Indexed Screen is a screen which can receive and send information to several devices individually. When opened, the screen receives an information about the name of the object to be linked, and then automatically creates the link.

For example, on a screen there are three engines. When clicking any of them, a screen with detailed information must be opened.

Figure 1

The screen with detailed information about the engine is always the same, what changes is the variables where information comes from.

Developing an indexed screen

XObject

The first step is having all information to pass to the indexed screen in a single place. The best way to do this is creating an XObject.

Let’s use as an example the XObject EngineTag created in previous chapters. The EngineTag monitors the maintenance status, failure, and the engine speed using three properties: fail, maintenance, and RPM.

XControl

The second step is having an XControl which can access all XObject properties which you want to monitor.

Let’s use as an example the XControl Engine created in previous chapters. This XControl displays the name of the engine using a text, the RPM using a Display, its color blinks in yellow and red in case it is on failure, and a rectangle switches between red and green to symbolize the on or off status.

Using a button, you can change the failure status, and clicking the engine image you can turn it on or off. To link the XControl to the XObject, it was created a property named Source of the same type of the XObject.

Creating an Indexed Screen

The next step is to create the indexed screen. Usually, this screen is windowed and modal. Thus, you must close it to return to the previous screen.

Create a screen with the size you want and insert an XControl to exchange information with the XObject.

Figure 2

This XControl must point to some XObject inserted in your application. This link is performed only when the screen opens. When this happens, the screen must receive the name of the XObject to be linked through the Arg parameter.

To do so, create in the OnPreShow event of the screen the script which links the XControl property (for example, Source) to the Arg parameter of the screen.

Sub EngineScreen_OnPreShow(Arg)
  'Links to one of the engines
  Item("Engine1").Source = Arg
End Sub

Opening the Indexed Screen

Now, you must configure it so that when clicking the engine image on the screen, the operator answers if he wants to open the indexed screen, and then define the engine name as the parameter to be controlled.

 

Figure 3

Exercises

  1. Create an indexed screen for the Object ValveTag.
  2. Create an indexed screen for the Speedometer.

Attachments:

LibrariesCap6.zip

Este artigo foi útil? Was this post helpful?
Yes0
No0

Deixe seu Comentário

Seu endereço de e-mail não será publicado. Campos marcados com asterisco são obrigatórios *