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 DAQ_<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" (DAQ_<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 | 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 | ... |
Subsystem "Archives" contains three tables with fixed names:
Tables of the archivers can be complemented by fields, typical for each type of archiver.
Table 17. Structure of the table of the values' archive (Archive_val).
ID <ID> | Name <NAME> | Description <DESCR> | To start <START> | The mode of the values' source <SrcMode> | Source of the values <Source> | Type of the values <VTYPE> | Buffer's periodicity <BPER> | Buffer's size <BSIZE> | Buffer's hard grid <BHGRD> | High resolution of the buffer's time <BHRES> | List of the serviced archivers <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; |
Table 18. Structure of the table of the values' archivers (Archive_val_proc).
ID <ID> | Archiver's type <MODUL> | Name <NAME> | Description <DESCR> | To start <START> | Address <ADDR> | Values' period <V_PER> | Archiving period <A_PER> | Individual fields of the archivers' types |
1s | FSArch | One second | 1 | ARCHIVES/VAL/1s | 1 | 60 | ... | |
POMP_20070301 | FSArch | 0 | ARCHIVES/VAL/POMP_20070301 | 0.0001 | 60 | ... |
Table 19. Structure of the table of the messages' archivers (Archive_mess_proc).
ID <ID> | Archiver's type <MODUL> | Name <NAME> | Description <DESCR> | To start <START> | Template of the messages' category <CATEG> | Messages' level <LEVEL> | Address <ADDR> | Individual fields of the archivers' types |
StatErrors | FSArh | Station error | 1 | /DemoStation* | 4 | ARCHIVES/MESS/stError/ | ... | |
NetRequsts | FSArh | Network requests | 1 | /DemoStation/Transport/Sockets* | 1 | ARCHIVES/MESS/Net/ | ... |
Subsystem "Security" contains two tables: table of the system's users (Security_user) and groups of the system (Security_grp).
Table 20. Structure of the table of the system's users (Security_user).
Name <NAME> | Description <DESCR> | Password <PASS> | Picture <PICTURE> |
root | SuperUser | openscada | |
user | User | user |
Table 21. Structure of the table of the system's users groups (Security_grp).
Name <NAME> | Description <DESCR> | Users in the group <USERS> |
root | SuperUser's group | root;user |
users | User's group | toot;user |
Each module can have its own database tables to store individual data. Structure of database tables of the modules can be formed freely, based on internal needs.