OpenSCADAWiki: Home Page En/Doc/ Vision ...

Home | Index | Changes | Comments | Users | Registration | Login  Password:  
 
This is an old revision of HomePageEn/Doc/Vision from 2017-08-22 09:48:20..
Ukrainian (1 Kb) Óêðà¿íñüêà?
Russian (1 Kb) Ðîññèéñêèé

Module "Vision" of the subsystem "User Interfaces"

Module: Vision
Name: Operation user interface (Qt)
Type: User interfaces
Source: ui_Vision.so
Version: 4.5
Author: Roman Savochenko, Maxim Lysenko (2007-2012), Ksenia Yashina (2007-2008)
Description: Visual operation user interface, based on Qt library - front-end to VCA engine.
License: GPL

Contents

Introduction

Vision module provides a mechanism of the final visualization control area (VCA) into the OpenSCADA. The module is based on the multi-platform library of graphical user interface (GUI) of firm TrollTech — Qt (http://www.trolltech.com/qt ). In its work, the module uses the data of the VCA engine (module VCAEngine).


Visual control area (VCA) is an integral part of the SCADA system. It applies to the client stations with a view to providing accessible information about the object and to for the the issuance of the control actions to the object. In various practical situations and conditions the VCA, based on different principles of visualization may by applied. For example, this may be the library of widgets Qt, GTK+, ~ wxWidgets or hypertext mechanisms based technologies HTML, XHTML, XML, CSS, and JavaScript, or third-party applications of visualization, realized in various programming languages Java, Python, etc. Any of these principles has its advantages and disadvantages, the combination of which could become an insurmountable obstacle to the use of VCA in a practical case. For example, technologies like the Qt library can create highly-reactive VCA, which will undoubtedly important for the operator station for control of technological processes (TP). However, the need for installation of that client software in some cases may make using of it impossible. On the other hand, Web-technology does not require installation on client systems and is extremely multi-platform (it is enough to create a link to the Web-server at any Web-browser) that is most important for various engineering and administrative stations, but the responsiveness and reliability of such interfaces is lower that actually eliminates the using of them at the operator of the TP stations.


OpenSCADA system has extremely flexible architecture that allows you to create external interfaces, including user and in any manner and for any taste. For example, the system configuration OpenSCADA as now available as by means of the Qt library, and also the Web-based.


At the same time creation of an independent implementation of the VCA in different basis may cause the inability to use the configuration of one VCA into another one. That is inconvenient and limited from the user side, as well as costly in terms of implementation and follow-up support. In order to avoid these problems, as well as to create as soon as possible the full spectrum of different types of VCA ïðîåêò ñîçäàíèÿ êîíöåïöèè ÑÂÓ? is established. The result of this project — the direct visualization module (based on the library Qt), direct visualization module WebVision and VCA engine VCAEngine.

1. Purpose

This module of the direct visualization of the VCA is designed for the formation and execution of VCA interfaces among the graphic library Qt. The VCA module provide:

2. Tool of the graphical formation of the VCA interface

Development of the VCA interface is performed in a single window, realizing many documents interface (MDI) interface (Fig. 2.a). This approach allows you to simultaneously open multiple frames of various sizes. The following mechanisms for managing the development are used: toolbars, menus and context menus. Most actions are duplicated by different mechanisms, that allows you to quickly find the tool by the preferred method. Navigational interfaces are implemented by the attached windows. Configuration if the toolbars and attached windows is saved on exit and restored at startup that lets you to customize the interface for yourself.


Developing window of the VCA interfaces (140 Kb)
Fig.2.a. The window of the VCA interface development.

Access to major components of the VCA is made by attached windows, in the Figure 2.a these windows are shown on the left side. These windows contain:


In the main space of the working window the pages of projects, frames of the widgets' libraries, user elements and elements of primitives at the time of their visual editing are placed.


At the top of the working window there is the menu. All the tools needed for development the VCA interfaces are placed in the menu. Menu has the following structure:


Above, under menu, or on the sides, there are the toolbars. Toolbars can be hidden or located, which is controlled in the menu item "View". The following toolbars are present:


At the bottom of the development window of the VCA there is the status line. On the right side of the status line there are indicators of the visual scale of the edited frame, of the mode of changing of the size of the elements, of the mode of the current page of the of the VCA engine station and the user on whose behalf the development of the VCA interface is done. By double-clicking on the indicator of the user it can be changed the current user, enter the new username and password. In the main field of the status line it is displayed various information and assistance messages.


To edit the properties of the visual elements there are two dialogues. The first dialogue allows you to edit the properties of containers of visual elements (widget libraries and projects), figure 2.b. The second dialogue serves to edit the properties of the visual elements, Fig. 2.d. Changes, made in the dialogues, at once, get to the VCA engine. To save these changes to the database or restore from the database it is necessary to use the appropriate tools of the main development window.


Dialogue of the editing the properties of the containers of visual elements. (42 Kb)
Fig.2.b. Dialogue of the editing the properties of the containers of visual elements.

With the help of the main tab of that dialog you can set:


The tab "Diagnostics" of the projects. (57 Kb)
Fig.2.c. The tab "Diagnostics" of the projects.

From this tab you can select time, or refresh to current, and size for diagnostic messages obtain.


Dialogue of the properties editing of the visual elements (31 Kb)
Fig.2.d. Dialogue of editing the properties of visual elements.

With the help of the main tab of that dialog you can set:


Dialogue of editing the properties of the containers of visual elements contains two tabs: configuration tab of the the main parameters (Fig.2.b) and the configuration tab of the mime-data of the container (Fig. 2.e).


Editing tab of the data of the container of the visual elements (38 Kb)
Fig.2.e. Editing tab of the mime-data of the container of visual elements.

Dialogue of the editing the properties of the visual elements contains four tabs: configuration tab of the main parameters (Fig.2.b), the tab of attributes of the element (Fig. 2.f), the tab of the processing of the element (Fig. 2.g) and the tab of links of the elements (Fig.2.h). At different levels of the hierarchy of visual elements any tabs can be available, but some are not.


Attributes of the editing dialogue of the properties of the visual element tab. (44 Kb)
Fig.2.f. Attributes of the editing dialogue of the properties of the visual element tab.

Processing tab of the dialogue of the editing the properties of the visual element. (62 Kb)
Fig.2.g. Processing tab of the dialogue of the editing the properties of the visual element.

Links tab of the dialogue of changing properties of the visual element (58 Kb)
Fig.2.g. Tab of links of the editing dialog of the properties of visual element.

2.1. Styles


It is known that people can have individual characteristics in the perception of graphical information. If these features are not taken into account it is possible to get the rejection and exclusion of the user to the VC interface. Such rejection and exclusion can lead to fatal errors in the management of TP, as well as traumatize the human by the permanent working with the such interface. In SCADA systems it is accepted the agreement, which regulate the requirements for establishing a unified VC interface which is normally perceived by most of people. The people with some deviations are not taken into account.


To take this into account, and provide the ability to centrally and easily change the visual properties of the interface, the project provides the implementation of visualization interface styles manager.


User can create many styles, each of which will hold the color, font and other properties of the elements of the frame. A simple change of style will quickly transform the VC interface, and the possibility of appointing an individual style to the user will take into account his individual characteristics.


To realize this opportunity, when you create a frame, it is necessary for the properties of color, font and others set the «Config» ( of the table if the «process» tab) in the value of «From style». And in the parameter «Config template» to specify the identifier of the style field. Further, this field will automatically appear in the Style Manager and will be there to change. Style Manager is available on the project configuration page in the tab «Styles» (Figure next). On this tab you can create new styles, delete old ones, change the field of the style and delete unnecessary.


Tab "Styles" of the configuration page of the project (19 Kb)

In general the styles are available from the project level. At the level of libraries of widgets you can only define styles fields of widgets. At the project level, at the choice of style it is started the work with styles, which includes access to the fields of styles instead of direct attribute values. In fact, this means that when reading or writing a widget attribute these operations will be carried out with the corresponding field of the chosen style.


When you run the project execution it will be used the set in the project style. Subsequently, the user can select a style from the list of available ones. The user's style will be saved and used next time you run the project.

2.2. Linkage with the dynamics

To provide relevant data in the visualization interface the data of subsystems "Data acquisition (DAQ)" must be used. The nature of these data as follows:

  1. parameters that contain some number of attributes;
  2. attributes of the parameter can provide information of four types: Boolean, Integer, Real and String;
  3. attributes of the parameter can have their history (archive);
  4. attributes of the parameter can be set to read, write, and with full access.

Considering the first paragraph it is necessary to allow the possibility of the group of destination links. To do this we use the conception of of the logic level.


In accordance with paragraph 2, links provide transparent conversion of connection types and do not require special configuration.


To satisfy the opportunities for access to archives, in accordance with paragraph 3, links make check of the type of the attribute, and in the case of connection to the "Address", the address of linkage is put into the value.


In terms of the VCA, the dynamic links and configuration of the dynamics are the one process, to describe a configuration of which the tab "Processing" of the widgets is provided (Fig.2.f). The tab contains a table of configuration of the properties of the attributes of the widget and the text of calculation procedure of the widget.


In addition to configuration fields of the attributes the column "Processing" in the table is provided, for selective using of the attributes of the widgets in the computational procedure of the widget, and the columns "Configuration" and "Configuration template", to describe the configuration of links.


The column "Configuration" allows you to specify the linkage type for the attribute of the widget:


The column "Configuration template" makes it possible to describe the groups of dynamic attributes. For example, it may be different types of parameters of subsystem "DAQ" and other widgets of the interface. Furthermore, in the case of correct formation of this field, the mechanism of automatically assign of the attributes with the only indication of the parameter of subsystem "DAQ" or the widget is working, which simplifies and accelerates the configuration process. The value of this column has the following format:


Installation of the links may be of several types, which are determined by the prefix:


Processing of the links occurs at a frequency of calculating the widget in the following order:


Fig. 2.g presents the tab with the possibility of group and individual assignment of attributes.


When the widget that contains the configuration of links is placed to the container of widgets, all links of the source widget is added to the list of resulting links of the widgets' container.


The above shows that the links are set by the user in the configuration interface. However, for the possibility of creation of the frames for general use, with the function of providing detailed data of various sources of the same type, a dynamic linkage mechanism is necessary. Such mechanism is provided through a reserved key identifier "<page>" of the group of attributes of links in the frames of general purpose and dynamic linkage with the identifier "<page>" in the process of opening of the frame of general purpose by means of the signal from another widget.


Lets examine the example when we have the frame of general-purpose "Control panel of graph" and a lot of "Graphs" in different tabs. "Control panel of graph" has links with the templates:


At the same time, each widget "Graph" has the attributes tSek, tSize, trcPer and valArch. In the case of a calling of the opening signal of "Control panel of graph" from any widget "Graph" it is happening the linkage of the attributes of the "Control panel of graph" in accordance with the attribute specified in the template with the attribute of the widget "Graph". As a result, all changes in the "Control panel of graph" will be displayed on the graph by means of the link.


In the case of presence of external links to the parameters of subsystem "Data acquisition" in the widget "Graph", the links of "Control panel of graph" will be set on an external source. In addition, if in the "Control panel of graph" will be declared the links to the missing attributes directly in the widget "Graph", it will be made the search for the availability of such attributes from the external source, the first to which the link is directed, performing, thus, the addition of missing links.


To visualize this mechanism the table is cited.


Table. The mechanism of the dynamic linkage.

Attributes of the "Control panel of graph" (the template of dynamic linkage) "Graph" attributes Attributes of an external "Parameter" The resulting link or an value of the linking attribute
tSek (<page>|tSek) tSek - "Graph".tSek
tSize (<page>|tSize) tSize - "Graph".tSize
trcPer (<page>|trcPer) trcPer - "Graph".trcPer
valArch (<page>|valArch) valArch - "Graph".valArch
var (<page>|var) var var "Parameter".var
ed (<page>|ed) - ed "Parameter".ed
max (<page>|max) - - EVAL
min (<page>|min) - - EVAL

3. Execution of the VCA interfaces

Execution of the VCA interface is to run a new project session or connect to the existing one on the level of VCA engine. Then the module of direct visualization represents and manages the data of the session. The main window mode of execution mode of this module has the form presented at Fig.3.


Update of the contents of the open pages of the visualization interface with the frequency of the project session execution. In the updating process it is performed:


At the closure of "RunTime" window closing of the session of the project is done in the VCA engine.


The mechanism of the request of the only modified data is based on an absolute counter of the session execution. If you want to make real changes in the attributes of widgets the memorizing of the value of this counter is done, which allows the identification of modified attributes. This approach can increase productivity and reduce the load on network sharing in the case of access to the VCA engine via network.


Hierarchically the module provides an opportunity to accommodate the project pages in the main execution window (Fig.3), as well as putting them inside of the container widgets, as well as by the opening of additional windows over the main.


When you expand the main execution window, or when moving to the full-screen mode the scaling of the page content of the VCA interface is done, filling the entire space of the window and allowing to execute the projects, developed on one screen resolution, at different resolutions.


The main window consists of menu (top) status line (bottom), and the executable contents of the session between them. Menu in the execution mode is positioned as the OpenSCADA administrator tool, containing the self-system functions and it is available only to privileged users, occupying the group "root". Menu has the following structure:


On the right side of the status line the indicators of the time, the current VCA engine station and users on whose behalf the VCA interface is executed, as well as the panel with the alarm quittance buttons, print and export. By double-clicking on the indicator of the user it can be changed by the typing of the new username and password, and by clicking on the quittance button — to quit alarms completely or only the desired notification. In the main field of the status line various messages and assistance messages are displayed.


The main window if the execution mode. (107 Kb)
Fig.3. The main window if the execution mode.

4. Conception of basic elements (primitives)

In this version of that module not all the primitives' images of this project are implemented. In general the project provides the following primitives:

Id Name Function
ElFigure Elementary graphic figures

Primitive is the basis for drawing basic graphic shapes with their possible combinations in a single object. The support of the following basic figures is provided:

  • Line.
  • Arc.
  • Bézier curve.
  • Fill of the enclosed space.

For all the figures contained in the widget it is set the common properties of thickness, color, etc., but this does not exclude the possibility of indicating the above attributes for each figure separately.

FormEl Elements of the form

Includes support for standard form components:

  • Line edit.
  • Text edit.
  • Check box.
  • Button.
  • Combo box.
  • List.
  • Tree.
  • Table.
  • Slider.
  • Scroll bar.
Text Text Text element (labels). Characterized by the type of font, color, orientation and alignment.
Media Media Element of visualization of raster and vector images of various formats, playback of animated images, audio segments and video fragments.
Diagram Diagram Element of the diagram with the support of the visualization of the flow of several trends, the spectrum, XY diagrams of real-time data, ... .
Protocol Protocol Element of the protocol, visualizer of the system messages, with support for multiple operating modes.
Document Document The element of generating the reports, journals and other documentation on the basis of available in the system data.
Box Container Contains the mechanism for other widgets placement-including with the purpose of creation of new, more complex, widgets and pages of end visualization.
Function, in plane Function of API of the object model of OpenSCADA Not visual, on the side of execution, widget which allows to include a computing function of the object model of OpenSCADA in the VCA.

The module of visualizer provides and uses set of specific attributes of the generic means, its information are into next table. Theses attributes create by the visualizer, on its lack, at a first start.

Id (space) Name Appointment
statLine (main page) Status line items

Text field with description of the status line item in form "{Id}:{Label}:{ToolTip}:{Color}:{Img}", where:

  • "Id" — identifier, uses also for form events from the widget "stIt_{Id}".
  • "Label" — visual label of the status element.
  • "ToolTip" — context help about the element.
  • "Color" — label color.
  • "Img" — image of the status element, instead the label.
runWin (main page) Run window

Main window execution mode setting:

  • "Original size (0)".
  • "Maximize (1)".
  • "Full screen (2)".
keepAspectRatio (main page) Keep aspect ratio on scale Pages aspect ration save at the scaling.
stBarNoShow (main page) No show status bar Main window status line hide.
winPosCntrSave (main page) Windows position control and save Enabling of the windows position control and save.

Lets examine the implementation of each primitive.

4.1. Elementary figure primitive (ElFigure)


Support of the following elementary figures is provided: lines, elliptical arcs, Bézier curves and fill of the closed circuit with the color and/or image. For the elementary figures the following operations are provided:

Figure shows a part of the screen with a frame containing the elementary figures.


Realization of the basic elementary figures in Vision (10 Kb)

The figures underlying this widget, containing the points (the start and end ones) that can be connected with the according points of other figures; and the points with the help of which the geometry of the figure can be changed.


It is possible to add the figure using the mouse:

  1. Select the desired figure from the context menu.
  2. Set with the left mouse-button start and end points (for line with the SHIFT key hold its orthogonal drawing is made).

The deleting of the figure(s) it is possible by pressing "Del", having selected figure(s).


The copying of the figure(s) it is possible by pressing keys "Ctrl"+"C", having selected figure(s).


Moving/resizing of the figure it is possible by using the mouse or keyboard:

  1. Select the figure, by clicking on it with the left mouse button.
  2. Drag (with the help of mouse or control keys) the figure or one of its control points in the desired location and release the mouse button (key).

It is possible to move several figures, selected by means of holding "Ctrl" and clicking on the desired figures (this option works when the button Connections (Connections) is disabled) or by mouse selection.


The connection of the figures with each other it is possible by the following way:

  1. Press the Connections button.
  2. Select one of the figures and move its start or end point to the desired start or end point of the other figure so that it will get to the appeared circle, release the left mouse button. Connected figures are moving as well as the individual, the general point is moved for all connected figures, to which it refers(priority is given to the arc, two arcs can't be connected directly with each other ).

To fill the closed circuit from the figures it is possible with the following way:

  1. Press the Connections button.
  2. Create the closed circuit.
  3. Make the double-click of the left mouse button inside of it.

To delete the fill of the closed circuit it is possible from the context menu of the widget; by braking the closed circuit or by double-click of the left mouse button on the already existing filled space.


Rotation of the figure is made around the center of the widget.

4.2. Text primitive (Text)


Support of the text element with the following properties is provided:


Figure 4.2 represents a part of the screen with the frame containing the text examples using various parameters.


Realization of the text elements in the Vision (10 Kb)

4.3. Primitive of the form element (FormEl)


Support of the form elements on the VCA frames is provided. The following form elements are included:


The following modes are realized: «Enable» and «Active», as well as transfer of changes and events to the data model of the VCA (engine).


Figure represents a part of the screen with the frame containing the above-listed elements of the form.


Realization of the form elements in the Vision (18 Kb)

4.4. Primitive of the displaying the media materials (Media)


Support of the element of the displaying of media materials with the following properties is provided:


Figure represents a part of the screen with the frame containing examples of viewing/playback of media data.


Realization of the media elements in the Vision (17 Kb)

4.5. Primitive of the construction of diagrams/graphs (Diagram)


The diagrams construction element releases for types "Graph", "Spectrum" and "XY" with properties:


The module of visualizer provides and uses set of specific attributes of the generic means, its information are into next table. Theses attributes create by the visualizer, on its lack, at a first start.

Id Name Appointment
sclWin Scaling of a window selected part, by the mouse. It is logical type attribute created by the user manually at needs. The "true" value enables the scaling of a window selected part, by the mouse.

Figure represents a part of the screen with the frame containing examples of the diagrams: "Graph", "Spectrum" and "XY".


Realization of the basic element of a diagram-trend displaying in the Vision. (10 Kb)

4.6. Primitive of the protocol formation (Protocol)


Support of the element of the formation of the protocol with the following properties is provided:


Figure represents a part of the screen with the frame containing an example of the protocol.


Realization of the basic element of visualization of the protocol in Vision (34 Kb)

4.7. Primitive of the report formation (Document)


Support element of the report formation with the following properties is provided:


The basis of any document is XHTML-template. XHTML-template is the tag "body" of the WEB-page which contains the document's static in the standard XHTML 1.0 and elements of the executable instructions in one of the languages of the user programming of OpenSCADA in the form of <?dp {procedure} ?>. The resulting document is formed by the execution of procedures and insert of their result into the document.


The source for values of the executable instructions are the attributes of the widget of the primitive, as well as all the mechanisms of the user programming language. Attributes may be added by the user and they can be linked to the actual attributes or parameters or they can be autonomous, values of which will be formed in the script of the widget. In the case of linked attributes the values can be extracted from the history, archive.


Figure shows the frame containing a sample of the document.


Realization of the document element in the Vision (59 Kb)

4.8. Primitive of the box container (Box)


Support of the primitive of the container concurrently serves as the project pages is provided. This primitive is the only element-container, which may include links to frames from the library, thereby creating the user elements of desired configuration. Primitive implements the provided by the project properties. The properties of this primitive are:


Example of editing of the frame, based on the primitive, is shown in Fig. 2.a, and Fig. 3 shows a page containing the container of the pages, built on the basis of the primitive.


Action source page doesn't exist yet(/Home Page En / Doc / Vision / El Figure?)

6. The overall configuration of the module

To adjust your own behavior in not obvious situations the module provides the ability to customize individual settings through the management interface of the OpenSCADA (Fig. 6). These settings are:

 (2 Kb) The display selection function possible for non virtual and non repeating desktop, i.e. with using Xinerma or NVidia into proper modes. Technical the function Qt screen() must return different display's widgets to it's number.

The configuration page of the module. (101 Kb)
Fig.6. The configuration page of the module.

 
There are no files on this page.[Display files/form]
There is no comment on this page. [Display comments/form]