Эта страница является
переводом страницы
IRidium studio 2019 Schemes. Перевод выполнен на 100%.
Block-schemes
Programming logic of iRidium server work with the help of logical blocks
Works only on iRidium server
The scheme editor creates programs in FDP language (functional diagrams) for PCS. FBD is one of the languages of the IEC 61131-3 standard. Our realization is not fully compatible with the standard (it will be optimized), but its basic requirements are realized.
Scheme is a set of items, values of its parameters and links (chains) between the items.
Scheme item is a minimal functional block, that does an definite operation (logical, arithmetical, delay, etc.), or provides connection of a scheme to inputs or outputs of PLC.
Block connection is a projection in the studio of phisical connection betwee items of a real electrical scheme.
It does interaction and displays logic of scheme work.
Function blocks in iRidium Studio 2019 use native implementation methods and have nothing to do with the beta version of function blocks in the old studio (versions 1.3.8 and earlier). It is impossible to convert schemes created in the old studio into the logic on new block-schemes. To edit old projects, use iRidium Studio version 1.3.8 or create logic on the new studio.
To reallize block logic iRidium studio has SCHEMES panel that allows to set block logic for iRidium server.
Tool bar:
1. Scheme template;
2. List of Inputs/Outputs blocks;
3. Work area where you can place and set blocks and link them;
4. Catalogue of logical blocks available for schemes;
5. Schemes;
6. Scheme debug panel;
7. Log of the system last launch. Source code formed on the basis of block logic;
8. Scheme properties;
9. Block properties.
1. Template (scheme template)
A template (a scheme template) allows to create a scheme and use it many times. Schemes, created inside a template, differ only in inputs and outputs. Editing a template (the logic part, the number of inputs and outputs) influence every scheme created on the basis of this template. Changing a variable that an input ot an output of the scheme requests, influences only this very scheme, keeping inputs and outputs of other schemes unique.
When you drag'n'drop logical blocks to the workspace, the first template is created. A new scheme template can be added with the help of + button.
Click on right mouse button on the scheme and you'll see a menu with the following items:
Rename - change the name of the scheme
Delete - delete the scheme
Clone - clone a template.
Export and Import of Block-schemes
Export/import of block-schemes is a tool that allows to move to a new project shemes that are often used with saved connections, values and connections to the driver.
Export of Block-schemes
1 To export a scheme, click a button that looks like a disket, a window of a file manager will opne to enter a name and choose a place to store the scheme.
Import of Block-schemes
1 Click a button with “+”, then Add from file. A window of a file manager will open to choose a file to import .
After the import is completed, the imported Template and all its schemes are opened. Value blocks keep their values. To tag, To command, From tag blocks keep their connections to a driver and (or) a token.
2. List of Inputs/Outputs blocks
The list contains blocks that are used to read and to write inside each Instance. Calculation blocks are not displayed in this list. Each element can be edited by double clicking right mouse button on it and selecting a required channel, tag, token.
When a cursor approached an element of the list there appears a popup with a full name of a tag/command.
3. Workspace
Workspace is an area there you can place logical blocks and connect them. Each input/output of a block has only one connection..
It's recommended to divide a large scheme into several separate schemes, it;s easier to test its work this way. A scheme can be effectively divided with the help of tokens, where you'll write final values after simpler schemes are done.
Creating a block and connections between blocks.
Creating a block.
A block can be added to workspace by means of "Drag&Drop". It's enough to drag a required item into the workspace and a block with a corresponding color and characteristics appers.
The following can be used as logical blocks:
- Standard logical blocks;
- Commands and feedback channels;
- Tokens (system, user).
Creating connections between blocks.
For a scheme to work, blocks are connected. A connection can be drawn the following way:
1. Set a cursor on a required input/output of a block.
2. Press left mouse button on a required input/output, hold it and start moving. The initial input/output changes its color and becomes red. Available inputs/outputs of other blocks change their color and become green.
3. Move a cursor holding left mouse button till a required input/output of another block. A connection line is drawn after a cursor.
4. Release left mouse button on the final input/output and two blocks are connected.
Scaling workspace.
Size, scalling buttons. Inscrease or decrease of workspace size
1. Field with information about the current size (in per cent). The size can be selected from one of the variants by clicking left mouse button on the down arrow.
2. Scalling buttons:
- Zoom in - increases the current size by 10%;
- Zoom out - decreases the current size by 10%;
3. Coordinates of a cursor on the X and Y axes.
4. Catalogue of logical blocks
- Math. Arithmetic functions:
- Add (+). Addition;
- Sub (-). Substraction;
- Mul (*). Multiplication;
- Div (/). Division;
- Mod (%). Remainder in division;
Bitwise logic operation:
- And. Bitwise "AND";
- Or. Bitwise "OR";
- Xor. Bitwise "XOR";
- Not. Bitwise "NOT".
- LSHIFT. bit shift to the right;
- RSHIFT. bit shift to the left;
- Logic operations. Logic operations:
- Logic And. Logic "AND";
- Logic Or. Logic "OR";
- Xor. Logic excluding "OR";
- Not. Logic "NOT".
- Input. Input data:
- Value. Constant: float 64-bit;
- From Tag. Take a value from a tag;
- From Channel. Take a value from a channel.
- Output. Output data:
- To Log. Log a value;
- To Tag. Write a value to a tag;
- To Channel. Write a value to a channel.
- Conditions. Comparison operators.
- X > Y. Greater;
- X >= Y. Greater or equal;
- X < Y. Less;
- X <= Y. Less or equal;
- X == Y. Equal;
- X != Y. Not equal.
- Selection. Selection Operators:
- IF (SEL);
- Min;
- Max;
- Clamp.
- Utility. Auxiliary blocks
- Dublicate;
- Caption;
- Timer;
- Map;
- RS - триггер;
- D - триггер;
- T - триггер;
- Avg Statistics;
- Min Statistics;
- Max Statistics;
- RGBA to сolor;
- Color to RGBA;
- Color to RGB;
- To Bool;
- To Int;
- To Float;
- Delta;
- Inc/Dec;
- Real div;
- P-регулятор;
- PI-регулятор;
- PD-регулятор;
- PID-регулятор;
- Threshold switch;
- ByteToBits;
- BitsToByte;
- TON;
- TOF;
- TP;
- Multiplexer;
- Selector;
- AvgMedian;
- PulseGenerator;
- Set interval;
- Valve control.
Math.Arithmetic functions.
- Add (+) - Addition.
- Sub (-) - Substraction.
- Mul (*) - Multiplication.
- Div (/) - Division.
- Mod (%) - Remainder in division.
- Abs - absolute input value.
Add (+). Addition
Add(+) Addition is an arithmetic operation by means of which from two or more numbers a total is received. It has two inputs and one output.
Sub(-). Substraction
Sub(-) Substraction is an arithmetic operation by means of which a certain number is taken from another number. It has two inputs and one output.
Mul(*). Multiplication
Mul(*) Multiplication is an arithmentic operation of repeating a given number by another number, miltiplier. It has two inputs and one output.
Div(/). Division
Div(/) Division is an arithmetic opeation that shows how many times one number contains another number. It has two inputs and one output.
Multiplication and division helps with converting from different calculation systems.
Mod (%). Division with remainder
Mod (%) Division with remainder is division of one natural number by another one and the remainder is not equal to zero. It has two inputs and one output.
Abs. Absolute input value
Abs The block diplayes absolute input value. It's used to exclude a negative value.
Input:
Output:
- Out - absolute input value.
Bitwise logic operation.
- And - Bitwise "AND";
- Or - Bitwise "OR".
- Xor - Bitwise "XOR".
- Not - Bitwise "NOT";
- LSHIFT - bit shift to the left
.
- RSHIFT - bit shift to the right.
And. BitwiseП «AND»
And. Bitwise «AND» is a binary operation, its result is equivalent to the use of logical «AND» to each pair of bits that are in identical positions in binary values of incoming signals. In other words, if both bit values of incoming signals are 1, the resulting binary bit is 1; if at least one of the bits is 0, the resulting binary bit is 0. It has two inputs and one output.
Input 1 Input 2 |
11001010 11100010
|
| Output |
11000010
|
Or. Bitwise «OR»
OR. Bitwise «OR» is a binary operation, its action is equivalent to the use of logical «OR» to each pair of bits that are in identical positions in binary values of incoming signals. In other words, if both bit values of incoming signals are 0, the resulting binary bit is 0; if at least one of the bits is 1, the resulting binary bit is 1. It has two inputs and one output.
Input 1 Input 2 |
11001010 11100010
|
| Output |
11101010
|
Xor. Bitwise «XOR»
Xor. Bitwise«XOR» is a binary operation, the result of which is 1, if the number of added single bits is uneven, and 0 if the number is even. In other words of both bit values of incoming signals are equal to each other, the result is 0; otherwise the result is 1. It has two inputs and one output.
Input 1 Input 2 |
11001010 11100010
|
| Output |
00101000
|
Not. Bitwise «NOT»
Not. Bitwise "NOT" inverts the instance of each bit if the initial variable. It has one input and one output.
| Input 1 |
11001010
|
| Output |
00110101
|
LSHIFT. Bit shift to the left
LSHIFT. Bit shift to the left - shifts to the left by a bit.
See detailed description below in RSHIFT (it's the same as RSHIFT, the only difference is the direction of the shift).
RSHIFT. Bit shift to the right
RSHIFT. Bit shift to the right - shifts to the right by a bit.
Inputs:
- Value - 32-bit unsigned (it's important) - input value
- Count - the number of bits to which a shift must be made.
Outputs:
- Out - the result of bit shift.
Block properties:
- Cyclic - it turns on the cyclic character of a shift (False/True).
Logic: If a shift is cyclic (Cyclic = 1), the last Count bits become the first ones.
Example: 15 (00000000 00000000 0000000 000011112) RHIFT 2 = 3221225475 (11000000 00000000 00000000 000000112).
If a shift is not cyclic (Cyclic = 0), the value shifts to the right, and the first Count bits become zeros. (The behavoir is the same as that of an operator >> in С, С++, C# languages, etc).
Logic operations.
- Logic And - logic "AND".
- Logic Or - logic "OR".
- Logic Xor - logic excluding "OR".
- Logic Not - logic "NOT".
Logic «And»
Logic «And» is a logic operation that compares two values and returns false if at least one of the values is false. In other words, if both values of incoming signals are not equal to 0, the result is equal to 1; if at least one of the values is equal to 0, the result will be equal to 0. It has two inputs and one output.
Input 1 Input 2 |
10 15
|
| Output |
1.0000
|
Logic «Or»
Logic «Or» is a logic operation that compares two values and returns true, if at least one of the values is true. In other words, if both incoming values are equal to 0, the result is equal to 0; if at least one of the calues is not equal to 0, the result is equal to 1. It has two inputs and one output.
Input 1 Input 2 |
120 0
|
| Output |
1.0000
|
Xor. Logic excluding «OR»
Xor. Logic excluding «OR» is a logic operation that compares two values and returns true, if one value is true and the other is false. In other words, if both values are equal to 0, or if both values are not equal to 0, the result is equal to 0; otherwise, the result is equal to 1. It has two inputs and one output.
Input 1 Input 2 |
215 0
|
| Output |
1.0000
|
Not. Logic «NOT»
Not. Logic «NOT» is a logic operation that returns true if a value is equal to 0 and false if a value is not equal to 0. It has one input adn 1 output.
Input. Input data.
Value
Value - Constant: float 64-bit. It has one output that is connected to a calculation block or exit block.
It has the following properties:
- Name - block name.
- Type - block type (Value).
- Value - numerical value. The maximum number of digits before a point is 9, after a point 2.
From Tag
From Tag - Element that allows to take values from feedback channels, tokens for further work in a scheme.
It has the following properties:
- Name - block name.
- Type - From Tag.
- Value - Displays the address of a feedback channel.
From Channel
From Channel - Element that allows to take values from channels, tokens for further work in a scheme.
It has the following properties:
- Name - block name.
- Type - From Channel.
- Value - it displayes channel address.
Output. Outgoing data.
- To Log.
- To Tag.
- To Channel.
To Log
To Log - To write a value in log is displayed in the window of last scheme launch (9).
To Tag
To Tag - To write a value in a driver tag, virtual channel, token.
To Channel
To Channel - To write a value in a driver command, virtual channel, token.
Conditions. Comparison operators.
Return false/true, as a result of comparison.
- X > Y. Greater.
- X >= Y. Greater or equal.
- X < Y. Less.
- X <= Y. Less or equal.
- X == Y. Equal.
- X != Y. Not equal.
X>Y. Greater
X>Y. Greater - the operator shows True on the output if X value is greater than Y. Otherwise it shows false.
X>=Y. Greater than or equal
X>=Y. Greater or equal - the operator shows True on the output if X value is greater than or equal to Y. Otherwise it shows false.
X<Y. Less
X<Y. Less - the operator shows True on the output if X value is less than Y. Otherwise it shows false.
X<=Y. Less than or equal
X<=Y. Less or equal - the operator shows True on the output if X value is less than or equal to Y. Otherwise it shows false.
X == Y. Equal
X == Y. Equal - the operator compares X and Y values, it shows True if they are equal. Otherwise it shows false..
X != Y. Not equal to
X != Y . Not equal - the operator compares X and Y values, it shows False if they are not equal. Otherwise it shows true.
Selection. Selection Operators.
Returns a value that satisfies the block condition:
- IF (SEL);
- Min;
- Max;
- Clamp.
IF (SEL)
SEL – the function selects one of two inputs depending on the value of the first IF input.
Inputs:
- IF - (BOOL) - Selection of input value;
- TRUE(THEN) - (Any) - Input value;
- FALSE(ELSE) - (Any) - Input value.
Outputs:
- OUT - (Any) - Output value.
Logic:
Depending on the income value on IF:
- In case IF = 0, the value of the FALSE(ELSE) input is displayed on the OUT output.
- In case IF = any value that is not 0, the value of TRUE(THEN) input is displayed on the OUT output.
Min
Min - calculating the less of the two.
Inputs:
- In1 - input of value 1;
- In2 - input of value 2.
Outputs:
- Out - the min value of the two input ones.
Max
Max - calculating the greater of the two
Inputs:
- In1 - input of value 1;
- In2 - input of value 2.
Outputs:
- Out - the max value of the two input ones.
Clamp
Clamp - limits a value with a range min >= value <= max.
Inputs:
- Min - minimum range value;
- Max - maximum range value;
- Value - input value.
Outputs:
Logic:
- If a value is greater than the maximum one, the maximum value is returned.
- If the value is less than the minumum one, the minimum value is returned.
- Formula: Out = max(min(Value, Max), Min)
Other. Auxiliary blocks.
- Duplicate;
- Caption;
- Timer;
- Map;
- To Bool;
- To Int;
- To Float;
- Color to RGBA;
- RGBA to Color;
- Delta;
- Threshold switch;
- Inc/Dec.
Duplicate
Duplicate – copies the input value. It has up to 8 outputs which copies the input value.
Caption
Caption - functions as a message block that can be placed in the workspace. It can also be used for notes inside a scheme.
It has the following properties:
- Name - block name.
- Type - From Tag.
- Value - Value to display on the block.
Timer
Timer - the element send the value of the incoming signal till 0 comes to the “Switch” input. As soon as a signal greater than 0 comes to the input, the block starts working and sends "In 1" value to the output, repeating it with a set interval.
It has the following properties:
- Name - block name.
- Type - From Tag.
- Value - Interval to send a value again (ms).
Map
Map - converts a value from one range into another one.
Inputs:
Outputs:
Block properties:
- From min - the minimum value of the initial range$
- From max - the maximum value of the initial range
- To min - the minimum value of the new range
- To max - the maximum value of the new range
Logic:Conversion formula: Out = ([Val] - [From min]) * ([To max] -[To min]) / ([From max] -[From min]) +[To min];
SR NOR latch
Trigger is a device that has two stable states («0» or «1») and that can jump from one stable state to the other under the influence of the incoming signal. A trigger is a simple machine with a memory that can store 1 bit of information («0» or «1»).
SR NOR latch - The distinctive feature of the latch as a functional device is capability to remember binary information. The memory of the latch is a capability to stay in one of the two states after the switching signal is turned off. By accepting one state for «1» and the other for «0», the latch can be considered to store (remember) one bit of the number written in the binary code.
Inputs:
Outputs:
- Q - direct output;
- |Q - inverted output.
Logic: A logic device is in a stable state in case С=0. In this case impulses sent to the information D-input do not influence the device and the output impulse is determined by the value written earlier that is stored in the memory. If С=1, the output signal depends on the signal that was sent to the information D-input. If D=1, the output is 1, if D=0, the output is 0.
Truth table.
Gated D latch
'Gated D latch 'got its name from the English word «delay» that is realized by sending signals to the synchronization output. There were two input signals in RS-trigger. But to send a binary code it's enough to have one input with different voltage: high (1) and low (0). 1 could not be sent to two inputs at the same time, that's why, these inputs are united in D-trigger with the help of an inverter (see pic, 1 а), it excludes a possibility for a forbidden state to appear.
Inputs:
- D - input (0/1)
- C - synchronization input, flag (0/1)
Outputs:
Logic: A logic device is in a stable state in case С=0. In this case impulses sent to the information D-input do not influence the device and the output impulse is determined by the value written earlier that is stored in the memory. If С=1, the output signal depends on the signal that was sent to the information D-input. If D=1, the output is 1, if D=0, the output is 0.
Truth table.
T - Trigger
To appear soon.
T - trigger - it rea;izes logic of
asynchronous T-trigger.
Asynchronous T-trigger does not have count enable input - T, and it is switched at every clock pulse at the C input.
Inputs:
- In - boolean (0/1) input.
Outputs:
- Out - boolean (0/1) output.
Logic:Value (0/1) is stored in the memory and is asent to the output if In = 0. IF In = 1, the value in the memory is inverted and sent to the Out.
Truth table.
Avg Statistics
Avg Statistics - keeps track of statistics of the average value.
Inputs:
- Value - the current value
- Reset - flag (0/1), where 1 is resetting the average value to the value from the Value input
Outputs:
- Avg - the average value of all sent earlier (when Reset = 0). Value from the Value input (when Reset = 1).
Logic: It works in a similar way with the MinStatistics and MaxStatistics blocks. This block has a memory that stores the current average value. If Reset = 1 the block is in the reset mode. It means that a value from the input is sent to the output. If Reset = 0, the block is in the mode to gather statistics. It means that the average of the two values one from the memory and one from the input is sent to the output. The memory of the block works the same way as the memory of MinStatistics and MaxStatistics blocks: it stores the value that was sent to the output the previous time.
When the block is used for the first time (there is no prevous value in the memory), a value from the Value input it sent to the output and the same value is saved in the memory.
Min Statistics
Min Statistics - it keeps track of the statistics of min value.
Inputs:
- Value - the current value
- Reset - flag (0/1), where 1 is resetting the min value to the value from the Value input
Outputs:
- Max - the min value of all sent earlier (when Reset = 0). Value from the Value input (when Reset = 1).
Logic: This block has a memory that stores the current min value. If Reset = 1 the block is in the reset mode. It means that a value from the input is sent to the output. If Reset = 0, the block is in the mode to gather statistics. It means that the min of the two values one from the memory and one from the input is sent to the output. The memory of the block works quite simply: it stores the value that was sent to the output the previous time.
When the block is used for the first time (there is no prevous value in the memory), a value from the Value input it sent to the output and the same value is saved in the memory.
Max Statistics
Max Statistics - it keeps track of the max value.
Inputs:
- Value - the current value
- Reset - flag (0/1), where 1 is resetting the max value to the value from the Value input
Outputs:
- Max - the max value of all sent earlier (when Reset = 0). Value from the Value input (when Reset = 1).
Logic: It works in a similar way with the MinStatistics block. This block has a memory that stores the current max value. If Reset = 1 the block is in the reset mode. It means that a value from the input is sent to the output. If Reset = 0, the block is in the mode to gather statistics. It means that the max of the two values one from the memory and one from the input is sent to the output. The memory of the block works the same way as the memory of MinStatistics block: it stores the value that was sent to the output the previous time.
When the block is used for the first time (there is no prevous value in the memory), a value from the Value input it sent to the output and the same value is saved in the memory.
RGBA to сolor
RGBA to Color - block that converts color components (Red, Green, Blue, Alpha) into 32-bit unsigned integer RgbaColor.
Inputs: (values of each input vary from 0 to 255)
- Red - red channel;
- Green - green channel;
- Blue - blue channel;
- Alpha - alpha-channel.
Outputs:
- RgbaColor - 32-bit unsigned integer in 0xRRGGBBAA format.
Color to RGBA
Color to RGBA - conversion contrary to RGBA to Color, from 0xRRGGBBAA format to separate values for Red, Green, Blue, Alpha.
Inputs:
- RgbaColor - 32-bit unsigned integer in 0xRRGGBBAA format.
In case 24 bits is sent, the Alpha value is 0xFF, thus, you get 32-bit value 0xRRGGBBFF
Outputs: (values from 0 to 255)
- Red - red channel;
- Green - green channel;
- Blue - blue channel;
- Alpha - alpha-channel.
Color to RGB
Color to RGB is converstion from the 0xRRGGBB format to separate values Red, Green, Blue.
Inputs:
- RgbaColor - 32-bit unsigned integer in the 0xRRGGBBAA format.
In case 24 bits is sent, the Alpha value is 0xFF, thus, you get 32-bit value 0xRRGGBBFF
Outputs: (values from 0 to 255)
- Red - red channel;
- Green - green channel;
- Blue - blue channel;
To Bool
To Bool - automatic conversion to Bool.
Inputs:
Outputs:
- Out - output. Conversion to Bool.
To Int
To Int - automatic conversion to Int.
Inputs:
Outputs:
- Out - output. Conversion to Int.
To Float
To Float - automatic conversion to Float.
Inputs:
Outputs:
- Out - output. Conversion to Float.
Delta
Delta - delta of input value.
Inputs:
Outputs:
- Value - output value;
- RisingEdge - flag (0/1), 0 - value is not increased, 1 - value is increased;
- FallingRange - flag (0/1), 0 - value is not decreased, 1 - value is decreased.
Properties:
Logic: the input value is compared with a preious value stored in the block memory, if the difference between the input value and the previous value of the module is greater than Delta the value is sent to the Value output, if not the previous value stored in the memory is sent to the output.
Inc/Dec
Inc/Dec - increases (if Step > 0) or decreases (if Step < 0) the input value by the value of the step.
Inputs:
- Value - input value;
- Control - flag (0/1) - not to increase / increase.
Outputs:
Properties:
Logic:
- if Control = 0, input value is returned to the output;
- if Control = 1, Value + Step is returned.
Real div
Real div, division with remainder, is a math operation where a number is divided by the other number with a decimal fraction as a result.
It has two input channels and one output channel.
Multiplication and division can help you with converting data from one measure systemt to another.
P-Regulator
P-regulator -- it realizes logic of P-controller.
Inputs:
- ACT - regulated value;
- SET - set value;
- SUP - dead-band;
- OFS - shift;
- MAN_IN - signal of manual input;
- MAN - control mode 1/0 (manual/automatic);
- KP - gain ratio of P-component;
- LL - low limit of the control signal;
- LH - high limit of a control signal.
Outputs:
- Y - control magnitude;
- DIFF - error signal;
- LIM - flag 1/0 «limit for Y is reached».
Logic:
See more page 550.
PI-Regulator
PI-regulator - it realizes logic of PI-controller.
Inputs:
- ACT - regulated value;
- SET - set value;
- SUP - dead-band;
- OFS - shift;
- MAN_IN - signal of manual input;
- MAN - control mode 1/0 (manual/automatic);
- RST - reset signal of И-component 1/0;
- KP - gain ratio of P-component;
- KI - gain ratio of I-conmponent;
- LL - low limit of the control signal;
- LH - high limit of a control signal.
- dT - delta time - time between measurements (required for integration).
Outputs:
- Y - control magnitude;
- DIFF - error signal;
- LIM - flag 1/0 «limit for Y is reached».
Logic:
See more page 550.
PD-Regulator
PD-regulator - it realizes logic of PD-controller.
Inputs:
- ACT - regulated value;
- SET - set value;
- SUP - dead-band;
- OFS - shift;
- MAN_IN - signal of manual input;
- MAN - control mode 1/0 (manual/automatic);
- RST - reset signal of I-component 1/0;
- KP - gain ratio of P-component;
- KD - gain ratio of D-conmponent;
- LL - low limit of the control signal;
- LH - high limit of a control signal.
- dT - delta time - time between measurements (required for integration).
Outputs:
- Y - control magnitude;
- DIFF - error signal;
- LIM - flag 1/0 «limit for Y is reached».
Logic:
See more page 550.
PID-Regulator
PID-regulator - it realizes logic of PID-controller.
Inputs:
- ACT - regulated value;
- SET - set value;
- SUP - dead-band;
- OFS - shift;
- MAN_IN - signal of manual input;
- MAN - control mode 1/0 (manual/automatic);
- RST - reset signal of И-component 1/0;
- TN - constant of integration time;
- TV - constant of differentiation time ;
- KD - gain ratio of D-conmponent;
- LL - low limit of the control signal;
- LH - high limit of a control signal.
- dT - delta time - time between measurements (required for integration).
Outputs:
- Y - control magnitude;
- DIFF - error signal;
- LIM - flag 1/0 «limit for Y is reached».
Logic:
See more page 550.
Threshold switch
Threshold switch - Threshold switch.
Inputs:
- In - input value;
- Threshold - threshold value;
- Range - range.
Outputs:
- Out - output boolean value (0/1).
Logic: if the value differs from the Threshlod value of the module not greater than the Range value, 1 is returned, otherwise 0 is returned
Formula: Out = | In - Threshold | <= Range
ByteToBits
ByteToBits - conversion of a set of byte on the input to a set of bites on the output.
Входы:
Outputs:
- Out1 - bit 1 (count starts from the end, for example, this output will display the value of bit 1 for 00000001),
- Out2 - bit 2,
- Out3 - bit 3,
- Out4 - bit 4,
- Out5 - bit 5,
- Out6 - bit 6,
- Out7 - bit 7,
- Out8 - bit 8.
BitsToByte
ByteToBits - conversion of a set of bits on the input to a byte on the output.
Inputs:
- In1 - bit 1 (count starts from the end, for example, this input will display the value of bit 1 for 00000001),
- In2 - bit 2,
- In3 - bit 3,
- In4 - bit 4.
- In5 - bit 5,
- In6 - bit 6,
- In7 - bit 7,
- In8 - bit 8.
Outputs:
- Out is an output byte made from input bits.
TON
TON realizes timer logic with a turn-on delay.
Inputs:
- In - boolean input (0/1).
Outputs:
- Out - boolean output (0/1).
Proterties:
- Interval (ms) - a turn-on delay (in ms).
Logic: If In input = 1, the timer starts working. An interval later the timer sends 1 to the output (it sent 0 before that).
TOF
TON realizes timer logic with a turn-off delay.
Inputs:
- In - boolean input (0/1).
Outputs:
- Out - boolean output (0/1).
Proterties:
- Interval (ms) - a turn-off delay (in ms).
Logic: If In input = 0, the timer starts count down. An interval later the times sends 0 to the output (it sent 1 before that).
TP
TP is a block that realizes logic of TP timer.
Inputs:
Outputs:
Proterties:
- Interval (ms) - a period of time (in ms).
Logic: A TP block sends an inpulse of a set length (Interval (ms)) when the input is activated. A second impulse does not continue the closed state.
Multiplexer
Multiplexer is a block that realizes logic of a multiplexer.
Inputs:
- Control - control input вход контроля (insigned integer),
- In1-8 - signal inputs.
Outputs:
- Out - a value from one of the signal inputs.
Logic: An unsigned integer, an index of a signal input from which a value must be sent to an output, is sent to the Control input. The index can be a number from 1 to 8 (inclluding) and it corresponds to the number of signal inputs.
Selector
Selector is a block that stores a value that can be increased/decreased with a Step, it can also set a new value from the Set input (when Reset is equal to 1). In cases when the initial value is not set (for example, Reset = and there is no previous value) a value of MinValue property is sent to the output and stored in the block memory.
Inputs:
- Inc - increase (1/0);
- Dec - descrease (1/0);
- Set - a value to set;
- Reset - set a value from the Set input as the current one (1/0).
Outputs:
Properties:
- MinValue - the min value;
- MaxValue - the max value;
- Step - an increase/descrese step;
- Cyclic - if Cyclic is 0, and a value exceeds the limits (MinValue, MaxValue), MinValue or MaxValue correspondingly is sent to the output (limitation like in the Clamp block); if Cyclic is 1, and a value exceeds the limits (MinValue, MaxValue), a value with a cyclic shift is sent to the output (for example: MinValue = 3, MaxValue = 6, Step = 4, Inc = 1, Dec = 0; 4 is sent to the output).
A shift to exceed the lower limit is calculated according to the formula below:
- Out = MaxValue - ( |MinValue - CurrentValue| mod |MaxValue - MinValue| ),
A shift to exceed the upper limit is calculated according to the formula below::
- Out = MinValue + ( |CurrentValue - MaxValue| mod |MaxValue - MinValue| ),
where CurrentValue is a current value that must be sent to the output.
AvgMedian
AvgMedian is a block that counts an average value by excluding values that are not in the 3* sigma area.
Inputs:
Outputs:
PulseGenerator
PulseGenerator is a generator of impulses.
Inputs:
Outputs:
Properties:
- Interval (ms) - an interval between impulses (in milliseconds);
- Duration (ms) - duration of impulses (in milliseconds).
Logic: it gives true on the output of set duration and with a set interval, as long as the conrtol input is true.
Set interval
Set interval - realizes logic of sending a value with an interval.
Inputs:
Outputs:
Proterties:
- Interval (ms) - a period of time in milliseconds.
Logic: it sends a value from In input to Out output each time at the end of an interval, if the interval is not over yet, 0 is sent.
Valve control
Valve control realizes logic of valve control.
Inputs:
- In - input (any floatpoint values).
Outputs:
Properties:
- Preventative closing(bool) - prophylactic closing of a valve;
- Interval (hours) - an interval in hours when a valve must be closed for prophylictic purposes;
- Duration (ms) - how long a valve must be closed in milliseconds.
Special feature of the block: it work correctly only in the mode of scheme update at interval.
Logic:
"To close a valve" means that 0 is sent to the output as long as "the valve is closed". When the "valve is open", a value from the In input is sent to the Out output.
If Preventative closing is true, the block is in the working state. It will “close a valve” at an Interval of hours for a period of time in milliseconds - Duration.
If Preventative closing is false, the block simply sends a value from the In input to the Out output.
5. Schemes
Schemes are copies of the initial template where it is possible to change paths of commands and feedback channels (Inputs/Outputs tab). One and the same scheme can be used as a standard logic scene for different commands and feedback channels.
Changing blocks that are respobsible for logic leads to changes in other blocks of a template.
Each scheme contains its own list of blocks Inputs/Outputs(IO). IO are unique variables that a scheme accesses. A scheme can be added in two ways:
1. Add
- by pressing "+" blocks and connections are copied. A path to a channel/tag/token is not copied.
2. Clone
- by pressing this button the whole scheme is copied. A path to a channel/tag/token is not copied.
6. Panel to debug scheme
Buttons to debug scheme.
Buttons can debug only the current scheme. The work of a scheme can be tested without launching a project.
Launch - launching a scheme, testing its work. Errors or log results can be seen in the log field.
Clear log - deletes records from the log field.
7. Log of the last scheme launch. Initial code formed on the basis of block logic
Log of scheme launch
Displays information with the results of calculation block work, errors of scheme work. For calculation information to be displayed in this field, connect "To Log" block to the output of the calculation block.
Initial code formed on the basis of block logic
If you select "Code" tab, you'll see a code formed on the basis of block logic.
Initial code formed on the basis of block logic. It's purely informative.
8. Scheme properties
- Name,
- Active:
- Run Mode:
- On Tag Change,
- By Interval.
Name - Scheme name.
Active - Scheme state. True - the scheme works, calculations are done inside a scheme. False - the scheme is inactive, no calculations are done.
Run Mode - A mode to launch a scheme has the following parameters:
On Tag Change - scheme launch when a value in a tag (token) is changed;
By Interval - scheme launch at a set interval. Interval parameter is added to scheme properties, time is set in miliseconds. For a scheme to launch one time at a server start, set 0.
9. Block properties
Block properties diplays working parameters of a block. There are two obligatory parameters, Name and Type. Some types of blocks may also have the Value parameter.
Name - Block name.
Type - block type, selected in a scheme. The type can be changed manually in the drop down menu, block type changes and it is displayed in a scheme.
- Value - In some types of blocks Value can be set in a numeral value, or a path to a tag, channel, token can be indicated.