Library of functions for provide access to data of different network devices with most simply protocols like to wide resources counters.
Address:
DB in file: SQLite.LibDB.tmplib_DevLib and SQLite.LibDB.UserProtocol_uPrt (oscadalibs.db.gz)
Compatibility:
OpenSCADA >= 0.9
About the library
The templates library "DevLib" is created to provide common templates and related functions for custom access to wide range of devices' data with simple protocol to implement into User Protocol module, present complex protocols (ModBus, OPC_UA, HTTP) or direct at internal language and also for some integration the devices data.
The template's names and it's parameters are available in languages: English, Ukrainian and Russian. Source code wrote into language independent mode with calls for the translations by function tr() and the message's translation also allowed for English, Ukrainian and Russian.
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.
To use the templates at generic you need create the device representing object into module of Logical controller and select proper template from the templates library. Next follow to specific for the template into individual description to correct configuration.
In general the custom accessing conception to the device's data we can imagine like to figure 1.
Fig.1. Custom accessing to device's data conception.
As you can see from image 1 intermediate to the device carried out through some transport by the device physical base. Requests to the transport you can send:
Directly by OpenSCADA system API function of the transport object string messIO( string mess, real timeOut = 0 );, if the protocol specific part very simple and you need only the data extract.
Wrapped data request req by function int messIO( XMLNodeObj req, string prt ); and for protocol prt, if the protocol part complex enough and already present into OpenSCADA.
Specific for custom wrapped data request by function int messIO( XMLNodeObj req, "UserProtocol" ); and user protocol implementation, if the protocol part complex enough and not yet present into OpenSCADA. Here user implement self the protocol specific part into UserProtocol module and the data specific part into the template for module Logical controller or direct into controller's procedure of the internal language module JavaLikeCalc.
For placing here a protocol you need do next and follow to shown demands:
be the copyright holder or the author of the code and distribute it's under any free license, GPL preferred;
prepare and store the code into a separated DB file of SQLite or as a text file includes all the function's attributes description and the procedure's source text, which was wrote and formed in some system way;
write a short description and instruction for connect a device by the protocol in way like to the other ones here;
write the direct request to placing the protocol here to the forum topic "OpenSCADA development" includes a proving of it's ability to work from any OpenSCADA developer or a short demonstration video.
1. SMS (SMS)
Description: Provides operations with SMS by the GSM-modem connected as a serial device. For now supported only sending SMS messages to a number of remote cell phone or GSM modem. For sending supported: ECHO disable, PIN check and set, send in PDU and Text mode. Author:Roman Savochenko <rom_as@oscada.org> Version: 2.1
Output user protocol's XML request structure:<{cmd} pin="1111" tel="+380XXXXXXXXX" text="{0|1}" err="1:Error">{SMSText}</cmd>
cmd — command, for now only "send" allowed; pin — PIN code to the SIM card access; tel — telephone number for receiver (remote cell phone or GSM modem); text{0,1} — SMS in the text mode, only ASCII SMSText — the message text; err — sets for the request result.
Using/configuring:
Create an output transport type "Serial" and set ID that like "SMS", one transport allowed for more receivers.
Set proper address, only for Serial device. The serial port speed, asynchronous data format and timeouts will adjusted by the function.
Place some commands requests direct to present or new internal OpenSCADA procedures like:
Result: Into variable rez you will get "OK" if no errors occur and the messages transmitted to the receiver.
2. SMTP (SMTP)
Description: Provides operations with EMail by its send through TCP-Socket or SSL. For now supported: TCP, SSL, AUTH, topic encoding for UTF-8. Author:Roman Savochenko <rom_as@oscada.org> Version: 1.1
Output user protocol's XML request structure:<send auth="{user}:{pass}" from="{FromAddr}" to="{ToAddr}" topic="{My Topic}" err="1:Error">{MessageText}</send>
topic — the message topic; from — sender address; to — destination address of the receiver; auth — authenticate user and password; MessageText — the message text; err — sets for the request result.
Using/configuring:
Create an output transport type "Sockets" or "SSL" and set ID that like "SMTP", one transport allowed for more receivers.
Set proper address, for Sockets(25) or SSL(465). The transport's timeouts will adjusted by the function.
Place some commands requests direct to present or new internal OpenSCADA procedures like:
Result: Into variable rez you will get "OK" if no errors occur and the messages transmitted to the receiver.
3. UPS (UPS)
Description: Uninterruptible power supply unifying data for provide all the data into single attribute of object type "All items" for next the control as the object with the data provide as table, alarming and allowing set writable attributes. The template aimed for using with module "System" data source as "UPS" and widget "Main.objProps" as the data presenter. The template also you can use as example for create like other data unification as complex object with properties, alarming and writing. Author:Roman Savochenko <rom_as@oscada.org> Version: 1.2
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
srcAddr
Source object's address
String
Input
Not attribute
Constant
items
All items
Object
Output
Full access
Variable
this
The object
Object
Input
Not attribute
Variable
SHIFR
Code
String
Input
Not attribute
Variable
NAME
Name
String
Input
Not attribute
Variable
DESCR
Description
String
Input
Not attribute
Variable
Using/configuring:
Create a controller object into module "System" and set ID that like "SYSData".
Create a parameter object into previous new the controller object and set ID that like "UPS".
Create a logical parameter object and select the template for that, one for each the devices. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
Source object's address — to address the UPS parameter object like "System.SYSData.UPS".
Result: Into attribute items you will get the object with all attributes and its properties. At some violations into attribute "err" you will get the information.
Into visual interfaces developing of Vision place widget "Main.objProps" to any page and link it to the parameter object crated into stage 4.
Result: Into runtime the page you get table with data of the object, notifications about violations into the header and allowing for set writable properties.
Create a logical parameter object and select the template for that, one for each the devices. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
Transport — to ID of the transport into stage 1.
Device address — to the device's logical address in bus by upper transport.
Period data getting — to need acquisition period which more to real processing by the logical level controller. Commands and some other will process immediate.
Result: The logical parameter object will perform interaction and place gathered data to the parameter attributes. Also you allowed for send some commands to the device through writable attributes.
6. Heat counter computer VKT7 (VKT7)
Description: Firm "Teplocom" (http://www.teplocom.spb.ru) computer "VKT-7" for complex heat measurement and the count. The device complex enough by provide more parameters, more history to its and access by nonlinear Serial-based protocol at low speed. The template implement acquisition for all significant parameters, get history by hours, days and result months. Also you can simple enough append for process other left parameters. Author:Roman Savochenko <rom_as@oscada.org> Sponsored: Vladislav Chubuk Version: 1.0
Output user protocol's XML request structure:<mess addr="1" err="1:Error">{req}</mess>
req — request/respond data; addr — remote station address (0...254); err — sets for the request result.
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
imit
Imitation drift % (0-disable)
Real
Input
Not attribute
Constant
0
trAddr
Transport
String
Input
Not attribute
Constant
Transport.Serial.out_VKT7
arhH
Archiver: hours
String
Input
Not attribute
Constant
arhD
Archiver: days
String
Input
Not attribute
Constant
arhRes
Archiver: results-month
String
Input
Not attribute
Constant
maxDayDepth
Archiver: maximum read depth for no hours archiver, days
Integer
Input
Not attribute
Constant
366
lastResTm
Last result months read time (s)
Integer
Output
Full access
Variable
0
leftResTm
Left result months for read from archive
Integer
Output
Read only
Variable
lastDTm
Last days read time (s)
Integer
Output
Full access
Variable
0
leftDTm
Left days for read from archive
Integer
Output
Read only
Variable
lastHTm
Last hours read time (s)
Integer
Output
Full access
Variable
leftHTm
Left hours for read from archive
Integer
Output
Read only
Variable
diffTm
Difference time (server-counter), hours
Integer
Input
Read only
Variable
firmVer
Firmware version
Real
Input
Read only
Variable
abonId
Subscriber ID
String
Input
Read only
Variable
repDay
Report day
Integer
Input
Read only
Variable
netNum
Network number
Integer
Input
Read only
Variable
modelImpl
Model implementation
Integer
Input
Read only
Variable
tTypeM
t: dimension
String
Input
Read only
Variable
GTypeM
G: dimension
String
Input
Read only
Variable
VTypeM
V: dimension
String
Input
Read only
Variable
MTypeM
M: dimension
String
Input
Read only
Variable
PTypeM
P: dimension
String
Input
Read only
Variable
QoTypeM
Qo: dimension
String
Input
Read only
Variable
QntTypeHIM
ÂÍÐ: dimension
String
Input
Read only
Variable
QntTypeM
ÂÎÊ: dimension
String
Input
Read only
Variable
t1_1
t1 (Tâ1)
Real
Input
Full access
Variable
t2_1
t2 (Tâ1)
Real
Input
Full access
Variable
t3_1
t3 (Tâ1)
Real
Input
Full access
Variable
V1_1
V1 (Tâ1)
Real
Input
Full access
Variable
V2_1
V2 (Tâ1)
Real
Input
Full access
Variable
V3_1
V3 (Tâ1)
Real
Input
Full access
Variable
M1_1
M1 (Tâ1)
Real
Input
Full access
Variable
M2_1
M2 (Tâ1)
Real
Input
Full access
Variable
M3_1
M3 (Tâ1)
Real
Input
Full access
Variable
P1_1
P1 (Tâ1)
Real
Input
Full access
Variable
P2_1
P2 (Tâ1)
Real
Input
Full access
Variable
Mg_1
Mg (Tâ1)
Real
Input
Full access
Variable
Qo_1
Qo (Tâ1)
Real
Input
Full access
Variable
Qg_1
Qg (Tâ1)
Real
Input
Full access
Variable
dt_1
dt (Tâ1)
Real
Input
Full access
Variable
BNR_1
ÂÍÐ (Tâ1)
Real
Input
Full access
Variable
BOC_1
ÂÎÑ (Tâ1)
Real
Input
Full access
Variable
G1_1
G1 (Tâ1)
Real
Input
Full access
Variable
G2_1
G2 (Tâ1)
Real
Input
Full access
Variable
t1_2
t1 (Tâ2)
Real
Input
Full access
Variable
t2_2
t2 (Tâ2)
Real
Input
Full access
Variable
t3_2
t3 (Tâ2)
Real
Input
Full access
Variable
V1_2
V1 (Tâ2)
Real
Input
Full access
Variable
V2_2
V2 (Tâ2)
Real
Input
Full access
Variable
V3_2
V3 (Tâ2)
Real
Input
Full access
Variable
M1_2
M1 (Tâ2)
Real
Input
Full access
Variable
M2_2
M2 (Tâ2)
Real
Input
Full access
Variable
M3_2
M3 (Tâ2)
Real
Input
Full access
Variable
P1_2
P1 (Tâ2)
Real
Input
Full access
Variable
P2_2
P2 (Tâ2)
Real
Input
Full access
Variable
Mg_2
Mg (Tâ2)
Real
Input
Full access
Variable
Qo_2
Qo (Tâ2)
Real
Input
Full access
Variable
Qg_2
Qg (Tâ2)
Real
Input
Full access
Variable
dt_2
dt (Tâ2)
Real
Input
Full access
Variable
BNR_2
ÂÍÐ (Tâ2)
Real
Input
Full access
Variable
BOC_2
ÂÎÑ (Tâ2)
Real
Input
Full access
Variable
G1_2
G1 (Tâ2)
Real
Input
Full access
Variable
G2_2
G2 (Tâ2)
Real
Input
Full access
Variable
Using/configuring:
Create an output transport type "Serial" and set ID that like "VKT7", one for each the devices.
Set proper the address and the timeouts to the Serial device.
Create a logical parameter object and select the template for that, one for each the devices. Enable the parameter.
Create or use a minutes (current) value archivator object (1m, period=60sek.).
Create a hours value archivator object (arhH, period=3600sek.), days value archivator object (arhD, 86400sek.) and result month value archivator object (arhM, 86400sek.). Set "Period archiving (sec)" property of the archivators to '0' for disable the data flow from the archive buffer.
Into tab "Template configuration" of the logical parameter object you need set:
Imitation drift % — to '0' for the imitation disable.
Transport — to path of the transport into stage 1, like "Transport.Serial.out_VKT7".
Archiver: hours — to the hours archiver into stage 6, like "FSArch.arhH".
Archiver: days — to the days archiver into stage 6, like "FSArch.arhD".
Archiver: results-month — to the result month archiver into stage 6, like "FSArch.arhM".
Archiver: maximum read depth for no hours archiver, days — to need for read no hours archives depth, in days.
Into tab "Archiving" set archiving for needs attributes to the archivators.
Result: The logical parameter object will perform interaction and place current gathered data to the parameter attributes and current archive. Other archives' data will read parallel from previous set depth by one value for period i.e. one day for minute period for days up to the current and last value.
7. Sycon Multi Drop Protocol (SMDP)
Description: STM devices for resonant frequency measurement for mass of deposited films attached to its surface by Sycon Instruments, Inc. (http://www.sycon.com). Author:Roman Savochenko <rom_as@oscada.org> Sponsored: Vasiliy Grigoriev from "Vacuum technologies laboratory (http://e-beam.ru)". Version: 1.0
Output user protocol's XML request structure:<mess addr="16" try="1" err="1:Error">{req}</mess>
req — request/respond data; addr — remote device address [16...254]; try — tries for the request; err — sets for the request result.
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
transport
Transport
String
Input
Not attribute
Constant
SMDP
addr
Device address (16...254)
Integer
Input
Not attribute
Constant
16
perGet
Period data getting (s)
Real
Input
Not attribute
Constant
10
version
Firmware Version
String
Input
Read only
Variable
CfgPrmSSID
Configuration parameter session ID
Integer
Input
Read only
Variable
Srlno
Measurement serial number
Integer
Input
Read only
Variable
RawFreq
Channel freq.
Real
Input
Read only
Variable
GoodFreq
Last used, good channel freq. (Hz)
Real
Input
Read only
Variable
RawThick
Computed raw thickness, from frequency. (A)
Real
Input
Read only
Variable
XtalThick
Computed material related thickness, can be zeroed. (A)
Real
Input
Read only
Variable
XtalThick_F
Filtered computed material related thickness, can be zeroed. (A)
Real
Input
Read only
Variable
XtalRate
Rate, angstroms per second.
Real
Input
Read only
Variable
XtalRate_F
Rate, angstroms per second, filtered.
Real
Input
Read only
Variable
XtalLife
XtalLife (%)
Real
Input
Read only
Variable
XtalQual
Quality level (0-9).
Integer
Input
Read only
Variable
XtalQualPeak
Highest quality level seen (0-9).
Integer
Input
Read only
Variable
XtalStab
Stability level (0-9).
Integer
Input
Read only
Variable
XtalStabPeak
Highest stability level seen (0-9).
Integer
Input
Read only
Variable
XtalStat
Channel status.
String
Input
Read only
Variable
XtalLife_C
XtalLife (%).
Integer
Input
Read only
Variable
SessId
Session ID
Integer
Input
Full access
Variable
Fq
Xtal start freq. (Hz)
Real
Input
Full access
Variable
Fm
Xtal min freq. (Hz)
Real
Input
Full access
Variable
Density
Material density (gm/cc).
Real
Input
Full access
Variable
Zratio
Material Z ratio. Not scaled or unitized.
Real
Input
Full access
Variable
Tooling
1.000 is 100 % tooling (unity).
Real
Input
Full access
Variable
RateReq
Requested rate (A/S).
Real
Input
Full access
Variable
QlvlTrip
Quality threshold, if non 0 and exceeded, xtal fail occurs.
Integer
Input
Full access
Variable
SlvlTrip
Stability threshold, if non 0 and exceeded, xtal fail occurs.
Integer
Input
Full access
Variable
Using/configuring:
Create an output transport type "Serial" and set ID that like "SMDP", one for each the devices' used serial bus.
Set proper the address and the timeouts to the Serial device.
Create a logical parameter object and select the template for that, one for each the devices. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
Transport — to ID of the transport into stage 1.
Device address — to the device's logical address in bus by upper transport.
Period data getting — to need acquisition period which more to real processing by the logical level controller. Commands and some other will process immediate.
Result: The logical parameter object will perform interaction and place gathered data to the parameter attributes. Also you allowed for send some commands to the device through writable attributes.
Create a logical parameter object and select the template for that, one for each the devices. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
Transport — to ID of the transport into stage 1.
Device address — to the device's logical address in bus by upper transport.
Period data getting — to need acquisition period which more to real processing by the logical level controller. Commands and some other will process immediate.
Result: The logical parameter object will perform interaction and place gathered data to the parameter attributes. Also you allowed for send some commands to the device through writable attributes.
Create a logical parameter object and select the template for that, one for each the devices. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
Transport — to ID of the transport into stage 1.
Device address — to the device's logical address in bus by upper transport.
Result: The logical parameter object will perform interaction and place gathered data to the parameter attributes.
10. IVE-452HS-02 (IVE_452HS_02)
Description: Power supply of beam-electrons evaporator of "Plasma Tech" Ltd, from Moskov. Author:Roman Savochenko <rom_as@oscada.org> Sponsored: Vasiliy Grigoriev from "Vacuum technologies laboratory (http://e-beam.ru)". Version: 1.0
Output user protocol's XML request structure:<mess addr="255" err="1:Error">{req}</mess>
req — request/respond data; addr — remote station address (0...255); err — sets for the request result.
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
transport
Transport
String
Input
Not attribute
Constant
Sockets.out_IVE
addr
Device address
Integer
Input
Not attribute
Constant
255
COIA
Output current level set-point
Integer
Output
Full access
Variable
COUA
Output voltage level set-point
Integer
Output
Full access
Variable
COPA
Output power level set-point
Integer
Output
Full access
Variable
DIA
Output current
Integer
Input
Read only
Variable
DUA
Output voltage
Integer
Input
Read only
Variable
DPA
Output power
Integer
Input
Read only
Variable
DFA
Electric arcs frequency
Integer
Input
Read only
Variable
DAC
Electric arcs counter
Integer
Input
Read only
Variable
COM_DEW
Command: Blocking by SC and XX
Boolean
Input
Full access
Variable
COM_OUT
Command: Display on UI out block's params
Boolean
Input
Full access
Variable
COM_DEP
Command: Enable MK
Boolean
Input
Full access
Variable
COM_DEL
Command: Blocks #1,2 to net
Boolean
Input
Full access
Variable
COM_UF
Command: Display on UI frequency and current
Boolean
Input
Full access
Variable
DKW
MUBR of the block overheated
Boolean
Input
Read only
Variable
DKZ
Short circuits on the block out
Boolean
Input
Read only
Variable
DK
MK of the block overheated
Boolean
Input
Read only
Variable
DE
Power and voltage on out present
Boolean
Input
Read only
Variable
Using/configuring:
Create an output transport type "Serial" direct, or by the Sockets gate and, set address that like "Sockets.out_IVE", one for each the devices' used serial bus.
Set proper the address and the timeouts to the Serial device.
Create a logical parameter object and select the template for that, one for each the devices. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
Transport — to the address of the transport into stage 1. Supported tracing for the hot change.
Device address — to the device's logical address in bus by upper transport. Supported tracing for the hot change and real the device's address changing.
Result: The logical parameter object will perform interaction and place gathered data to the parameter attributes. Also you allowed for send some commands to the device through writable attributes.
11. OPTRIS CT/CTL (OPTRIS)
Description: OPTRIS CT/CTL communication interface of "Optris" GmbH, from Berlin. Author:Roman Savochenko <rom_as@oscada.org> Sponsored: Vasiliy Grigoriev from "Vacuum technologies laboratory (http://e-beam.ru)". Version: 1.0
Output user protocol's XML request structure:<mess addr="1" cs="1" err="1:Error">{req}</mess>
req — request/respond data; addr — remote station address (0...15); ñs — use control sum for SET commands [0,1]; err — sets for the request result.
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
transport
Transport
String
Input
Not attribute
Constant
Serial.out_OPTRIS
addr
Device address
Integer
Input
Not attribute
Constant
1
Tproc
T process
Real
Input
Read only
Variable
Thead
T head
Real
Input
Read only
Variable
Tbox
T box
Real
Input
Read only
Variable
Tact
T act.
Real
Input
Read only
Variable
eps
IR epsilon
Real
Input
Full access
Variable
trans
IR transmission
Real
Input
Full access
Variable
spIll
Spot illumination
Logical
Input
Full access
Variable
Using/configuring:
Create an output transport type "Serial" direct, or by the Sockets gate and, set address that like "Serial.out_OPTRIS", one for each the devices' used serial bus.
Set proper the address and the timeouts to the Serial device.
Create a logical parameter object and select the template for that, one for each the devices. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
Transport — to the address of the transport into stage 1. Supported tracing for the hot change.
Device address — to the device's logical address in bus by upper transport.
Result: The logical parameter object will perform interaction and place gathered data to the parameter attributes. Also you allowed for send some commands to the device through writable attributes.
12. CTR 100, 101 (CTR)
Description: The RS232C Serial Interface permits the communication between the digital Oerlikon Leybold Vacuum CERAVAC, from Köln. Author:Roman Savochenko <rom_as@oscada.org> Sponsored: Vasiliy Grigoriev from "Vacuum technologies laboratory (http://e-beam.ru)". Version: 1.0
Output user protocol's XML request structure:<mess err="1:Error">{req}</mess>
req — request/respond data; err — sets for the request result.
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
transport
Transport
String
Input
Not attribute
Constant
Serial.out_CTR
press
Pressure, Tor
Real
Output
Read only
Variable
zeroSet
Zero set
Logical
Input
Full access
Variable
Using/configuring:
Create an output transport type "Serial" direct, or by the Sockets gate and, set address that like "Serial.out_CTR", one for each the devices' used serial bus.
Set proper the address and the timeouts to the Serial device.
Create a logical parameter object and select the template for that, one for each the devices. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
Transport — to the address of the transport into stage 1. Supported tracing for the hot change.
Result: The logical parameter object will perform interaction and place gathered data to the parameter attributes. Also you allowed for send some commands to the device through writable attributes.
13. IEC-60870 (IEC60870)
Description:IEC 60870 part 5 is one from the IEC 60870 set of standards which defines systems used for telecontrol (supervisory control and data acquisition) in electrical engineering and power system automation applications. Part 5 provides a communication profile for sending basic telecontrol messages between two systems, which uses permanent directly connected data circuits between the systems. The template implements part 104 (Ethernet transport) for the client and followed services: STARTDT, STOPDT, TESTFR, Ack, C_IC_NA_1, C_CI_NA_1, C_SC_NA_1, M_SP_NA_1, M_ME_NB_1, C_CS_NA_1. To accumulation of the gathered and controlling data used an object into attribute "items" for next the control as the object with the data represent as table, alarming and allowing set the writable attributes. To the data control by attributes at once you can point its into the attribute "itemsSet". Into the template for the first time used the non request mode of an output transport and free attributes creation wile performing. Version: 1.0 Author:Roman Savochenko <rom_as@oscada.org> Sponsored: Ustijancev Michael. Implementing task:http://oscada.org/en/development/tasks/posts/subsystem_daq/iec_60870_5_acquisition_protocol_implementation
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
transport
Transport
String
Input
Not attribute
Constant
Sockets.out_IEC60870
addr
Address, {addr}.{OA}
String
Input
Not attribute
Constant
0.5
tmRetr
Retry connection time, s
Real
Input
Not attribute
Constant
10
t1
Acknowledge lack timeout, s
Real
Input
Not attribute
Constant
1.5
t2
Acknowledge timeout, s
Real
Input
Not attribute
Constant
1
t3
Test timeout, s
Real
Input
Not attribute
Constant
2
k
Maximum unconfirmed
Integer
Input
Not attribute
Constant
12
w
Maximum no ack
Integer
Input
Not attribute
Constant
8
itemsSet
Items set by: "ai|di|do:{IOA}[-{EndIOA}]:a[:{NameBase}]"
Text
Input
Full access
Variable
items
All items
Object
Output
Full access
Variable
this
Object
Object
Input
Not attribute
Variable
f_frq
Function calculate frequency (Hz)
Real
Input
Not attribute
Variable
1000
f_start
Function start flag
Boolean
Input
Not attribute
Variable
0
f_stop
Function stop flag
Boolean
Input
Not attribute
Variable
0
f_err
Function error
String
Input
Not attribute
Variable
0
Using/configuring:
Create an output transport type "Sockets", set address to that like "Sockets.out_IEC60870", one for each the device-PLC.
Set proper address and timeouts to the Sockets device-PLC.
Create and start a logical controller object or use any present with need scheduling properties. For interaction by IEC-60870-104 you need set the execution period to no lesser then 100ms.
Create a logical parameter object and select the template for that, one for each the devices-PLCs. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
Transport — to the address of the transport into stage 1. Supported tracing for the hot change.
Address — data address in format "{addr}.{OA}".
Retry connection time — retry connection time in seconds at the connection lack.
Acknowledge lack timeout, in seconds.
Acknowledge timeout, in seconds.
Test timeout, in seconds.
Maximum unconfirmed — not used into the client but it is not generate like flow.
Maximum no ack — maximum input packages after what the client will send "Ack".
Result: The logical parameter object will perform interaction and place gathered data to the object "items", create/place and check to commands for proper attributes, created by the "itemsSet" instruction.
Into tab "Template configuration" of the object of the logical parameter you need to set:
Transport — to the address of the transport into stage 1.
Network address — the counter's logical address.
Coded address by the program Fixer+ — set the flag for counters coded by the program. Most likely the address will equal to apartment number.
Read energy from reset — set the flag if you need the data.
Read current values — set the flag to read current values.
Result: The logical parameter object will perform interaction and place gathered data to the parameter attributes.
15. Mercury 230 (m230)
Description: Three phase counter of electricity Mercury 230, 231, 232, 233, 234, 236 from firm Incotex (http://www.incotexcom.ru) Author: Arsen Zakojan <godzilla919@gmail.com> Version: 1.0
Output XML request structure of user protocol:<req netaddr="255" data="{req}">{resp}</req>
req — request's data; resp — respond's data; netaddr — Network address. For counters Mercury 230, 231 and 233 the tree last digits are serial number or they are last two digits for the number more to 240. If the last numbers are zero, the network address is "1". Universal, broadcast address is "0".
Parameters of the template:
ID
Parameter
Type
Mode
Attribute
Configure
Value
answer
Answer to the password request
String
Input
Read only
Variable
TS
Read energy of tariffs sum
Boolean
Input
Not attribute
Constant
0
T1
Read energy of tariff 1
Boolean
Input
Not attribute
Constant
0
T2
Read energy of tariff 2
Boolean
Input
Not attribute
Constant
0
T3
Read energy of tariff 3
Boolean
Input
Not attribute
Constant
0
T4
Read energy of tariff 4
Boolean
Input
Not attribute
Constant
0
P
Read power P
Boolean
Input
Not attribute
Constant
0
Q
Read power Q
Boolean
Input
Not attribute
Constant
0
S
Read power S
Boolean
Input
Not attribute
Constant
0
U
Read voltage U
Boolean
Input
Not attribute
Constant
0
I
Read current I
Boolean
Input
Not attribute
Constant
0
K
Read power coefficient
Boolean
Input
Not attribute
Constant
0
F
Read frequency F
Boolean
Input
Not attribute
Constant
0
N
Read serial number
Boolean
Input
Not attribute
Constant
0
TSAp
Energy from resetting, tariffs sum A+
Real
Input
Read only
Variable
TSAm
Energy from resetting, tariffs sum A-
Real
Input
Read only
Variable
TSRp
Energy from resetting, tariffs sum R+
Real
Input
Read only
Variable
TSRm
Energy from resetting, tariffs sum R-
Real
Input
Read only
Variable
T1Ap
Energy from resetting, tariff 1 A+
Real
Input
Read only
Variable
T1Am
Energy from resetting, tariff 1 A-
Real
Input
Read only
Variable
T1Rp
Energy from resetting, tariff 1 R+
Real
Input
Read only
Variable
T1Rm
Energy from resetting, tariff 1 R-
Real
Input
Read only
Variable
T2Ap
Energy from resetting, tariff 2 A+
Real
Input
Read only
Variable
T2Am
Energy from resetting, tariff 2 A-
Real
Input
Read only
Variable
T2Rp
Energy from resetting, tariff 2 R+
Real
Input
Read only
Variable
T2Rm
Energy from resetting, tariff 2 R-
Real
Input
Read only
Variable
T3Ap
Energy from resetting, tariff 3 A+
Real
Input
Read only
Variable
T3Am
Energy from resetting, tariff 3 A-
Real
Input
Read only
Variable
T3Rp
Energy from resetting, tariff 3 R+
Real
Input
Read only
Variable
T3Rm
Energy from resetting, tariff 3 R-
Real
Input
Read only
Variable
T4Ap
Energy from resetting, tariff 4 A+
Real
Input
Read only
Variable
T4Am
Energy from resetting, tariff 4 A-
Real
Input
Read only
Variable
T4Rp
Energy from resetting, tariff 4 R+
Real
Input
Read only
Variable
T4Rm
Energy from resetting, tariff 4 R-
Real
Input
Read only
Variable
PS
Power P(W) by the phases sum
Real
Input
Read only
Variable
P1
Power P(W) by the phase 1
Real
Input
Read only
Variable
P2
Power P(W) by the phase 2
Real
Input
Read only
Variable
P3
Power P(W) by the phase 3
Real
Input
Read only
Variable
QS
Power Q(var) by the phases sum
Real
Input
Read only
Variable
Q1
Power Q(var) by the phase 1
Real
Input
Read only
Variable
Q2
Power Q(var) by the phase 2
Real
Input
Read only
Variable
Q3
Power Q(var) by the phase 3
Real
Input
Read only
Variable
SS
Power S(VA) by the phases sum
Real
Input
Read only
Variable
S1
Power S(VA) by the phase 1
Real
Input
Read only
Variable
S2
Power S(VA) by the phase 2
Real
Input
Read only
Variable
S3
Power S(VA) by the phase 3
Real
Input
Read only
Variable
U1
Voltage U(V) by the phase 1
Real
Input
Read only
Variable
U2
Voltage U(V) by the phase 2
Real
Input
Read only
Variable
U3
Voltage U(V) by the phase 3
Real
Input
Read only
Variable
I1
Current I(A) by the phase 1
Real
Input
Read only
Variable
I2
Current I(A) by the phase 2
Real
Input
Read only
Variable
I3
Current I(A) by the phase 3
Real
Input
Read only
Variable
KS
Power coefficient by the phases sum
Real
Input
Read only
Variable
K1
Power coefficient by the phase 1
Real
Input
Read only
Variable
K2
Power coefficient by the phase 2
Real
Input
Read only
Variable
K3
Power coefficient by the phase 3
Real
Input
Read only
Variable
F1
Frequency F(Hz)
Real
Input
Read only
Variable
N1
Serial number
String
Input
Read only
Variable
netaddr
Network address (0...240)
Integer
Input
Not attribute
Constant
1
password
Password
String
Input
Not attribute
Constant
111111
transport
Transport
String
Input
Not attribute
Constant
merc230
f_stop
Function stop flag
Boolean
Input
Not attribute
Variable
0
f_err
Function error
String
Input
Not attribute
Variable
0
f_start
Function start flag
Boolean
Input
Not attribute
Variable
0
f_frq
Function calculate frequency (Hz)
Real
Input
Not attribute
Variable
1000
Using/configuring:
Create an output transport type "Serial" with name like to "merc230".
Set proper address and timeouts for the Serial device.
Create a logical parameter object and select the template for that, one for each the devices. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
Transport — to the address of the transport into stage 1. Supported tracing for the hot change.
Address — to the device's logical address in bus by upper transport.
Result: The logical parameter object will perform:
reading files of lists listsDir for creation and content forming of an attribute "selList" of list of all alowed device's attributes;
reading of content of the attribute list of selected device's attributes to dynamic form their representing attributes into the parameter object;
reading of the dynamic formed representing attributes;
checking for changes and writing of the dynamic formed representing attributes.
17. Example: DCON (DCON)
Description: Mostly aimed for example implement the user protocols into OpenSCADA and contains only main functions into the protocol part. Author:Roman Savochenko <rom_as@oscada.org>
Input user protocol's part: Test implements only processing for requests '#' and '@' with fixed reply data. Using/configuring:
Create an input transport type mostly "Serial" and set any ID.
Set proper the address and the timeouts to the Serial device.
Set transport protocol to "UserProtocol.DCON".
Result: all requests to the input transports will process by input part of the module.
Output user protocol's XML request structure:<ReqSymb addr="1" err="1:Error">{req}</ReqSymb>
ReqSymb — request type symbol into the tag name, like: '#', '@', etc; req — request/respond data; addr — remote host address [1...240]; err — sets for the request result.
Using/configuring:
Create an output transport type "Serial" and set ID that like "DCON", one for each the devices' used serial bus.
Set proper the address and the timeouts to the Serial device.
Place some commands requests direct to present or new internal OpenSCADA procedures like:
Result: Into variable data you will get the request's data part if no errors occur. The data is analog inputs' values.
Output user protocol's XML request structure:<mess addr="1" err="1:Error">{req}</mess> — message tag
req — request/respond data; addr — remote station address (0...2047); err — sets for the request result.
Using/configuring:
Create an output transport type "Serial" and set ID that like "OWEN", one for each the devices' used serial bus.
Set proper the address and the timeouts to the Serial device.
Place some commands requests direct to present or new internal OpenSCADA procedures like:
Result: Into variable data you will get the request's data part if no errors occur.
19. One Wire by {DS9097,DS9097U} (1W_{DS9097,DS9097})
Description: One Wire sensors bus implementing by 1Wire-adapter {DS9097,DS9097U}. Supported direct and parasite powering for the temperature sensors.
Supported 1Wire-devices: DS1820, DS1820/DS18S20/DS1920 (not tested), DS1822 (not tested), DS2413, DS2408, DS2450, DS2438. Author:Roman Savochenko <rom_as@oscada.org> Version: 1.1, 1.1
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
transport
Transport of the One Wire bus, Serial
String
Input
Not attribute
Constant
oneWire
tmResc
Rescan period, s
Real
Input
Not attribute
Constant
60
power
Power, for temperature
Boolean
Input
Read only
Variable
this
Object
Object
Input
Not attribute
Variable
f_frq
Function calculate frequency (Hz)
Real
Input
Not attribute
Variable
1000
f_start
Function start flag
Boolean
Input
Not attribute
Variable
0
f_stop
Function stop flag
Boolean
Input
Not attribute
Variable
0
f_err
Function error
String
Input
Not attribute
Variable
0
Using/configuring:
Create an output transport type "Serial", set address to that like "oneWire", one for each the One Wire bus.
Set proper address, only for the adapter's serial device like "/dev/ttyS{N}". The serial port speed, asynchronous data format and timeouts will adjusted by the template.
Create a logical parameter object and select the template for that, one for each One Wire bus. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
Transport of the One Wire bus, Serial — to the address of the transport into stage 1. Supported tracing for the hot change.
Rescan period, s — periodicity of rescan to new and removed devices search.
Result: The logical parameter object will perform at first searching to 1Wire devices on the bus and create included parameters to the each found one. Next the logical parameter object will perform gather data of the found devices and trace to modify of the writable device's properties.
20. I2C: PCF8591 (PCF8591)
Description: I2C 8-bit 4xA/D and D/A converter. Connect through a Serial output transport into the I2C mode. Author:Roman Savochenko <rom_as@oscada.org> Version: 1.0
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
transport
Transport of the I2C, Serial
String
Input
Not attribute
Constant
i2c
addr
Device address [0...119]
Integer
Input
Not attribute
Constant
72
vRef
Reference voltage, V
Real
Input
Not attribute
Constant
3.2
ai0
AI0
Real
Input
Read only
Variable
ai1
AI1
Real
Input
Read only
Variable
ai2
AI2
Real
Input
Read only
Variable
ai3
AI3
Real
Input
Read only
Variable
ao
AO
Real
Input
Full access
Variable
f_frq
Function calculate frequency (Hz)
Real
Input
Not attribute
Variable
1000
f_start
Function start flag
Boolean
Input
Not attribute
Variable
0
f_stop
Function stop flag
Boolean
Input
Not attribute
Variable
0
f_err
Function error
String
Input
Not attribute
Variable
0
Using/configuring:
Create an output transport type "Serial", set address to that like "i2c", one for each the I2C bus.
Set proper address, only the I2C bus address like "/dev/i2c-{N}". Set the symbol's time into the timeouts field to minimum value.
Create a logical parameter object and select the template for that, one for each I2C slave device. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
transport — to the address of the transport into stage 1. Supported tracing for the hot change.
addr — the I2C slave device's address [0...119].
vRef — reference voltage of the AIs and AO.
Result: The logical parameter object will perform interaction and place gathered data to the AI attributes and also will take the AO and write to the chip.
21. I2C: PCF8574 (PCF8574)
Description: I2C 8-bit 8DIO. Connect through a Serial output transport into the I2C mode. Author:Roman Savochenko <rom_as@oscada.org> Version: 1.0
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
transport
Transport I2C
String
Input
Not attribute
Constant
i2c
addr
Device address (0, 119)
Integer
Input
Not attribute
Constant
39
di0
DI0
Boolean
Input
Read only
Variable
di1
DI1
Boolean
Input
Read only
Variable
di2
DI2
Boolean
Input
Read only
Variable
di3
DI3
Boolean
Input
Read only
Variable
di4
DI4
Boolean
Input
Read only
Variable
di5
DI5
Boolean
Input
Read only
Variable
di6
DI6
Boolean
Input
Read only
Variable
di7
DI7
Boolean
Input
Read only
Variable
do0
DO0
Boolean
Output
Full access
Variable
do1
DO1
Boolean
Output
Full access
Variable
do2
DO2
Boolean
Output
Full access
Variable
do3
DO3
Boolean
Output
Full access
Variable
do4
DO4
Boolean
Output
Full access
Variable
do5
DO5
Boolean
Output
Full access
Variable
do6
DO6
Boolean
Output
Full access
Variable
do7
DO7
Boolean
Output
Full access
Variable
f_frq
Function calculate frequency (Hz)
Real
Input
Not attribute
Variable
1000
f_start
Function start flag
Boolean
Input
Not attribute
Variable
0
f_stop
Function stop flag
Boolean
Input
Not attribute
Variable
0
f_err
Function error
String
Input
Not attribute
Variable
0
Using/configuring:
Create an output transport type "Serial", set address to that like "i2c", one for each the I2C bus.
Set proper address, only the I2C bus address like "/dev/i2c-{N}". Set the symbol's time into the timeouts field to minimum value.
Create a logical parameter object and select the template for that, one for each I2C slave device. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
transport — to the address of the transport into stage 1. Supported tracing for the hot change.
addr — the I2C slave device's address [0...119].
Result: The logical parameter object will perform interaction and place gathered data to the DI attributes and also will take the DO and write to the chip.
22. I2C: BMP180 (BMP180)
Description: I2C Pressure and Temperature sensor. Connect through a Serial output transport into the I2C mode. Author:Roman Savochenko <rom_as@oscada.org> Version: 1.0
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
transport
Transport of the I2C, Serial
String
Input
Not attribute
Constant
i2c
addr
Device address [0...119]
Integer
Input
Not attribute
Constant
119
oss
Oversampling setting (0...3)
Integer
Input
Not attribute
Constant
0
t
T, °Ñ
Real
Input
Read only
Variable
p
P, Pa
Real
Input
Read only
Variable
f_frq
Function calculate frequency (Hz)
Real
Input
Not attribute
Variable
1000
f_start
Function start flag
Boolean
Input
Not attribute
Variable
0
f_stop
Function stop flag
Boolean
Input
Not attribute
Variable
0
f_err
Function error
String
Input
Not attribute
Variable
0
Using/configuring:
Create an output transport type "Serial", set address to that like "i2c", one for each the I2C bus.
Set proper address, only the I2C bus address like "/dev/i2c-{N}". Set the symbol's time into the timeouts field to minimum value.
Create a logical parameter object and select the template for that, one for each I2C slave device. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
transport — to the address of the transport into stage 1. Supported tracing for the hot change.
addr — the I2C slave device's address [0...119].
oss — oversampling setting of pressure measurement [0...3].
Result: The logical parameter object will perform interaction and place gathered data to the Pressure and Temperature attributes.
23. I2C: DS3231 (DS3231)
Description: I2C RTC chip with Temperature sensor and calibration on it. Connect through a Serial output transport into the I2C mode. Author:Roman Savochenko <rom_as@oscada.org> Version: 1.0
Create a logical parameter object and select the template for that, one for each I2C slave device. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
transport — to the address of the transport into stage 1. Supported tracing for the hot change.
addr — the I2C slave device's address [0...119].
Result: The logical parameter object will perform interaction and place gathered data to the DateTime, Temperature and some one state attributes and also will take the DateTime, some one state attributes and write it to the chip.
24. I2C: AT24C{32|64} (AT24CXX)
Description: Provides operations with EEPROM memory based on I2C chips AT24C32 (4KB) and AT24C64 (8KB). Supported random reading and writing. Author:Roman Savochenko <rom_as@oscada.org> Version: 1.0
Output user protocol's XML request structure:<{cmd} addr="{ChipAddr}" off="{MemOffset}" size="{ReadSize}" err="1:Error">{ReadWriteSeq}</{cmd}>
cmd — command, for now there allowed: "read", "write"; addr — I2C device address [0...119]; off — memory part offset; size — readed memory block size. ReadWriteSeq — Read/Write bytes sequence. err — sets for the request result.
Using/configuring:
Create an output transport type "Serial", set address to that like "i2c", one for each the I2C bus.
Set proper address, only the I2C bus address like "/dev/i2c-{N}". Set the symbol's time into the timeouts field to minimum value.
Place some commands requests direct to present or new internal OpenSCADA procedures like:
Result: Into text() for "read" you will get the read data if no errors occur.
25. GPIO: DHT11,22 (AM23XX) (DHT)
Description: Digital Temperature and Humidity Sensor for models: DHT11, DHT12, AM2302, AM2320, ... . The module designed for the sensors connect through GPIO, mostly it's Raspberry PI BCM2835 GPIO. Conditions: Exclusively realtime planing in the priority 199 (FIFO-99). Author:Roman Savochenko <rom_as@oscada.org> Version: 1.0
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
addr
GPIO address with functions mode(), get() and put(), mostly it's BCM2835
String
Input
Not attribute
Constant
DAQ.BCM2835.pi.pi
pin
IO pin number of the GPIO
Integer
Input
Not attribute
Constant
17
tries
Tries [1...5]
Integer
Input
Not attribute
Constant
2
dev
Device (0-DHT11, 1-DHT22)
Integer
Input
Not attribute
Constant
1
t
T, °Ñ
Real
Input
Read only
Variable
h
H, %
Real
Input
Read only
Variable
f_frq
Function calculate frequency (Hz)
Real
Input
Not attribute
Variable
1000
f_start
Function start flag
Boolean
Input
Not attribute
Variable
0
f_stop
Function stop flag
Boolean
Input
Not attribute
Variable
0
f_err
Function error
String
Input
Not attribute
Variable
0
Using/configuring:
Create an output controller and parameter object in DAQ module "BCM 2835", by default it's "pi.pi".
Create a logical parameter object and select the template for that, one for each sensor. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
addr — To the address of the "BCM 2835" parameter like "DAQ.BCM2835.pi.pi". Supported tracing for the hot change.
pin — GPIO pin number where connected the data pin of the sensor.
tries — Tries of the sensor read.
dev — Generic device specific selection.
Result: The logical parameter object will perform interaction and place gathered data to the Temperature and Humidity attributes.
26. GPIO|I2C: 1602A(HD44780) (1602A)
Description: LCD Module 1602A, STN, BLUB, 16 Character x 2 Line, 5 x 8 Dots, by the direct (Raspberry PI BCM2835 GPIO) or I2C (PCF8574) wiring. Conditions: Default planing policy but realtime one preferred. Author:Roman Savochenko <rom_as@oscada.org> Version: 1.1
Template parameters:
ID
Parameter
Type
Mode
Attribute
Configure
Value
transport
Transport of the I2C, Serial (i2c) or
GPIO address with function put(), mostly it's BCM2835 (DAQ.BCM2835.pi.pi)
String
Input
Not attribute
Constant
i2c
addr
I2C device address [0...119]
Integer
Input
Not attribute
Constant
39
RS
GPIO Pin: Reset
Integer
Input
Not attribute
Constant
7
E
GPIO Pin: Enable
Integer
Input
Not attribute
Constant
8
D4
GPIO Pin: Data4
Integer
Input
Not attribute
Constant
25
D5
GPIO Pin: Data5
Integer
Input
Not attribute
Constant
24
D6
GPIO Pin: Data6
Integer
Input
Not attribute
Constant
23
D7
GPIO Pin: Data7
Integer
Input
Not attribute
Constant
18
ln1
Line 1
String
Input
Full access
Variable
ln2
Line 2
String
Input
Full access
Variable
f_frq
Function calculate frequency (Hz)
Real
Input
Not attribute
Variable
1000
f_start
Function start flag
Boolean
Input
Not attribute
Variable
0
f_stop
Function stop flag
Boolean
Input
Not attribute
Variable
0
f_err
Function error
String
Input
Not attribute
Variable
0
Using/configuring:
Create an output controller and object of parameter in DAQ module "BCM 2835", by default it's "pi.pi" or create an output transport type "Serial", set address to that like "i2c", one for each the I2C bus.
Create a logical parameter object and select the template for that, one for each display. Enable the parameter.
Into tab "Template configuration" of the logical parameter object you need set:
transport — To the address of the "BCM 2835" parameter like "DAQ.BCM2835.pi.pi" or to the address of the transport into stage 1. Supported tracing for the hot change.
addr — The I2C slave device's address [0...119].
RS, E, D4, D5, D6, D7 — GPIO pins number where connected proper data ones of the sensor.
Result: The logical parameter object will perform interaction and set lines' values to the display.