Library is created to provide common operations retrieve data for report documents using data from data sources (DAQ) and their archives. The library is not static, but based on the module JavaLikeCalc, allowing to create calculations on the Java-like language.
To address the functions of the library you can use static call address "DAQ.JavaLikeCalc.lib_doc.{Func}()" or dynamic "SYS.DAQ.JavaLikeCalc["lib_doc"]["{Func}"].call()", "SYS.DAQ.JavaLikeCalc["lib_doc"].{Func}()". Where {Func} — function identifier in the library.
To connect the library to the project of the OpenSCADA station it is possible by downloading the attached file of the database, placing it in in the database directory of the station's project and creating the database object for the DB module "SQLite", indicating the database file in the configuration.
1 The library structure
The library contains several functions often needed for report documents preparation based on data of data sources of OpenSCADA. The functions' names and its parameters are available in three languages: English, Russian and Ukrainian.
Average value of archive (averVal)
Description: Calculate the average value over a specified period of time an archive and issuing results with the specified number of decimal points. Parameters:
ID
Parameter
Type
Mode
Hide
Default
rez
Result
String
Return
false
addr
Address
String
Input
false
bTime
Begin time (s)
Integer
Input
false
eTime
End time (s)
Integer
Input
false
prec
Signs after dot
Integer
Input
false
3
archtor
Archivator
String
Input
false
Program:
Getting value from archive (getVal)
Description: Query the value for a specified time from the assigned archive and issuing the result with the specified number of decimal points. Parameters:
ID
Parameter
Type
Mode
Hide
Default
rez Result
String
Return
false
addr
Address
String
Input
false
time
Time (s) Integer
Input
false
uTime
Time (us)
Integer
Input
false
prec
Signs after dot
Integer
Input
false
3
archtor
Archivator
String
Input
false
strong
Strong
Boolean
Input
false
0
Program:
Sum values of archive (sumVal)
Description: Calculating the sum of values for a specified period of time an archive and issuing results with the specified number of decimal points. Parameters: