OpenSCADA

Библиотеки/Основная

This page is a translated version of the page Libs/Main and the translation is 6% complete.

English • ‎mRussian • ‎Українська
Название Версия Лицензия Источник Языки Автор Описание
Основная библиотека 2.1 GPLv2 OscadaLibs.db (SQL, GZip) > DAQ.tmplb_base en, uk, ru Roman Savochenko Library of the main templates of the DAQ-sources processing and related services.
- finish of implementation the Partial Content requests in WebUser: HTTP File Server after support the HEAD request in Protocol.HTTP.

Библиотека создана для предоставления основных шаблонов обработки DAQ-источников и производных сервисов.

Названия элементов и их параметров доступны на языках: Английский, Украинский и mRussian. Их исходный код написан в языко(человеческий)-независимом режиме с вызовом функции перевода tr() и перевод этих сообщений также доступен Английским, Украинским и mRussian.

Для подключения библиотеки к проекту станции OpenSCADA Вы можете получить файл БД как:

wget http://oscada.org/svn/trunk/OpenSCADA/data/LibsDB/OscadaLibs.sql
sqlite3 -init OscadaLibs.sql OscadaLibs.db .exit

Этот полученный файл вы далее можете разместить в каталоге проекта станции и создать объект базы данных модуля БД "SQLite", зарегистрировав файл базы данных в конфигурации.

Для DAQ-шаблонов, в целом, вам нужно создать представительский объект устройства в модуле Логического Уровня и выбрать соответствующий шаблон из библиотеки шаблонов. Далее, для корректной конфигурации, придерживайтесь специфики шаблона в персональном описании.

Contents

1 Templates of standard structures of the DAQ-parameters

1.1 Analog signal, unified (anUnif)

2.4 GPLv2 * en, uk, ru Roman Savochenko
Result and the operative setup.

Common, representative and unified template of analog input signals processing. The template forms a structure of analog parameter (complex tag) which can be easily connected to most widgets and cadres of the main elements library of the user interface just pointing the parameter object.

The representative structure of analog parameters (complex tags) is:

Significant graphical shapes representing the structure:

Functions

  • simple correction-calibration at the formula "in = iMult*(in+iAdd)";
  • scaling from the hardware border [plcMin...plcMax] to the main border [min...max], applying the square scale scSqr;
At.png The hardware borders can be inverted ones and disabled in whole for equal values of the maximum and minimum, when the main border only used.
  • permission to exceed the border for the input value on the value of plcExcess percent;
  • filtering the input value changing in the time Tf.
At.png Missing the link plcImitIn (EVAL) causes to generating random analog input
  • in [IN|OUT] — the same raw analog input IO;
  • var [IN] — the end variable IO;
  • min, max [IN] — the main border IOs;
  • plcMin, plcMax [IN] — the hardware border IOs;
  • plcImit, plcImitIn [IN] — IOs of the simple imitation;
  • levErr, tErr [IN|OUT] — alarm level [-79...0] and text of the error (the attribute "err" format);
  • f_frq [IN] — frequency of calculation, the template IO;
  • this [IN] — reference to the parameter object, what executing the template;
  • ctx [IN] — object of the user context, what saved between the execution cycles;
  • toSave [OUT] — to force save the parameter object at exit.
  • missing for data or connection with source at the EVAL input value — error code 1 and alarm level 5;
  • exceeding the input value of the hardware border — error code 1,2 and alarm level 5;
  • exceeding the end variable of the alarm border [aMin...aMax] — error code 3,4 and alarm level 4;
At.png Disabled at setting for equal or inverted values of the border
  • exceeding the end variable of the warning border [wMin...wMax] — error code 5,6 and alarm level 2;
At.png Disabled at setting for equal or inverted values of the border
  • big motion speed of the end variable — error code 7 and alarm level 2.
  • the first line — as description of the alarm messages;
  • the field CustomFlds — specifying of the custom fields of the alarm messages in the form "CustomFlds: {CustFld0} => {CustFld1} => ... => {CustFldN}";
  • the field CustomAlarms — redefinition of the standard alarm levels of the alarm messages in the form "CustomAlarms: {ConErr};{BrdAlarm};{BrdWarn}".

Template IOs

Identifier Name Type Mode Attribute Configuration Value
in Input Real Input Not attribute Link Input|var
inProc Input processing procedure Text Input Not attribute Constant
var Variable Real Input Read only Variable 0
ed Dimension String Input Full access Variable
min Scale: minimum Real Input Full access Variable 0
max Scale: maximum Real Input Full access Variable 100
scSqr Scale: square Boolean Input Full access Variable 0
subMode Substitute: mode Integer numbers selection Input Full access Variable 0

0;1;2
no;last;substitute

subVar Substitute: variable Real Input Full access Variable 0
alSup Violations suppress Boolean Input Full access Variable
alDelay Violations delay, seconds Real Input Full access Variable 0
aMin Border down alarm Real Input Full access Variable 0
aMax Border up alarm Real Input Full access Variable 0
wMin Border down warning Real Input Full access Variable 0
wMax Border up warning Real Input Full access Variable 0
HystBnd Hysteresis of borders violation Real Input Full access Variable 1
speed Motion speed, %/cycle Real Input Full access Variable 0
prec Precision, signs Integer Input Full access Variable 2
log Logarithmic scale Boolean Input Full access Variable 0
Tf Filter time, seconds Real Input Full access Variable 0
iAdd Input addition Real Input Not attribute Constant 0
iMult Input multiplication Real Input Not attribute Constant 1
plcMin Minimum module scale Real Input Not attribute Constant 0
plcMax Maximum module scale Real Input Not attribute Constant 0
plcExcess Allowed scale exceeding, % Real Input Not attribute Constant 0
plcImit PLC imitation Boolean Input Not attribute Constant 0
plcImitIn PLC imitation input Real Input Not attribute Link Imitation|var
this Object Object Output Not attribute Variable
SHIFR Code String Input Not attribute Variable
NAME Name String (translate) Input Not attribute Variable
DESCR Description Text (translate) Input Not attribute Variable
f_err Function error String Input Not attribute Variable 0
f_frq Frequency of calculation of the function, 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
Configuration.

Configuring and using

1. Create and start a logical controller object or use any presented one with the needed scheduling properties.
2. Create a logical parameter object and select this template for it. Enable the parameter.
3. Into the tab "Template configuration" of the logical parameter object you need to set:
  • Inputlink to a source of the "raw" signal.
  • Input processing procedure — form for the complex preprocessing and complete generation of the analog input on the internal programming language of OpenSCADA. It is optional and should be defined in complex cases, for example:
  • simple and transparent preprocessing to bring the percentage of UPS load to power that can be done with iMult also:
in = 490*in/100;	//the UPS has 480W
  • implementing of the input signal counter — consumed electricity of the UPS:
//Checking for the data validity
if(ctx.cntr.isEVal())	ctx.cntr = this.var.get();
if(!in.isEVal()) {
	pUPS = 33;
	if(ctx.cntr.isEVal())	ctx.cntr = (pUPS+in)/(3600*f_frq);
	else ctx.cntr += (pUPS+in)/(3600*f_frq);
}

//Checking for the next month reset
month = 0; SYS.localtime(SYS.time(), 0, 0, 0, 0, month);
if(!ctx.month.isEVal() && month != ctx.month)	ctx.cntr = 0;
ctx.month = month;

in = ctx.cntr;
  • generating of the extended violations — processing for the external signals related to the source:
gO = this.cntr().prm_grps;
if(SYS.DAQ.JavaLikeCalc.lib_aviary.sensorError(gO.prm_generic.PRG_Input_Err_T_room_S.get(),levErr,tErr));
else if(!(tVl=gO.prm_alarms.PRG_Alarm_T_max.get()).isEVal() && tVl)
	levErr = -4, tErr = "11:above the set limit";
else if(!(tVl=gO.prm_alarms.PRG_Alarm_T_min.get()).isEVal() && tVl)
	levErr = -4, tErr = "11:below the set limit";
  • Minimum and maximum of the module scale — must be set at the case of significant difference the hardware and the generic scales, for example:
  • the input is raw and measured in value of the current [4...20]mA, here it is necessary to specify 4 and 20 mA;
  • the previous case where it is necessary to simply and transparently calibrate the end value — with a precision device set 4mA and 20mA and indicate here the real measured values of the "raw" signal.
  • Input addition and multiplication — use for easy and linear correction of the input, for example:
  • calibration for the end value, which is less transparent and these coefficients should be calculated according to the formulas:
iAdd = ((plcMin*precMeasMax)/plcMax - precMeasMin)*(plcMax/(plcMax-plcMin))
iMult = (plcMax - plcMin) / (precMeasMax - precMeasMin)
  • Allowed scale exceeding — set if necessary to exceed the value of the main border, and when this scale starts to perform the recommendation function, say for the initial display of the trend on this scale.
  • PLC imitation and the imitation input — define at the need to simulate the input as required in the functions.
4. RESULT: Launching the controller object (where this parameter is created) and if it has not been started, we must get the operational data in the tab "Attributes" for: variable, error status; and the generation of violations if the state of the error is nonzero.
5. In the process of the working, through the tab "Attributes" of operational data, in addition to obtaining the result, it is possible to perform operative setup and control on:
  • Scale: minimum and maximum — strictly At.png set to the range of data changes by availability and according to the hardware border, otherwise the value will be distorted! In the absence of the hardware border, this, the main border, is arbitrary and advisory, although exceeding of the border by the value will be also accompanied by a violation.
  • Scale: square — set if the hardware border is square one.
  • Filter time — set the filtering time for noisy signals.
  • Substitute: mode and variable — set the desired substitution mode at invalidity the variable.
  • Violations suppress — set at the need of the parameter violations complete suppression — to disable their generation in whole.
  • Violations delay — set the delay time for the generation of the violations, to exclude frequent generation, characteristic to uncertain sources of data, characterized by short-term loss of communication.
  • Border up/down alarm/warning — set when it is necessary to generate violations at the exceeding of the alarm/warning borders.
  • Hysteresis of borders violation — set the hysteresis of removing the violation, that is, removal of the violations occurs at the specified percentage later, in order to prevent the frequent generation by fluctuating the value near the border.
  • Motion speed — set if it is necessary to warn about fast change of value.
  • Name, Description, Dimension, Precision, Logarithmic scale — set this information as needed when displayed, or as an element of the passport.


1.2 Analog signal, unified, violation statuses (anUnifSt)

1.3 GPLv2 * en, uk, ru Roman Savochenko

Common, representative and unified template of analog input signals processing, extended by binary states of indication the violations. The template grounded on the base template "Analog signal, unified" with its representative structure and some differences characteristic to independent development and expansion.

Binary states were provided for the convenient use of algorithms of operation at the borders of violations of the parameter object, preferably in the block diagrams of general control algorithms.

Functions
Mostly the same as the basic template "Analog signal, unified" and the borderline signs are additionally provided: "H", "L", "HH", "LL", "EVAL".

Template IOs

Identifier Name Type Mode Attribute Configuration Value
Template IOs of "Analog signal, unified"
H Border up warning violation Boolean Output Read only Variable
L Border down warning violation Boolean Output Read only Variable
HH Border up alarm violation Boolean Output Read only Variable
LL Border down alarm violation Boolean Output Read only Variable
EVAL Error value Boolean Output Read only Variable

Configuring and using
Completely identical to "Analog signal, unified]" with the difference of using the borderline signs: "H", "L", "HH", "LL", "EVAL"; which can be connected to external computing.


1.3 Manual input, unified (manInUnif)

1.2 GPLv2 * en, uk, ru Roman Savochenko
Result and the operative setup.

Common, representative and unified template of a manual input and an analog output signal. The template forms a structure of parameter (complex tag) of the manual input what can be easily connected to most widgets and cadres of the main elements library of the user interface just pointing the parameter object, the control mostly can be performed through the Element cadre control panel.

The representative structure of the parameter (complex tag) of the manual input is:

Significant graphical shapes representing the structure:

Functions

  • simple correction-calibration at the formula "in = iMult*(in+iAdd)";
  • scaling from the hardware border [plcMin...plcMax] to the main border [min...max], applying the square scale scSqr;
At.png The hardware borders can be inverted ones and disabled in whole for equal values of the maximum and minimum, when the main border only used.
  • permission to exceed the border for the input value on the value of plcExcess percent;
  • filtering the input value changing in the time Tf.
  • missing for data or connection with source at the EVAL input value — error code 1 and alarm level 5;
  • exceeding the input value of the hardware border — error code 1,2 and alarm level 5;
  • exceeding the end variable of the alarm border [aMin...aMax] — error code 3,4 and alarm level 4;
At.png Disabled at setting for equal or inverted values of the border
  • exceeding the end variable of the warning border [wMin...wMax] — error code 5,6 and alarm level 2;
At.png Disabled at setting for equal or inverted values of the border
  • big motion speed of the end variable — error code 7 and alarm level 2.
At.png In the absence of the "Input/Output" connection, the writing is not performed and there is the stand-alone operation.

Template IOs

Identifier Name Type Mode Attribute Configuration Value
inout Input/Output Real Output Not attribute Link Parameter|var
var Variable Real Input Read only Variable 0
varIn Variable input Real Input Full access Variable 0
ed Dimension String Input Full access Variable
min Scale: minimum Real Input Full access Variable 0
max Scale: maximum Real Input Full access Variable 100
scSqr Scale: square Boolean Input Full access Variable 0
alSup Violations suppress Boolean Input Full access Variable
alDelay Violations delay, seconds Real Input Full access Variable
aMin Border down alarm Real Input Full access Variable 0
aMax Border up alarm Real Input Full access Variable 0
wMin Border down warning Real Input Full access Variable 0
wMax Border up warning Real Input Full access Variable 0
HystBnd Hysteresis of borders violation Real Input Full access Variable 1
speed Motion speed, %/cycle Real Input Full access Variable 0
prec Precision, signs Integer Input Full access Variable 2
log Logarithmic scale Boolean Input Full access Variable 0
Tf Filter time, seconds Real Input Full access Variable 0
iAdd Input addition Real Input Not attribute Constant 0
iMult Input multiplication Real Input Not attribute Constant 1
plcMin Minimum module scale Real Input Not attribute Constant 0
plcMax Maximum module scale Real Input Not attribute Constant 0
plcExcess Allowed scale exceeding, % Real Input Not attribute Constant 0
this Object Object Output Not attribute Variable
SHIFR Code String Input Not attribute Variable
NAME Name String (translate) Input Not attribute Variable
DESCR Description Text (translate) Input Not attribute Variable
f_err Function error String Input Not attribute Variable 0
f_frq Frequency of calculation of the function, 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
Configuration.

Configuring and using

1. Create and start a logical controller object or use any presented one with the needed scheduling properties.
2. Create a logical parameter object and select this template for it. Enable the parameter.
3. Into the tab "Template configuration" of the logical parameter object you need to set:
  • Input/Outputlink to a source of the "raw" IO signal, or do not link for the stand-alone mode.
  • Minimum and maximum of the module scale — must be set at the case of significant difference the hardware and the generic scales, for example see the template "Analog signal, unified".
  • Input addition and multiplication — use for easy and linear correction of the input, for example see the template "Analog signal, unified".
  • Allowed scale exceeding — set if necessary to exceed the value of the main border, and when this scale starts to perform the recommendation function, say for the initial display of the trend on this scale.
4. RESULT: Launching the controller object (where this parameter is created) and if it has not been started, we must get the operational data in the tab "Attributes" for: variable, error status; and the generation of violations if the state of the error is nonzero; and it will be allowed to set new values.
5. In the process of the working, through the tab "Attributes" of operational data, in addition to obtaining the result, it is possible to perform operative setup and control on:
  • Scale: minimum and maximum — strictly At.png set to the range of data changes by availability and according to the hardware border, otherwise the value will be distorted! In the absence of the hardware border, this, the main border, is arbitrary and advisory, although exceeding of the border by the value will be also accompanied by a violation.
  • Scale: square — set if the hardware border is square one.
  • Filter time — set the filtering time for noisy signals.
  • Violations suppress — set at the need of the parameter violations complete suppression — to disable their generation in whole.
  • Violations delay — set the delay time for the generation of the violations, to exclude frequent generation, characteristic to uncertain sources of data, characterized by short-term loss of communication.
  • Border up/down alarm/warning — set when it is necessary to generate violations at the exceeding of the alarm/warning borders.
  • Hysteresis of borders violation — set the hysteresis of removing the violation, that is, removal of the violations occurs at the specified percentage later, in order to prevent the frequent generation by fluctuating the value near the border.
  • Motion speed — set if it is necessary to warn about fast change of value.
  • Name, Description, Dimension, Precision, Logarithmic scale — set this information as needed when displayed, or as an element of the passport.


1.4 Discrete block, unified (digitBlockUnif)

1.0 GPLv2 * en, uk, ru Roman Savochenko
Result and the operative setup.

Common, representative and unified template of the block for union of Discrete parameters for the common control device. The template forms a structure of discrete parameter-block (complex tag) which can be easily connected to most widgets and cadres of the main elements library of the user interface just pointing the parameter object.

The representative structure of discrete parameters (complex tags) is a latch object with two characteristic states and three commands, which in the final representation may have a different meaning and name:

Significant graphical shapes representing the structure:

Functions

Template IOs

Identifier Name Type Mode Attribute Configuration Value
com Command "Open" Boolean Output Full access Link com
close Command "Close" Boolean Output Full access Link close
stop Command "Stop" Boolean Output Full access Link stop
st_open State "Opened" Boolean Input Read only Link st_open
st_close State "Closed" Boolean Input Read only Link st_close
tCmd Time to hold the command, seconds Integer Input Not attribute Constant 5
last_cmd Last command Integer Output Not attribute Variable 0
w_tm Process command counter Real Output Not attribute Variable 0
f_err Function error String Input Not attribute Variable 0
f_frq Frequency of calculation of the function, 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
Configuration.

Configuring and using

1. Create and start a logical controller object or use any presented one with the needed scheduling properties.
2. Create a logical parameter object and select this template for it. Enable the parameter.
3. Into the tab "Template configuration" of the logical parameter object you need to set:
4. RESULT: Launching the controller object (where this parameter is created) and if it has not been started, we must get the operational data in the tab "Attributes" for: states and commands.
5. In the process of the working, through the tab "Attributes" of operational data, in addition to obtaining the result, it is possible to perform operative control, performing the commands:


1.5 Alarm discrete (digAlarm)

1.3 GPLv2 * en, uk, ru Roman Savochenko
Result and the operative setup.

Common, representative and unified template of separate discrete parameter (complex tag) processing with formation of signaling by the defined criterion. The template forms a structure of discrete parameter (complex tag) which can be easily connected to most widgets and cadres of the main elements library of the user interface just pointing the parameter object.

The template provides some fields of the representative structure of the discrete parameters and adds the error field:

Functions

  • in [IN|OUT] — the same raw discrete input IO;
  • levErr, tErr [IN|OUT] — alarm level [-79...0] and text of the error (the attribute "err" format);
  • f_frq [IN] — frequency of calculation, the template IO;
  • this [IN] — reference to the parameter object, what executing the template;
  • ctx [IN] — object of the user context, what saved between the execution cycles.
  • the first line — as description of the alarm messages;
  • the field CustomFlds — specifying of the custom fields of the alarm messages in the form "CustomFlds: {CustFld0} => {CustFld1} => ... => {CustFldN}".

Template IOs

Identifier Name Type Mode Attribute Configuration Value
alrm Alarm "{st}:{lev}:{mess}" String Input Not attribute Constant
stInv State inversion Boolean Input Not attribute Constant
in Input Boolean Input Read only Link Input|in
inProc Input processing procedure Text Input Not attribute Constant
alSup Violations suppress Boolean Input Full access Variable
alDelay Violations delay, seconds Real Input Full access Variable 0
st_open State "Opened" Boolean Input Read only Variable
st_close State "Closed" Boolean Input Read only Variable
SHIFR Code String Input Not attribute Variable
NAME Name String (translate) Input Not attribute Variable
DESCR Description Text (translate) Input Not attribute Variable
this Object Object Input Not attribute Variable
f_err Function error String Input Not attribute Variable 0
f_frq Frequency of calculation of the function, 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
Configuration.

Configuring and using

1. Create and start a logical controller object or use any presented one with the needed scheduling properties.
2. Create a logical parameter object and select this template for it. Enable the parameter.
3. Into the tab "Template configuration" of the logical parameter object you need to set:
  • "Alarm "{st}:{lev}:{mess}" — define the criterion for the violation formation, leave blank to disable the violations generation.
  • "State inversion" — set to invert the representative attributes, that is, "st_open" set for "in" equal to false.
  • Inputlink to a source of the "raw" signal.
  • Input processing procedure — form for the complex preprocessing and complete generation of the discrete input on the internal programming language of OpenSCADA. For example:
  • complete creation for a complex status:
gO = this.cntr().prm_grps;
status = gO.prm_generic.PRG_Input_Err_T_Zone1_S.get();
in = gO.prm_generic.SET_CalcFan_UseSensor_T1.get() || !(status == 0 || status == 2 || status == 3);
4. RESULT: Launching the controller object (where this parameter is created) and if it has not been started, we must get the operational data in the tab "Attributes" for: variable, error status; and the generation of violations if the state of the error is nonzero.


1.6 Code state (codeState)

1.4 GPLv2 * en, uk, ru Roman Savochenko
Result and the operative setup.

A variant of the common, representative and unified template of the block for union of Discrete parameters, expanded by more than two states and three commands that can be encoded by an integer value. The template forms a structure of parameter (complex tag) which can be easily connected to most widgets and cadres of the main elements library of the user interface just pointing the parameter object.

The representative structure of the parameter (complex tag) of the code state is:

Significant graphical shapes representing the structure:

Functions

  • in [IN|OUT] — IO of the code state;
  • text [OUT] — direct text status setting;
  • coms [IN] — list of available commands, of the corresponded IO;
  • com_text [IN|OUT] — text of the received command;
  • levErr, tErr [IN|OUT] — alarm level [-79...0] and text of the error (the attribute "err" format);
  • f_frq [IN] — frequency of the calculation, the template IO;
  • this [IN] — reference to the parameter object, what executing the template;
  • ctx [IN] — object of the user context, what saved between the execution cycles.

Template IOs

Identifier Name Type Mode Attribute Configuration Value
in Input Integer Input Read only Link Signal|in
out Output Integer Output Read only Link Signal|out
inProc Input processing procedure Text Input Not attribute Constant
alSup Violations suppress Boolean Input Full access Variable
alDelay Violations delay, seconds Real Input Full access Variable 0
st_text State "Text" String Input Read only Variable
stats States, rows "{code}:{State}" Text Input Full access Variable
com_text Command "Text" String Input Full access Variable
coms Commands-states, rows "{code}:{State}" Text Input Full access Variable
digComs Commands Text Input Read only Variable
SHIFR Code String Input Not attribute Variable
NAME Name String (translate) Input Not attribute Variable
DESCR Description Text (translate) Input Not attribute Variable
this Object Object Output Not attribute Variable
f_err Function error String Input Not attribute Variable 0
f_frq Frequency of calculation of the function, 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
Configuration.

Configuring and using

1. Create and start a logical controller object or use any presented one with the needed scheduling properties.
2. Create a logical parameter object and select this template for it. Enable the parameter.
3. Into the tab "Template configuration" of the logical parameter object you need to set:
  • Input and Outputlink to a source of the "raw" signal.
  • Input processing procedure — form for the processing and complete generation-imitation of the input, and issuing of the specific output, on the internal programming language of OpenSCADA. For example:
  • complete creation for the state code and alarms forming:
gO = this.cntr().prm_grps;
if(gO.prm_fansControl.PRG_CntrFan_AutoMode_G1.get().isEVal())	in = 4;
else {
  if(!(tVl=gO.prm_fansControl.PRG_CntrFan_Alarm_ThermalRelay.get()).isEVal() && tVl)
    levErr = -4, tErr = "11:alarm";
  if(gO.prm_fansControl.PRG_CntrFan_AutoMode_G1.get())
    in = gO.prm_fansControl.PRG_CntrFan_On_G1.get() ? 1 : 2;
  else in = 3;
}
  • forming the clock time text and issuing the time synchronization — direct status text setting and issuing for specific commands:
curTm = SYS.time();
text = SYS.strftime(curTm, "%H։%M %d.%m.%Y");
gO = this.cntr().prm_grps;
if(!(tVl=gO.prm_other.PRG_RTC_UNIX.get()).isEVal()) {
  text += " ("+(tVl-curTm).toString(10,0,true)+")";
}

if(com_text.length && !com_text.isEVal() && (tVl=coms.match("^([^:]+):"+com_text,"m")).length && tVl[1] == 1) {
  gO.prm_other.SET_RTC_New_UNIX.set(curTm);
  gO.prm_other.KEY_RTC_set_time.set(true);
}
4. RESULT: Launching the controller object (where this parameter is created) and if it has not been started, we must get the operational data in the tab "Attributes" for: input, output, code-input state, error status; and the generation of violations if the state of the error is nonzero.
5. In the process of the working, through the tab "Attributes" of operational data, in addition to obtaining the result, it is possible to perform operative control, performing the commands:
  • States — set to list of accordance with its status code to text.
  • Commands-states — set to list of accordance with its status-command code to text.
  • Command "Text" — set in the command text, which is described in the command list, for the code conversion and issuance.
  • Violations suppress — set at the need of the parameter violations complete suppression — to disable their generation in whole.
  • Violations delay — set the delay time for the generation of the violations, to exclude frequent generation, characteristic to uncertain sources of data, characterized by short-term loss of communication.


1.7 PID signal, unified, violation statuses (pidUnif)

1.2 GPLv2 * en, uk, ru Roman Savochenko
Result and the operative setup.

Common, representative and unified template of an interface to the Proportional Integral Differential (PID) regulator based on the common analog input signal, extended by binary states of indication the violations. The template forms a structure of the analog PID-regulator which can be easily connected to some cadres and widgets of the main elements library of the user interface just pointing the parameter object.

The representative structure of the analog PID-regulators is:

Significant graphical shapes representing the structure:

Functions

  • simple correction-calibration at the formula "in = iMult*(in+iAdd)";
  • scaling from the hardware border [plcMin...plcMax] to the main border [min...max], applying the square scale scSqr;
  • permission to exceed the border for the input value on the value of plcExcess percent;
  • filtering the input value changing in the time Tf.
  • missing for data or connection with source at the EVAL input value — error code 1 and alarm level 5;
  • exceeding the input value of the hardware border — error code 1,2 and alarm level 5;
  • exceeding the end variable of the alarm border [aMin...aMax] — error code 3,4 and alarm level 4;
At.png Disabled at setting for equal or inverted values of the border
  • exceeding the end variable of the warning border [wMin...wMax] — error code 5,6 and alarm level 2;
At.png Disabled at setting for equal or inverted values of the border
  • big motion speed of the end variable — error code 7 and alarm level 2.

Template IOs

Identifier Name Type Mode Attribute Configuration Value
in Input Real Input Not attribute Link Signal|in
sp Setpoint Real Input Full access Link PID|sp
var Variable Real Input Read only Variable 0
manIn Manual input, % Real Input Full access Link PID|manIn
out Output, % Real Input Full access Link PID|out
auto Mode: automate Boolean Input Full access Link PID|auto
casc Mode: cascade Boolean Input Full access Link PID|casc
ed Dimension String Input Full access Variable
min Scale: minimum Real Input Full access Link PID|min
max Scale: maximum Real Input Full access Link PID|max
scSqr Scale: square Boolean Input Full access Variable 0
alSup Violations suppress Boolean Input Full access Variable 0
alDelay Violations delay, seconds Real Input Full access Variable 0
aMin Border down alarm Real Input Full access Variable 0
aMax Border up alarm Real Input Full access Variable 0
wMin Border down warning Real Input Full access Variable 0
wMax Border up warning Real Input Full access Variable 0
HystBnd Hysteresis of borders violation Real Input Full access Variable 0
speed Motion speed, %/cycle Real Input Full access Variable 0
prec Precision, signs Integer Input Full access Variable 2
log Logarithmic scale Boolean Input Full access Variable 0
H Border up warning violation Boolean Output Read only Variable 0
L Border down warning violation Boolean Output Read only Variable 0
HH Border up alarm violation Boolean Output Read only Variable 0
LL Border down alarm violation Boolean Output Read only Variable 0
EVAL Value is error Boolean Output Read only Variable 0
Tf Filter time, milliseconds Real Input Full access Variable 0
Kp Gain Real Input Full access Link PID|Kp
Ti Ti, milliseconds Integer Input Full access Link PID|Ti
Kd Gain differential Real Input Full access Link PID|Kd
Td Td, milliseconds Integer Input Full access Link PID|Td
Tzd T differential lag, milliseconds Integer Input Full access Link PID|Tzd
Zi Insensitivity, % Real Input Full access Link PID|Zi
Hup Upper output border, % Real Input Full access Link PID|Hup
Hdwn Lower output border, % Real Input Full access Link PID|Hdwn
K1 Coefficient of input 1 Real Input Full access Link PID|K1
K2 Coefficient of input 2 Real Input Full access Link PID|K2
K3 Coefficient of input 3 Real Input Full access Link PID|K3
K4 Coefficient of input 4 Real Input Full access Link PID|K4
iAdd Input addition Real Input Not attribute Constant 0
iMult Input multiplication Real Input Not attribute Constant 1
plcMin Minimum module scale Real Input Not attribute Constant 1
plcMax Maximum module scale Real Input Not attribute Constant 5
plcExcess Allowed scale exceeding, % Real Input Not attribute Constant 0
plcImit PLC imitation Boolean Input Not attribute Constant 0
plcImitIn PLC imitation input Real Input Not attribute Link Imitation|var
this Object Object Output Not attribute Variable
SHIFR Code String Input Not attribute Variable
NAME Name String (translate) Input Not attribute Variable
DESCR Description Text (translate) Input Not attribute Variable
f_frq Frequency of calculation of the function, Hz Real Input Not attribute Variable 1000
f_start Function start flag Boolean Input Not attribute Variable 0
f_err Function error String Input Not attribute Variable 0
f_stop Function stop flag Boolean Input Not attribute Variable 0
Configuration.

Configuring and using

1. Create and start a logical controller object or use any presented one with the needed scheduling properties.
2. Create a logical parameter object and select this template for it. Enable the parameter.
3. Into the tab "Template configuration" of the logical parameter object you need to set:
  • Inputlink to a source of the "raw" analog signal.
  • Setpoint, Manual input, Output, Mode: automate, Mode: cascade, Scale: minimum, Scale: maximum, Gain, Ti, Gain differential, Td, T differential lag, Insensitivity, Upper output border, Lower output border, Coefficient of input 1, Coefficient of input 2, Coefficient of input 3, Coefficient of input 4link to a source of the PID-regulator.
  • Input addition and multiplication — use for easy and linear correction of the input, for example see the template "Analog signal, unified".
  • Allowed scale exceeding — set if necessary to exceed the value of the main border, and when this scale starts to perform the recommendation function, say for the initial display of the trend on this scale.
  • PLC imitation and the imitation input — define at the need to simulate the input as required in the functions.
4. RESULT: Launching the controller object (where this parameter is created) and if it has not been started, we must get the operational data in the tab "Attributes" for: variable, error status; and the generation of violations if the state of the error is nonzero. Also we will get all the PID-specific attributes.
5. In the process of the working, through the tab "Attributes" of operational data, in addition to obtaining the result, it is possible to perform operative setup and control on:
  • Scale: minimum and maximum — strictly At.png set to the range of data changes by availability and according to the hardware border, otherwise the value will be distorted!
  • Scale: square — set if the hardware border is square one.
  • Filter time — set the filtering time for noisy signals.
  • Violations suppress — set at the need of the parameter violations complete suppression — to disable their generation in whole.
  • Violations delay — set the delay time for the generation of the violations, to exclude frequent generation, characteristic to uncertain sources of data, characterized by short-term loss of communication.
  • Border up/down alarm/warning — set when it is necessary to generate violations at the exceeding of the alarm/warning borders.
  • Hysteresis of borders violation — set the hysteresis of removing the violation, that is, removal of the violations occurs at the specified percentage later, in order to prevent the frequent generation by fluctuating the value near the border.
  • Motion speed — set if it is necessary to warn about fast change of value.
  • Name, Description, Dimension, Precision, Logarithmic scale — set this information as needed when displayed, or as an element of the passport.


1.8 Impulse PID signal, unified, violation statuses (pidUnifImp)

1.1 GPLv2 * en, uk, ru Roman Savochenko

Common, representative and unified template of an interface to the Proportional Integral Differential (PID) regulator based on the common analog input signal but with the PWM-output, extended by binary states of indication the violations and mostly like to the template "PID signal, unified, violation statuses". The template forms a structure of the impulse PID-regulator which can be easily connected to some cadres of the main elements library of the user interface just pointing the parameter object.

The representative structure of the impulse PID-regulators is mostly equal to the template "PID signal, unified, violation statuses" and contains a number of attributes specific to the pulse output and the attribute of determining the operation of this regulator in the analog mode, that is, this template is even more generalizable:

Functions
Mostly the same as the basic template "PID signal, unified, violation statuses" and the impulse-specific attributes are additionally provided: "Impulse output up", "Impulse output down", "Mode: analog", "T impulses period", "T minimal impulse", "Impulse rate factor".

Template IOs

Identifier Name Type Mode Attribute Configuration Value
Template IOs of "PID signal, unified, violation statuses"
impQup Impulse output up Boolean Input Read only Link PID|impQupTm
impQdwn Impulse output down Boolean Input Read only Link PID|impQdwnTm
analog Mode: analog Boolean Input Read only Link PID|analog
TImpPer T impulses period, milliseconds Integer Input Full access Link PID|TImpPer
TImpMin T minimal impulse, milliseconds Integer Input Full access Link PID|TImpMin
KImpRfact Impulse rate factor Real Input Full access Link PID|KImpRfact

Configuring and using
Mostly the same as the basic template "PID signal, unified, violation statuses" with the difference of using the impulse specific output: "Impulse output up", "Impulse output down", "Mode: analog", "T impulses period", "T minimal impulse", "Impulse rate factor".

2 Templates of the complex objects

In some cases where an object is only a part of a common automated system and does not require deep detailing to the level of signals and parameters (complex tag) around them, including without the need for archiving, it is convenient to unify them in one representative object of the data source OpenSCADA with appropriate consolidated view and object control as a set of simple attributes with violation elements. Such consolidation often occurs around specialised data sources, whose access to data is usually implemented through a separate exchanging protocol, but without unifying the transmission of this data to the level of visualisation and signalling by a separate attribute of the object.

In general, the representative structure of a complex object is:

Generally, it is advisable to create such template (a layer above the physical data source object) above a raw data source that provides this data in attributes and without processing, and this template therefore performs:

In addition to complex object templates, this object-control mechanism can be implemented by templates for implementing the logical level of data access, such as in IEC60870.

To represent the data of the object-control mechanism, there currently provided the appropriate Object properties frame, which provides these properties as a table-list with illumination of the violations and the possibility to change the selected and accessible to edit row-properties.


2.1 Uninterruptible Power Supply (UPS)

1.3 GPLv2 * en, uk, ru Roman Savochenko
Result and the operative setup.

Data combination of the Uninterruptible Power Supply in a complex object of the attribute "All items". The template designed to use together with the DAQ-module "System" in the part "UPS" and to represent this data by the frame "Object properties" as a complex object with properties, signalling at single borders and writing.

Template IOs

Identifier Parameter Type Mode Attribute Configuration Value
srcAddr Source object's address String Input Not attribute Constant
alSup Violations suppress Boolean Input Full access Variable
alDelay Violations delay, seconds Real Input Full access Variable 0
items All items Object Output Full access Variable
bChL Battery charge low Real Input Full access Variable 20
bChLL Battery charge critical Real Input Full access Variable 5
inVL Input voltage low Real Input Full access Variable 210
inVH Input voltage high Real Input Full access Variable 250
inFLL Input frequency too low Real Input Full access Variable 40
inFL Input frequency low Real Input Full access Variable 45
inFH Input frequency high Real Input Full access Variable 55
inFHH Input frequency too high Real Input Full access Variable 60
loadH Load high Real Input Full access Variable 80
loadHH Load too high Real Input Full access Variable 100
tH Temperature high Real Input Full access Variable 50
tHH Temperature too high Real Input Full access Variable 70
this Object Object Input Not attribute Variable
SHIFR Code String Input Not attribute Variable
NAME Name String (translate) Input Not attribute Variable
DESCR Description Text (translate) Input Not attribute Variable
f_stop Function stop flag Boolean Input Not attribute Variable 0
f_frq Frequency of calculation of the function, Hz Real Input Not attribute Variable 1000
f_err Function error String Input Not attribute Variable 0
f_start Function start flag Boolean Input Not attribute Variable 0
Configuration.

Configuring and using

1. Create a source controller object into the module "System" and set its Identifier like to "SYSData".
2. Create a source parameter object into the previous controller object and set its Identifier like to "UPS".
3. Create and start a logical controller object or use any presented one with the needed scheduling properties.
4. Create a logical parameter object and select the template for it. Enable the parameter.
5. In the tab "Template configuration" of the logical parameter object you need to set:
  • Source object's address — to address of the source UPS parameter object (see to step 1) like to "System.SYSData.UPS".
6. RESULT: When running the controller object (where this parameter was created) and if it was not started, we must obtain, in the parameter attribute items, this object with all the attributes and their properties. In case of some violations, we will get the corresponding information in the attribute of the parameter err, for which you can adjust the attributes of the boundaries of the corresponding violations.
7. Into the visual interfaces developing of the module Vision place the frame "Object properties" to any page and link it to the parameter object, created into step 4.
8. RESULT: Into runtime of the page you get a table with data of the object, notifications about violations into the header and the possibility to set of writable properties.


2.2 Network devices by SNMP (SNMP)

1.1 GPLv2 * en, uk, ru Roman Savochenko
Result and the operative setup.

Data combination of a device, accessible by the protocol SNMP, in a complex object of the attribute "All items". The template designed to use together with the DAQ-module "SNMP" and to represent this data by the frame "Object properties" as a complex object with properties, signalling at single borders and writing. Considering the great specificity and variety of SNMP-accessible devices, this template is actually a billet and an example of creating a template based on it to a corresponding device with a specific to it processing of input properties, forming of violations and write capability.

Template IOs

Identifier Parameter Type Mode Attribute Configuration Value
srcAddr Source object's address String Input Not attribute Constant
manTables Manual tables String Input Not attribute Constant
alSup Violations suppress Boolean Input Full access Variable
alDelay Violations delay, seconds Real Input Full access Variable 0
items All items Object Output Full access Variable
this Object Object Input Not attribute Variable
SHIFR Code String Input Not attribute Variable
NAME Name String (translate) Input Not attribute Variable
DESCR Description Text (translate) Input Not attribute Variable
f_err Function error String Input Not attribute Variable 0
f_start Function start flag Boolean Input Not attribute Variable 0
f_stop Function stop flag Boolean Input Not attribute Variable 0
f_frq Frequency of calculation of the function, Hz Real Input Not attribute Variable 1000
Configuration.

Configuring and using

1. Create a source controller object into the module "SNMP" and set its Identifier like to "SYSData".
2. Create a source parameter object into the previous controller object and set its Identifier like to "DEV".
3. Create and start a logical controller object or use any presented one with the needed scheduling properties.
4. Create a logical parameter object and select the template for it. Enable the parameter.
5. In the tab "Template configuration" of the logical parameter object you need to set:
  • Source object's address — to address of the source SNMP device parameter object (see to step 1) like to "SNMP.SYSData.DEV".
  • Manual tables — enter manually some static MIB-variables.
6. RESULT: When running the controller object (where this parameter was created) and if it was not started, we must obtain, in the parameter attribute items, this object with all the attributes and their properties. In case of some violations, we will get the corresponding information in the attribute of the parameter err, for which you can adjust the attributes of the boundaries of the corresponding violations.
7. Into the visual interfaces developing of the module Vision place the frame "Object properties" to any page and link it to the parameter object, created into step 4.
8. RESULT: Into runtime of the page you get a table with data of the object, notifications about violations into the header and the possibility to set of writable properties.

3 Services

3.1 Notificator by SMS, EMail-SMTP (ntf)

1.0 GPLv2 * => UserProtocol en, uk, ru Roman Savochenko
Result and the operative setup.

The complex template of the notification contains of parts of the dispatcher and the output user protocol of notification by EMail(SMTP) and SMS.

THE DISPATCHER can be performed for pointed messages of the message buffer of OpenSCADA and applied on the Logical level or the controller object of the module JavaLikeCalc.

Template IOs

Identifier Name Type Mode Attribute Configuration Value
io UserPrt: Output IO Object Input Not attribute Variable
tr UserPrt: Transport Object Input Not attribute Variable
tmOut Maximum notification timeout, seconds Integer Input Not attribute Constant 5
messLev Messages level, negative for alarms Integer Input Not attribute Constant 1
messCat Messages category, template or regular expression String Input Not attribute Constant al*:*
messCatExcl Message exclusion category, in regular expression String Input Not attribute Constant
emailState Email notification current state String Output Read only Variable
emailTrAddr Output transport for SMTP connection, empty for disable String Input Not attribute Constant Sockets.out_SMTP
emailAuth Auth, empty for disable String Input Not attribute Constant user:pass
emailSender Sender String Input Not attribute Constant noreply@oscada.org
emailReceiver Destination receiver address String Input Not attribute Constant test@oscada.org
emailTopic EMail topic String Input Not attribute Constant Notification
emailMess EMail message String Input Not attribute Constant
SMSState SMS notification current state String Output Read only Variable
SMSTrAddr SMS serial transport, empty for disable String Input Not attribute Constant Serial.out_SMS
SMSPin SMS-pin, empty for disable String Input Not attribute Constant 1111
SMSTel SMS destination receiver, tel. number String Input Not attribute Constant +380XXXXXXXXX
SMSTextMd SMS in the text mode, else PDU Boolean Input Not attribute Constant 0
f_frq Frequency of calculation of the function, Hz Real Input Not attribute Variable 1000
f_start Function start flag Boolean Input Not attribute Variable 0
f_err Function error String Input Not attribute Variable 0
f_stop Function stop flag Boolean Input Not attribute Variable 0
Configuration.

Configuring and using

1. Create a parameter in a controller object of the Logical Level or a controller object in the module DAQ.JavaLikeCalc.
2. Create an output transport of the type "Serial" and set its Identifier like to "SMS", one transport suitable for more receivers.
3. Set for proper address, only for the Serial device. The serial port speed, asynchronous data format and timeouts will adjusted by the function.
4. Create an output transport of the type "Sockets" or "SSL" and set its Identifier like to "SMTP", one transport suitable for more receivers.
5. Set-up for proper address, for Sockets(25) or SSL(465). The transport timeouts will be adjusted by the function.
6. In the tab "Template configuration" you need to set:
  • Maximum notification timeout, seconds.
  • Messages level, negative for alarms.
  • Messages category, template or regular expression.
  • Message exclusion category, in regular expression.
  • Output transport for SMTP connection, empty for disable.
  • Auth, empty for disable.
  • Sender.
  • Destination receiver address.
  • EMail topic.
  • EMail message.
  • SMS serial transport, empty for disable.
  • SMS-pin, empty for disable.
  • SMS destination receiver, tel. number.
  • SMS in the text mode, else PDU.
7. RESULT: Sending for the pointed messages at SMS or EMail(SMTP).

THE OUTPUT USER PROTOCOL PART "SMS" provides operations with SMS by a GSM-modem connected as serial device. For now, there supported only sending SMS messages to a number of remote cell phone or GSM-modem. For sending there are supported: ECHO disable, PIN check and set, sending in PDU and the Text mode.

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 of the 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.

Configuring and using

1. Create an output transport of the type "Serial" and set its Identifier like to "SMS", one transport suitable for more receivers.
2. Set for proper address. The serial port speed, asynchronous data format and timeouts will adjusted by the function.
3. Create of needed user protocol object based on the templates, with Identifier like to "SMS".
4. Place some requesting commands directly into presented or a new internal OpenSCADA-procedure like to:
req = SYS.XMLNode("send"); req.setAttr("ProtIt","SMS").setAttr("pin","1111").setAttr("tel","+380XXXXXXXXX").setText("Notify message");
SYS.Transport.Serial.out_SMS.messIO(req, "UserProtocol");
rez = req.attr("err").toInt() ? req.attr("err") : "OK";
5. RESULT: In the variable rez you will get "OK" if no errors occur and the message successfully transmitted to the receiver.

THE OUTPUT USER PROTOCOL PART "SMTP" provides operations with a SMTP-server for delivering EMails by their sending through TCP-Socket or SSL. For now, there are supported: TCP, SSL, AUTH, topic encoding for UTF-8.

Output user protocol's XML request structure
<send auth="{user}:{pass}" from="{FromAddr}" to="{ToAddr}" topic="{My Topic}" err="1:Error">{MessageText}</send>

topic — topic of the message;
from — sender address;
to — destination address of the receiver;
auth — authenticate user and password;
MessageText — text of the message;
err — sets for the request result.

Configuring and using

1. Create an output transport of the type "Sockets" or "SSL" and set its Identifier like to "SMTP", one transport suitable for more receivers.
2. Set-up for proper address, for Sockets(25) or SSL(465). The transport timeouts will be adjusted by the function.
3. Create of needed user protocol object based on the templates, with Identifier like to "SMTP".
4. Place some requesting commands directly into allowed or a new internal OpenSCADA procedure like to:
req = SYS.XMLNode("send");
req.setAttr("ProtIt","SMTP").setAttr("from","noreply@oscada.org").setAttr("to","oscada@oscada.org").setAttr("topic","My topic").setText("My message");
SYS.Transport.Sockets.out_SMTP.messIO(req, "UserProtocol");
rez = req.attr("err").toInt() ? req.attr("err") : "OK";
5. RESULT: In the variable rez you will get "OK" if no errors occur and the message successfully transmitted to the receiver.


3.2 Initiative connections processing for the associated output transports (initConAssociateTrs)

1.2 GPLv2 * en, uk, ru Roman Savochenko
Result and the operative setup.

The template of processing input initiative connections was created to provide the last link of implementation and support for conception of data acquisition in the passive mode and the initiative connection, that is — the control of associative connections, created by the input transport at each connection.

At.png After implementation this control together the new common-unified output transport connection function outAt() that template became deprecated for sources adapted to use the new mechanism, but you still can use the template for not adapted sources.

The function of creation associated output transports at connections is currently only supported by the module "Sockets" and for TCP-sockets.

The control of associated transport means:

The template can control the containers of data source objects, constructed both as DAQ-objects of the controllers and logical level parameters, what representing the data source and having a transport address definition field, and what generally defined by the configuration field "srcObjPath" of the format {CntrAddr}:{TrCntrFldAddr}, where:

Template IOs

Identifier Name Type Mode Attribute Configuration Value
inTransport Input transport String Input Not attribute Constant InitiateCons
outTrTm Output transport timeouts String Input Not attribute Constant 10:0.1
srcObjPath Source object path String Input Not attribute Constant ModBus:%2fcntr%2fcfg%2fADDR
prcTr Processed transports Object Output Read only Variable
f_err Function error String Input Not attribute Variable 0
f_start Function start flag Boolean Input Not attribute Variable 0
f_stop Function stop flag Boolean Input Not attribute Variable 0
f_frq Frequency of calculation of the function, Hz Real Input Not attribute Variable 1000
Configuration.

Configuring and using

1. Create an input transport of receiving the initiative connections of the module "Sockets" with the name like to "InitiateCons".
2. Set the previously created transport to the needed address of opening the input socket and move it to the mode of creating the associative output transports, leaving the protocol field in empty.
3. Provide a container of the data sources to which associative transports must be connected, which can be either a DAQ-module (such as "DAQ.ModBus"), or a logical controller (such as "DAQ.LogicLev.Sources"), or a parameter in it (such as "DAQ.LogicLev.PLC.Sources"), with logical level parameters representing the data source.
4. For this template, create and run a logical controller object or use any available with the required scheduling properties.
5. Create a logical parameter object and select this template for it. Enable the parameter.
6. In the tab "Template configuration" of the logical parameter object you need to set:
  • Input transport — to value of the identifier of the input transport, created in the item 1, like to "InitiateCons;
  • Output transport timeouts — increase the first digit for very slow connections and typical is normal in most situations
  • Source objects path — set according to the item 3, for the first part, and to the control field path, for the second part, for example, and typically for for "ModBus", is — "ModBus:%2fcntr%2fcfg%2fADDR".
6. RESULT: Starting the controller object (where this parameter was created) and if it was not started, we should get, in the attribute prcTr of the parameter for information about the processed and therefore successfully transport-linked data sources. In case of some violations, we will get the corresponding information in the attribute err of the parameter. The absence of a representative object for the received identifier is placed in the protocol of messages.

4 For WebUser

4.1 WebUser: HTTP File Server (fileServerHTTP)

1.0 GPLv2 * en, uk Roman Savochenko

The template for implementing a HTTP File Server directly in OpenSCADA, which is suitable one at missing a full-featured one for functions of servicing file requests from OpenSCADA Web-interfaces.

Currently there implemented only requesting files by the GET request of HTTP. There are supported also the Partial Content requests in single range and with forcing to this mode at some configured file size. At.png That is work properly only for video and audio files and doesn't work for other files especially documents, so you have to configure the file size limit for solid reading in maximum size of your documents. For proper working the Partial Content requests we need to implement the HTTP request HEAD in the module Protocol.HTTP before implementing here!

Template IOs

Identifier Name Type Mode Attribute Configuration Value
rez Result String Input Not attribute Variable 200 OK
HTTPreq HTTP request String Input Not attribute Variable
url URL String Input Not attribute Variable
page WWW-page String Output Not attribute Variable
HTTPvars HTTP variables Object Output Not attribute Variable
baseD Base directory String Input Not attribute Constant /data/share_res/local/Lib/
fSzSolidLim File size limit for solid reading, else enables the partial content Real Input Not attribute Constant 10e6
f_start Function start flag Boolean Input Not attribute Variable 0
f_frq Frequency of calculation of the function, Hz Real Input Not attribute Variable 1000
f_stop Function stop flag Boolean Input Not attribute Variable 0
f_err Function error String Input Not attribute Variable 0
Configuration.

Configuring and using

1. Create a page in the UI.WebUser module with some reasonable PageId.
2. In the tab "Procedure" you need to set:
  • Base directory from which the page'll search files.
  • File size limit for solid reading, else enables the partial content.
3. RESULT: Opening URL "http://{OpenSCADAHost}/WebUser/{PageId}/{MyFile}" in a WebBrowser will open and send you file on FS "{baseD}/{MyFile}".
Libs/Main/ru - GFDLMarch 2024OpenSCADA 0.9.7