OpenSCADA

Modules/FLibComplex1

English • ‎mRussian • ‎Українська
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 DIYA Ltd.

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.

Contents

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

Structure:
FLibComplex1 PID.png

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)

The object "User function" (SYS.Special.FLibComplex1["funcID"])

Modules/FLibComplex1/en - GFDLDecember 2024OpenSCADA 1+r3000