OpenSCADAWiki: Home Page En/Doc/DB Arch ...

Home | Каталог | Изменения | Комментарии | Пользователи | Регистрация | Вход  Пароль:  
 

Module of subsystem "Archives" <DBArch>

Module: DBArch
Name: Arhivator on the DB
Type: Archive
Source: arh_DBArch.so
Version: 2.4
Author: Roman Savochenko, Maxim Lysenko (2009)
Description: The archiver module. Provides functions for messages and values archiving to DB.
License: GPL

Оглавление

Introduction

The module designed for archiving messages and values of OpenSCADA to a database maintained by OpenSCADA.


Any SCADA system provides the ability to archive the collected data, i.e. formation of history of the changes (dynamics) of processes. Archives conditionally can be divided into two types: archives of messages and archives of values.


A feature of the archives of messages is that so-called events are archived. The characteristic feature of the events is its time of occurrence. The archives of messages are usually used for archiving messages in the system, that is logging and reports. Depending on the source the messages can be classified according to different criteria. For example, this may be the reports of emergency situations, the reports of actions of the operators, reports of the connection lost and others.


A feature of the archives of values is their frequency, measured in the time lag between two adjacent values. Archives of values are used for archiving the history of continuous processes. As the process is continuous, it can only be archived by introducing the notion of quantization of time gathering, because otherwise we get the archives of infinite dimensions in view of continuity of the nature of the process. In addition, practically, we can get value from the time limited by the data sources. For example, a fairly high-quality data sources in the industry, are rarely allowed to receive data at a frequency of more than 1kHz. And this is without taking into account of the sensors themselves, which have even less qualitative characteristics.


For archiving in the system OpenSCADA the subsystem "Archives" is provided. This subsystem, according to the types of archives, consists two parts: an archives of messages and archives of values. The subsystem, in general, is a module that allows you to create archives based on the different nature and methods of storing of data. This module provides a mechanism for the archiving on the data base for both: for the flow of messages, and for the flow of values.

1. Message Archiver

Archives of messages are formed by an archiver. There can be the set of archivers, with individual settings, allowing to share archiving of different classes of messages.


The archiver of messages of this module stores data in a database table, which is named "DBAMsg_{ArchID}", where:


Module provides additional settings for the archiving process (Fig. 1).


Additional settings of an archiving process of messages. (113 Кб)
Fig.1. Additional settings of the archiving process of messages.

Those additional parameters represents by:


The table of the database archiver has structure {MIN, TM, TMU, CATEG, MESS, LEV}, where:

2. Values Archiver

Archives of values, by default, are formed particularly by archivers of the values for each registered archive. There can be a lot of archivers with individual settings that allow to divide the archives by various parameters, such as the accuracy and depth. The parameter's archives of one archivator can be grouped, a single table, for pointed limit of the parameters quantity. The grouping allows significant increase the archiving productivity by sending to DB single request which values of parameters into the group.


Archive of values is an independent component, which includes buffer processed by archivers. The main parameter of archive of value is a source of data. As a source of data may make the attributes of the parameters of subsystem "Data acquisition", as well as other external data sources (passive mode). Other sources of data could be: network archivers of remote OpenSCADA systems, the environment of programming of systems OpenSCADA etc. No less important parameters are the parameters of the archive buffer. From the parameters of the buffer the opportunity of working of archivers depends on.  (2 Кб) Thus, the frequency of values in the buffer should be no more than the frequency of the fastest archiver, a buffer size not less than double the amount for the slowest archiver. Otherwise, the possible loss of data.


The overall scheme of archival of values clearly shown in Fig. 2.


The overall scheme of the process of archiving by module DBArch. (35 Кб)
Fig.2. The overall scheme of the process of archiving.

Archive of this module stores data in a database table, which is called in way "DBAVl_{ArchivatorID}_{ArchiveID}", for the single mode, and "DBAVl_{ArchivatorID}_<GRP>{N}", for the group mode, where:


The module provides additional settings for the archiving process (Fig. 3).


Additional settings of the archiving process of values. (93 Кб)
Fig.3. Additional settings of the archiving process of values.

Those additional parameters represents by:


The table of database archiver of values has structure: {MARK, TM, VAL), for the single mode, and {MARK, TM, {PRM1}, {PRM2}, {PRMN}}, for the grouping mode, where:

3. Informational table of the archival tables

To store the beginning, end and other service information of archives in archival tables the informational table with the name of the module is created: "DBArch". This table has the structure {TBL, BEGIN, END, PRM1, PRM2, PRM3), where:


According to information into the table for the value archivators the archive objects restoring and creation supported.

4. Efficiency

In the design and implementation of the module it wasn't included any mechanisms of improving the process of archiving but presenting of objective limits into the same data bases and its accessing interfaces. Then the efficiency of archiving to DB mostly related to the DB and its accessing interface. From the most effective interfaces and approaches of the performance increasing there need to mark the following ones:


Results of measurement of the performance of archiving placed to the following table:

Test / Environment and DB Intel Core3 1.3GHz, Local PostgreSQL 9.3, SSD AMD A8 3.5GHz, Local PostgreSQL 9.3, HDD
Values archiving, 60 records, 1 signal (seconds) 53...63 13...14
Values archiving, 60 records, 10 signal (seconds) 65...67 16...19
Values archiving, 60 records, 100 signal (seconds) 154...163 52...60
Result: average time of writing 60 values of signal (millisecond),
maximum number of the archiving signals in periodicity 1 second
1, 60000 0.4, 150000

Links

Страницы, ссылающиеся на данную: HomePageEn/Doc
HomePageEn/Function


 
Много файлов (5).[Показать файлы/форму]
Комментариев нет. [Показать комментарии/форму]