Module | Name | Version | License | Source | Languages | Platforms | Type | Author |
---|---|---|---|---|---|---|---|---|
WebVision | Operation user interface (WEB) | 6.11 | GPL2 | ui_WebVision.so | en,uk,ru,de | x86,x86_64,ARM | UI | Roman Savochenko Maxim Lysenko (2007-2012), Ksenia Yashina (2007-2008) |
Description | ||||||||
Visual operation user interface, based on the WEB — front-end to the VCA engine.
|
The module provides in OpenSCADA a mechanism of the final visualization of the visual control area (VCA). 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 control 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 on the 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 the 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 stations of TP.
OpenSCADA has extremely flexible architecture that allows you to create external interfaces, including user, in any manner and taste. For example, the OpenSCADA configuration environment available now as by means of the Qt-library, and also the Web-based.
At the same time, independent creation of the VCA implementations in different basis may cause the inability to use the configuration of one VCA in 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, the generic concept of VCA is established. The result of this project — this direct visualization module (based on the Web-technologies), direct visualization module Vision and the VCA engine VCAEngine.
This module of the direct visualization of the VCA serves only for the execution of the VCA interfaces in the area of WEB-technologies!
The user interface forms in WEB-browser, by reference to the WEB-server and receiving from it XHTML-document over HTTP. In this case, the WEB-server — OpenSCADA, which supports standard communication mechanisms of the TCP-networks (module Transport.Sockets), hypertext transfer protocol (module Protocol.HTTP), as well as encryption of the traffic between the browser and the server (Transport.SSL). Therefore, in order to access the user interface provided by this module, OpenSCADA must configure transport (Transport.Sockets or Transport.SSL) in conjunction with the HTTP protocol (Protocol.HTTP). OpenSCADA comes with configuration files that contain the Transport.Sockets configuration for port 10002. Consequently, the module interface, in the default, will be available at URL: "http://localhost:10002".
The final version of this VCA module, built on the basis of this module, will provide:
Execution of the VCA interface is to run a new project session, or connect to the existing one, on the level of the VCA engine (Fig.2). Before the connection request to the session the user authentication request (Fig.1) is done. Then the module of direct visualization displays and controls the data of the session. The main window of the execution mode of this module has the form presented at Figure 3. The administrator users ("root" or in the group "root") can close the opened sessions.
The interface of the execution window is built fully dynamically by the JavaScript script on the basis of the contents of the project session through direct XML requests to the server.
Update of the contents of the open pages of the visual interface with periodicity of the project session is implemented. During the upgrade process:
The mechanism of the request for only modified data is based on the absolute counter of the session execution. When you make real changes in the attributes of widgets the remembering of the value of this counter is made, which allows us to identify the modified attributes. This approach allows to increase productivity and reduce the load on the traffic in case of access to the model through the network.
Hierarchically, the module assumes the possibility of placing pages of the project as in the main window of execution (Fig. 3), and by placing inside the container widgets, as well as by opening additional windows over the main one.
Located in the status bar:
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 the order:
This version of the module does not implement all the shapes of the primitives laid by the project. In general, the project provides the following primitives:
Identifier | Name | Function |
---|---|---|
ElFigure | Elementary graphical figure |
The primitive is the basis for drawing elementary graphical shapes with their possible combinations in a single object. The support of the following elementary figures is provided:
For all the figures, contained in the widget, set the common properties of thickness, color, etc., provides the possibility to specify the above-mentioned attributes for each figure separately and their dynamization. |
FormEl | Element of the form |
Includes support for the standard form components:
|
Text | Text | Text element-label. Characterized by the font type, color, orientation and alignment. Support for arguments is provided. |
Media | Media | Element of the visualization of raster and vector images of various formats, playback of the animated images, playback of the audio fragments and view of the video fragments. |
Diagram | Diagram | Element of the diagram with the support of the visualization in the real-time for the flow of several: trends (time charts), spectrum, XY diagrams. |
Protocol | Protocol | Element of the protocol — visualizer of the program messages, with support of the multiple operating modes. |
Document | Document | Element of the generating reports, journals and other documentation on the basis of available data. |
Box | Container | Contains the mechanism for other widgets placement-including with the purpose of creation of new, more complex, widgets and pages of the end visualization. |
Function, in plane | Function of API of the object model of OpenSCADA | Not visual widget, on the runtime side, which allows to include a computing function of the object model of OpenSCADA in the VCA. |
The visualizer module provides and uses set of specific attributes of the generic means, the information of which is given in the table. These attributes are automatically created by the visualizer in their absence and during the first run, or created by the user in the frame of the specified area, as needed.
Identifier (area) | Name | Appointment |
---|---|---|
keepAspectRatio (main page) | Keep aspect ratio on scale | Keep aspect ratio of the pages on scale. |
stBarNoShow (main page) | Do not show the status bar | Hide the status bar of the main window. |
notify{N}, notifyVisWebVision{N} (page) | Notification: type {N} | Create manually with the type "Text"!
Specifies a notifier and a procedure of the notification resource obtaining according to the "Signalling (Alarms)" conception. |
statLine (main page) | Status line items | Create manually with the type "Text"!
Text field with description of the status line item in the string form "{Id}:{Label}:{ToolTip}:{Color}:{Img}", where:
|
userSetVis (main page) | Setting the user | Create manually with the type "String"!
Change the user or call a dialog to select it. Variants of the value:
if((SYS.time()-this.ownerSess().userActTm()) < 60)userSetVis = "";
else if(this.ownerSess().reqUser() != "user") userSetVis = "user";
|
prjDoc (main page) | Project document | Create manually with the type "String"!
Specifying the project documentation of call from the status line's button with a possibility of disabling-concealing the button at empty value. The documentation specified in view "{OffLine}|{OnLineOpenSCADAWiki}", for example for the AGLCS project — "AGLCS|Using/Model_AGLKS". The online part is used in first order at its specifying! |
vs_goHttpUrl (view "Button" of the primitive "FormEl") | Go to the HTTP URL | Create manually with the type "String"!
Go to the specified URL at the button press. |
vs_background (views "Line edit", "Text edit", "Combo box", "List", "Tree", "Table" of the primitive "FormEl") | Custom background | Create manually with the type "String"!
Specifies for the custom background in the form {color}-{transp} {image}. |
vs_border (views "Line edit", "Text edit", "Combo box", "List", "Tree", "Table" of the primitive "FormEl") | Custom border | Create manually with the type "String"!
Specifies for the custom border in the standard CSS-form {wdth}px {style} {color}. |
vs_winTitle (the view "Box") | Window title | Create manually with the type "String"!
Dynamic window title value. |
Consider the implementation of each primitive in more detail.
Support of the elementary figures is implemented: lines, elliptical arcs, Bézier curves and fill of the enclosed space with the color and image with the properties:
Figure shows a part of the screen with a frame containing the elementary figures.
Support of the text element with the following properties is implemented:
Figure represents a part of the screen with the frame containing the text examples using various parameters.
Provides support for the form elements on the VCA frames with the planed properties, including the types:
The "Enabled" and "Active" modes are implemented, as well as the transfer of changes and events to the data model of the VCA — engine. The mode "Active" cause to the activity cursor set for not empty background and the addition conditions of the different views "Text", "Media" and "Box":
Figure represents a part of the screen with the frame containing the above-listed elements of the form.
Support of the element of the displaying of the media-materials with the following properties is provided:
Figure represents a part of the screen with the frame containing examples of reviewing/playback of the media-data.
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".
Provides for support of the element of the protocol formation with the following properties:
Figure represents a part of the screen with the frame containing an example of the protocol.
Provides for support element of the report formation with the following properties:
The basis of any document is the XHTML template. The 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 the user programming language of OpenSCADA in the view <?dp {procedure} ?>. The resulting document is formed by the procedures execution and insertion of their result into the document.
The source for values of the executable instructions are the widget attributes of the primitive, as well as all the mechanisms of the user programming language OpenSCADA. 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 widget procedure. In the case of linked attributes the values can be extracted from the archive-history.
Figure represents the frame, containing a sample of the document.
Provides for support of the container primitive, which, in combination, plays the role of project pages. This primitive is the only container-element, which can itself include links to frames from the library, thus forming the user elements of the desired configuration. The primitive implements the properties provided by the project. Let's list, in points, the properties of this primitive:
To configure and control this module, you have the configuration page of the OpenSCADA control interface (Fig.4):
You can deeply customise main interface of the module overriding and adding the HTML and JavaScript code by placing to folder of your OpenSCADA project files WebVisionVCA.html and WebVisionVCA.js which initially you can obtain from the module source code — UI.WebVision.
31.07.2019
GROUNDS: The Web-sessions may create many objects servicing the VCA-session for generating images, processing documents and performing other background functions of the end user Web-interface. Moreover, in difference to Vision, the VCA-sessions may be created, closed and recreated again multiple times for different users and remote hosts. In the time the memory heap is affected by the memory fragmentation, so the program consumes more memory than at the start. The table below represents the phenomenon for different environments and the first page of the DemoDB (AGLKS) project reopening:
Environment | Initially, MB | Iter. 1, MB | Iter. 2, MB | Iter. 3, MB | Iter. 4, MB | Iter. 5, MB | Resume | |
---|---|---|---|---|---|---|---|---|
Complete creation the Web- and VCA-sessions | ||||||||
Debian 10 amd64, GLibC 2.28, GCC 8.3.0 + MALLOC_ARENA_MAX=2 | 181 | 189 | 190 | 195 | 195 | 194 | Satiated on the iteration 3, base consumption 8 MB, extra consumption 5 MB (62.5 %), liboscada.so 3.5 MB, ui_WebVision.so 0.75 MB | |
Debian 10 amd64, GLibC 2.28, GCC 8.3.0 + MALLOC_ARENA_MAX=1 | 177 | 185 | 186 | 186 | 185 | 186 | Satiated on the iteration 2, base consumption 8 MB, extra consumption 1 MB (13 %), liboscada.so 3.5 MB, ui_WebVision.so 0.75 MB | |
Debian 9 amd64, GLibC 2.28, GCC 8.3.0 + MALLOC_ARENA_MAX=1 | 160 | 168 | 168 | 168.5 | 168.5 | 168.5 | Satiated on the iteration 1, base consumption 8 MB, extra consumption 0.5 MB (6 %), liboscada.so 3.5 MB, ui_WebVision.so 0.75 MB | |
Debian 10 amd64, GLibC 2.28, GCC 8.3.0 + optional background objects in WebVision | 184 | 194.5 | 200 | 207 | 207 | 212.5 | Satiated on the iteration 5, base consumption 10.5 MB, extra consumption 18 MB (171 %), liboscada.so 3.5 MB, ui_WebVision.so 0.75 MB | |
Debian 10 amd64, GLibC 2.28, GCC 8.3.0 | 182 | 191.5 | 199 | 206 | 212 | 212 | Satiated on the iteration 4, base consumption 9.5 MB, extra consumption 20 MB (200 %), liboscada.so 3.5 MB, ui_WebVision.so 0.74 MB | |
Debian 9 amd64, GLibC 2.24, GCC 6.3.0 | 160 | 170 | 178 | 179 | 183 | 185 | Satiated on the iteration 5, base consumption 10 MB, extra consumption 15 MB (150 %), liboscada.so 3.5 MB, ui_WebVision.so 0.72 MB | |
Debian 8 amd64, GLibC 2.19, GCC 4.9.2 | 125.5 | 133 | 139 | 139 | 139 | 139 | Satiated on the iteration 2, base consumption 7.5 MB, extra consumption 6 MB (80 %), liboscada.so 3.8 MB, ui_WebVision.so 0.79 MB | |
Debian 7 amd64, GLibC 2.13, GCC 4.7.2 | 101 | 108 | 111 | 112 | 112 | 112 | Satiated on the iteration 2, base consumption 7 MB, extra consumption 4 MB (57 %), liboscada.so 3.4 MB, ui_WebVision.so 0.85 MB | |
Debian 10 i386, GLibC 2.28, GCC 8.3.0 + MALLOC_ARENA_MAX=1 | 144 | 152 | 152 | 152 | 152 | 152 | Satiated on the iteration 1, base consumption 8 MB, extra consumption 0 MB (0 %), liboscada.so 3.7 MB, ui_WebVision.so 0.9 MB | |
Debian 9 i386, GLibC 2.24, GCC 6.3.0 + MALLOC_ARENA_MAX=1 | 126.5 | 132.5 | 133 | 133 | 133 | 133 | Satiated on the iteration 1, base consumption 6 MB, extra consumption 0.5 MB (8 %), liboscada.so 3.7 MB, ui_WebVision.so 0.9 MB | |
Debian 10 i386, GLibC 2.28, GCC 8.3.0 | 151 | 158 | 162.5 | 166 | 166 | 166 | Satiated on the iteration 3, base consumption 7 MB, extra consumption 8 MB (114 %), liboscada.so 3.7 MB, ui_WebVision.so 0.9 MB | |
Debian 9 i386, GLibC 2.24, GCC 6.3.0 | 125 | 131 | 132 | 136 | 136 | 139 | Satiated on the iteration 5, base consumption 6 MB, extra consumption 8 MB (133 %), liboscada.so 3.7 MB, ui_WebVision.so 0.9 MB | |
Debian 8 i386, GLibC 2.19, GCC 4.9.2 | 92.5 | 99 | 101.5 | 103 | 103.5 | 103.5 | Satiated on the iteration 2, base consumption 6.5 MB, extra consumption 4.5 (69 %), liboscada.so 3.6 MB, ui_WebVision.so 0.94 MB | |
Debian 7 i386, GLibC 2.13, GCC 4.7.2 | 70 | 76 | 76 | 76 | 77 | 77 | Satiated on the iteration 2, base consumption 6 MB, extra consumption 1 MB (16 %), liboscada.so 3.6 MB, ui_WebVision.so 0.9 MB | |
ALTLinux 6 i386, GLibC 2.11.3, GCC 4.5.4 | 69 | 74 | 75 | 75 | 75 | 75 | Satiated on the iteration 2, base consumption 5 MB, extra consumption 1 MB (20 %), liboscada.so 2.3 MB, ui_WebVision.so 0.9 MB | |
Creation only VCA-session, from remote connection to the visualizer server | ||||||||
Debian 10 amd64, GLibC 2.28, GCC 8.3.0 | 180 | 186 | 186 | 186 | 186 | 186 | Satiated on the iteration 1, extra consumption 0.2 MB (3 %) | |
Debian 7 amd64, GLibC 2.13, GCC 4.7.2 | 100 | 104 | 105 | 105 | 105 | 105 | Satiated on the iteration 1, extra consumption 1 MB (25 %) | |
Debian 10 i386, GLibC 2.28, GCC 8.3.0 | 148 | 154 | 155 | 155 | 155 | 155 | Satiated on the iteration 1, extra consumption 1 MB (16 %) | |
Debian 7 i386, GLibC 2.13, GCC 4.7.2 | 69 | 72 | 72 | 72 | 72 | 72 | Satiated on the iteration 1, extra consumption 0 MB (0 %) |
CONCLUSION: We see obvious degradation in the memory effectivity on the last Debian releases starting at Debian 8 (GLibC 2.19) on I386 and Debian 9 (GLibC 2.24) on AMD64, when the memory consumption increased up to 200% after 3,4 free-allocate iterations of the same data. To more presenting of the problem there have built follow images on the data basis:
MEASURES:
20.06.2013
GROUNDS: At working with the board MOPSlcdLX, attention was drawn to the heavy load of the task of forming full-size trends. As it turned out later, a large load is created by the formation of a PNG image in the GD2 library, or rather, the packing procedure of ZLib. The subject analysis of the performance of the formation of images of various formats on this board is summarized in the table below:
Format | Trend building, milliseconds | Converting to the image format, milliseconds | Size of the image, bytes |
---|---|---|---|
PNG (0) | 200 | 800 | 1700365 |
PNG (1) | 200 | 690 | 24000 |
PNG (-1) | 200 | 1000 | 14800 |
PNG (9) | 200 | 1900 | 13354 |
JPEG (-1) | 200 | 180 | 53157 |
GIF | 200 | 380 | 14300 |
CONCLUSION: As can be seen from the table above, the operation of forming PNG as a whole is resource-intensive and the most optimal level of compression is "1". At the same time, the formation of JPEG and GIF is much faster, but these image formats have a number of critical flaws, namely: JPEG does not have an alpha channel (transparency), and GIF is limited by the number of colors, which in both cases leads to loss of transparency and distortion of text smoothing and images in general.
MEASURES: The ability to select the compression level for the generated PNG images is added, and the default value is set to the optimal level "1". The implementation of the formation of the "Diagram" primitive on the browser side in the "svg" or "canvas" tags is planned.
At this stage, the module can be used to construct real user interfaces with support for the main functions. However, some problems may arise due to the differences between browsers. At this time, provided enough quality performance on browsers: Chromium (Google Chrome), FireFox, Opera, Konqueror.
Modules/WebVision/en - GFDL | November 2024 | OpenSCADA 1+r2996 |