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

Home | Index | Changes | Comments | Users | Registration | Login  Password:  
 
This is an old revision of HomePageEn/Doc/DBArch from 2016-06-23 17:18:46..

Module of subsystem "Archives" <DBArch>

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

Contents

Introduction

The module is 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, i.e.
conducting of logs 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 glitches of connection 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 interviewing, 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 conducting of archives in the system OpenSCADA the subsystem «Archives» is provided. This subsystem, according to the types of archives, consists of 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 file system for both: for the flow of messages, and for the flow of values.

1. Message Archiver

Archives of messages are formed by 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 by the following way: "DBAMsg_{ArchID}". Where:


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


Additional settings of an archiving process of messages. (113 Kb)
Fig.1. Additional settings of an archiving process of messages.

Those parameters represents by:


Table of the database archiver has the following structure: {MIN,TM, TMU, CATEG, MESS, LEV}. Where:

2. Values Archiver

Archives of values 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.


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, 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. 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 vividly depicted in Fig. 2.


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

Archive of this module stores data in a database table, which is called by the following way: "DBAVl_{ArchID}_{ArchiveID}". Where:


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


Additional settings of the archiving process of values. (93 Kb)
Fig.3. Additional settings of an archiving process of values.

Those parameters represents by:


Table of database archiver of values is as follows: {TM, TMU, VAL). Where:

3. Informational table of the archival tables

To store the beginning, end and other 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:

4. Productivity and limits

Due to the specific of working with the DBMS and it's related low performance here also presented limits to the data access by the OpenSCADA DB abstraction. The abstraction means now using the seek API (SELECT by pointed single records) and by minutes. Into following table shown some practical results for different DBMS and it's configuration, for time limit into 5 seconds:


Configuration Seek limit, records Seeks, read number limit Notes
PostgreSQL, local, Intel Core I5 1500 10000 Then maximum messages flow is 1500 messages per minute and maximum guaranty requested block is 7 days.

Links

Referring pages: HomePageEn/Doc
HomePageEn/Function


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