From OpenSCADAWiki
Jump to: navigation, search
Other languages:
English • ‎mRussian • ‎Українська
Name Version License Source Languages Author Description
Service procedures library 1.2 GPLv2 OscadaLibs.db (SQL, GZip) > DAQ.JavaLikeCalc.servProc en, uk, ru Roman Savochenko Library of the service procedures of different application.
  • Founded: November 2017
  • Initially created: in the old Wiki
  • Used by: different OpenSCADA processes

The library is created to provide service functions of performing service tasks about the OpenSCADA environment. The library is not static, but based on the module JavaLikeCalc, allowing to create calculations on the Java-like language. The functions' names and their parameters are available in languages: English, Ukrainian and mRussian.

To addressing the library functions you can use the static call address DAQ.JavaLikeCalc.lib_servProc.{Func}() or dynamic SYS.DAQ.JavaLikeCalc["lib_servProc"]["{Func}"].call(), SYS.DAQ.JavaLikeCalc["lib_servProc"].{Func}()". Where {Func} — function identifier in the library.

For connection the library to a project of the OpenSCADA station you can obtain the database file as:

  • supplied with a ready and proper package of the Linux distribution like to "openscada-libdb-main", "openscada-LibDB.Main";
  • directly taken for most actual one from the subversion repository and converted to the DB SQLite file in way:
wget http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/OscadaLibs.sql
sqlite3 -init OscadaLibs.sql OscadaLibs.db .exit

This obtained file next you can place into the project's database directory of the station and create the database object for the DB module "SQLite", registering the database file in the configuration.


1 TEST: Packing of the archiver on FS (archPackFStests)

1.0 GPLv2 * en Roman Savochenko

Tests set for packing of the value archives to File System, to check the optimization algorithm. The stages are provided:

  • Stage 0: Filling the main values: "1,1,10,10,100,100,1000,1000,10000,10000,EVAL"
  • Stage 1: Changing to different value 20: "1,1,20,10,100,100,1000,1000,10000,10000,EVAL"
  • Stage 2: Setting a value for merging (equal) to the up (10): "1,1,20,10,10,100,1000,1000,10000,10000,EVAL"
  • Stage 3: Setting a value for merging (equal) to the down (1000): "1,1,20,10,10,1000,1000,1000,10000,10000,EVAL"
  • Stage 4: Setting a different value to the end 20000: "1,1,20,10,10,1000,1000,1000,10000,10000,20000,EVAL"
  • Stage 5: Changing the end value for merging to the up (10000): "1,1,20,10,10,1000,1000,1000,10000,10000,10000,EVAL"
  • Stage 6: Setting a value to the end for merging to the up (10000): "1,1,20,10,10,1000,1000,1000,10000,10000,10000,10000,EVAL"
  • Stage 7: Setting the end value to EVAL: "1,1,20,10,10,1000,1000,1000,10000,10000,10000,EVAL"
  • Stage 8: Setting an equal value for inserting 10000: "1,1,20,10,10,1000,1000,1000,10000,10000,10000,EVAL"

Function parameters

Identifier Name Type Mode Default
tm Start time (14.03.2015 21:37) Integer Input 1426361839
per Period, seconds Integer Input 60
addr Archive address String Input test123
archiver Archiver address String Input FSArch.1m
step Step (0-8), -1 for all Integer Input -1


2 TEST: Release (releaseTests)

2.0 GPLv2 * en Roman Savochenko

Set of formal tests of the OpenSCADA releases:
0: System
1: Security User/Group tests
2: Transport subsystem tests

  • Data transferring through output and input transports by the test "TrOut":
means presence of the input transports with the name "testRelease[{N}]" and the connected output transport adress into description or address field (if equal one).

3: Protocol subsystem tests

  • Execution of the test controller object DAQ.ModBUS.testTCP:
means presence of the controller object DAQ.ModBUS.testTCP.
  • Execution of the test controller object DAQ.OPC_UA.test:
means presence of the controller object DAQ.OPC_UA.test.
  • Send requests to a test-echo protocol from a transport:
means presence of the user protocol object Protocol.UserProtocol.up_test.

4: Archive subsystem tests

  • Using the test "Mess" of the module "SystemTests" for archiving messages:
means presence the message archivers "test";
  • Assign/Clear archiving from the parameter attribute:
means presence "/DAQ/LogicLev/experiment/F3" with the attribute "ed", and the value archivers "1s"
  • The tests "Archive" of the value archiver to verify the correctness of the functioning of the sequential mechanism for packaging by "SystemTests":
means presence the archive "testArch_cntr" with the data period 1s and processed by the archiver FSArch.1s.

5: DB subsystem tests

  • The tests "BD" of the module "SystemTests":
means presence of the test DB with the name "testRelease".

6: DAQ subsystem tests

  • Test "Param" from the module "SystemTests":
presence of the DAQ parameter LogicLev.experiment.F3.
  • Test "Val" of the module "SystemTests" for the parameter attribute:
presence of the DAQ parameter LogicLev.experiment.F3.var.
  • Blocks create/remove, change, load, save and load from config and copy, set link:
presence the DAQ controller object "KM102cntr" for copy the block scheme.
presence the DAQ parameter LogicLev.experiment.F3.var.

7: UI subsystem tests
8: Special subsystem tests

Function parameters

Identifier Name Type Mode Default
sub Subsystem (-1:All;0:SYS;1:Security;2:Transport;... Integer Input -1
rez Result Text Output
rezF Result for HTML file Text Output


3 CRC 16 (crc16)

1.0 GPLv2 * en Roman Savochenko

Standard Cyclic Redundancy Check (CRC) with free setting the polynomial, by default 0x8005. It isn't actual more by the common common CRC implementing.

Function parameters

Identifier Name Type Mode Default
in Input String Input
out Result Integer Output
poly Polynomial (reversion) Integer Input 40961


4 Archives recalculation (procArh)

1.0 GPLv2 * en Roman Savochenko

Value archives recalculation.

Function parameters

Identifier Name Type Mode Default
fromarch From archive String Input Archive.va_ai3_code
toarch To archive String Input Archive.va_ai3_dP
begs Begin time String Input 2006-08-08 9:21:56
ends End time String Input 2006-08-08 11:21:55


5 EXT: WackoWiki to MediaWiki (wacko2media)

1.1 GPLv2 * en Roman Savochenko

Procedure of conversion Wiki-dialect from WackoWiki to MediaWiki. Used and using to move OpenSCADA Wiki to MediaWiki.

Function parameters

Identifier Name Type Mode Default
ndb MySQL DB id String Input wiki
wpg Wiki page String Input HomePageUk/Doc/SQLite
rez Result Text Return


6 EXT: Off-line documentation (docOffLine)

1.3 GPLv2 * en Roman Savochenko

Procedure of forming the offline documentation of OpenSCADA from Wiki by reading and processing the specified Wiki pages on different languages, currently it is: English, Ukrainian, mRussian.

Function parameters

Identifier Name Type Mode Default
res Result String Output
reqTr Tries of requests Integer Output 3
resDir Results directory String Input /home/roman/roman/work/Проекти/OpenSCADA/doc/
pages Pages list

Rows in the form "{wiki}:{langs}:{dest}".

Text Input
Documents:en,uk,ru:index.html
Documents/Release_0.9:en,uk,ru:Release_0.9.html
About:en,uk,ru:About.html
Documents/Terms:en,uk,ru:Terms.html
Functions_and_demands:en,uk,ru:Functions_and_demands.html
Works/To_do:en:To_do.html
Documents/FAQ:en,uk,ru:FAQ.html
Documents/Quick_start:en,uk,ru:Quick_start.html
Documents/Program_manual:en,uk,ru:Program_manual.html
Documents/How_to:en,ru,uk:How_to.html
Documents/How_to/Install:en,ru,uk:How_to_Install.html
Documents/How_to/Live_disk:en,ru,uk:How_to_Live_disk.html
Documents/How_to/Violations,_alarms_and_notifications:en,ru,uk:How_to_Violations.html
Documents/How_to/Cyclic_programming:en,ru,uk:How_to_Cyclic_programming.html
Documents/How_to/Debug:en,ru,uk:How_to_Debug.html
Documents/How_to/Transferring_project_configuration:en,ru,uk:How_to_Transferring_project_configuration.html
Documents/How_to/Build_from_source:en,ru,uk:How_to_Build_from_source.html
Documents/How_to/Crash_report:en,ru,uk:How_to_Crash_report.html
Documents/How_to/Create_module:en,ru,uk:How_to_Create_module.html
Documents/DAQ:en,uk,ru:DAQ.html
Documents/User_API:en,uk,ru:User_API.html
Documents/API:en:API.html
Modules/SQLite:en,uk,ru:Modules/SQLite.html
Modules/MySQL:en,uk,ru:Modules/MySQL.html
Modules/FireBird:en,uk,ru:Modules/FireBird.html
Modules/DBF:en,uk,ru:Modules/DBF.html
Modules/PostgreSQL:en,uk,ru:Modules/PostgreSQL.html
Modules/Sockets:en,uk,ru:Modules/Sockets.html
Modules/Serial:en,uk,ru:Modules/Serial.html
Modules/SSL:en,uk,ru:Modules/SSL.html
Modules/SelfSystem:en,uk,ru:Modules/SelfSystem.html
Modules/UserProtocol:en,uk,ru:Modules/UserProtocol.html
Modules/HTTP:en,uk,ru:Modules/HTTP.html
Modules/JavaLikeCalc:en,uk,ru:Modules/JavaLikeCalc.html
Modules/LogicLev:en,uk,ru:Modules/LogicLev.html
Modules/BlockCalc:en,uk,ru:Modules/BlockCalc.html
Modules/DAQGate:en,uk,ru:Modules/DAQGate.html
Modules/System:en,uk,ru:Modules/System.html
Modules/ModBus:en,uk,ru:Modules/ModBus.html
Modules/DCON:en,uk,ru:Modules/DCON.html
Modules/OPC_UA:en,uk,ru:Modules/OPC_UA.html
Modules/SNMP:en,uk,ru:Modules/SNMP.html
Modules/ICP_DAS:en,uk,ru:Modules/ICP_DAS.html
Modules/Siemens:en,uk,ru:Modules/Siemens.html
Modules/DiamondBoards:en,uk,ru:Modules/DiamondBoards.html
Modules/Comedi:en,uk,ru:Modules/Comedi.html
Modules/SoundCard:en,uk,ru:Modules/SoundCard.html
Modules/BFN:en,uk,ru:Modules/BFN.html
Modules/SMH2Gi:en,uk,ru:Modules/SMH2Gi.html
Modules/GPIO:en,uk,ru:Modules/GPIO.html
Modules/FSArch:en,uk,ru:Modules/FSArch.html
Modules/DBArch:en,uk,ru:Modules/DBArch.html
Modules/VCAEngine:en,uk,ru:Modules/VCAEngine.html
Modules/QTStarter:en,uk,ru:Modules/QTStarter.html
Modules/QTCfg:en,uk,ru:Modules/QTCfg.html
Modules/Vision:en,uk,ru:Modules/Vision.html
Modules/WebCfgD:en,uk,ru:Modules/WebCfgD.html
Modules/WebCfg:en,uk,ru:Modules/WebCfg.html
Modules/WebVision:en,uk,ru:Modules/WebVision.html
Modules/WebUser:en,uk,ru:Modules/WebUser.html
Modules/FLibSYS:en,uk,ru:Modules/FLibSYS.html
Modules/SystemTests:en,uk,ru:Modules/SystemTests.html
Modules/FLibMath:en,uk,ru:Modules/FLibMath.html
Modules/FLibComplex1:en,uk,ru:Modules/FLibComplex1.html
pagesCur Current pages list

Rows in the form "{wiki}:{langs}:{dest}", for empty here used "pages".

Text Input