OpenSCADAWiki: Home Page En/Doc/F Lib Complex1 ...

Home | Index | Changes | Comments | Users | Registration | Login  Password:  
 
This is an old revision of HomePageEn/Doc/FLibComplex1 from 2009-09-22 11:22:17..

The module <FLibComplex1> of the subsystem “Specials”

Russian (1 Kb) Русская версия
Ukrainian (1 Kb) Українська версія


Module:FLibComplex1
Name:Library of functions compatible with SCADA Complex1.
Тип:Specials
Source:spec_FLibComplex1.so
Version:1.0.4
Author:Roman Savochenko
Translated:Maxim Lysenko
Description:Provides the library of functions compatible with SCADA Complex1 of the firm SIC "DIYA".
License:GPL

Contents

Introduction

Special module FLibComplex1 provides the OpenSCADA system with the static library of functions compatible with SCADA Complex1 of firm SIC 'DIYA'. These functions are used in the SCADA system Complex1 in the form of algoblocks to create inner-computings on the virtual controller. Provision of the library of these functions lets to do the transfer of computational algorithms from the system Complex1.


To address the functions of this library must it is necessary to use the path: <Special.FLibComplex1.*>, where '*' - function identifier in the library.


Below is the description of each function of the librariy. For each function it was evaluated the execution time. Measurements were made on the system with the following parameters: Athlon 64 3000 + (ALTLinux 4.0 (32bit)) by measuring the total execution time of the function when you call it 1000 times. Sampling was carried out of the five calculations, rounded to integer. Time is in angle brackets and is measured in microseconds.

1. Alarm (alarm) <111>

Description: Set alarm sign in the case of going out of the variable for the specified boundary.
Formula:

out = if(val>max || val<min) true; else false;

2. Condition '<' (cond_lt) <239>

Description: Operation of branching in accordance with the condition "<".
Formula:

out=if(in1<(in2_1*in2_2*in2_3*in2_4)) in3_1*in3_2*in3_3*in3_4;
else in4_1*in4_2*in4_3*in4_4;

3. Condition '>' (cond_gt) <240>

Description: Operation of branching in accordance with the condition ">".
Formula:

out=if(in1>(in2_1*in2_2*in2_3*in2_4)) in3_1*in3_2*in3_3*in3_4;
else in4_1*in4_2*in4_3*in4_4;

4. Full condition (cond_full) <513>

Description: Full check of the conditions, including more, less and equal.
Formula:

out = if(in1<(in2_1*in2_2*in2_3*in2_4)) in3_1*in3_2*in3_3*in3_4;
else if( in1>(in4_1*in4_2*in4_3*in4_4) in5_1*in5_2*in5_3*in5_4;
else in6_1*in6_2*in6_3*in6_4;

5. digital block (digitBlock) <252>

Description: Function contains the control algorithm of digital signals acquisition for valves and pumps that contain: signs of "Open", "Close" and the command "Open", "Close", "Stop". Supports work with pulse commands, i.e. can read the signal through the specified period of time.
Parameters:

IDParameterTypeMode
cmdOpenCommand "Open"BoolOut
cmdCloseCommand "Close"BoolOut
cmdStopCommand "Stop"BoolOut
stOpenPosition "Opened"BoolIn
stClosePosition "Closed"BoolIn
tCmdCommand hold time (s)IntegerIn
frqFrequency of calculation (milliseconds)IntegerIn

6. Division (div) <526>

Description: Makes division of the set of variables.
Formula:

out = (in1_1*in1_2*in1_3*in1_4*in1_5 + in2_1*in2_2*in2_3*in2_4*in2_5 + in3) /
(in4_1*in4_2*in4_3*in4_4*in4_5 + in5_1*in5_2*in5_3*in5_4*in5_5 + in6);

7. Exponent (exp) <476>

Description: Calculating the exponent under the group of variables.
Formula:

out=exp (in1_1*in1_2*in1_3*in1_4*in1_5 + (in2_1*in2_2*in2_3*in2_4*in2_5+in3) /
(in4_1*in4_2*in4_3*in4_4*in4_5+in5) )

8. Flow (flow) <235>

Description: Calculation of the gas flow.
Formula:

f = K1*((K3+K4*x)^K2);

9. Iterator (increment) <181>

Description: Iterative calculation with the increment specifying. Gain ratio for different directions is different.
Formula:

out = if( in1 > in2 ) in2 + in3*(in1-in2); 
else in2 - in4*(in2-in1);

10. Lag (lag) <121>

Описание: Задержка изменения переменной. Практически это фильтр без привязки ко времени.
Формула:

y = y - Klag*( y - x );

11. Простое умножение(mult) <259>

Описание: Простое умножение с делением.
Формула:

out=(in1_1*in1_2*in1_3*in1_4*in1_5*in1_6)/
(in2_1*in2_2*in2_3*in2_4);

12. Умножение+деление(multDiv) <468>

Описание: Разветвленное умножение+деление.
Формула:

out=in1_1*in1_2*in1_3*in1_4*in1_5*
(in2_1*in2_2*in2_3*in2_4*in2_5+(in3_1*in3_2*in3_3*in3_4*in3_5)/
(in4_1*in4_2*in4_3*in4_4*in4_5));

13. ПИД регулятор (pid) <745>

Описание: Пропорционально-интегрально-дифференциальный регулятор.
Параметры:

IDПараметрТипРежимПо умолчанию
varПеременнаяВеществен.Вход0
spЗаданиеВеществен.Вход0
maxМакс. шкалыВеществен.Вход100
minМин. шкалыВеществен.Вход0
manInРучной ввод (%)Веществен.Вход0
outВыход (%)Веществен.Возврат0
autoАвтоматBoolВход0
cascКаскадBoolВход0
KpKpВеществен.Вход1
TiТи (мс)ЦелыйВход1000
TdТд (мс)ЦелыйВход0
TfТфильтр (мс)ЦелыйВход0
HupВерхняя граница выхода (%)Веществен.Вход100
HdwnНижняя граница выхода (%)Веществен.Вход0
ZiНечувствительность (%)Веществен.Вход1
K1Коэф. входа 1Веществен.Вход0
in1Вход 1Веществен.Вход0
K2Коэф. входа 2Веществен.Вход0
in2Вход 2Веществен.Вход0
K3Коэф. входа 3Веществен.Вход0
in3Вход 3Веществен.Вход0
K4Коэф. входа 4Веществен.Вход0
in4Вход 4Веществен.Вход0
f_frqЧастота вычисления (%)ВещественныйВход1

Структура:
file:pid.png

14. Степень (pow) <564>

Описание: Возведение в степень.
Формула:

out=(in1_1*in1_2*in1_3*in1_4*in1_5)^
(in2_1*in2_2*in2_3*in2_4*in2_5 + (in3_1*in3_2*in3_3*in3_4*in3_5)/
(in4_1*in4_2*in4_3*in4_4*in4_5));

15. Выбор (select) <156>

Описание: Выбор одного из четырёх вариантов.
Формула:

out = if( sel = 1 ) in1_1*in1_2*in1_3*in1_4;
if( sel = 2 ) in2_1*in2_2*in2_3*in2_4;
if( sel = 3 ) in3_1*in3_2*in3_3*in3_4;
if( sel = 4 ) in4_1*in4_2*in4_3*in4_4;

16. Простой сумматор (sum) <404>

Описание: Простое суммирование с умножением.
Формула:

out=in1_1*in1_2+in2_1*in2_2+in3_1*in3_2+in4_1*in4_2
+ in5_1*in5_2+in6_1*in6_2+in7_1*in7_2+in8_1*in8_2;

17. Сумма с делением (sum_div) <518>

Описание: Суммирование с делением группы значений.
Формула:

out = in1_1*in1_2*(in1_3+in1_4/in1_5) + 
in2_1*in2_2*(in2_3+in2_4/in2_5) +
in3_1*in3_2*(in3_3+in3_4/in3_5) + 
in4_1*in4_2*(in4_3+in4_4/in4_5);

18. Сумма с умножением (sum_mult) <483>

Описание: Суммирование с умножением группы значений.
Формула:

out = in1_1*in1_2*(in1_3*in1_4+in1_5) + 
in2_1*in2_2*(in2_3*in2_4+in2_5) +
in3_1*in3_2*(in3_3*in3_4+in3_5) + 
in4_1*in4_2*(in4_3*in4_4+in4_5);

Ссылки

Referring pages: HomePageEn/Doc
HomePageEn/Doc/DAQ
HomePageEn/Doc/FLibComplex1
HomePageEn/Doc/ProgrammManual
HomePageEn/Doc/ProgrammManual/part5


 
There are no files on this page.[Display files/form]
There is no comment on this page. [Display comments/form]