Line 190: | Line 190: | ||
[[file:FLibComplex1_PID.png]] | [[file:FLibComplex1_PID.png]] | ||
− | + | == Power (pow) == <!--T:18--> | |
− | + | ||
− | == Power (pow) | + | |
''Description:'' Raising to the power<br/> | ''Description:'' Raising to the power<br/> | ||
''Formula:'' | ''Formula:'' | ||
Line 200: | Line 198: | ||
(in4_1*in4_2*in4_3*in4_4*in4_5));</pre> | (in4_1*in4_2*in4_3*in4_4*in4_5));</pre> | ||
− | == Selection (select) | + | == Selection (select) == <!--T:19--> |
− | ''Description:'' | + | ''Description:'' Choose one from the four options.<br/> |
''Formula:'' | ''Formula:'' | ||
<pre style="white-space: pre-wrap;"> | <pre style="white-space: pre-wrap;"> | ||
Line 209: | Line 207: | ||
if(sel = 4) in4_1*in4_2*in4_3*in4_4;</pre> | if(sel = 4) in4_1*in4_2*in4_3*in4_4;</pre> | ||
− | == Simple | + | == Simple sumator (sum) == <!--T:20--> |
− | ''Description:'' | + | ''Description:'' Simple sumator with multiplication.<br/> |
''Formula:'' | ''Formula:'' | ||
<pre style="white-space: pre-wrap;"> | <pre style="white-space: pre-wrap;"> | ||
Line 216: | Line 214: | ||
+ in5_1*in5_2+in6_1*in6_2+in7_1*in7_2+in8_1*in8_2;</pre> | + in5_1*in5_2+in6_1*in6_2+in7_1*in7_2+in8_1*in8_2;</pre> | ||
− | == Sum with | + | == Sum with division (sum_div) == <!--T:21--> |
− | ''Description:'' | + | ''Description:'' Sum with division of values group.<br/> |
''Formula:'' | ''Formula:'' | ||
<pre style="white-space: pre-wrap;"> | <pre style="white-space: pre-wrap;"> | ||
Line 225: | Line 223: | ||
in4_1*in4_2*(in4_3+in4_4/in4_5);</pre> | in4_1*in4_2*(in4_3+in4_4/in4_5);</pre> | ||
− | == Sum | + | == Sum and multiplicating (sum_mult) == <!--T:22--> |
− | ''Description:'' | + | ''Description:'' Sum with multiplication of values group.<br/> |
''Formula:'' | ''Formula:'' | ||
<pre style="white-space: pre-wrap;"> | <pre style="white-space: pre-wrap;"> | ||
Line 235: | Line 233: | ||
== User programming API == <!--T:23--> | == User programming API == <!--T:23--> | ||
− | + | The module, as an object, provides user programming functions. | |
− | + | ||
− | + | ||
<section begin=API /> | <section begin=API /> | ||
'''The object "Functions library" (SYS.Special.FLibComplex1)''' | '''The object "Functions library" (SYS.Special.FLibComplex1)''' | ||
Line 244: | Line 240: | ||
<!--T:25--> | <!--T:25--> | ||
'''The object "User function" (SYS.Special.FLibComplex1["funcID"])''' | '''The object "User function" (SYS.Special.FLibComplex1["funcID"])''' | ||
− | * ''ElTp call(ElTp prm1, ...)'' — call the function with parameters '' | + | * ''ElTp call(ElTp prm1, ...)'' — call the function with parameters ''prm{N}''. Return result of the called function. |
<section end=API /> | <section end=API /> | ||
</translate> | </translate> |
Revision as of 19:47, 28 October 2018
Module | Name | Version | License | Source | Languages | Platforms | Type | Author | Description |
---|---|---|---|---|---|---|---|---|---|
FLibComplex1 | Complex1 functions | 1.2 | GPL2 | spec_FLibComplex1.so | en,uk,ru,de | x86,x86_64,ARM | Special | Roman Savochenko Maxim Lysenko (2009) — the page translation |
Provides a library of the functions of compatibility with SCADA Complex 1 of the firm SIC "DIYA". |
Contents
[hide]- 1 Alarm (alarm)
- 2 Condition '<' (cond_lt)
- 3 Condition '>' (cond_gt)
- 4 Full condition (cond_full)
- 5 Discrete block (digitBlock)
- 6 Division (div)
- 7 Exponent (exp)
- 8 Flow (flow)
- 9 Iterator (increment)
- 10 Lag (lag)
- 11 Simple multiplication (mult)
- 12 Multiplication and division (multDiv)
- 13 PID regulator (pid)
- 14 Power (pow)
- 15 Selection (select)
- 16 Simple sumator (sum)
- 17 Sum with division (sum_div)
- 18 Sum and multiplicating (sum_mult)
- 19 User programming API
The module provides OpenSCADA for a static library of compatibility functions with SCADA Complex1 of the firm SIC "DIYA". These functions were used in Complex1 in the form of algoblocks to create in-system computations based on the virtual controller. Providing the library of these functions allows the transfer of computational algorithms from Complex1.
To address the functions of the library you can use the static call address Special.FLibComplex1.{Func}() or dynamic SYS.Special.FLibComplex1["{Func}"].call(), SYS.Special.FLibComplex1.{Func}(). Where {Func} — function identifier in the library.
Below is a description of each library function.
1 Alarm (alarm)
Description: Setting an alarm sign in case of exceeding of the variable for the specified boundary.
Formula:
out = if(val>max || val<min) true; else false;
2 Condition '<' (cond_lt)
Description: Operation of the branching according to the condition "less."
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)
Description: Operation of the branching according to the condition "great".
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)
Description: Full condition check including great, 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 Discrete block (digitBlock)
Description: The function contains a control algorithm for the collection of discrete signals for latches and pumps that contain: signs "Opened", "Closed", and commands "Open", "Close", and "Stop". The function supports the operation of pulsed commands, that is it can take a signal within a specified time interval.
Parameters:
Identifier | Parameter | Type | Mode |
---|---|---|---|
cmdOpen | Command "Open" | Bool | Output |
cmdClose | Command "Close" | Bool | Output |
cmdStop | Command "Stop" | Bool | Output |
stOpen | State "Opened" | Bool | Input |
stClose | State "Closed" | Bool | Input |
tCmd | Time of commands holding, seconds | Integer | Input |
frq | Frequency of the calculating, Hz | Integer | Input |
6 Division (div)
Description: Divides assemblies 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)
Description: Calculate an exponent over a 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)
Description: Calculation of the gas flow.
Formula:
f = K1*((K3+K4*x)^K2);
9 Iterator (increment)
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)
Description: Delay of the change of a variable, practically it is a filter without binding to time.
Formula:
y = y - Klag*( y - x );
11 Simple multiplication (mult)
Description: Simple multiplication with division.
Formula:
out = (in1_1*in1_2*in1_3*in1_4*in1_5*in1_6)/ (in2_1*in2_2*in2_3*in2_4);
12 Multiplication and division (multDiv)
Description: Branched multiplication and division.
Formula:
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 regulator (pid)
Description: Proportional-integral-differential regulator.
Parameters:
Identifier | Parameter | Type | Mode | By defaults |
---|---|---|---|---|
var | Variable | Real | Input | 0 |
sp | Setpoint | Real | Output | 0 |
max | Maximum of the scale | Real | Input | 100 |
min | Minimum of the scale | Real | Input | 0 |
manIn | Manual input, % | Real | Input | 0 |
out | Out, % | Real | Return | 0 |
auto | Auto mode | Bool | Input | 0 |
casc | Cascade mode | Bool | Input | 0 |
Kp | Kp | Real | Input | 1 |
Ti | Ti, milliseconds | Integer | Input | 1000 |
Kd | Kd | Real | Input | 1 |
Td | Td, milliseconds | Integer | Input | 0 |
Tzd | Td lag, milliseconds | Integer | Input | 0 |
Hup | Upper limit of the out, % | Real | Input | 100 |
Hdwn | Lower limit of the out, % | Real | Input | 0 |
Zi | Insensitivity, % | Real | Input | 1 |
followSp | Follow setpoint from variable on the manual mode | Bool | Input | 1 |
K1 | K input 1 | Real | Input | 0 |
in1 | Input 1 | Real | Input | 0 |
K2 | K input 2 | Real | Input | 0 |
in2 | Input 2 | Real | Input | 0 |
K3 | K input 3 | Real | Input | 0 |
in3 | Input 3 | Real | Input | 0 |
K4 | K input 4 | Real | Input | 0 |
in4 | Input 4 | Real | Input | 0 |
f_frq | Frequency of the calculating, Hz | Real | Input | 1 |
14 Power (pow)
Description: Raising to the power
Formula:
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 Selection (select)
Description: Choose one from the four options.
Formula:
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 Simple sumator (sum)
Description: Simple sumator with multiplication.
Formula:
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 with division (sum_div)
Description: Sum with division of values group.
Formula:
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 and multiplicating (sum_mult)
Description: Sum with multiplication of values group.
Formula:
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);
19 User programming API
The module, as an object, provides user programming functions.
The object "Functions library" (SYS.Special.FLibComplex1)
- ElTp {funcID}(ElTp prm1, ...) — call the library function {funcID}. Return result of the called function.
The object "User function" (SYS.Special.FLibComplex1["funcID"])
- ElTp call(ElTp prm1, ...) — call the function with parameters prm{N}. Return result of the called function.