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.
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/MessLev | 0 |
user | /DemoStation/Workdir | /mnt/home/roman/work/OScadaD/share/OpenScada |
user | /DemoStation/UI/QTStarter/StartMod | QTCfg |
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> |
LibBD | MySQL | Function's library | server.diya.org;roman;123456;oscadaUserLibs | KOI8-U | 1 | |
AnastModel | SQLite | AGLKS model | ./DATA/AGLKSModel.db | UTF8 | 1 | |
GenDB | MySQL | Main DB | server.diya.org;roman;123456;oscadaDemoSt | KOI8-U | 1 |
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 |
AutoDA | Automatic source | Data acquisition from active sources with automatic identification of them. | 1 | 1 | ... |
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 |
P3 | P3 | Pressure on the diaphragm | 1 | ... |
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> |
base | Basic templates | Basic templates' library | tmplib_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> |
digAlarm | Digital signal | Alarm over the discrete parameter | JavaLikeCalc.JavaScript |
simpleBoard | Simple boards | Formation 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> |
digAlarm | in | Вход | 3 | 144 | 2 | |
digitBlock | cmdOpen | Open command | 3 | 161 | Parameter:com | 0 |
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 |
web1 | Sockets | Web 1 | Work web transport for proced http requests. | TCP::10002:0 | HTTP | 1 | ... |
Self | SelfSystem | TCP 1 | Test TCP input socket! | Sockets | TCP::10001:1 | 1 | ... |
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_o1 | Sockets | TCP Out 1 | Output TCP transport 1 | TCP::10001 | 1 | ... |
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_o1 | Sockets | TCP Out 1 | Output TCP transport 1 | TCP::10001 | 1 | ... |
Подсистема “Архивы” содержит три таблицы с фиксированными именами:
Таблицы архиваторов могут дополняться полями, характерными для каждого типа архиватора.
Таблица 17. Структура таблицы архивов значений (Archive_val).
Идентификатор <ID> | Имя <NAME> | Описание <DESCR> | Запускать <START> | Режим источника значений <SrcMode> | Источник значений <Source> | Тип значений <VTYPE> | Периодичность буфера <BPER> | Размер буфера <BSIZE> | Жесткая сетка буфера <BHGRD> | Высокое разрешение времени буфера <BHRES> | Перечень обслуживающих архиваторов <ArchS> |
CPULoad_load | 1 | 1 | DAQ.System.AutoDA.CPULoad.load | 4 | 1 | 100 | 0 | 0 | FSArch.1s;DBArch.1m;FSArch.1m; | ||
ai1_dP | 0 | 0 | 4 | 0.0001 | 100 | 1 | 1 | FSArch.POMP_20070301;FSArch.1s; |
Таблица 18. Структура таблицы архиваторов значений (Archive_val_proc).
Идентификатор <ID> | Тип архиватора <MODUL> | Имя <NAME> | Описание <DESCR> | Запускать <START> | Адрес <ADDR> | Период значений <V_PER> | Период архивирования <A_PER> | Индивидуальные поля типов архиваторов |
1s | FSArch | Односекундный | 1 | ARCHIVES/VAL/1s | 1 | 60 | ... | |
POMP_20070301 | FSArch | 0 | ARCHIVES/VAL/POMP_20070301 | 0.0001 | 60 | ... |
Таблица 19. Структура таблицы архиваторов сообщений (Archive_mess_proc).
Идентификатор <ID> | Тип архиватора <MODUL> | Имя <NAME> | Описание <DESCR> | Запускать <START> | Шаблон категории сообщений <CATEG> | Уровень сообщений <LEVEL> | Адрес <ADDR> | Индивидуальные поля типов архиваторов |
StatErrors | FSArh | Ошибки станции | 1 | /DemoStation* | 4 | ARCHIVES/MESS/stError/ | ... | |
NetRequsts | FSArh | Сетевые запросы | 1 | /DemoStation/Transport/Sockets* | 1 | ARCHIVES/MESS/Net/ | ... |
Подсистема “Безопасность” содержит две таблицы: таблица пользователей системы (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 |
Каждый модуль может иметь собственные таблицы БД для хранения индивидуальных данных. Структура таблиц БД модулей может формироваться свободно, исходя из внутренних потребностей.