From OpenSCADAWiki
Jump to: navigation, search

Session of the project execution

The project session is expanded tree of the project for direct it execution, which includes an individual task of hierarchical the widget's procedures execution. For each project can be opened many sessions. The end-user visual interface forming performs by the visualizers from data of the project's session, after the session creation by the request.

Between the widgets, at different levels of the hierarchy, finally formed fairly complex hereditary links, which are determined by the possibility of using some widgets by others, ranging from the library widget to the session widget. To explain these features of interaction, the figure shows an exhaustive map of "using" inheritance.

VCA map inher.png

At the session level widget contains a object of values of calculation procedure. This object is initiated and used in the case of presence of the calculation procedure itself. At the time of the initialization, the list of parameters of the procedure is created and a compilation of the procedure is performed with these parameters, in the module that implements the selected programming language and with the name of the resulting procedure in the form of a coded full name of the widget. The compiled function is connected to the object of values of the calculation procedure, and further the calculation is performed with the session period.

Calculation and processing of the widget runs in the following sequence:

  • the events available at the time of calculation are selected from the attribute "event" of the widget;
  • the events are loaded into the parameter "event" of the object of computation;
  • values of the input links are loaded into the object of calculation;
  • values of special variables (f_frq, f_start and f_stop) are loaded into the computation object;
  • values of selected parameters of the widget are loaded into the object of computation;
  • computation;
  • uploading the computation object's values to the selected parameters of the widget;
  • uploading the events from the parameter "event" of the computation object;
  • processing the events and transfer the unprocessed ones at the level above.

The session objects of the project inherit from an abstract object "Widget" and use the appropriate objects of the project. Thus, the session "Session" uses the project "Project" and forms expanded tree on its basis. Project page "Page" is directly used by the session page "SessPage". The remaining objects "SessWdg" are deployed in accordance with the hierarchy of page elements.

In addition to the standard properties of the abstract widget "Widget", elements of the pages and the session pages themselves get the following properties: storage of the object of values of the computational procedure, calculation of the procedures and mechanism for processing of the events. Pages of the session, in addition, contain a container of the following by the hierarchy pages. The session, in general, is calculated with the specified periodicity and in sequence:

  • "Page of the top level" -> "Page of the lower level"
  • "Widget of the lower level" -> "Widget of the top level"

This policy allows to bypass the pages according to their hierarchy, and events in the widgets "climb up" during one iteration.

The sessions support multi-language at the level of the control interface of OpenSCADA, which depended from values of the generic attributes "lang" and "user" and which visualizer can set in proper way of own language. This function is enabled by dynamic messages translation of OpenSCADA.