Using Libraries in Elipse E3: Lesson 5.

XControl and XObject

An XControl is a graphical object which usually displays information about variables on a server. An XObject is a server object which usually is linked to a screen object to display its values in a graphical format. When using an XControl and an XObject simultaneously, you expand the application flexibility.

XControl <-> XObject

As an example, let’s develop an XControl to the XObject EngineTag. The EngineTag is an XObject which was developed on the previous lesson to monitor the engine maintenance status, failure and speed. In case the engine is on failure, an alarm must be triggered.

Engine

Let’s develop an XControl which displays values from EngineTag in a graphical form.

Figure 1

  1. Insert a new XControl named Engine.
  2. Insert an engine image (there are some images on the Motors group of the Gallery). The engine must blink in red and yellow to symbolize a failure.
  3. To change the failure status, let’s use a ToggleButton.
  4. Insert a Rectangle on the engine drawing to indicate if it is turned on or off.
  5. Insert a Display to show the RPM value and a Text to show the engine name.
  6. In the Properties tab of the XControl, create a property named Source of type EngineTag.

Figure 2

  1. In the Design tab, create a Bidirectional Link from the Fail button to the Source.Fail property.

Figure 3

  1. Select the engine image and create a Digital Link to change its color. It blinks in yellow and red when on failure, and gray when working properly.

Figure 4

  1. Create a Simple Link in the Display, to show the RPM property of the EngineTag.

Figure 5

  1. Create a Simple Link in the Text with the Name property of the EngineTag.

Figure 6

  1. Save and register the Library.

To use the XControl, follow these steps:

  1. In the InitialScreen, insert an Engine object for each existing EngineTag on the Data folder.
  2. Link every Engine object inserted on the Screen, in the Source property, with one EngineTag of the Data folder.

Figure 7

  1. Execute the application and test its functionalities.

Exercises

  1. Create an XControl for the XObject MaintenanceTime.
  2. Create an XControl for the XObject ValveTag.
  3. Create an XObject for the XControl Speedometer with the following requisites:
  • Properties: Value, Minimum e Maximum.
  • Alarm: when its value is different from 70% of the maximum, with a dead band of five units.
  • Perform the modifications in the XControl Speedometer.
  1. Create an XObject for the XControl Bottle with the following configurations:
  • Property: Level.
  • Alarms: property Level less than 30 and greater than 70.
  • The level value must be generated internally in the XObject (Tag Demo).
  • Perform the modifications in the XControl Bottle.
  1. Create an XObject for the XControl Controller with the following configurations:
  • Properties: Variable, Setpoint and Alarm.
  • Alarms: when the Variable property is greater than SetPoint.
  1. Perform the modifications in the XControl Controller.

Attachments:

LibrariesCap5.zip

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *