OpenSCADAWiki: Home Page En/Doc/API/part17 ...

Home | Index | Changes | Comments | Users | Registration | Login  Password:  
 
This is an old revision of HomePageEn/Doc/API/part17 from 2009-11-16 15:31:07..

17. Organization and structure of the database of the system components

Nodes and subsystems of OpenSCADA may have their own tables in the database to store their own data. The structure of tables is individual and determined by the <TConfig> object. Nodes and subsystems must create and configure the <TConfig> object under their demands.

17.1. System tables

OpenSCADA system has two system tables: BD and SYS. Table BD contains records of registered databases and the table SYS contains data of system-wide parameters.


Table 7. Structure if the table of system-wide parameters (SYS).

User <user>Parameter's ID <id>Parameter's value <val>
root/DemoStation/MessLev0
user/DemoStation/Workdir/mnt/home/roman/work/OScadaD/share/OpenScada
user/DemoStation/UI/QTStarter/StartModQTCfg

Table 8. Structure if the table of registered DB.

ID <ID>DB Type <TYPE>Name <NAME>Description <DESCR>Address <ADDR>Codepage of the database contents <CODEPAGE>To enable <EN>
LibBDMySQLFunction's library server.diya.org;roman;123456;oscadaUserLibsKOI8-U1
AnastModelSQLiteAGLKS model ./DATA/AGLKSModel.dbUTF81
GenDBMySQLMain DB server.diya.org;roman;123456;oscadaDemoStKOI8-U1

17.2. Tables of the "Data acquisition" subsystem

Controllers (data sources) of the subsystem "Data acquisition" are stored in the tables of their subsystems named DQA_ <ModName>. The structures of these tables can differ significantly, but all of them have the obligatory fields. The overall structure of the controllers' tables is presented in table 9.


Table 9. The overall structure of the controllers' tables of the subsystem "Data acquisition" (DQA_<ModName>).

ID <ID>Controller's name <NAME>Description <DESCR>To enable<ENABLE>To start <START>Individual parameters
AutoDAAutomatic sourceData acquisition from active sources with automatic identification of them.11 ...

Like the controller's table, the parameter's table for different types of data sources can differ significantly, but also have the obligatory fields. In addition to the differences which is typical to the type of data source, parameter's tables can still be different for different types of parameters. The overall structure of the parameters' tables is given in Table 10.


Table 10. The overall structure of the parameters' tables of the subsystem "Data acquisition".

Parameter's shifr <SHIFR>Parameter's name <NAME>Parameter's description <DESCR>To enable <EN>Individual parameters
P3P3Pressure on the diaphragm1...

In addition to controllers and parameters the subsystem "Data acquisition" contains parameter's templates. Parameter's templates are grouped by templates' libraries and are stored in tables of three types: templates' library table (ParamTemplLibs) - table 11, parameter's templates table - table 12 and template's parameters table - table 13.


Table 11. Structure of the templates' library table.

ID <ID>Name <NAME>Description <DESCR>DB table of the library <DB>
baseBasic templatesBasic templates' librarytmplib_base
S7 Templates' Library for Siemens S7 series controllers.tmplib_S7

Table 12. Structure of the templates' table.

ID <ID>Name <NAME>Description <DESCR>Text of the template procedure <PROGRAM>
digAlarmDigital signalAlarm over the discrete parameterJavaLikeCalc.JavaScript
simpleBoardSimple boardsFormation of the simple boards of the analog signal.JavaLikeCalc.JavaScript

Table 13. Structure of the table of the template's parameters.

Template's ID <TMPL_ID>Parameter's ID <ID>Name <NAME>Type <TYPE>Flags <FLAGS>Value <VALUE>Position <POS>
digAlarminВход3144 2
digitBlockcmdOpenOpen command3161Parameter:com0

17.3. Tables of the "Transports" subsystem

Subsystem "Transports" is divided into incoming and outgoing transports. For each type of transport there is its own table with its own structure. Table names, respectively: Transport_In and Transport_Out. Tables can be supplemented by fields, typical to the type of transport.


Table 14. Structure of the incoming transport's table (Transport_in).

ID <ID>Type <MODULE>Name <NAME>Description <DESCRIPT>Address <ADDR>Protocol <PROT>To start <START>Individual fields of the transports' types
web1SocketsWeb 1Work web transport for proced http requests.TCP::10002:0HTTP1...
SelfSelfSystemTCP 1Test TCP input socket!SocketsTCP::10001:11...

Table 15. Structure of the outgoing transport's table (Transport_out).

ID <ID>Type <MODULE>Name <NAME>Description <DESCRIPT>Address <ADDR>To start <START>Individual fields of the transports' types
tcp_o1SocketsTCP Out 1Output TCP transport 1TCP::100011...

For the centralized description of the list of external OpenSCADA stations it is used the table of external hosts (CfgExtHosts). The structure of this table is shown in Table 16.


Table 16. The structure of the table of external OpenSCADA hosts (CfgExtHosts).

User of the system <OP_USER>ID <ID>Name <NAME>Transport <TRANSP>Address of the remote host <ADDR>**User of the external host
<USER>**
Password of the user of the external host <PASS>
tcp_o1SocketsTCP Out 1Output TCP transport 1TCP::100011...

17.4. Tables of the "Archives" subsystem

Подсистема “Архивы” содержит три таблицы с фиксированными именами:


Таблицы архиваторов могут дополняться полями, характерными для каждого типа архиватора.


Таблица 17. Структура таблицы архивов значений (Archive_val).

Идентификатор <ID>Имя <NAME>Описание <DESCR>Запускать <START>Режим источника значений <SrcMode>Источник значений <Source>Тип значений <VTYPE>Периодичность буфера <BPER>Размер буфера <BSIZE>Жесткая сетка буфера <BHGRD>Высокое разрешение времени буфера <BHRES>Перечень обслуживающих архиваторов <ArchS>
CPULoad_load 11DAQ.System.AutoDA.CPULoad.load4110000FSArch.1s;DBArch.1m;FSArch.1m;
ai1_dP 00 40.000110011FSArch.POMP_20070301;FSArch.1s;

Таблица 18. Структура таблицы архиваторов значений (Archive_val_proc).

Идентификатор <ID>Тип архиватора <MODUL>Имя <NAME>Описание <DESCR>Запускать <START>Адрес <ADDR>Период значений <V_PER>Период архивирования <A_PER>Индивидуальные поля типов архиваторов
1sFSArch Односекундный1ARCHIVES/VAL/1s160...
POMP_20070301FSArch 0ARCHIVES/VAL/POMP_200703010.000160...

Таблица 19. Структура таблицы архиваторов сообщений (Archive_mess_proc).

Идентификатор <ID>Тип архиватора <MODUL>Имя <NAME>Описание <DESCR>Запускать <START>Шаблон категории сообщений <CATEG>Уровень сообщений <LEVEL>Адрес <ADDR>Индивидуальные поля типов архиваторов
StatErrorsFSArhОшибки станции 1/DemoStation*4ARCHIVES/MESS/stError/...
NetRequstsFSArhСетевые запросы 1/DemoStation/Transport/Sockets*1ARCHIVES/MESS/Net/...

17.5. Таблицы подсистемы “Безопасность”

Подсистема “Безопасность” содержит две таблицы: таблица пользователей системы (Security_user) и групп системы (Security_grp).


Таблица 20. Структура таблицы пользователей системы (Security_user).

Имя <NAME>Описание <DESCR>Пароль <PASS>Изображение <PICTURE>
rootСуперпользовательopenscada
userПользовательuser

Таблица 21. Структура таблицы групп пользователей системы (Security_grp).

Имя <NAME>Описание <DESCR>Пользователи в группе <USERS>
rootГруппа суперпользователейroot;user
usersГруппа пользователейtoot;user

17.6. Структура баз данных модулей

Каждый модуль может иметь собственные таблицы БД для хранения индивидуальных данных. Структура таблиц БД модулей может формироваться свободно, исходя из внутренних потребностей.


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