<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html class="client-nojs" dir="ltr" lang="en"> <head> <meta charset="UTF-8" /> <title>Библиотеки/Документы - OpenSCADAWiki</title> <meta content="MediaWiki 1.26.4" name="generator" /> <link href="https://www.gnu.org/copyleft/fdl.html" rel="copyright" /> <link href="../en/files/doc.css" rel="stylesheet" /></head> <body><div class="floatright"><a href="index.html"><img alt="OpenSCADA" src="../en/files/index.png" /></a></div><div id="mw_header"> <div class="mw-indicators"> </div> <h1 id="firstHeading" lang="ru">Библиотеки/Документы</h1> </div><div class="mw-content-ltr" dir="ltr" id="mw-content-text" lang="ru"><div class="mw-pt-translate-header noprint" dir="ltr" lang="en">This page is a <span class="plainlinks"><a class="external text" href="http://oscada.org/wiki/index.php?title=Special:Translate&group=page-Libs%2FDocuments&action=page&filter=&language=ru" rel="nofollow noreferrer noopener" target="_blank">translated version</a></span> of the page <a class="external" href="http://oscada.org/wiki/Libs/Documents" title="Libs/Documents">Libs/Documents</a> and the translation is 31% complete.</div><hr /><div class="mw-pt-languages" dir="ltr" lang="en"><div class="mw-pt-languages-list autonym"><a class="mw-pt-languages-ui mw-pt-progress mw-pt-progress--complete" href="../en/Libs_Documents.html" title="Libs/Documents (100% translated)">English</a> • ‎<span class="mw-pt-languages-selected mw-pt-progress mw-pt-progress--low">mRussian</span> • ‎<a class="mw-pt-progress mw-pt-progress--complete" href="../uk/Libs_Documents.html" title="Бібліотеки/Документи (100% translated)">УкраїнÑька</a></div></div> <table class="wikitable"> <tr> <th> Ðазвание </th> <th> ВерÑÐ¸Ñ </th> <th> Ð›Ð¸Ñ†ÐµÐ½Ð·Ð¸Ñ </th> <th> ИÑточник </th> <th> Языки </th> <th> Ðвтор </th> <th> Иконка </th> <th> ОпиÑание </th></tr> <tr> <td> <a href="Libs_Documents.html" title="Special:MyLanguage/Libs/Documents">Библиотека отчётов и документов</a> </td> <td> 2.0, 2.1 </td> <td> GPLv2 </td> <td> <p>OscadaLibs.db (<a class="external text" href="http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/OscadaLibs.sql" rel="nofollow noreferrer noopener" target="_blank">SQL</a>, <a class="external" href="http://oscada.org/wiki/File:OscadaLibs.db.gz" title="File:OscadaLibs.db.gz">GZip</a>) > DAQ.JavaLikeCalc.doc<br /> vcaBase.db (<a class="external text" href="http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/vcaBase.sql" rel="nofollow noreferrer noopener" target="_blank">SQL</a>, <a class="external" href="http://oscada.org/wiki/File:VcaBase.db.gz" title="File:VcaBase.db.gz">GZip</a>) > VCA.wlb_doc </p> </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Роман Савоченко</a> </td> <td> <a class="image" href="http://oscada.org/wiki/File:LibDocuments.png"><img alt="LibDocuments.png" height="64" src="../en/files/LibDocuments.png" width="64" /></a> </td> <td> ПредоÑтавлÑет комбинированную библиотеку отчётов, документов и ÑвÑзанных функций общей и промышленной автоматизации. <ul><li> <b>ОÑновано:</b> Январь 2008</li> <li> <b>Изначально Ñоздано, Ð´Ð»Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¹:</b> в <a class="external text" href="http://wiki.oscada.org/Using/APIFunctionLibs/LibDoc" rel="nofollow noreferrer noopener" target="_blank">Ñтарой Wiki</a></li> <li> <b>ИÑпользовано:</b> <a class="external" href="http://oscada.org/wiki/Special:MyLanguage/Using" title="Special:MyLanguage/Using">большинÑтво проектов на OpenSCADA</a></li> <li> <b><a href="../en/To_do.html" title="Special:MyLanguage/Works/To do">Задачи (To Do)</a>:</b></li></ul> <dl><dd>- раÑширить документ "<a href="Libs_Documents.html#docRepYear" title="Special:MyLanguage/Libs/Documents">Годовой отчёт меÑÑчных значений</a>" обработкой переполнений Ñчётчиков введенных вручную;</dd> <dd>- раÑширить функцию документов "<a href="Libs_Documents.html#diagram" title="Special:MyLanguage/Libs/Documents">Диаграмма</a>" поддержкой полоÑового графика (гиÑтограмм).</dd></dl> </td></tr></table> <p>Библиотека ÑоздаётÑÑ Ð´Ð»Ñ Ð¿Ñ€ÐµÐ´Ð¾ÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñлементов-кадров отчётов и документов пользовательÑкого интерфейÑа и Ñодержит графичеÑкие Ñлементы, которые чаÑто воÑтребованы при формировании пользовательÑкого интерфейÑа автоматизации технологичеÑких и общих процеÑÑом. СтроитÑÑ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÐ° на оÑнове <a href="Modules/VCAEngine.html#WidgetPrimitives" title="Special:MyLanguage/Modules/VCAEngine">примитивов виджетов</a> и Ñзыка внутреннего Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ <a href="Modules/JavaLikeCalc.html" title="Special:MyLanguage/Modules/JavaLikeCalc">JavaLikeCalc</a>, также Ð´Ð»Ñ ÑвÑзанных функций. </p><p>ÐÐ°Ð·Ð²Ð°Ð½Ð¸Ñ Ñлементов и их параметров доÑтупны на Ñзыках: ÐнглийÑкий, УкраинÑкий и mRussian. Их иÑходный код напиÑан в Ñзыко(человечеÑкий)-незавиÑимом режиме Ñ Ð²Ñ‹Ð·Ð¾Ð²Ð¾Ð¼ функции перевода <i>tr()</i> и перевод Ñтих Ñообщений также доÑтупен ÐнглийÑким, УкраинÑким и mRussian. </p> <div class="toc" id="toc"><div id="toctitle"><h2>Contents</h2></div> <ul> <li class="toclevel-1 tocsection-1"><a href="#.D0.94.D0.BE.D0.BA.D1.83.D0.BC.D0.B5.D0.BD.D1.82.D1.8B"><span class="tocnumber">1</span> <span class="toctext">Документы</span></a> <ul> <li class="toclevel-2"><a href="#Document_-_archival_.28doc.29"><span class="tocnumber">1.1</span> <span class="toctext">Document - archival (doc)</span></a> <ul> <li class="toclevel-3"><a href="#Day_report_of_the_hour-averaged_values_.28docRepDay.29"><span class="tocnumber">1.1.1</span> <span class="toctext">Day report of the hour-averaged values (docRepDay)</span></a></li> <li class="toclevel-3"><a href="#Month_report_of_the_day-averaged_values_.28docRepMonth.29"><span class="tocnumber">1.1.2</span> <span class="toctext">Month report of the day-averaged values (docRepMonth)</span></a></li> </ul> </li> <li class="toclevel-2"><a href="#Document_-_dynamic_.28docDin.29"><span class="tocnumber">1.2</span> <span class="toctext">Document - dynamic (docDin)</span></a> <ul> <li class="toclevel-3"><a href="#Instantaneous_values_report_.28docRepInstVals.29"><span class="tocnumber">1.2.1</span> <span class="toctext">Instantaneous values report (docRepInstVals)</span></a></li> <li class="toclevel-3"><a href="#Protocol_of_violations_.28docAlarmsRep.29"><span class="tocnumber">1.2.2</span> <span class="toctext">Protocol of violations (docAlarmsRep)</span></a></li> <li class="toclevel-3"><a href="#Protocol_of_interruptions_.28docUsersSet.29"><span class="tocnumber">1.2.3</span> <span class="toctext">Protocol of interruptions (docUsersSet)</span></a></li> <li class="toclevel-3"><a href="#Protocol_of_messages_.28docMessRep.29"><span class="tocnumber">1.2.4</span> <span class="toctext">Protocol of messages (docMessRep)</span></a></li> <li class="toclevel-3"><a href="#Report_of_two_working_shifts_.28docRep2WorkSh.29"><span class="tocnumber">1.2.5</span> <span class="toctext">Report of two working shifts (docRep2WorkSh)</span></a></li> <li class="toclevel-3"><a href="#Year_report_of_the_month_values_.28docRepYear.29"><span class="tocnumber">1.2.6</span> <span class="toctext">Year report of the month values (docRepYear)</span></a></li> </ul> </li> </ul> </li> <li class="toclevel-1 tocsection-2"><a href="#.D0.A1.D0.B5.D1.80.D0.B2.D0.B8.D1.81.D0.BD.D1.8B.D0.B5_.D1.81.D0.B2.D1.8F.D0.B7.D0.B0.D0.BD.D0.BD.D1.8B.D0.B5_.D1.84.D1.83.D0.BD.D0.BA.D1.86.D0.B8.D0.B8"><span class="tocnumber">2</span> <span class="toctext"><span>СервиÑные ÑвÑзанные функции</span></span></a> <ul> <li class="toclevel-2"><a href="#.D0.9F.D0.BE.D0.BB.D1.83.D1.87.D0.B5.D0.BD.D0.B8.D0.B5_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D1.8F_.D0.B8.D0.B7_.D0.B0.D1.80.D1.85.D0.B8.D0.B2.D0.B0_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D0.B9_.28getVal.29"><span class="tocnumber">2.1</span> <span class="toctext">Получение Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¸Ð· архива значений (getVal)</span></a></li> <li class="toclevel-2"><a href="#.D0.A1.D1.80.D0.B5.D0.B4.D0.BD.D0.B5.D0.B5_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D0.B5_.D0.B0.D1.80.D1.85.D0.B8.D0.B2.D0.B0_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D0.B9_.28averVal.29"><span class="tocnumber">2.2</span> <span class="toctext">Среднее значение архива значений (averVal)</span></a></li> <li class="toclevel-2"><a href="#.D0.A1.D1.83.D0.BC.D0.BC.D0.B0_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D0.B9_.D0.B0.D1.80.D1.85.D0.B8.D0.B2.D0.B0_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D0.B9_.28sumVal.29"><span class="tocnumber">2.3</span> <span class="toctext">Сумма значений архива значений (sumVal)</span></a></li> <li class="toclevel-2"><a href="#.D0.94.D0.B8.D0.B0.D0.B3.D1.80.D0.B0.D0.BC.D0.BC.D0.B0_.28diagram.29"><span class="tocnumber">2.4</span> <span class="toctext">Диаграмма (diagram)</span></a></li> </ul> </li> </ul> </div> <h2><span class="mw-headline" id=".D0.94.D0.BE.D0.BA.D1.83.D0.BC.D0.B5.D0.BD.D1.82.D1.8B"><span class="mw-headline-number">1</span> Документы</span></h2> <p>Содержит Ñлементы-кадры документов шаблонного и конечного типов, которые предназначены Ð´Ð»Ñ Ñ€Ð°Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð² разделе "Документы" (вид отображениÑ) дерева Ñтраниц проекта, поÑтроенного по <a href="Libs_Main_graphical_elements.html#RootPgSo" title="Special:MyLanguage/Libs/Main graphical elements">концепции объектов Ñигнализации корневой Ñтраницы "RootPgSo"</a>. Однако, они могут быть размещены как отдельные ÑущноÑти или в ÑоÑтаве ÑобÑтвенной концепции ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñтраницами, но тут нужно учитывать, что кадры чаÑто ÑÑылаютÑÑ Ð¸ вызывают <a href="Libs_Main_graphical_elements.html#doc_panel" title="Special:MyLanguage/Libs/Main graphical elements">панель документов</a>! </p><p>Ð”Ð»Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ñ‡Ð°Ñти библиотеки к проекту Ñтанции OpenSCADA Ð’Ñ‹ можете получить файл БД как: </p> <ul><li> такой что поÑтавлÑетÑÑ Ñ Ð³Ð¾Ñ‚Ð¾Ð²Ñ‹Ð¼ и ÑоответÑтвующим пакетом диÑтрибутива Linux вроде "openscada-libdb-vca", "openscada-LibDB.VCA";</li> <li> наиболее актуальный и непоÑредÑтвенно полученный из <a class="external text" href="http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/vcaBase.sql" rel="nofollow noreferrer noopener" target="_blank">репозиторию subversion</a>, преобразованный в файл БД SQLite путём:</li></ul> <div class="mw-highlight mw-content-ltr" dir="ltr" style="margin-left: 15px"><pre>wget http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/vcaBase.sql sqlite3 -init vcaBase.sql vcaBase.db .exit </pre></div> <ul><li> загрузка <a class="external" href="http://oscada.org/wiki/File:VcaBase.db.gz" title="File:VcaBase.db.gz">прикреплённого тут</a>.</li></ul> <p>Ðтот полученный файл Ð’Ñ‹ далее можете размеÑтить в каталоге проекта Ñтанции и Ñоздать объект базы данных Ð¼Ð¾Ð´ÑƒÐ»Ñ Ð‘Ð” "SQLite", зарегиÑтрировав файл базы данных в конфигурации. </p><p><br /> </p> <table class="wikitable"> <tr> <td> <span id="doc" title="#doc"><h3><span class="mw-headline" id="Document_-_archival_.28doc.29"><span class="mw-headline-number">1.1</span> Document - archival (<a href="Libs_Documents.html#doc" title="Special:MyLanguage/Libs/Documents">doc</a>)</span></h3></span> </td> <td> 1.2 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Roman Savochenko</a> </td></tr></table> <p>The frame, shown in Figure 1.1, is a template of documents of the archive type and it is provided as an example and for building own archive documents on it basis. The main specific of that document type is the periodic generating on the VCA-session level (in the background) and placing the final and ready to view documents to an archive, the VCA-project's session DB-table "prj_{ProjID}_ses". </p><p>The main advantage of this document type is the lowest load on CPU during the generation, which can be multi-step one during the main generation period, and the fast view, which involves simply opening the ready documents from the archive. But this document type has a significant disadvantage, which is the constant execution of single project session in the background and the absence of which leads to the omission of the documents generation in the archive. </p><p><a class="image" href="http://oscada.org/wiki/File:At.png"><img alt="At.png" height="22" src="../en/files/At.png" width="22" /></a> Therefore, documents of this type are appropriated to use on the stationary AWPs of the operators, even if it is a reproduction from the visualisation server, and are useless in the WEB-interface! </p> <div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:902px;"><a class="image" href="http://oscada.org/wiki/File:LibDocuments_doc.png"><img class="thumbimage" height="600" src="../en/files/LibDocuments_doc.png" width="900" /></a> <div class="thumbcaption">Fig.1.1. The "Document - archival" frame in the development mode.</div></div></div></div> <p><b><u>Using — development</u></b><br /> The frame can only be used as a basis for creating your own archival type documents, for which you should it copy or inherit, by selecting the appropriate option in the copy dialog. Next, you need to edit the document template, in the appropriate attribute, according to the needs of your document, and write your own procedure for periodically and step-by-step formatting of the documents with closing to the archive, a sample of which can be obtained from the final documents based on this. </p><p><br /> </p> <table class="wikitable"> <tr> <td> <span id="docRepDay" title="#docRepDay"><h4><span class="mw-headline" id="Day_report_of_the_hour-averaged_values_.28docRepDay.29"><span class="mw-headline-number">1.1.1</span> Day report of the hour-averaged values (<a href="Libs_Documents.html#docRepDay" title="Special:MyLanguage/Libs/Documents">docRepDay</a>)</span></h4></span> </td> <td> 3.2 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Roman Savochenko</a> </td> <td> -1 ms (parent) </td></tr></table> <p>The document, shown in Figure 1.1.1, is provided for generating a day report of the hour-averaged values in view of the trends diagram and the data table. The document is initially the archival type but in time it is made dynamic also, so, depending from the execution mode, you can whether select a ready document from the archive or specify the data time and depth. The document commonly uses and represents the representative structure of the DAQ-template "<a href="Libs_Main.html#anUnif" title="Special:MyLanguage/Libs/Main">Analog signal</a>". As a data source of this document is <a href="Program_manual.html#ArchVals" title="Special:MyLanguage/Documents/Program manual">the value archives</a> of the DAQ-parameters. </p><p>Working in the primary archival mode performed with the 5 minutes period, when during an hour an one record-row data is formed. The last one record-row is closed at the 5 minute of a new hour (14:05 for example) and a new one record-row is started. Whole and complete document is archived at the 3 minute of the "Report hour (<i>repHour</i>)" of the next day (09:03 for example). </p> <ul><li> <b>Sponsored for the dynamization by</b>: BLUE STAR GROUP Ltd and Vinnica Poultry Farm</li></ul> <div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:902px;"><a class="image" href="http://oscada.org/wiki/File:LibDocuments_docRepDay.png"><img class="thumbimage" height="580" src="../en/files/LibDocuments_docRepDay.png" width="900" /></a> <div class="thumbcaption">Fig.1.1.1. The "Day report of the hour-averaged values" document in the runtime mode.</div></div></div></div> <p><b><u>Using — development</u></b><br /> The document is designed to perform the role of page-template, and should therefore be placed directly in the project's tree. To each document can be connected up to ten parameters, setting the links. Items, for which there are not set the links, will be hidden at runtime. </p><p><a class="image" href="http://oscada.org/wiki/File:At.png"><img alt="At.png" height="22" src="../en/files/At.png" width="22" /></a> To each document can be set: </p> <ul><li> the "Archive length (<b>n</b>)" attribute in need value of the document archive size or in 0 for the dynamic mode;</li> <li> the "Archiver (<b>arch</b>)" attribute in need archiver that maintains the specified parameters; you must not use archivers with worse at one minute quality;</li> <li> the "Report hour (<b>repHour</b>)" attribute in the document report hour — start hour of the day;</li> <li> the "Enable graph (<b>enGraph</b>)" attribute for enable/disable the graph;</li> <li> the "Title (<b>title</b>)" attribute in the document specific title.</li></ul> <p><b><u>Using — runtime</u></b><br /> In the runtime mode, the items, for which links have been set, are displayed. Additionally you can control the display properties of documents, for what there is used <a href="Libs_Main_graphical_elements.html#doc_panel" title="Special:MyLanguage/Libs/Main graphical elements">the document control panel</a>, which can be called clicking the left mouse button in the document area. </p><p><b><u>Linking and configuring the attributes</u></b><br /> </p> <table class="wikitable"> <tr> <th> Identifier </th> <th> Name </th> <th> Type </th> <th> Configuration </th> <th> Configuration template </th> <th> Description </th></tr> <tr> <td> n </td> <td> Archive length, 0 for the dynamic mode </td> <td> Integer </td> <td> Constant </td> <td> </td> <td> Setting the archive size in 0 you switch the document mode to the dynamic type, by default 100. </td></tr> <tr> <td> repHour </td> <td> Report hour </td> <td> Integer </td> <td> Constant </td> <td> </td> <td> The hour which means as the report start — the day start, by default 9. </td></tr> <tr> <td colspan="6"> <i>Document widget (doc)</i> </td></tr> <tr> <td> arch </td> <td> Archiver </td> <td> String </td> <td> Constant </td> <td> </td> <td> Values archiver, by default and preferable to use one-minute archiver "FSArch.1m". </td></tr> <tr> <td> title </td> <td> Title </td> <td> String </td> <td> Constant </td> <td> </td> <td> Title of the report. </td></tr> <tr> <td> enGraph </td> <td> Enable graph </td> <td> Boolean </td> <td> Constant </td> <td> </td> <td> Enabled by default. </td></tr> <tr> <td colspan="6"> <i>Parameter {n} from 1 to 10.</i> </td></tr> <tr> <td> p{n}name </td> <td> Parameter {n}: name </td> <td> String </td> <td> Input link </td> <td> Parameter{n}|NAME </td> <td> Name of the parameter in the table header. </td></tr> <tr> <td> p{n}var </td> <td> Parameter {n}: variable </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|var </td> <td> Address to the parameter attribute with the value archive. </td></tr> <tr> <td> p{n}ed </td> <td> Parameter {n}: dimension </td> <td> String </td> <td> Input link </td> <td> Parameter{n}|ed </td> <td> </td></tr> <tr> <td> p{n}prec </td> <td> Parameter {n}: precision </td> <td> Integer </td> <td> Input link </td> <td> Parameter{n}|prec </td> <td> </td></tr> <tr> <td> p{n}cntr </td> <td> Parameter {n}: is counter </td> <td> Boolean </td> <td> Constant </td> <td> Parameter{n}|isCntr </td> <td> Sets for counters for obtain the values as difference. </td></tr> <tr> <td> p{n}max </td> <td> Parameter {n}: maximum </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|max </td> <td> Used for determining the parameter scale on the graph. </td></tr> <tr> <td> p{n}min </td> <td> Parameter {n}: minimum </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|min </td> <td> Used for determining the parameter scale on the graph. </td></tr></table> <p><br /> </p> <table class="wikitable"> <tr> <td> <span id="docRepMonth" title="#docRepMonth"><h4><span class="mw-headline" id="Month_report_of_the_day-averaged_values_.28docRepMonth.29"><span class="mw-headline-number">1.1.2</span> Month report of the day-averaged values (<a href="Libs_Documents.html#docRepMonth" title="Special:MyLanguage/Libs/Documents">docRepMonth</a>)</span></h4></span> </td> <td> 3.2 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Roman Savochenko</a> </td> <td> -1 ms (parent) </td></tr></table> <p>The document, shown in Figure 1.1.2, is provided for generating a month report of the day-averaged values in view of the trends diagram and the data table. The document is initially the archival type but in time it is made dynamic also, so, depending from the execution mode, you can whether select a ready document from the archive or specify the data time and depth. The document commonly uses and represents the representative structure of the DAQ-template "<a href="Libs_Main.html#anUnif" title="Special:MyLanguage/Libs/Main">Analog signal</a>". As a data source of this document is <a href="Program_manual.html#ArchVals" title="Special:MyLanguage/Documents/Program manual">the value archives</a> of the DAQ-parameters. </p><p>Working in the primary archival mode performed with the 5 minutes period, when during a day an one record-row data is formed. The last one record-row is closed at the 5 minute of a new day (05 09:05 for example) and a new one record-row is started. Whole and complete document is archived at the 3 minute of the "Report hour (<i>repHour</i>)" of the next month (05 09:03 for example). </p> <ul><li> <b>Sponsored for the dynamization by</b>: BLUE STAR GROUP Ltd</li></ul> <div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:902px;"><a class="image" href="http://oscada.org/wiki/File:LibDocuments_docRepMonth.png"><img class="thumbimage" height="580" src="../en/files/LibDocuments_docRepMonth.png" width="900" /></a> <div class="thumbcaption">Fig.1.1.2. The "Month report of the day-averaged values" document in the runtime mode.</div></div></div></div> <p><b><u>Using — development</u></b><br /> The document is designed to perform the role of page-template, and should therefore be placed directly in the project's tree. To each document can be connected up to ten parameters, setting the links. Items, for which there are not set the links, will be hidden at runtime. </p><p><a class="image" href="http://oscada.org/wiki/File:At.png"><img alt="At.png" height="22" src="../en/files/At.png" width="22" /></a> To each document can be set: </p> <ul><li> the "Archive length (<b>n</b>)" attribute in need value of the document archive size or in 0 for the dynamic mode;</li> <li> the "Archiver (<b>arch</b>)" attribute in need archiver that maintains the specified parameters; you must not use archivers with worse at one day quality;</li> <li> the "Report hour (<b>repHour</b>)" attribute in the document report hour — start hour of the day;</li> <li> the "Enable graph (<b>enGraph</b>)" attribute for enable/disable the graph;</li> <li> the "Title (<b>title</b>)" attribute in the document specific title.</li></ul> <p><b><u>Using — runtime</u></b><br /> In the runtime mode, the items, for which links have been set, are displayed. Additionally you can control the display properties of documents, for what there is used <a href="Libs_Main_graphical_elements.html#doc_panel" title="Special:MyLanguage/Libs/Main graphical elements">the document control panel</a>, which can be called clicking the left mouse button in the document area. </p><p><b><u>Linking and configuring the attributes</u></b><br /> </p> <table class="wikitable"> <tr> <th> Identifier </th> <th> Name </th> <th> Type </th> <th> Configuration </th> <th> Configuration template </th> <th> Description </th></tr> <tr> <td> n </td> <td> Archive length, 0 for the dynamic mode </td> <td> Integer </td> <td> Constant </td> <td> </td> <td> Setting the archive size in 0 you switch the document mode to the dynamic type, by default 100. </td></tr> <tr> <td> repHour </td> <td> Report hour </td> <td> Integer </td> <td> Constant </td> <td> </td> <td> The hour which means as the report start — the day start, by default 9. </td></tr> <tr> <td colspan="6"> <i>Document widget (doc)</i> </td></tr> <tr> <td> arch </td> <td> Archiver </td> <td> String </td> <td> Constant </td> <td> </td> <td> Values archiver, by default and preferable to use one-minute archiver "FSArch.1m". </td></tr> <tr> <td> title </td> <td> Title </td> <td> String </td> <td> Constant </td> <td> </td> <td> Title of the report. </td></tr> <tr> <td> enGraph </td> <td> Enable graph </td> <td> Boolean </td> <td> Constant </td> <td> </td> <td> Enabled by default. </td></tr> <tr> <td colspan="6"> <i>Parameter {n} from 1 to 10.</i> </td></tr> <tr> <td> p{n}name </td> <td> Parameter {n}: name </td> <td> String </td> <td> Input link </td> <td> Parameter{n}|NAME </td> <td> Name of the parameter in the table header. </td></tr> <tr> <td> p{n}var </td> <td> Parameter {n}: variable </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|var </td> <td> Address to the parameter attribute with the value archive. </td></tr> <tr> <td> p{n}ed </td> <td> Parameter {n}: dimension </td> <td> String </td> <td> Input link </td> <td> Parameter{n}|ed </td> <td> </td></tr> <tr> <td> p{n}prec </td> <td> Parameter {n}: precision </td> <td> Integer </td> <td> Input link </td> <td> Parameter{n}|prec </td> <td> </td></tr> <tr> <td> p{n}cntr </td> <td> Parameter {n}: is counter </td> <td> Boolean </td> <td> Constant </td> <td> Parameter{n}|isCntr </td> <td> Sets for counters for obtain the values as difference. </td></tr> <tr> <td> p{n}max </td> <td> Parameter {n}: maximum </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|max </td> <td> Used for determining the parameter scale on the graph. </td></tr> <tr> <td> p{n}min </td> <td> Parameter {n}: minimum </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|min </td> <td> Used for determining the parameter scale on the graph. </td></tr></table> <p><br /> </p> <table class="wikitable"> <tr> <td> <span id="docDin" title="#docDin"><h3><span class="mw-headline" id="Document_-_dynamic_.28docDin.29"><span class="mw-headline-number">1.2</span> Document - dynamic (<a href="Libs_Documents.html#docDin" title="Special:MyLanguage/Libs/Documents">docDin</a>)</span></h3></span> </td> <td> 1.3 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Roman Savochenko</a> </td> <td> -2 ms (disabled) </td></tr></table> <p>The frame, shown in Figure 1.2, is a template of documents of the dynamic type and it is provided as an example and for building own dynamic documents on it basis. The main specific of that document type is the synchronous generating at the requesting-opening. </p><p>The main advantage of this document type is the maximal actuality of the data and the document language, for the multilingual interfaces, that is the possibility of generating for the specified date and time. But this document type has a significant disadvantage, which is the high CPU load and long time of the synchronous generation for big archival data. </p><p><a class="image" href="http://oscada.org/wiki/File:At.png"><img alt="At.png" height="22" src="../en/files/At.png" width="22" /></a> Therefore, documents of this type are allowed to use on every types of the interfaces, include the WEB-interfaces, but some documents based on big archival data require for not slow processing systems! </p> <div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:902px;"><a class="image" href="http://oscada.org/wiki/File:LibDocuments_docDin.png"><img class="thumbimage" height="600" src="../en/files/LibDocuments_docDin.png" width="900" /></a> <div class="thumbcaption">Fig.1.2. The "Document - dynamic" frame in the development mode.</div></div></div></div> <p><b><u>Using — development</u></b><br /> The frame can only be used as a basis for creating your own dynamic type documents, for which you should it copy or inherit, by selecting the appropriate option in the copy dialog. Next, you need to edit the document template, in the appropriate attribute, according to the needs of your document, and write your own common generation procedure, if it is not builtin into the document template. </p><p><br /> </p> <table class="wikitable"> <tr> <td> <span id="docRepInstVals" title="#docRepInstVals"><h4><span class="mw-headline" id="Instantaneous_values_report_.28docRepInstVals.29"><span class="mw-headline-number">1.2.1</span> Instantaneous values report (<a href="Libs_Documents.html#docRepInstVals" title="Special:MyLanguage/Libs/Documents">docRepInstVals</a>)</span></h4></span> </td> <td> 2.1 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Roman Savochenko</a> </td></tr></table> <p>The document, shown in Figure 1.2.1, is provided for generating a report of the instantaneous values in view of the trends diagram and the data table. The document is the dynamic type, so you can specify the data time and depth. The document commonly uses and represents the representative structure of the DAQ-template "<a href="Libs_Main.html#anUnif" title="Special:MyLanguage/Libs/Main">Analog signal</a>". As a data source of this document is <a href="Program_manual.html#ArchVals" title="Special:MyLanguage/Documents/Program manual">the value archives</a> of the DAQ-parameters. </p> <div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:902px;"><a class="image" href="http://oscada.org/wiki/File:LibDocuments_docRepInstVals.png"><img class="thumbimage" height="580" src="../en/files/LibDocuments_docRepInstVals.png" width="900" /></a> <div class="thumbcaption">Fig.1.2.1. The "Instantaneous values report" document in the runtime mode.</div></div></div></div> <p><b><u>Using — development</u></b><br /> The document is designed to perform the role of page-template, and should therefore be placed directly in the project's tree. To each document can be connected up to ten parameters, setting the links. Items, for which there are not set the links, will be hidden at runtime. The default document depth in the past is set at 10 minutes. </p><p><a class="image" href="http://oscada.org/wiki/File:At.png"><img alt="At.png" height="22" src="../en/files/At.png" width="22" /></a> To each document can be set: </p> <ul><li> the "Enable graph (<b>enGraph</b>)" attribute for enable/disable the graph;</li> <li> the "Title (<b>title</b>)" attribute in the document specific title.</li></ul> <p><b><u>Using — runtime</u></b><br /> In the runtime mode, the items, for which links have been set, are displayed. Additionally you can control the display properties of documents, for what there is used <a href="Libs_Main_graphical_elements.html#doc_panel" title="Special:MyLanguage/Libs/Main graphical elements">the document control panel</a>, which can be called clicking the left mouse button in the document area. </p><p><b><u>Linking and configuring the attributes</u></b><br /> </p> <table class="wikitable"> <tr> <th> Identifier </th> <th> Name </th> <th> Type </th> <th> Configuration </th> <th> Configuration template </th> <th> Description </th></tr> <tr> <td colspan="6"> <i>Document widget (doc)</i> </td></tr> <tr> <td> title </td> <td> Title </td> <td> String </td> <td> Constant </td> <td> </td> <td> Title of the report. </td></tr> <tr> <td> enGraph </td> <td> Enable graph </td> <td> Boolean </td> <td> Constant </td> <td> </td> <td> Enabled by default. </td></tr> <tr> <td colspan="6"> <i>Parameter {n} from 1 to 10.</i> </td></tr> <tr> <td> p{n}name </td> <td> Parameter {n}: name </td> <td> String </td> <td> Input link </td> <td> Parameter{n}|NAME </td> <td> Name of the parameter in the table header. </td></tr> <tr> <td> p{n}var </td> <td> Parameter {n}: variable </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|var </td> <td> Address to the parameter attribute with the value archive. </td></tr> <tr> <td> p{n}ed </td> <td> Parameter {n}: dimension </td> <td> String </td> <td> Input link </td> <td> Parameter{n}|ed </td> <td> </td></tr> <tr> <td> p{n}prec </td> <td> Parameter {n}: precision </td> <td> Integer </td> <td> Input link </td> <td> Parameter{n}|prec </td> <td> </td></tr> <tr> <td> p{n}max </td> <td> Parameter {n}: maximum </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|max </td> <td> Used for determining the parameter scale on the graph. </td></tr> <tr> <td> p{n}min </td> <td> Parameter {n}: minimum </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|min </td> <td> Used for determining the parameter scale on the graph. </td></tr></table> <p><br /> </p> <table class="wikitable"> <tr> <td> <span id="docAlarmsRep" title="#docAlarmsRep"><h4><span class="mw-headline" id="Protocol_of_violations_.28docAlarmsRep.29"><span class="mw-headline-number">1.2.2</span> Protocol of violations (<a href="Libs_Documents.html#docAlarmsRep" title="Special:MyLanguage/Libs/Documents">docAlarmsRep</a>)</span></h4></span> </td> <td> 1.7 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Roman Savochenko</a> </td> <td> -2 ms (disabled) </td></tr></table> <p>The document, shown in Figure 1.2.2, is provided for generating a report of the violations. The document is the dynamic type, so you can specify the data time and depth. The document commonly uses and represents the messages structure "<a href="Program_manual.html#ArchMess" title="Special:MyLanguage/Documents/Program manual">Violations</a>". As a data source of this document is <a href="Program_manual.html#ArchMess" title="Special:MyLanguage/Documents/Program manual">the message archive</a>. </p> <div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:902px;"><a class="image" href="http://oscada.org/wiki/File:LibDocuments_docAlarmsRep.png"><img class="thumbimage" height="580" src="../en/files/LibDocuments_docAlarmsRep.png" width="900" /></a> <div class="thumbcaption">Fig.1.2.2. The "Protocol of violations" document in the runtime mode.</div></div></div></div> <p><b><u>Using — development</u></b><br /> The document is designed to perform the role of page-template, and should therefore be placed directly in the project's tree. To each document can be set own messages level and category of the processed violations in the attribute "Message category (<b>messCat</b>)", which is the generic one by default "1:al*:*" and can be specified by the data sources. The default document depth in the past is set at 1 day. </p><p><b><u>Using — runtime</u></b><br /> In the runtime mode, the specified violation messages are displayed. Additionally you can control the display properties of documents, for what there is used <a href="Libs_Main_graphical_elements.html#doc_panel" title="Special:MyLanguage/Libs/Main graphical elements">the document control panel</a>, which can be called clicking the left mouse button in the document area. </p><p><b><u>Linking and configuring the attributes</u></b><br /> </p> <table class="wikitable"> <tr> <th> Identifier </th> <th> Name </th> <th> Type </th> <th> Description </th></tr> <tr> <td> messCat </td> <td> Message category </td> <td> String </td> <td> The requested violation messages level and category, by default "1:al*:*". </td></tr></table> <p><br /> </p> <table class="wikitable"> <tr> <td> <span id="docUsersSet" title="#docUsersSet"><h4><span class="mw-headline" id="Protocol_of_interruptions_.28docUsersSet.29"><span class="mw-headline-number">1.2.3</span> Protocol of interruptions (<a href="Libs_Documents.html#docUsersSet" title="Special:MyLanguage/Libs/Documents">docUsersSet</a>)</span></h4></span> </td> <td> 1.8 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Roman Savochenko</a> </td></tr></table> <p>The document, shown in Figure 1.2.3, is provided for generating a report of the user interruptions. The document is the dynamic type, so you can specify the data time and depth. The document commonly uses and represents the messages structure "<a href="Program_manual.html#ArchMess" title="Special:MyLanguage/Documents/Program manual">User-operator actions</a>". As a data source of this document is <a href="Program_manual.html#ArchMess" title="Special:MyLanguage/Documents/Program manual">the message archive</a>. </p> <div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:902px;"><a class="image" href="http://oscada.org/wiki/File:LibDocuments_docUsersSet.png"><img class="thumbimage" height="580" src="../en/files/LibDocuments_docUsersSet.png" width="900" /></a> <div class="thumbcaption">Fig.1.2.3. The "Protocol of interruptions" document in the runtime mode.</div></div></div></div> <p><b><u>Using — development</u></b><br /> The document is designed to perform the role of page, and should therefore be placed directly in the project's tree. The document does not mean any configurations due to the interruption messages are common. The default document depth in the past is set at 1 day. </p><p><b><u>Using — runtime</u></b><br /> In the runtime mode, the user interruption messages are displayed. Additionally you can control the display properties of documents, for what there is used <a href="Libs_Main_graphical_elements.html#doc_panel" title="Special:MyLanguage/Libs/Main graphical elements">the document control panel</a>, which can be called clicking the left mouse button in the document area. </p><p><b><u>Linking and configuring the attributes</u></b><br /> </p> <table class="wikitable"> <tr> <th> Identifier </th> <th> Name </th> <th> Type </th> <th> Description </th></tr> <tr> <td> messCat </td> <td> Message category </td> <td> String </td> <td> The requested messages level and category, by default "2:/(^|.*:)OP*/". </td></tr></table> <p><br /> </p> <table class="wikitable"> <tr> <td> <span id="docMessRep" title="#docMessRep"><h4><span class="mw-headline" id="Protocol_of_messages_.28docMessRep.29"><span class="mw-headline-number">1.2.4</span> Protocol of messages (<a href="Libs_Documents.html#docMessRep" title="Special:MyLanguage/Libs/Documents">docMessRep</a>)</span></h4></span> </td> <td> 1.5 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Roman Savochenko</a> </td></tr></table> <p>The document, shown in Figure 1.2.4, is provided for generating a report of <a href="Program_manual.html#ArchMess" title="Special:MyLanguage/Documents/Program manual">different sort messages</a> together, including: "Violations", "User-operator actions" and "System". The document is the dynamic type, so you can specify the data time and depth. The document so commonly uses and represents <a href="Program_manual.html#ArchMess" title="Special:MyLanguage/Documents/Program manual">the messages structures</a>: "Violations", "User-operator actions" and "System". As a data source of this document is <a href="Program_manual.html#ArchMess" title="Special:MyLanguage/Documents/Program manual">the message archive</a>. </p><p>The document also provides a simple filtering for selected criteria: "Disabled", "Date and time (dttm)", "Level (lev)", "Parameter (prm)", "Description (dscr)", "Value (alrm)". </p> <ul><li> <b>Sponsored by:</b> Ustijancev Michael</li></ul> <div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:902px;"><a class="image" href="http://oscada.org/wiki/File:LibDocuments_docMessRep.png"><img class="thumbimage" height="580" src="../en/files/LibDocuments_docMessRep.png" width="900" /></a> <div class="thumbcaption">Fig.1.2.4. The "Protocol of messages" document in the runtime mode.</div></div></div></div> <p><b><u>Using — development</u></b><br /> The document is designed to perform the role of page-template, and should therefore be placed directly in the project's tree. </p><p><a class="image" href="http://oscada.org/wiki/File:At.png"><img alt="At.png" height="22" src="../en/files/At.png" width="22" /></a> To each document can be set own level and category of the processed messages in the attribute "Message category (<b>messCat</b>)", which is the generic one by default "1:/^(al|OP|/sub_UI/mod_VCAEngine)/" and can be specified for yourself. Also you can specify the only used archivers by setting the attribute "Archivers list (<b>archLs</b>)". The default document depth in the past is set at 1 day. </p><p><b><u>Using — runtime</u></b><br /> In the runtime mode, the specified messages are displayed. Additionally you can control the display properties of documents, for what there is used <a href="Libs_Main_graphical_elements.html#doc_panel" title="Special:MyLanguage/Libs/Main graphical elements">the document control panel</a>, which can be called clicking the left mouse button in the document area. </p><p>Selecting a filtering criteria and entering text required to presence, the user can see only needed messages. </p><p><b><u>Linking and configuring the attributes</u></b><br /> </p> <table class="wikitable"> <tr> <th> Identifier </th> <th> Name </th> <th> Type </th> <th> Description </th></tr> <tr> <td> messCat </td> <td> Message category </td> <td> String </td> <td> The requested messages level and category, by default "1:/^(al|OP|/sub_UI/mod_VCAEngine)/". </td></tr> <tr> <td> archLs </td> <td> Archivers list, "{ArhMod}.{Arh}[;{ArhModN}.{ArhN}]" </td> <td> String </td> <td> List of message archivers from which the messages will be only requested, set empty for common access. </td></tr></table> <p><br /> </p> <table class="wikitable"> <tr> <td> <span id="docRep2WorkSh" title="#docRep2WorkSh"><h4><span class="mw-headline" id="Report_of_two_working_shifts_.28docRep2WorkSh.29"><span class="mw-headline-number">1.2.5</span> Report of two working shifts (<a href="Libs_Documents.html#docRep2WorkSh" title="Special:MyLanguage/Libs/Documents">docRep2WorkSh</a>)</span></h4></span> </td> <td> 2.0 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Roman Savochenko</a> </td></tr></table> <p>The document, shown in Figure 1.2.5, is provided for generating a report of the hour values of up to 10 parameters for two working shift of day with the result sum for flows and related parameters. The document is the dynamic type, so you can specify the data time and depth (fixed). The document commonly uses and represents the representative structure of the DAQ-template "<a href="Libs_Main.html#anUnif" title="Special:MyLanguage/Libs/Main">Analog signal</a>". As a data source of this document is <a href="Program_manual.html#ArchVals" title="Special:MyLanguage/Documents/Program manual">the value archives</a> of the DAQ-parameters. </p> <ul><li> <b>Sponsored by:</b> <a class="external text" href="http://diyaorg.dp.ua" rel="nofollow noreferrer noopener" target="_blank">DIYA Ltd</a></li></ul> <div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:902px;"><a class="image" href="http://oscada.org/wiki/File:LibDocuments_docRep2WorkSh.png"><img class="thumbimage" height="580" src="../en/files/LibDocuments_docRep2WorkSh.png" width="900" /></a> <div class="thumbcaption">Fig.1.2.5. The "Report of two working shifts" document in the runtime mode.</div></div></div></div> <p><b><u>Using — development</u></b><br /> The document is designed to perform the role of page-template, and should therefore be placed directly in the project's tree. To each document can be connected up to ten parameters, setting the links. Items, for which there are not set the links, will be hidden at runtime. </p><p><a class="image" href="http://oscada.org/wiki/File:At.png"><img alt="At.png" height="22" src="../en/files/At.png" width="22" /></a> You must also specify an one-hour archiver in the "Archiver (<b>arch</b>)" attribute that maintains the specified parameters, since this document requires such data. If the start of the first working shift is different from 8 (eighth) hours, then you must specify the required hour in the "Start hour (<b>stH</b>) attribute. </p><p><b><u>Using — runtime</u></b><br /> In the runtime mode, the items, for which links have been set, are displayed. Additionally you can control the display properties of documents, for what there is used <a href="Libs_Main_graphical_elements.html#doc_panel" title="Special:MyLanguage/Libs/Main graphical elements">the document control panel</a>, which can be called clicking the left mouse button in the document area. Since the document fixes the depth in history at 12 hours (one working shift), the user can only change the document time! </p><p><b><u>Linking and configuring the attributes</u></b><br /> </p> <table class="wikitable"> <tr> <th> Identifier </th> <th> Name </th> <th> Type </th> <th> Configuration </th> <th> Configuration template </th> <th> Description </th></tr> <tr> <td colspan="6"> <i>Document widget (doc)</i> </td></tr> <tr> <td> stH </td> <td> Start hour </td> <td> Integer </td> <td> Constant </td> <td> </td> <td> Start hour of the working shifts, from 0 to 11 hour, by default 8. </td></tr> <tr> <td> arch </td> <td> Archiver </td> <td> String </td> <td> Constant </td> <td> </td> <td> One-hour archiver, by default "FSArch.1h". </td></tr> <tr> <td colspan="6"> <i>Parameter {n} from 1 to 10.</i> </td></tr> <tr> <td> p{n}_sh </td> <td> Parameter {n}: code </td> <td> String </td> <td> Input link </td> <td> Parameter{n}|NAME </td> <td> Code of the parameter in the table. </td></tr> <tr> <td> p{n}_nm </td> <td> Parameter {n}: description </td> <td> String </td> <td> Input link </td> <td> Parameter{n}|DESCR </td> <td> Description of the parameter in the table. </td></tr> <tr> <td> p{n}_val </td> <td> Parameter {n}: value </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|var </td> <td> Address to the parameter attribute with the value archive. </td></tr> <tr> <td> p{n}_ed </td> <td> Parameter {n}: dimension </td> <td> String </td> <td> Input link </td> <td> Parameter{n}|ed </td> <td> </td></tr> <tr> <td> p{n}_prec </td> <td> Parameter {n}: precision </td> <td> Integer </td> <td> Input link </td> <td> Parameter{n}|prec </td> <td> </td></tr> <tr> <td> p{n}_flSum </td> <td> Parameter {n}: sum flag </td> <td> Boolean </td> <td> Constant </td> <td> Parameter{n}|flSum </td> <td> Sign of calculation the parameter values sum for the working shift. </td></tr></table> <p><br /> </p> <table class="wikitable"> <tr> <td> <span id="docRepYear" title="#docRepYear"><h4><span class="mw-headline" id="Year_report_of_the_month_values_.28docRepYear.29"><span class="mw-headline-number">1.2.6</span> Year report of the month values (<a href="Libs_Documents.html#docRepYear" title="Special:MyLanguage/Libs/Documents">docRepYear</a>)</span></h4></span> </td> <td> 1.3 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Roman Savochenko</a> </td> <td> -2 ms (disabled) </td></tr></table> <p>The document, shown in Figure 1.2.6, is provided for generating a year report of the month values in view of the trends diagram and the data table. The document is the dynamic type. The document commonly uses and represents the representative structure of the DAQ-template "<a href="Libs_Main.html#anUnif" title="Special:MyLanguage/Libs/Main">Analog signal</a>". As a data source of this document is <a href="Program_manual.html#ArchVals" title="Special:MyLanguage/Documents/Program manual">the value archives</a> of the DAQ-parameters mostly. </p><p>The document first introduced the manual entry of archival values of a large measurement time interval, which in this case is a month, as an undetermined interval. This feature is of great relevance for counters that for one reason or another cannot be connected to the system directly, with continuous measurement or periodic uploading of archive parts. Determining the parameter to manual input performs by setting the constant <b>isMan</b> of the appropriate parameter, which enables the form elements at the top of the document under the appropriate rights ("root" or in the "ITW" group), and accessing the data for the table and trend strictly at the interval of the document — month, as well as entering them. </p><p>Manually entered data is stored whether traditionally in an archive of values, with only one value recorded per representative interval, that is, with unreliable values between them; or as a separate entry with a value in the message archive, also introduced for the first time by this document: </p> <dl><dd> CATEGORY: defines the source ID <i>SrcID</i> in the form "<b>val{SrcID}</b>", where: <ul><li> "val*" — the typical template-sign of a value, that can be directly used in the category filter to determine only the values in messages;</li> <li> <i>SrcID</i> — source identifier, what directly entered by a constant in the parameter address <b>var</b>.</li></ul></dd> <dd> TEXT: the parameter <i>Name</i> and <i>Value</i> in the form "<b>{Name}: {Value}</b>".</dd></dl> <p>The message archiver of <a href="Modules/FSArch.html" title="Special:MyLanguage/Modules/FSArch">the module FSArch</a> must be set for the next attributes to correct work perform together this document: set "Prevent duplicates", "Consider duplicates and prevent, for equal time, category, level" and set "Time size of the archive files" to 3660 days. <a href="Modules/DBArch.html" title="Special:MyLanguage/Modules/DBArch">The module DBArch</a> must work without such kind specific. </p> <div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:902px;"><a class="image" href="http://oscada.org/wiki/File:LibDocuments_docRepYear.png"><img class="thumbimage" height="580" src="../en/files/LibDocuments_docRepYear.png" width="900" /></a> <div class="thumbcaption">Fig.1.2.6. The "Year report of the month values" document in the runtime mode.</div></div></div></div> <p><b><u>Using — development</u></b><br /> The document is designed to perform the role of page-template, and should therefore be placed directly in the project's tree. To each document can be connected up to ten parameters, setting the links. Items, for which there are not set the links, will be hidden at runtime. </p><p><a class="image" href="http://oscada.org/wiki/File:At.png"><img alt="At.png" height="22" src="../en/files/At.png" width="22" /></a> To each document can be set: </p> <ul><li> the "Archiver (<b>arch</b>)" attribute in required value and message archiver in the form <b>{ValArch};{MessArch}</b>, these maintain the specified parameters; you must not use archivers with worse at one hour quality for values;</li> <li> the "Enable graph (<b>enGraph</b>)" attribute for enable/disable the graph;</li> <li> the "Title (<b>title</b>)" attribute in the document specific title.</li></ul> <p><b><u>Using — runtime</u></b><br /> In the runtime mode, the items, for which links have been set, are displayed. The year of the document formation is available for selection on the top of this document, from the current year and for ten years in depth. </p><p>With the rights ("root" or in the "ITW" group), the user can enter parameter values with the manual entry sign (<b>isMan</b>) using the form elements above, where you can select the month, parameter and value that will be recorded immediately after confirmation and shown in the document. </p><p><b><u>Linking and configuring the attributes</u></b><br /> </p> <table class="wikitable"> <tr> <th> Identifier </th> <th> Name </th> <th> Type </th> <th> Configuration </th> <th> Configuration template </th> <th> Description </th></tr> <tr> <td colspan="6"> <i>Document widget (doc)</i> </td></tr> <tr> <td> arch </td> <td> Archiver, {ValArch};{MessArch} </td> <td> String </td> <td> Constant </td> <td> </td> <td> Value and message archiver in the form <b>{ValArch};{MessArch}</b>, by default and preferable to use one-hour archiver "FSArch.1h". </td></tr> <tr> <td> title </td> <td> Title </td> <td> String </td> <td> Constant </td> <td> </td> <td> Title of the report. </td></tr> <tr> <td> enGraph </td> <td> Enable graph </td> <td> Boolean </td> <td> Constant </td> <td> </td> <td> Enabled by default. </td></tr> <tr> <td> depth </td> <td> Depth to select, years </td> <td> Integer </td> <td> Constant </td> <td> </td> <td> Years depth allowed to select. </td></tr> <tr> <td> showOrigCntr </td> <td> Show original counter </td> <td> Boolean </td> <td> Constant </td> <td> </td> <td> Show the original counter value near to the interval value. </td></tr> <tr> <td colspan="6"> <i>Parameter {n} from 1 to 10.</i> </td></tr> <tr> <td> p{n}name </td> <td> Parameter {n}: name </td> <td> String </td> <td> Input link </td> <td> Parameter{n}|NAME </td> <td> Name of the parameter in the table header. </td></tr> <tr> <td> p{n}var </td> <td> Parameter {n}: variable </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|var </td> <td> Address to the parameter attribute with the value archive or the parameter identifier (<b>val:{PrmId}</b>) for manually values writing at storing in the message archive. </td></tr> <tr> <td> p{n}ed </td> <td> Parameter {n}: dimension </td> <td> String </td> <td> Input link </td> <td> Parameter{n}|ed </td> <td> </td></tr> <tr> <td> p{n}prec </td> <td> Parameter {n}: precision </td> <td> Integer </td> <td> Input link </td> <td> Parameter{n}|prec </td> <td> </td></tr> <tr> <td> p{n}cntr </td> <td> Parameter {n}: is counter </td> <td> Boolean </td> <td> Constant </td> <td> Parameter{n}|isCntr </td> <td> Sets for counters for obtain the values as difference. </td></tr> <tr> <td> p{n}max </td> <td> Parameter {n}: maximum </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|max </td> <td> Used for determining the parameter scale on the graph. </td></tr> <tr> <td> p{n}min </td> <td> Parameter {n}: minimum </td> <td> Address </td> <td> Input link </td> <td> Parameter{n}|min </td> <td> Used for determining the parameter scale on the graph. </td></tr> <tr> <td> p{n}isMan </td> <td> Parameter {n}: is manual </td> <td> Boolean </td> <td> Constant </td> <td> Parameter{n}|isMan </td> <td> Marks this parameter as the manual input one. </td></tr></table> <h2><span class="mw-headline" id=".D0.A1.D0.B5.D1.80.D0.B2.D0.B8.D1.81.D0.BD.D1.8B.D0.B5_.D1.81.D0.B2.D1.8F.D0.B7.D0.B0.D0.BD.D0.BD.D1.8B.D0.B5_.D1.84.D1.83.D0.BD.D0.BA.D1.86.D0.B8.D0.B8"><span class="mw-headline-number">2</span> <span id="ServFunc" title="#ServFunc">СервиÑные ÑвÑзанные функции</span></span></h2> <p>СервиÑные функции кадров отчётов и документов предназначены Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñ…Ð°Ñ€Ð°ÐºÑ‚ÐµÑ€Ð½Ñ‹Ñ… задач Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð¾Ñ‚Ñ‡Ñ‘Ñ‚Ð½Ñ‹Ñ… данных, Ð´Ð»Ñ Ñ‡ÐµÐ³Ð¾ нужно оÑущеÑтвлÑÑ‚ÑŒ какую-то проверку или подÑчёт, например, проверÑÑ‚ÑŒ доÑтоверноÑÑ‚ÑŒ и Ñуммировать. СервиÑной функцией может быть и формирование Ñложных данных, вроде вÑтраиваемых в документ диаграмм. </p><p>Ð”Ð»Ñ Ð°Ð´Ñ€ÐµÑации к функции Ñтой библиотеки можно иÑпользовать ÑтатичеÑкий Ð°Ð´Ñ€ÐµÑ Ð²Ñ‹Ð·Ð¾Ð²Ð° <b>DAQ.JavaLikeCalc.lib_doc.{Func}()</b> или динамичеÑкий <b>SYS.DAQ.JavaLikeCalc["lib_doc"]["{Func}"].call()</b>, <b>SYS.DAQ.JavaLikeCalc["lib_doc"].{Func}()</b>. Где <i>{Func}</i> — идентификатор функции в библиотеке. </p><p>Ð”Ð»Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ñ‡Ð°Ñти библиотеки к проекту Ñтанции OpenSCADA Ð’Ñ‹ можете получить файл БД как: </p> <ul><li> такой что поÑтавлÑетÑÑ Ñ Ð³Ð¾Ñ‚Ð¾Ð²Ñ‹Ð¼ и ÑоответÑтвующим пакетом диÑтрибутива Linux вроде "openscada-libdb-main", "openscada-LibDB.Main";</li> <li> наиболее актуальный и непоÑредÑтвенно полученный из <a class="external text" href="http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/OscadaLibs.sql" rel="nofollow noreferrer noopener" target="_blank">Ñ€ÐµÐ¿Ð¾Ð·Ð¸Ñ‚Ð¾Ñ€Ð¸Ñ subversion</a>, преобразованный в файл БД SQLite путём:</li></ul> <div class="mw-highlight mw-content-ltr" dir="ltr" style="margin-left: 15px"><pre>wget http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/OscadaLibs.sql sqlite3 -init OscadaLibs.sql OscadaLibs.db .exit </pre></div> <ul><li> загрузка <a class="external" href="http://oscada.org/wiki/File:OscadaLibs.db.gz" title="File:OscadaLibs.db.gz">прикреплённого тут</a>.</li></ul> <p>Ðтот полученный файл Ð’Ñ‹ далее можете размеÑтить в каталоге проекта Ñтанции и Ñоздать объект базы данных Ð¼Ð¾Ð´ÑƒÐ»Ñ Ð‘Ð” "SQLite", зарегиÑтрировав файл базы данных в конфигурации. </p><p><br /> </p> <table class="wikitable"> <tr> <td> <span id="getVal" title="#getVal"><h3><span class="mw-headline" id=".D0.9F.D0.BE.D0.BB.D1.83.D1.87.D0.B5.D0.BD.D0.B8.D0.B5_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D1.8F_.D0.B8.D0.B7_.D0.B0.D1.80.D1.85.D0.B8.D0.B2.D0.B0_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D0.B9_.28getVal.29"><span class="mw-headline-number">2.1</span> Получение Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¸Ð· архива значений (<a href="Libs_Documents.html#getVal" title="Special:MyLanguage/Libs/Documents">getVal</a>)</span></h3></span> </td> <td> 1.1 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Роман Савоченко</a> </td></tr></table> <p>Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð·Ð° определённое Ð²Ñ€ÐµÐ¼Ñ (<i>time</i>:<i>uTime</i>) из ÑвÑзанного архиватора <i>archtor</i> (FSArch.1m) и формирование результата Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ñ‘Ð½Ð½Ñ‹Ð¼ количеÑтвом знаков <i>prec</i> поÑле запÑтой. </p><p>Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ð°ÐµÑ‚ Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð°Ð¼Ð¸ атрибутов DAQ-параметров к которым подключён архив, и Ð°Ð´Ñ€ÐµÑ <i>addr</i> к нему запиÑываетÑÑ Ð¿Ð¾Ð»Ð½Ñ‹Ð¼ путём вроде "/DAQ/LogicLev/gen/prm_F3/a_var". Ð”Ð»Ñ Ð¿ÑƒÑтого <i>archtor</i> Ð·Ð°Ð¿Ñ€Ð¾Ñ Ð±ÑƒÐ´ÐµÑ‚ оÑущеÑтвлÑÑ‚ÑŒÑÑ Ð² целом ко вÑем Ñ Ð¿ÐµÑ€Ð¸Ð¾Ð´Ð¸Ñ‡Ð½Ð¾Ñтью буфера архива. </p><p>Ð’ процеÑÑе Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ, Ð²Ñ€ÐµÐ¼Ñ Ñтого Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð¶ÐµÑ‚ отличатьÑÑ Ð¾Ñ‚ запрошенного, еÑли архив на Ñто Ð²Ñ€ÐµÐ¼Ñ Ð¾Ñ‚ÑутÑтвует и возвращаетÑÑ Ð±Ð»Ð¸Ð¶Ð°Ð¹ÑˆÐµÐµ, предотвратить что можно уÑтановив <i>strong</i>. Когда таки необходимо контролировано получить ближайшее доÑтоверное значение, например Ð´Ð»Ñ Ñчётчиков, то предуÑмотрен аргумент времени <i>tryTo</i> до которого иÑкать ближайшее доÑтоверное значение. Ð’Ñ€ÐµÐ¼Ñ Ð² <i>tryTo</i> может быть как больше, так и меньше времени запроÑа. </p><p>Первично, результат предоÑтавлÑетÑÑ Ð² виде Ñтроки вещеÑтвенного Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ñ‘Ð½Ð½Ñ‹Ð¼ количеÑтвом знаков <i>prec</i> поÑле запÑтой, и Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸ÐµÐ¼ "ПуÑто" Ð´Ð»Ñ Ð½ÐµÐ´Ð¾Ñтоверных значений, что позволÑет вÑтавлÑÑ‚ÑŒ его в документ без дополнительной обработки. Однако, при необходимоÑти дополнительной обработки и ÑпецифичеÑкого форматированиÑ, результат можно получить неформатированным вещеÑтвенным значением, Ð´Ð»Ñ <i>prec</i> менше 0. </p><p><b><u>Параметры</u></b><br /> </p> <table class="wikitable"> <tr> <th> Идентификатор </th> <th> Параметр </th> <th> Тип </th> <th> Режим </th> <th> Скрытый </th> <th> По умолчанию </th></tr> <tr> <td> rez </td> <td> Результат </td> <td> Строка </td> <td> Возврат </td> <td> false </td> <td> </td></tr> <tr> <td> addr </td> <td> ÐÐ´Ñ€ÐµÑ </td> <td> Строка </td> <td> Вход </td> <td> false </td> <td> </td></tr> <tr> <td> time </td> <td> ВремÑ, Ñекунд </td> <td> Целый </td> <td> Вход </td> <td> false </td> <td> </td></tr> <tr> <td> uTime </td> <td> ВремÑ, микроÑекунды </td> <td> Целый </td> <td> Вход </td> <td> false </td> <td> </td></tr> <tr> <td> prec </td> <td> Знаков поÑле запÑтой </td> <td> Целый </td> <td> Вход </td> <td> false </td> <td> 3 </td></tr> <tr> <td> archtor </td> <td> Ðрхиватор </td> <td> Строка </td> <td> Вход </td> <td> false </td> <td> </td></tr> <tr> <td> strong </td> <td> Точно </td> <td> Логич. </td> <td> Вход </td> <td> false </td> <td> 0 </td></tr> <tr> <td> tryTo </td> <td> Пробовать значение до, микроÑекунды </td> <td> Целый </td> <td> Вход </td> <td> false </td> <td> 0 </td></tr></table> <p><br /> </p> <table class="wikitable"> <tr> <td> <span id="averVal" title="#averVal"><h3><span class="mw-headline" id=".D0.A1.D1.80.D0.B5.D0.B4.D0.BD.D0.B5.D0.B5_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D0.B5_.D0.B0.D1.80.D1.85.D0.B8.D0.B2.D0.B0_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D0.B9_.28averVal.29"><span class="mw-headline-number">2.2</span> Среднее значение архива значений (<a href="Libs_Documents.html#averVal" title="Special:MyLanguage/Libs/Documents">averVal</a>)</span></h3></span> </td> <td> 1.1 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Роман Савоченко</a> </td></tr></table> <p>ВычиÑление Ñреднего Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð·Ð° указанный период времени [<i>bTime</i>...<i>eTime</i>], Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… архиватора <i>archtor</i> (FSArch.1m) и формирование результата Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ñ‘Ð½Ð½Ñ‹Ð¼ количеÑтвом знаков <i>prec</i> поÑле запÑтой. </p><p>Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ð°ÐµÑ‚ Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð°Ð¼Ð¸ атрибутов DAQ-параметров к которым подключён архив, и Ð°Ð´Ñ€ÐµÑ <i>addr</i> к нему запиÑываетÑÑ Ð¿Ð¾Ð»Ð½Ñ‹Ð¼ путём вроде "/DAQ/LogicLev/gen/prm_F3/a_var". Ð”Ð»Ñ Ð¿ÑƒÑтого <i>archtor</i> Ð·Ð°Ð¿Ñ€Ð¾Ñ Ð±ÑƒÐ´ÐµÑ‚ оÑущеÑтвлÑÑ‚ÑŒÑÑ Ð² целом ко вÑем Ñ Ð¿ÐµÑ€Ð¸Ð¾Ð´Ð¸Ñ‡Ð½Ð¾Ñтью буфера архива. </p><p>Ð’ процеÑÑе раÑчёта оÑущеÑтвлÑетÑÑ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ° данных в архиве на предмет доÑтоверноÑти и формируетÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ процента доÑтоверных данных <i>actPerc</i>, которые принÑли учаÑтие в получении результата. Ð’ целом, Ñтоит иÑпользовать промежуточные архиваторы — архиваторы Ñреднего качеÑтва, чтобы данных в нём, за указанный интервал, не было очень много Ð´Ð»Ñ Ð¿Ð¾Ð½Ð¸Ð¶ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾Ñти, и чтобы Ñто не было вообще одне значение. </p><p>Первично, результат предоÑтавлÑетÑÑ Ð² виде Ñтроки вещеÑтвенного Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ñ‘Ð½Ð½Ñ‹Ð¼ количеÑтвом знаков <i>prec</i> поÑле запÑтой, и Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸ÐµÐ¼ "ПуÑто" Ð´Ð»Ñ Ð½ÐµÐ´Ð¾Ñтоверных значений, что позволÑет вÑтавлÑÑ‚ÑŒ его в документ без дополнительной обработки. Однако, при необходимоÑти дополнительной обработки и ÑпецифичеÑкого форматированиÑ, результат можно получить неформатированным вещеÑтвенным значением, Ð´Ð»Ñ <i>prec</i> менше 0. </p><p><b><u>Параметры</u></b><br /> </p> <table class="wikitable"> <tr> <th> Идентификатор </th> <th> Параметр </th> <th> Тип </th> <th> Режим </th> <th> Скрытый </th> <th> По умолчанию </th></tr> <tr> <td> rez </td> <td> Результат </td> <td> Строка </td> <td> Возврат </td> <td> false </td> <td> </td></tr> <tr> <td> addr </td> <td> ÐÐ´Ñ€ÐµÑ </td> <td> Строка </td> <td> Вход </td> <td> false </td> <td> </td></tr> <tr> <td> bTime </td> <td> Ð’Ñ€ÐµÐ¼Ñ Ð½Ð°Ñ‡Ð°Ð»Ð°, Ñекунд </td> <td> Целый </td> <td> Вход </td> <td> false </td> <td> </td></tr> <tr> <td> eTime </td> <td> Ð’Ñ€ÐµÐ¼Ñ ÐºÐ¾Ð½Ñ†Ð°, Ñекунд </td> <td> Целый </td> <td> Вход </td> <td> false </td> <td> </td></tr> <tr> <td> prec </td> <td> Знаков поÑле запÑтой </td> <td> Целый </td> <td> Вход </td> <td> false </td> <td> 3 </td></tr> <tr> <td> archtor </td> <td> Ðрхиватор </td> <td> Строка </td> <td> Вход </td> <td> false </td> <td> </td></tr> <tr> <td> actPerc </td> <td> Процент актуальных значений </td> <td> ВещеÑтв. </td> <td> Выход </td> <td> false </td> <td> </td></tr></table> <p><br /> </p> <table class="wikitable"> <tr> <td> <span id="sumVal" title="#sumVal"><h3><span class="mw-headline" id=".D0.A1.D1.83.D0.BC.D0.BC.D0.B0_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D0.B9_.D0.B0.D1.80.D1.85.D0.B8.D0.B2.D0.B0_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D0.B9_.28sumVal.29"><span class="mw-headline-number">2.3</span> Сумма значений архива значений (<a href="Libs_Documents.html#sumVal" title="Special:MyLanguage/Libs/Documents">sumVal</a>)</span></h3></span> </td> <td> 1.1 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Роман Савоченко</a> </td></tr></table> <p>ВычиÑление Ñуммы значений за указанный период времени [<i>bTime</i>...<i>eTime</i>], Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… архиватора <i>archtor</i> (FSArch.1m) и формирование результата Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ñ‘Ð½Ð½Ñ‹Ð¼ количеÑтвом знаков <i>prec</i> поÑле запÑтой. </p><p>Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ð°ÐµÑ‚ Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð°Ð¼Ð¸ атрибутов DAQ-параметров к которым подключён архив, и Ð°Ð´Ñ€ÐµÑ <i>addr</i> к нему запиÑываетÑÑ Ð¿Ð¾Ð»Ð½Ñ‹Ð¼ путём вроде "/DAQ/LogicLev/gen/prm_F3/a_var". Ð”Ð»Ñ Ð¿ÑƒÑтого <i>archtor</i> Ð·Ð°Ð¿Ñ€Ð¾Ñ Ð±ÑƒÐ´ÐµÑ‚ оÑущеÑтвлÑÑ‚ÑŒÑÑ Ð² целом ко вÑем Ñ Ð¿ÐµÑ€Ð¸Ð¾Ð´Ð¸Ñ‡Ð½Ð¾Ñтью буфера архива. </p><p>Ð’ процеÑÑе раÑчёта оÑущеÑтвлÑетÑÑ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ° данных в архиве на предмет доÑтоверноÑти. </p><p>Первично, результат предоÑтавлÑетÑÑ Ð² виде Ñтроки вещеÑтвенного Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ñ‘Ð½Ð½Ñ‹Ð¼ количеÑтвом знаков <i>prec</i> поÑле запÑтой, и Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸ÐµÐ¼ "ПуÑто" Ð´Ð»Ñ Ð½ÐµÐ´Ð¾Ñтоверных значений, что позволÑет вÑтавлÑÑ‚ÑŒ его в документ без дополнительной обработки. Однако, при необходимоÑти дополнительной обработки и ÑпецифичеÑкого форматированиÑ, результат можно получить неформатированным вещеÑтвенным значением, Ð´Ð»Ñ <i>prec</i> менше 0. </p><p><b><u>Параметры</u></b><br /> </p> <table class="wikitable"> <tr> <th> Идентификатор </th> <th> Параметр </th> <th> Тип </th> <th> Режим </th> <th> Скрытый </th> <th> По умолчанию </th></tr> <tr> <td> rez </td> <td> Результат </td> <td> Строка </td> <td> Возврат </td> <td> false </td> <td> </td></tr> <tr> <td> addr </td> <td> ÐÐ´Ñ€ÐµÑ </td> <td> Строка </td> <td> Вход </td> <td> false </td> <td> </td></tr> <tr> <td> bTime </td> <td> Ð’Ñ€ÐµÐ¼Ñ Ð½Ð°Ñ‡Ð°Ð»Ð°, Ñекунд </td> <td> Целый </td> <td> Вход </td> <td> false </td> <td> </td></tr> <tr> <td> eTime </td> <td> Ð’Ñ€ÐµÐ¼Ñ ÐºÐ¾Ð½Ñ†Ð°, Ñекунд </td> <td> Целый </td> <td> Вход </td> <td> false </td> <td> </td></tr> <tr> <td> prec </td> <td> Знаков поÑле запÑтой </td> <td> Целый </td> <td> Вход </td> <td> false </td> <td> 3 </td></tr> <tr> <td> archtor </td> <td> Ðрхиватор </td> <td> Строка </td> <td> Вход </td> <td> false </td> <td> </td></tr></table> <p><br /> </p> <table class="wikitable"> <tr> <td> <span id="diagram" title="#diagram"><h3><span class="mw-headline" id=".D0.94.D0.B8.D0.B0.D0.B3.D1.80.D0.B0.D0.BC.D0.BC.D0.B0_.28diagram.29"><span class="mw-headline-number">2.4</span> Диаграмма (<a href="Libs_Documents.html#diagram" title="Special:MyLanguage/Libs/Documents">diagram</a>)</span></h3></span> </td> <td> 1.5 </td> <td> GPLv2 </td> <td> * </td> <td> en, uk, ru </td> <td> <a class="external" href="http://oscada.org/wiki/User:RomanSavochenko" title="User:RomanSavochenko">Роман Савоченко</a> </td></tr></table> <p>ПоÑтроение диаграммы трендов в SVG, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð¼Ð¾Ð¶ÐµÑ‚ далее вÑтраиватьÑÑ Ð² XHTML-документ, Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… за указанный период времени [(<i>end</i>-<i>size</i>)...<i>end</i>] и из иÑточников <i>srcs</i>. </p> <ul><li> <b>Total complexity:</b> 1.4 <span title="human-days, 1 HD — 10 hours">HD<sup style="color: blue">[!]</sup></span></li> <li> <b>Sponsored by, for initial implementation on 1.0 <span title="human-days, 1 HD — 10 hours">HD<sup style="color: blue">[!]</sup></span>:</b> Magomed, <a class="external text" href="https://www.savtech.ru" rel="nofollow noreferrer noopener" target="_blank">SAVTECH</a></li></ul> <p>Код Ñ„Ð¾Ñ€Ð¼Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð¸Ð°Ð³Ñ€Ð°Ð¼Ð¼Ñ‹ оÑнован на коде примитива "<a class="external" href="http://oscada.org/wiki/Special:MyLanguage/Sub-projects/VCA#Diagram" title="Special:MyLanguage/Sub-projects/VCA">Диаграмма</a>" визуализаторов, и который был довольно проÑто перенеÑен Ñ Ñзыка C++ на <a href="Modules/JavaLikeCalc.html" title="Special:MyLanguage/Modules/JavaLikeCalc">вÑтроенный Ñзык JavaLikeCalc</a>. Ð¡ÐµÐ¹Ñ‡Ð°Ñ Ð¿ÐµÑ€ÐµÐ½ÐµÑено-реализовано только тренды! </p><p>Вид диаграммы определÑетÑÑ ÐµÑ‘ размерами <i>hsz</i>*<i>vsz</i> и иÑходным SVG-шаблоном <i>tmpl</i>, Ñ€Ñд атрибутов кореневого тега которого имеют оÑобое значение и которые ÑоответÑтвуют примитиву "<a class="external" href="http://oscada.org/wiki/Special:MyLanguage/Sub-projects/VCA#Diagram" title="Special:MyLanguage/Sub-projects/VCA">Диаграмма</a>": </p> <ul><li> Шкала: Маркеры: шрифт (sclMarkFont), по умолчанию "Arial 10".</li> <li> Шкала: Ð³Ð¾Ñ€Ð¸Ð·Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð°Ñ (sclHor), по умолчанию "Маркеры (2)" и в целом предуÑмотрено: "Ðе риÑовать (0)", "Решетка (1)", "Маркеры (2)", "Решетка и маркеры (3)".</li> <li> Шкала: Ð²ÐµÑ€Ñ‚Ð¸ÐºÐ°Ð»ÑŒÐ½Ð°Ñ (sclVer), по умолчанию "Решетка и маркеры (3)" и в целом предуÑмотрено: "Ðе риÑовать (0)", "Решетка (1)", "Маркеры (2)", "Решетка и маркеры (3)", "Решетка (лог) (5)", "Маркеры (лог) (6)", "Решетка и маркеры (лог) (7)".</li> <li> Шкала: цвет (sclColor), по умолчанию "gray".</li> <li> Шкала: Маркеры: цвет (sclMarkColor), по умолчанию "gray".</li></ul> <p>Currently, only value archives can be used as a data source, either directly to them or through the DAQ-parameter attribute with the archive. The number of data sources is not directly limited and is written in separate lines of the argument <i>srcs</i> in the format "<b>{addr}:{min}:{max}:{color}[:{scale}[:{width}]]</b>", where: </p> <ul><li> <b>addr</b> — address to: <ul><li> the value archive ("/Archive/va_CPULoad_load") or the DAQ-parameter attribute ("/DAQ/LogicLev/gen/F3/var");</li> <li> the direct data in the form "<b><d s='1' aprox='1' per='1'>{p0}={pV0},{p1}={pV1},...,{pN}={pVN}</d></b>" for periodic, by set the attribute "s" it will allows the period setting in seconds; "aprox" — approximate the transition from one point to another instead of the previous value to all the periodicity points from the packaging;</li> <li> the direct data in the form "<b><d per='0'>{tm0}={pV0},{tm1}={pV1},...,{tmN}={pVN}</d></b>" for aperiodic of long intervals from months, where <i>tm{N}</i> in seconds.</li></ul></li> <li> <b>min</b>, <b>max</b> — minimum and maximum of the scale, in the scale absence (<b>min</b> >= <b>max</b>), it will be calculated from the real data;</li> <li> <b>color</b> — colour of the trend curve;</li> <li> <b>scale</b> — separate definition of the trend scale, by default "Global (0)" and generally provided: "Global (0)", "Markers (2)", "Grid and markers (3)", "Markers (log) (6)", "Grid and markers (log) (7)".</li> <li> <b>width</b> — width of the trend curve, by default 2.</li></ul> <div class="center"><div class="thumb tnone"><div class="thumbinner" style="width:902px;"><a class="image" href="http://oscada.org/wiki/File:LibDocuments_docRepInstVals.png"><img class="thumbimage" height="580" src="../en/files/LibDocuments_docRepInstVals.png" width="900" /></a> <div class="thumbcaption">РиÑ.2.4. Типичный результат функции "Диаграмма" в XHTML-документе.</div></div></div></div> <p><b><u>Параметры</u></b><br /> </p> <table class="wikitable"> <tr> <th> Идентификатор </th> <th> Параметр </th> <th> Тип </th> <th> Режим </th> <th> Скрытый </th> <th> По умолчанию </th></tr> <tr> <td> res </td> <td> Результат </td> <td> ТекÑÑ‚ </td> <td> Возврат </td> <td> false </td> <td> </td></tr> <tr> <td> end </td> <td> Ð’Ñ€ÐµÐ¼Ñ ÐºÐ¾Ð½Ñ†Ð°, Ñекунд </td> <td> ВещеÑтв. </td> <td> Вход </td> <td> false </td> <td> 0 </td></tr> <tr> <td> size </td> <td> Размер, Ñекунд </td> <td> ВещеÑтв. </td> <td> Вход </td> <td> false </td> <td> 3600 </td></tr> <tr> <td> srcs </td> <td> ИÑточники </td> <td> ТекÑÑ‚ </td> <td> Вход </td> <td> false </td> <td> <pre style="white-space: pre-wrap;"> /DAQ/LogicLev/gen/F3/var:0:100:#ae77c3:2 /Archive/va_CPULoad_load:0:0:darkcyan:2 </pre> </td></tr> <tr> <td> hsz </td> <td> Горизонтальный размер, пикÑелей </td> <td> Целый </td> <td> Вход </td> <td> false </td> <td> 600 </td></tr> <tr> <td> vsz </td> <td> Вертикальный размер, пикÑелей </td> <td> Целый </td> <td> Вход </td> <td> false </td> <td> 400 </td></tr> <tr> <td> arch </td> <td> Ðрхиватор </td> <td> Строка </td> <td> Вход </td> <td> false </td> <td> </td></tr> <tr> <td> tmpl </td> <td> Шаблон </td> <td> ТекÑÑ‚ </td> <td> Вход </td> <td> false </td> <td> <div class="mw-highlight mw-content-ltr" dir="ltr"><pre><span class="nt"><svg</span> <span class="na">xmlns=</span><span class="s">"http://www.w3.org/2000/svg"</span> <span class="na">version=</span><span class="s">"1.1"</span> <span class="na">sclMarkFont=</span><span class="s">"Arial 10"</span> <span class="na">sclHor=</span><span class="s">"2"</span> <span class="na">sclVer=</span><span class="s">"3"</span> <span class="na">sclColor=</span><span class="s">"gray"</span> <span class="na">sclMarkColor=</span><span class="s">"gray"</span><span class="nt">></span> <span class="nt"><style</span> <span class="na">type=</span><span class="s">"text/css"</span><span class="nt">></span> #scVer rect { stroke: none; } #scVer text { stroke: none; } #scHor rect { stroke: none; } #scHor text { stroke: none; } #drawArea path { fill: none; } <span class="nt"></style></span> <span class="c"><!--Draw grid and markers--></span> <span class="nt"><g</span> <span class="na">id=</span><span class="s">"scVer"</span> <span class="nt">/></span> <span class="nt"><g</span> <span class="na">id=</span><span class="s">"scHor"</span> <span class="nt">/></span> <span class="c"><!--Curves area --></span> <span class="nt"><g</span> <span class="na">id=</span><span class="s">"drawArea"</span> <span class="nt">/></span> <span class="nt"></svg></span> </pre></div> </td></tr></table> </div><table style="border-top: dotted 2px #999999; margin-top: 20pt; color: gray;" width="100%"><tr><td style="text-align: left;" width="40%"><a href="http://oscada.org/wiki/Libs/Documents/ru">Libs/Documents/ru</a> - <a href="http://oscada.org/en/main/about-the-project/licenses/">GFDL</a></td><td style="text-align: center;">March 2025</td><td style="text-align: right;" width="40%">OpenSCADA 1+r3012</td></tr></table></body> </html>