OpenSCADAWiki: Home Page En/Doc/ Web Vision
 

The module <WebVision> of the subsystem "User Interfaces"

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

Contents

Introduction

WebVision module provides a mechanism of the final visualization of the visual control area (VCA) in the OpenSCADA system. The module is based on WEB technologies (XHTML, JavaScript, CSS, AJAX). In its work, the module uses the data from 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-productive 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 productivity 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 generic concept of the VCA is established. The result of this project — the direct visualization module (based on Web-technologies), direct visualization module Vision and VCA engine VCAEngine.

1. Purpose

This module of the direct visualization of the VCA serves only for the execution of interfaces of the VCA in the area of WEB-technologies!

User interface forms in WEB-browser, by reference to WEB-server and receiving from it XHTML-document over HTTP. In this case, the WEB-server — OpenSCADA system, which supports standard communication mechanisms of the TCP-networks (module Transport.Sockets), hypertext transfer protocol (module Protocol.HTTP), as well as encryption of traffic between the browser and the server (Transport.SSL). On this basis, to gain access to the user interface provided by this module, you need to configure the transport in the OpenSCADA (Transport.Sockets or Transport.SSL) in conjunction with the protocol HTTP (Protocol.HTTP). In the delivery of the OpenSCADA system there are configuration files containing settings of the Transport.Sockets for ports 10002 and 10004. Consequently, the interface of the module in the default configuration of the OpenSCADA will be available at URL: "http://localhost:10002" and "http://localhost:10004".

The final version of the VCA module, built on the basis of this module, will provide:

2. 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 (Fig.2). Before the connection request to the session the authentication of the user request is done. Then the module of direct visualization represents and manages the data of the session. The main window of the execution mode of this module has the form presented at Fig.3.

The interface of the execution window is fully dynamically built by the JavaScript script on the basis of the contents of the session of the project through direct XML requests to the server.

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

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 traffic 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 of the WEB-browser (Fig.3), as well as putting them inside of the container widgets.

The module supports multi-language which one enabled by the dynamic messages translation of OpenSCADA. The gotten language passes by the module Protocol.HTTP and detects in way and by order:

Authentication page. (11 Kb)
Fig.1.Authentication page.


Connection or the creation of a new session of the project's execution of the VCA. (23 Kb)
Fig.2. Connection or the creation of a new session of the project's execution of the VCA.


The main execution window. (115 Kb)
Fig.3. The main execution window.

3. Conception of basic elements (Primitives)

In this version of the module not all the primitives' images (and them views) 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 (equal to Slider).
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 several 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.

Lets examine the implementation of each primitive.

3.1. Elementary figure primitive (ElFigure)


Support of the elementary figures is implemented: lines, elliptical arcs, Bézier curves and fill of the enclosed space with the color and/or image with the properties:

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

A part of the screen with a frame containing the elementary figures. (7 Kb)


3.2. Text primitive (Text)


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

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

A part of the screen with the frame containing the text examples using various parameters. (10 Kb)


3.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: "Enabled" and "Active", as well as transfer of changes and events to the data model of the VCA (engine). For all realized representations the active mode is supported, ie elements can be used to create the forms of user input.

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

A part of the screen with the frame of elements of the form. (21 Kb)


3.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.

A part of the screen with the frame containing examples of viewing/playback of media data. (20 Kb)


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


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

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 WebVision. (11 Kb)


3.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.

A part of the screen with the frame containing an example of the protocol. (14 Kb)


3.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.

The frame containing a sample of the document. (48 Kb)


3.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:

4. The overall configuration of the module

To adjust the module overall behavior provide several parameters configuration through the management interface of the OpenSCADA (Fig. 11):

Configuration page of the module (72 Kb)
Fig.11. The configuration page of the module.

Conclusion

At this stage, the module may be used to build a real user interfaces that support core functions. However, some problems may arise due to the differences between browsers. For now it is guaranteed stable work on browsers: FireFox, Konqueror, Opera and Google Chromium.

Links

Referring pages: HomePageEn/Developers
HomePageEn/Doc
HomePageEn/Doc/HTTP
HomePageEn/Doc/QuickStart
HomePageEn/Doc/VCAEngine
HomePageEn/Doc/VCAconcept
HomePageEn/Doc/VCAconcept/part6
HomePageEn/Doc/VCAconcept/part6/part4
HomePageEn/Doc/Vision
HomePageEn/Function
HomePageEn/MaximLysenko
HomePageEn/Using/PLC/firmware
HomePageEn/Using/PLC/firmwareARM
HomePageEn/Using/SmartHouse