From OpenSCADAWiki
Jump to: navigation, search
Other languages:
Constr.png Translation and actualizing
Module Name Version License Source Languages Platforms Type Author Description
WebVision Operation user interface (WEB) 2.2 GPL2 en,uk,ru,de x86,x86_64,ARM UI Roman Savochenko, Maxim Lysenko (2007-2012), Ksenia Yashina (2007-2008) Visual operation user interface, based on WEB - front-end to VCA engine.

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:

  • three levels of complexity in the formation of visualization interface which let organically to develop and apply the tools of the methodology from simple to complex:
  1. formation from the template frames through the appointment of the dynamics (without the graphical configuration);
  2. graphical formation of new frames through the use of already made visualization elements from the library (mimic panel);
  3. formation of new frames, template frames of the visualization elements in the libraries.
  • building of the visualization interfaces of various complexity, ranging from simple flat interfaces of the monitoring and finishing with the full-fledged hierarchical interface used in SCADA systems;
  • providing of the different ways of formation and configuration of the user interface, based on different graphical interfaces (Qt, Web, Java ...) and also through the standard management interface of OpenSCADA system;
  • change of dynamics in the process of execution;
  • building of the new template frames on the user level and the formation of the frames libraries, specialized for the area of application (eg the inclusion of frames of parameters, graphs and other items linking them to each other) in accordance with the theory of secondary using and accumulation;
  • building of the new user elements of the visualization and the formation of the libraries of frames,specialized for the area of application in accordance with the theory of secondary using and accumulation;
  • description of the logic of new template frames and user visualization elements as with the simple links, and also with the laconic, a full-fledged programming language;
  • the possibility of the inclusion of the functions(or frames of computing of the functions) of the object model of OpenSCADA to the user elements of the visualization, actually linking the presentation of the algorithm of computing (for example, by visualizing the library of models of devices of TP for following visual modeling TP);
  • separation of user interfaces and interfaces of visualization of data provides building the user interface in a single environment, and performance of it in many others (Qt, Web, Java ...);
  • the possibility to connect to the performing interface for monitoring and corrective actions (for example, while operator training and control in real time for his actions);
  • Visual building of various schemes with the superposition of the logical links and the subsequent centralized execution in the background (visual construction and performance of mathematical models, logic circuits, relay circuits and other proceedings);
  • providing of the the functions of the object API to the OpenSCADA system, it can be used to control the properties of the visualization interface from the user procedures;
  • building of the servers of frames, of elements of the visualization and of the project of the interfaces of the visualization with the possibility to serve the great number of the client connections;
  • simple organization of client stations in different basis (Qt, Web, Java ...) with the connection to the central server;
  • full mechanism of separation of privileges between the users which allows to create and execute projects with the various rights of access to its components;
  • adaptive formation of alarms and notifications, with the support of different ways of notification;
  • support of the user formation of the palettes and font preferences for the visualization of the interface;
  • support of the user formation of maps of the events under the various items of equipment management and user preferences;
  • support for user profiles, allowing to define various properties of the visualization interface (colors, font characteristics, the preferred maps of events);
  • flexible storage and distribution of libraries of widgets, frames, and projects of the visualization interfaces in the databases, supported by OpenSCADA; actually users need only to register the database with data.

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 Figure 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:

  • request at the model a list of opened pages, with a sign of page modification, and consistency checking of the actually opened pages to that list;
  • request of the branch of the modified pages;
  • update of the contents of the modified pages and their widgets, in accordance with the received modified data.

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:

  • URL's parameter "lang".
  • Authenticated user's language.
  • Web browser's preferred language from HTTP property "Accept-Language".
  • Generic language of the process of OpenSCADA.
Fig.1. Authentication page.
Fig.2. Connection or the creation of a new session of the project's execution of the VCA.
Fig.3. 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:

  • Arbitrary images forming from the three elementary figures and filling of closed areas by color or image.
  • There is possibility of determination of the figures' properties both in general and individual to each one: line width, color and style, line border's width and color, filling's color and image.
  • Arbitrary rotation of the generic figure about its center.
  • User's attributes support for dynamic points, widths, colors, styles and images.
  • Events forming by mouse manipulator doings into closed areas and in generic.

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

WebVision wvis run elfig.png

3.2 Text primitive (Text)

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

  • Font with the properties: type/class of the font, size, bold, italic, strikeout and underline.
  • Text color.
  • Text orientation.
  • Automatic word wrap.
  • Alignment of the text horizontally and vertically with all options..
  • Displaying the background as the color and/or image.
  • Display the border around the text, with the specified color, width and style.
  • Formation of the text from the attributes of different types and properties.

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

WebVision wvis run txt.png

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:

  • Line edit — It is represented by the following types: "Text", "Combo", "Integer", "Real", "Time", "Date", "Date and time". All kinds of line editor support the confirmation of entry.
  • Text edit — It is the flat-text editor with the confirmation or denial of entry.
  • Check box — Provides a field of binary flag.
  • Button — Provides the button with the support of: the color of the button, the image of the button, and mode of fixation.
  • Combo box — Provides the selection field of the element from the list of the items.
  • List — Provides the list box with the control of the current element.
  • Tree — Provides the tree element with possibility of an item selection.
  • Таблица — Provides the table element with possibility of a cell, a row or a column selection and a cell content edition.
  • Slider — Slider element.
  • Scroll bar — Strip of the scroll bar (Equal to Slider).

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.

WebVision wvis run formel.png

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:

  • The indication of the source of media data (images or video material).
  • View of the images of most well-known formats with the possibility of inscribing of it in the size of the widget.
  • Playback of the simple animated images and video formats with the possibility to control the playback speed.
  • Displaying of the the background as a color and/or image.
  • Display the border around the text, with the specified color, width and style.
  • Formation of the active areas and generating the events when they are activated.

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

WebVision wvis run media.png

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

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

  • General properties of the diagram types "Graph", "Spectrum" and "XY":
    • possibility for select an archivator, the archive's buffer or all the data at working with archiving data;
    • adapting the parameter's graph to real the data values in way the scales tune, at case the direct values range missing set;
    • controlling by axis ranges in way magnification/mitigation and shifting;
    • wide range scaling and adapting the time axis with automatic fitting the requested data to quality pretty for imaging, or needed for export — by set limited number measurements into pixel;
    • imaging dimensional grid and markers in horizontal and vertical with adapting to the imaging range;
    • tracing mode for current time by periodical update and switching the diagram time to current (time of last data into the archive buffer).
  • Properties of the diagram type "Graph":
    • constructing graphics up to 100 parameters into single diagram as percent scale with possibility to display self axis for selected parameters;
    • constructing graph for: current, archiving and users data;
    • forming intermediate displaying buffer for current only values;
    • support active mode with cursor and getting the values under the cursor;
    • possibility of construction graphics as into both linear, and logarithmic values scale.
  • Properties of the diagram type "Spectrum":
    • constructing graphics for frequency spectrum of the parameters up to 100 into single diagram as percent scale with possibility to display self axis for selected parameters;
    • constructing graph for: archiving and users data;
    • support active mode with cursor and getting the values under the cursor.
  • Properties of the diagram type "XY":
    • constructing XY graphics up to 50 parameters into single diagram as percent scale with possibility to display self axis for selected parameters;
    • constructing graph for: current, archiving and users data;
    • forming intermediate displaying buffer for current only values;
    • the parameters distributed by pairs at one graph, where paired by axis Y (0,2,4...) and unpaired by axis X (1,3,5...);
    • possibility of construction graphics as into both linear, and logarithmic values scale.

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

WebVision wvis run diag.png

3.6 Primitive of the protocol formation (Protocol)

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

  • Formation of the protocol from the archive of messages for the specified time and depth.
  • Request of the data from the messages archives.
  • Selection of data from the archives by the level of importance and the category of messages template.
  • Support the tracking mode for the appearance of messages in the archive of messages.

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

WebVision wvis run prot.png

3.7 Primitive of the report formation (Document)

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

  • Adaptive formation of a document structure based on Hypertext Markup Language. This provides support for the broad features of formatting of the documents.
  • Formation of the documents on command or on schedule. It is necessary for creation of reports into the archive and then view the archive.
  • Formation of a document in real time mode. It is necessary to form documents completely dynamically, and based on the archives for the specified time.
  • Using of the the attributes of the widget for transmission of values and addresses to the archives in the report. It allows you to use the widget of the document as a template when generating reports with other input data.

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.

WebVision wvis run doc.png

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:

  • Container — Allows you to form the desired objects by grouping in the limits of the primitive.
  • Page — Elements constructed on the basis of the primitive may serve as a page of user interface.
  • Container of pages — Property of substitution of its own contents by another page in the execution process. Used to create frames on the pages of user interface. For example, the main page of traditional SCADA system with alarm objects is constructed in this way.
  • Background — Supports ability to specify the background as color or image.
  • Border — Supports the displaying of the border, with the specified color, width and style.

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):

  • The lifetime of the authentication session.
  • Limit to overall sessions.
  • Compression level for generated PNG-images. Mostly optimal level is 1, as uncompressed files are too big and more compression levels consumes more CPU.
Fig.11. Configuration page of the module.

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