20 - 06 - 2019

Debug the process

Debug the process:

When the diagram is complicated and with many blocks, some time where is a question what happened with block's inputs/outputs. It is very easy to answer this question by pressing the Debug button.

Debug tool is exceptional powerful and we can use it when we design and test the diagram!

Diagram objects

Adding graphical elements to the diagram:

All the graphical objects can be added from the main application bar:

The graphical objects are:  Functional blocks, Controls and Common purpose graphical objects.

 

Functional blocks:

The blocks are grouped in libraries according to their theirs functions. Double click over the block in order to add it:

 

 

Controls:


Some controls are graphical objects which can visualize values from controlled/modelled process – Lamp, TextOut, Image... Another group of controls is human controlled input for the system, like Button, CheckBox, RadioButtons... Double click over the control in order to add it.

 

 

Common purpose graphical objects:

They are: Text, Bitmap, Color invertor, Color line, Transparent.

 

All the blocks and controls have unique names. It is impossible to grant a name of block or control, which doesn't already exists.

 

WEB Camera

Working with WEB cam

To see an image from WEB cam at the diagram is very easy, just click a third top icon Other and add a WebCam.

 

Resize it to needful size, click the right mouse button over it and choose at the property WebCam one of the installed WEB cams on your computer. When the diagram runs, the image from the selected camera will be shown on screen.

 

 

 

 

Text Formatting Conception

Text Formatting Conception:

Most of the blocks are designed to be universal and inputs with different types of signals can be added to them. Sometimes we need to format text with the values of the inputs. For example, if we are monitoring one temperature sensor and two PIR sensors (infrared sensors) and if there is an event as opened door, the diagram have to send an e-mail with values of the temperature and PIR sensors. We have to add a MailSender block to the diagram with three inputs:


- PIR1 (digital value);

- PIR2 (digital value);

- Temp (analog value);

The BODY of the sending e-mail can be:

Current temperature is 23.5 [C]
The bedroom door is: Closed
The living room door is: Open

This can be achieved by adding formatting tags to the text, which will change the contents of tags to the value of the inputs. For example:

Current temperature is <Temp;2> [C]
The bedroom door is: <PIR1;Open;Closed>
The living room door is: <PIR2;Open;Closed>

When the time comes to send an email, the following will happen:
- Tag <Temp;2> will be replaced with value of input Temp with two digits after the decimal separator;
- If the PIR1 or PIR2 inputs are at high level, their tag will be replaced with the Open string, if they are at a low level, they will be replaced with the Closed String;

Formats:
The formats for the different input types are described below. The basic rules are:
- tags always start with < and end with >
- the first parameter in the tag is always the name of the input, the parameters after the name are separated by ;
- all the parameters after the InputName are not required;

1. Digital values:
<InputName;OnValue;OffValue;WholeStringLen;LeftFillChar;RightFillChar>
- InputName - name of the input;
- OnValue - the value of the TAG if the input is in high level. If this parameter is not added, the TAG will be replaced with the default value On
- OffValue - the value of the TAG if the input is in low level. If this parameter is not added, the TAG will be replaced with the default value Off
- WholeStringLen - if this parameter is entered, the tag will be replaced by a string with the specified length;
- LeftFillChar - only one character can be entered for this parameter. The TAG will be replaced with a string with added LeftFillChar on the left side, until the length WholeStringLen is reached;
- RightFillChar - only one character can be entered for this parameter. The TAG will be replaced with a string with added RightFillChar on the right side, until the length WholeStringLen is reached;

2. Analog values:
<InputName;DigitsAfterDecimalSeparator;DecimalSeparator;WholeStringLen;LeftFillChar;RightFillChar>
- InputName - name of the input;
- DigitsAfterDecimalSeparator - digits after the decimal separator. Default value is 2;
- DecimalSeparator - this parameter can be only one character and is the decimal separator. The default value is a dot: .
- WholeStringLen - if this parameter is entered, the tag will be replaced by a string with the specified length;
- LeftFillChar - only one character can be entered for this parameter. The TAG will be replaced with a string with added LeftFillChar on the left side, until the length WholeStringLen is reached;
- RightFillChar - only one character can be entered for this parameter. The TAG will be replaced with a string with added RightFillChar on the right side, until the length WholeStringLen is reached;

3. Integer values:
<InputName;FormatType;WholeStringLen;LeftFillChar;RightFillChar>
- InputName - name of the input;
- FormatType, this parameter can be 0 - Decimal, 1 - Binary, 2 - Hex. It specifies whether the value of the input should be converted to decimal, binary or HEX string. Default value of the parameter is 0;
- WholeStringLen - if this parameter is entered, the tag will be replaced by a string with the specified length;
- LeftFillChar - only one character can be entered for this parameter. The TAG will be replaced with a string with added LeftFillChar on the left side, until the length WholeStringLen is reached;
- RightFillChar - only one character can be entered for this parameter. The TAG will be replaced with a string with added RightFillChar on the right side, until the length WholeStringLen is reached;

4. String values:
<InputName;WholeStringLen;LeftFillChar;RightFillChar>
- InputName - name of the input;
- WholeStringLen - if this parameter is entered, the tag will be replaced by a string with the specified length;
- LeftFillChar - only one character can be entered for this parameter. The TAG will be replaced with a string with added LeftFillChar on the left side, until the length WholeStringLen is reached;
- RightFillChar - only one character can be entered for this parameter. The TAG will be replaced with a string with added RightFillChar on the right side, until the length WholeStringLen is reached;

5. DateTime values:
<InputName;DateTimeFormat;WholeStringLen;LeftFillChar;RightFillChar>
- InputName - name of the input;
- DateTimeFormat - this ia a format of the DataTime input value and is described below, by default is: dd.MM.yyyy
- WholeStringLen - if this parameter is entered, the tag will be replaced by a string with the specified length;
- LeftFillChar - only one character can be entered for this parameter. The TAG will be replaced with a string with added LeftFillChar on the left side, until the length WholeStringLen is reached;
- RightFillChar - only one character can be entered for this parameter. The TAG will be replaced with a string with added RightFillChar on the right side, until the length WholeStringLen is reached;

 

All the possible elements of the DateTimeFormat parameter are:

d - One-digit or two-digit day
dd - Two-digit day
ddd - Three-character day of the week abbreviation (for example, Mon or Tue)
dddd - Full day of the week name (for example, Monday or Tuesday)
h - One-digit or two-digit hour in 12-hour format
hh - Two-digit hour in 12-hour format
H - One-digit or two-digit hour in 24-hour format
HH - Two-digit hour in 24-hour format
m - One-digit or two-digit minute
mm - Two-digit minute
M - One-digit or two-digit month
MM - Two-digit month
MMM - Three-character month abbreviation (for example, Jan or Feb)
MMMM - Full month name (for example, January or February)
s - One-digit or two-digit second
ss - Two-digit second
y - One-digit year
yy - Two-digit year
yyyy Four-digit year

Examples for DateTimeFormat if the DateTime value is 27 July 2018 18:24:35
- dd.MM.yyyy will be replaced with 27.07.2018
- dd MMM yyyy hh:mm:ss will be replaced with 27 Jul 2018 18:24:35

 

TCP/IP Server

Start/Stop TCP/IP Server.

The application has a TCP/IP Server which makes it a very powerful instrument for remote control and remote monitoring. The server can be started from the TCP/IP Server icon from main application bar. The default port of the server is 707. All the messages received from TCP/IP server are shown on the right blue area with dark blue color. When the TCP/IP server starts for first time, Windows FireWall will ask the user for allowance for an internet access and the user has to allow it.

When the TCP/IP Server is started, the icon of the button is changed to Stop Server.

Up to now two blocks that can work with TCP/IP Server have been developed. They allow the application to obtain information from a mobile phone with Android operating system. This information can be the data from the phone’s sensors, such as orientation, magnetic field, GPS, temperature, etc. An android application with several buttons is represented as a block with digital outputs and is suitable for remote control. The feedback from the SCADA can be sent to the phone as analog signal values. You can find these block in the Android blocks library.

 

TCP/IP Server settings:

 

The settings for TCP/IP Server can be made from TAB Settings, button Common Settings:

  • IP Port - the IP Port of the TCP/IP Server. Its default value is 707;
  • AutoStart TCP/IP Server - if the checkbox is checked, when the AltonaLab application starts, the TCP/IP Server will be started automatically;