OpenSCADAWiki: Home Page En/Doc/VCA Engine/doc ...

Home | Index | Changes | Comments | Users | Registration | Login  Password:  
 

Features of the primitive "Document":


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.


Fig. 3.8.7.a shows a block diagram of the widget of the primitive "Document". According to this structure "Document" includes: XHTML-template, the resulting documents and the processing script. The data source for the script and for the resulting documents are the attributes of the widget.


Primitive Document structure (40 Κα)
Fig. 3.8.7.a The block diagram of the primitive "Document".

It i provided the work of widget in two modes: Dynamic and Archive. The difference between archive mode is the availability of the archive of the specified depth and attributes which allow you to control the process of archiving and viewing of the document in the archive.


Generation of the document is always made at the time of installation of the time attribute <time> relatively to the set start time of the document in the attribute <bTime>. With the archive turned off the resulting document is placed directly in the attribute <doc>. When the archive is turned on the resulting document is placed in the cell under the cursor, the attribute <aCur>, as well as in <doc> if the value of the archive cursor <aCur> and the cursor of visualized document <vCur> match. Attributes of the archival cursors provide several command of values:


As it was stated above dynamics of the document's template is defined by the inserts of executable instructions of the form <?dp {procedure} ?>. The procedures may use the same attributes of the widget and functions of the user programming interface of OpenSCADA. In addition to the attributes of the widget special attributes (Table 3.8.7.a) are reserved.


In addition to special attributes in XHTML template tags and tags' attributes of special assignment are reserved (Table 3.8.7.a).


Table 3.8.7.a. Special and reserved elements of the template.

Name Assignment
Attributes
rez Attribute of the results of the procedure execution, the contents of which is placed to the document tree.
lTime Last formation time. If the document is formed for the first time, <lTime> is equal to the <bTime>.
rTime Contains the time for the selected values in seconds. It is defined inside the tags with the attribute "docRept".
rTimeU Contains the time for the selected values in microseconds. It is defined inside the tags with the attribute "docRept".
rPer Contains the periodicity of the selection of values (the attribute "docRept").
mTime, mTimeU, mLev, mCat, mVal It is defined inside the tags with an attribute "docAMess" when parsing messages of the messages' archive:
mTime — message time;
mTimeU — message time, microseconds;
mLev — message level;
mCat — message category;
mVal — message value.
Special tags
Special attributes of the standard tags
body.docProcLang Language of executable procedures of the document. By defaults it is JavaLikeCalc.JavaScript.
*.docRept="1s" Tag with the specified attribute, while the formation it multiplies through the time offset in the attribute "rTime" to the value, specified in this attribute.
*.docAMess="1:PLC*" Indicates the necessity of the tag multiplication with an attribute of message from the archive of messages for the specified interval of time and in accordance with the level of (1) and template of request (PLC*). The template request may specify a regular expression in the form of /{re}/. For this tag in the process of multiplication the following attributes: mTime, mTimeU, mLev, mCat and mVal are defined.
*.docRevers="1" Points to invert of the order of multiplication, the last from the top.
*.docAppend="1" The sign of the necessity of addition of the procedure execution result in the tag of the procedure. Otherwise, the result of execution replaces the contents of the tag.
body.docTime Time of formation of the document. It is used to set the attribute <lTime> in the time of the next formation of the document. It is not set by the user!
table.export="1" Enable for selected table content allow for export to CSV-file and other table formats.

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